Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: mdash on December 04, 2008, 04:02:33 PM

Title: Toggle Outputs with No Interuption to Motion
Post by: mdash on December 04, 2008, 04:02:33 PM
Is it possible to turn on/off an output (from the g-code via an m-macro) and not interupt the constant velocity?

I'm cutting circles in plasma, and to get a perfect cut I need to be able to switch off the torch a few mm before the end of the cut.
The CAM software can calculate this just fine, and break the circle into arcs and place an M code at the appropriate point.
However this causes a slight pause as the cnc decelerates, executes the M-code (to turn off the torch), and then re-accelerates to finish the cut.

Example:
G0X0
G1X10
M1000  ;Turn off output
G1X12 ;Finish cut

If this is executed without the M1000 there is no delay (no decl & accel).

Any ideas on how to achieve this?

Title: Re: Toggle Outputs with No Interuption to Motion
Post by: Hood on December 04, 2008, 04:34:09 PM
Try this, not sure if it will work but is worth a shot

G0X0
G1X10  ;Turn off output
G1X12 M1000


Hood
Title: Re: Toggle Outputs with No Interuption to Motion
Post by: spunk on December 07, 2009, 04:19:12 AM
anyone out there that already tested this?
Title: Re: Toggle Outputs with No Interuption to Motion
Post by: stirling on December 07, 2009, 07:11:17 AM
After a few similar problems recently reported on the forum - I took a look at this and other issues concerning the speed of M calls and switching outputs. Hood's suggestion is a pefectly reasonable one but what actually happens is the same as if you code the M1000 between the X10 and X12 i.e. the blending fails to cross the M call just as described in the OP. I'm in two minds as to whether this is a bug or not. In this particular case however, would a lead-in and lead-out not solve the problem?