Welcome, Guest. Please login or register.
Did you miss your activation email?
May 24, 2012, 11:39:43 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  macro works under mach3 editor but not by gcode or mcode
Pages: 1   Go Down
Print
Author Topic: macro works under mach3 editor but not by gcode or mcode  (Read 991 times)
0 Members and 2 Guests are viewing this topic.
eyalyossef
Active Member

Offline Offline

Posts: 2


View Profile
« on: May 03, 2009, 11:04:15 AM »

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
Logged
vmax549
Guest
« Reply #1 on: May 06, 2009, 08: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
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!