Machsupport Forum
G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: LGentry on January 23, 2013, 01:07:04 AM
-
I would like to pass a value from gcode to my macro m1234 and save it as a variable in VB.
In gcode
M1234 val1 val2
In VB
Dim val1, val2
Then fill the variables with the information.
Also passing variables from VB to gcode would be great as well.
Thanks in advance for any help.
Lewis
-
In a macro you can pass 3 variables to the macro, BUT BE ADVISED that Param3 does NOT go back to nill at macro end it stays at current value(BUG)
M1234 P# Q# R#
Inside the macro they are known as Param1 Param2 Param3
Dim Val1 ,Val2, Val3
Val1= Param1
Val2= Param2
Val3= Param3
********************************
Passing values to Gcode #var
SetParam(29,999.999) 'It sets #29 to 999.999
IT IS ALL IN THE MANUAL (;-)
(;-) TP
-
Thanks for the code. I will do a search for the manual.