4th axis tangent to path XY

More
10 Sep 2011 08:11 #13083 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

Please Log in or Create an account to join the conversation.

More
11 Sep 2011 05:32 #13095 by 1:1
Replied by 1:1 on topic Re:4th axis tangent to path XY
Cutting with a blade ?

Please Log in or Create an account to join the conversation.

More
11 Sep 2011 12:06 #13098 by Rick G
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

Please Log in or Create an account to join the conversation.

More
14 Sep 2011 06:27 #13193 by ioiotutu
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

Please Log in or Create an account to join the conversation.

More
15 Sep 2011 17:54 - 15 Sep 2011 17:55 #13214 by andypugh
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
comp --install tangentkins.c
You can then swap "trivkins" for "tangentkins" in your HAL and INI files.

It probably needs more work.

File Attachment:

File Name: tangentkins.zip
File Size:2 KB
Attachments:
Last edit: 15 Sep 2011 17:55 by andypugh.

Please Log in or Create an account to join the conversation.

More
16 Sep 2011 11:07 #13221 by ioiotutu
Thanks, i try to use the file.

Please Log in or Create an account to join the conversation.

More
19 Sep 2011 16:41 #13303 by ioiotutu
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.

Please Log in or Create an account to join the conversation.

More
19 Sep 2011 16:43 #13304 by ioiotutu
Modified file.

Sorry.

File Attachment:

File Name: tangentkin...5dae.zip
File Size:2 KB
Attachments:

Please Log in or Create an account to join the conversation.

More
19 Sep 2011 18:29 - 19 Sep 2011 18:31 #13311 by andypugh
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?

File Attachment:

File Name: tangentkins_3.zip
File Size:2 KB
Attachments:
Last edit: 19 Sep 2011 18:31 by andypugh.

Please Log in or Create an account to join the conversation.

More
21 Sep 2011 09:34 #13337 by ioiotutu
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!

Please Log in or Create an account to join the conversation.

Time to create page: 0.087 seconds
Powered by Kunena Forum