Hello Guest it is March 28, 2024, 11:15:00 AM

Author Topic: macro works under mach3 editor but not by gcode or mcode  (Read 3611 times)

0 Members and 1 Guest are viewing this topic.

macro works under mach3 editor but not by gcode or mcode
« 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

vmax549

*
Re: macro works under mach3 editor but not by gcode or mcode
« Reply #1 on: May 06, 2009, 09:51:42 AM »
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