NEWS
LinuxCNC 2.5.2 Release
There are no translations available.

LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release
There are no translations available.

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
There are no translations available.

New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 

Welcome, Guest
Username: Password: Remember me

TOPIC: 4th axis tangent to path XY

Re:4th axis tangent to path XY 19 Sep 2011 09:41 #13303

  • ioiotutu
  • ioiotutu's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 30
  • Karma: 1
Hi,
I compiled the file following your instructions and the kinematics move A axis automatically!

The angle was in radiant so i changed angle calculation on the file (see the attached file).



Is it possible lock and unlock the A axis runtime?
I mean, start the program normally withouth A automatically moved and activate the angle automatic movement only in some parts of the program.


In the next few days i can test the kinematics on a real machine.

Thanks.
The administrator has disabled public write access.

Re:4th axis tangent to path XY 19 Sep 2011 09:43 #13304

  • ioiotutu
  • ioiotutu's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 30
  • Karma: 1
Modified file.

Sorry. This attachment is hidden for guests. Please log in or register to see it.
Attachments:
  • Attachment This attachment is hidden for guests. Please log in or register to see it.
The administrator has disabled public write access.

Re:4th axis tangent to path XY 19 Sep 2011 11:29 #13311

  • andypugh
  • andypugh's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 4125
  • Thank you received: 141
  • Karma: 129
ioiotutu wrote:
Is it possible lock and unlock the A axis runtime?
I mean, start the program normally withouth A automatically moved and activate the angle automatic movement only in some parts of the program.

Yes. You would need to create a HAL pin in the rtpi_app_main function, then link that pin to something in the HAL file (motion.spindle-on would work, but remember that you need to have S > 0 for M3 to change the value of that pin) then modify the kinematics code to act on the value of that pin.

Alternatively, instead of using a pin in HAL to change the mode, you could use a user-defined M-code and a shell script containing
setp tangentkins.auto 1

How much of this needs further explanation? This attachment is hidden for guests. Please log in or register to see it.
Attachments:
  • Attachment This attachment is hidden for guests. Please log in or register to see it.
Last Edit: 19 Sep 2011 11:31 by andypugh.
The administrator has disabled public write access.

Re:4th axis tangent to path XY 21 Sep 2011 02:34 #13337

  • ioiotutu
  • ioiotutu's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 30
  • Karma: 1
Thanks,

For me It's ok to use M-codes. I build:

M151
#!/bin/bash
halcmd setp tangentkins.auto true
exit 0

M152
#!/bin/bash
halcmd setp tangentkins.auto false
exit 0

Testing this m-codes with HAL METER seems to work fine, i see the status changed but the A axis always move following XY.

I have some warnings during comp command:

root@ubuntu:/home/michele/emc2/nc_files# comp --install tangentkins.c
make -C /usr/src/linux-headers-2.6.32-122-rtai SUBDIRS=`pwd` CC=gcc V=0 -o /Module.symvers modules
make[1]: ingresso nella directory «/usr/src/linux-headers-2.6.32-122-rtai»
CC [M] /tmp/tmp8A54AP/tangentkins.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: "hal_init" [/tmp/tmp8A54AP/tangentkins.ko] undefined!
WARNING: "hal_exit" [/tmp/tmp8A54AP/tangentkins.ko] undefined!
WARNING: "hal_malloc" [/tmp/tmp8A54AP/tangentkins.ko] undefined!
WARNING: "hal_pin_bit_new" [/tmp/tmp8A54AP/tangentkins.ko] undefined!
WARNING: "hal_ready" [/tmp/tmp8A54AP/tangentkins.ko] undefined!
WARNING: "rtapi_print" [/tmp/tmp8A54AP/tangentkins.ko] undefined!
CC /tmp/tmp8A54AP/tangentkins.mod.o
LD [M] /tmp/tmp8A54AP/tangentkins.ko
make[1]: uscita dalla directory «/usr/src/linux-headers-2.6.32-122-rtai»
cp tangentkins.ko /usr/realtime-2.6.32-122-rtai/modules/emc2/
root@ubuntu:/home/michele/emc2/nc_files#

what do i wrong?

Sorry but i am a newbie!
The administrator has disabled public write access.

Re:4th axis tangent to path XY 21 Sep 2011 03:07 #13338

  • andypugh
  • andypugh's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 4125
  • Thank you received: 141
  • Karma: 129
ioiotutu wrote:
what do i wrong?
Nothing, you can ignore those warnings.
It is more likely that I made a mistake in the tangentkins file. I will try to have a look at it tonight.
The administrator has disabled public write access.

Re:4th axis tangent to path XY 21 Sep 2011 17:42 #13346

  • andypugh
  • andypugh's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 4125
  • Thank you received: 141
  • Karma: 129
Yes, I definitely made an error.
Annoyingly I had it working, but got in a tangle with save/compile/test and can't figure out which combination worked (the problem is a pointer indirection issue on the HAL pin variable)
I have run out of brainpower for tonight (01:42 here), I will look at it again tomorrow.
The administrator has disabled public write access.
Time to create page: 1.605 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.