Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: MojsterMiha on July 28, 2024, 03:32:37 AM

Title: Calling multiple tools in one line of G-code?
Post by: MojsterMiha on July 28, 2024, 03:32:37 AM
I am working on a woodworking machine with 17 vertical drills, each of which is lowered with the help of a pneumatic cylinder.
This happens when I call a tool in G-code (for example M6 T12)
Sometimes I could use several drills at once, since only these are installed in the standard grid for the furniture industry.
Is there any way Mach3 would recognize calling multiple tools at once (eg M6 T12 T13 T14 T15) and could use that in a tool change macro (M6Start) and drop multiple tools at once?
I know that this is possible if I assign an M-function to each tool, but with Txx it would be much more transparent...
Title: Re: Calling multiple tools in one line of G-code?
Post by: TPS on July 28, 2024, 03:47:25 AM
i know no way to use multiple tool's with one M6 call (M6 T01 T02 T03),
but if you make a custom M6Start macro you can use:

M6 T01
M6 T02
M6 T03

in seperate G-Code lines, every M6 call would lower the called tool
and a

M6 T0

would bring them all back.
Title: Re: Calling multiple tools in one line of G-code?
Post by: MojsterMiha on July 28, 2024, 04:01:23 AM
Hello
That's a good idea  :)
I also thought in this direction, but I did not find a solution how to solve the issue when it is necessary to raise the tools.
Now, in the M6 ​​procedure, I have a command to raise the lowered tool and lower a new one... of course, this is only possible with one tool, because it always raises an old one...
Just need to delete the lift command and add it at T0...easy.

Thank you!
Title: Re: Calling multiple tools in one line of G-code?
Post by: kf2qd on August 26, 2024, 06:12:43 PM
You could use a different MCodes for each spindle solenoid - would need an on and off code for each. Might require some special programming...

Is there the ability to pass a P value with an Mcode, That would allow a numerical value with the different bits in the number mapping to a solenoid output. MWhatever with a numerica value of 26 (binary 0001 1010, 16+6+2, solenoid 2,4,5) would turn on those solenoids and MWhatever with a value of 0 would turn them all off. Some coding in LUA?

Is there a way to capture data out of a comment in the code? Like the above - some coding in LUA.

Communication with a modbus device for the actual I/O.