Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: moorea21 on May 03, 2015, 10:08:32 AM
-
I'm having no luck executing movement from inside macro files, so I'm looking for an alternative to this macro.
Dim X As Double
X = GetVar(302)
Code "G00 X" & X
End
Is it possible to call up the value of the variable X in this way inside the macro, pass it to the main Gcode file, and then read and execute the 'G00 X &X' command in the Gcode itself, rather than unreliably from inside a macro? Absolute mayhem ensued when I tried more complicated moves from a macro, I'm looking to avoid all 'Code "G...."' statements if at all possible.
If not, would adding
'If IsMoving()
Wend'
before 'End' ensure that this line is executed properly before moving on?
Thanks,
M21
-
Always use the WHile Ismoving() / Wend after each single motion call or Group of motion calls.
(;-) TP
-
Will do