4th axis tangent to path XY
is it possible at low level (HAL layer) move automatically 4th axis tangent to XY path?
do you have suggestions?
Thanks,
Michele
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
www.linuxcnc.org/component/option,com_ku...imitstart,6/lang,en/
Rick G
Please Log in or Create an account to join the conversation.
I have to cut with a disk round parts, the disk orientation must be tangent to path.
In this moment i'm thinking to calculate the angle with a external python module and generate right g-code, but my final idea is to move this routine in real time tread to have this automatic.
Michele
Please Log in or Create an account to join the conversation.
You can install this with
comp --install tangentkins.c
It probably needs more work.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
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.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
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?
Please Log in or Create an account to join the conversation.
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!
Please Log in or Create an account to join the conversation.