开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

G code in macro passing veriable


barker806
 

One more quick question:
Is there a way to pas a variable in to the Gcode?

Example:
M6START
tool = GetSelectedTool()
x = GetToolChangeStart( 0 )
y = GetToolChangeStart( 1 )
z = GetToolChangeStart( 2 )
a = GetToolChangeStart( 3 )
b = GetToolChangeStart( 4 )
c = GetToolChangeStart( 5 )



SetCurrentTool( tool )

code "G00 G53 Z-.1"
code " G00 G59 P255"

M6END
x = GetToolChangeStart( 0 )
y = GetToolChangeStart( 1 )
z = GetToolChangeStart( 2 )
a = GetToolChangeStart( 3 )
b = GetToolChangeStart( 4 )
c = GetToolChangeStart( 5 )

StraightTraverse x, y, a, b, c

code "G43 H (Tool) " ; I don't think this will work


And then I can set the tool change location as 255


Thank you
Brian