Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: eyalyossef on May 03, 2009, 12:04:15 PM
-
Hello .
This program should perform testing of the limits of drawing, and record them in a file.
the program works well only from the editor.
Xmax= GetOEMDRO (10)
Ymax= GetOEMDRO (11)
message "X"&Xmax &"Y"&ymax
XYposition="X"&Xmax &"Y"&ymax
sleep (100)
code "g90 G00 "& XYposition
While Ismoving()
Wend
sleep (500)
code "g90 G00x0y0 "
While Ismoving()
Wend
Open "c:\XYposition.txt" For Output As #1
Write #1,XYposition
sleep (100)
Close #1
'End
-
DOUBLE check that you have saved the file in the proper directory. It should go to c:\mach3\macros\machmill (If you are in mill).
I ran it from Mcode AND a button here.
I also changed your code around a bit.
Xmax= GetOEMDRO (10)
Ymax= GetOEMDRO (11)
message "X"&Xmax &"Y"&ymax
XYposition="X"&Xmax &"Y"&ymax
code "g90 G00 "& XYposition
While Ismoving()
Sleep(100)
Wend
code "g90 G00x0y0 "
While Ismoving()
Sleep(100)
Wend
Open "c:\XYposition.txt" For Output As #1
Write #1,XYposition
Close #1
End