configuring tool change for multiple spindles

More
03 Nov 2022 12:53 #255842 by piflixe
Dear LinuxCNC community!

I am working on a retrofit of a machine that has one main spindle and multiple side spindles. The different spindles are pushed down by pneumatic cylinders, controlled with a simple output pin, one for each tool.

Assuming to use T1 M6 for first tool, T2 M6 for second tool and so on I would like to implement a "tool changer" component in LinuxCNC that simply activates the correct output for each tool. Could anyone please point out how this is done?

Or is there a better way or behaviour for this kind of machine? I saw that custom M-Codes could be created and linked to hall pins. But I thought this was re-implementing something that should already be covered by the T command. Also I would like the command to load the corresponding offset values from the tool table.

Looking forward to your responses and thanks in advance!

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

More
03 Nov 2022 17:07 #255854 by tommylight
On the phone so not much help, but search for Biesse Rover, there are some retrofited in this forum, so might have configs and info.
The following user(s) said Thank You: piflixe

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

More
03 Nov 2022 17:15 #255857 by andypugh
It is almost built-in. The tool table has columns for X, Y and Z axes to the offsets of the tool positions can be allowed for.

There isn't a built in per-tool HAL pin, but if it is as simple as every tool has one cylinder, and there is no additional carousel, then you could simply connect the tool number HAL pin (iocontrol.0.tool-number) (you might prefer pocket-number) to a "demux" HAL component
linuxcnc.org/docs/stable/html/man/man9/demux.9.html
A slight quirk,tool-number is signed-int and demux-sel-u32 is unsigned, so use the conversion component too.
linuxcnc.org/docs/stable/html/man/man9/conv_s32_u32.9.html
The following user(s) said Thank You: piflixe

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

More
29 Nov 2022 22:21 - 29 Nov 2022 22:23 #258035 by piflixe
thanks andypugh. Today I tried implementing this in the simulation machine and it works! Can't wait to test on the real machine.

In case anyone is interested in the details, here is the section of the hal file:
loadrt conv_s32_u32 count=1
loadrt demux names=demux-toolpin personality=11

net tool_number_s32 <= iocontrol.0.tool-number
net tool_number_s32 => conv-s32-u32.0.in
net tool_number_u32 <= conv-s32-u32.0.out
net tool_number_u32 => demux-toolpin.sel-u32

net tool-00 <= demux-toolpin.out-00
net tool-01 <= demux-toolpin.out-01
net tool-02 <= demux-toolpin.out-02
net tool-03 <= demux-toolpin.out-03
net tool-04 <= demux-toolpin.out-04
net tool-05 <= demux-toolpin.out-05
net tool-06 <= demux-toolpin.out-06
net tool-07 <= demux-toolpin.out-07
net tool-08 <= demux-toolpin.out-08
net tool-09 <= demux-toolpin.out-09
net tool-10 <= demux-toolpin.out-10

addf conv-s32-u32.0 servo-thread
addf demux-toolpin servo-thread
Last edit: 29 Nov 2022 22:23 by piflixe.
The following user(s) said Thank You: tommylight

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

Time to create page: 0.111 seconds
Powered by Kunena Forum