For the Ask#1` replacement you would use a macro call Lets say it was M901. Macros allow up to 3 parameters to be called with the macro call
M901 P# Q# R # The # would be numbers
You would create theM901 macro like this:
SetVar(Param2(),Param3())
While ISMoving()
Sleep(10)
Wend
This would set the Gcode #var (Q parameter) to the R parameter
Easy enough
Next to use a conditional statement you would use a macro say M902
The macro would look like this:
SetVar(2,Param3())
If Getvar(Param1()) = Param2() Then
Sleep(10)
Code"M98 P#2"
While Ismoving()
sleep(10)
Wend
end if
The macro sets up the conditional statement and the parametrs PQR call the comparing values and the JUMP to number
THE GCODE program it is called from looks like this
G0 X0 Y0
M901 Q1 R100 <------------------- This will set #1=100
G1 X5 F100
M902 P1 Q100 R2 <------------------- This will allow the program to skip down to the o2 line and proceed
M1
G0X100
(endof test)
o2
(done Deal)
G1 X0Y0
m30
NOT a very easy way to have to do it But that is the best I can do SEEING how Mach cannot do conditional Gcode.
I have a set of macros set up for all the normal conditional calls that I normally would use.
NOT very conventional BUT it does work in a pinch.
Hope that helps (:-) TP
****** The above statement "Sorry but MACH does NOT do conditional Gcode like most modern controllers do (;-)" Should have been"Sorry but MACH does NOT do conditional Gcode unlike most modern controllers (;-)"