Machsupport Forum
Mach Discussion => Feature Requests => Topic started by: Al Cutter on January 31, 2009, 08:24:20 AM
-
When Mach3 (v2.63) comes across the G-code,
M98 (doOperation) L 0
it runs doOperation once, even though the number of repetitions is specified as zero. Can the behaviour of Mach3 be changed to so that the subroutine is never called if L is set to zero ? This behaviour will enable some basic conditional G-code. For example,
#1 = 0 ; CLOCKWISE = 0 , ANTICLOCKWISE = 1
#2 = [ 1 AND #1 ]
M98 (MachineAntiClockwise) L #2
#2 = [ 1 - #2 ]
M98 (MachineClockwise) L #2
On the face of it, it would seem easy to implement and not require a change to the software design.
-
I believe it was changed in later version so that L0=zero. Look at the fix log for the new versions to be sure when it was done.
You can also hop out a macro breifly to make a condition test then redirect back inside the gcode where every you need to
M999 ( IF #3<#1 Code"M98 P100" It will test for the condition then return to the gcode at the Oword o100 , OR it will passthrough to the next line of Gcode after the macro call)
(;-) TP