- Posts: 50
- Thank you received: 0
4th axis tangent to path XY
15 years 1 month ago #13083
by ioiotutu
4th axis tangent to path XY was created by ioiotutu
Hi,
is it possible at low level (HAL layer) move automatically 4th axis tangent to XY path?
do you have suggestions?
Thanks,
Michele
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 to join the conversation.
15 years 1 month ago #13095
by 1:1
Replied by 1:1 on topic Re:4th axis tangent to path XY
Cutting with a blade ?
Please Log in to join the conversation.
15 years 1 month ago #13098
by Rick G
Replied by Rick G on topic Re:4th axis tangent to path XY
This does come up now and then, here is a starting point...
www.linuxcnc.org/component/option,com_ku...imitstart,6/lang,en/
Rick G
www.linuxcnc.org/component/option,com_ku...imitstart,6/lang,en/
Rick G
Please Log in to join the conversation.
15 years 1 month ago #13193
by ioiotutu
Replied by ioiotutu on topic Re:4th axis tangent to path XY
Thanks.
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
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 to join the conversation.
15 years 1 month ago #13214
by andypugh
Replied by andypugh on topic Re:4th axis tangent to path XY
I have attached a modified kinematics file in which the A axis value automatically changes to suit the direction of movement.
You can install this with
You can then swap "trivkins" for "tangentkins" in your HAL and INI files.
It probably needs more work.
You can install this with
Code:
comp --install tangentkins.c
It probably needs more work.
Attachment tangentkins.zip not found
Please Log in to join the conversation.
15 years 1 month ago #13221
by ioiotutu
Replied by ioiotutu on topic Re:4th axis tangent to path XY
Thanks, i try to use the file.
Please Log in to join the conversation.
15 years 1 month ago #13303
by ioiotutu
Replied by ioiotutu on topic Re:4th axis tangent to path XY
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.
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 to join the conversation.
15 years 1 month ago #13304
by ioiotutu
Replied by ioiotutu on topic Re:4th axis tangent to path XY
Modified file.
Sorry.
Sorry.
Attachment tangentkins-dea718dae1772d296db46b96caa05dae.zip not found
Please Log in to join the conversation.
15 years 1 month ago #13311
by andypugh
Replied by andypugh on topic Re:4th axis tangent to path XY
ioiotutu wrote:
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
How much of this needs further explanation?
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
Code:
setp tangentkins.auto 1
How much of this needs further explanation?
Attachment tangentkins_3.zip not found
Please Log in to join the conversation.
15 years 1 month ago #13337
by ioiotutu
Replied by ioiotutu on topic Re:4th axis tangent to path XY
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!
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 to join the conversation.
Time to create page: 3.400 seconds
