Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: guynamedbathgate on January 12, 2007, 09:59:35 AM
-
now i will dmit im new at this. but i had this program working fine a few months ago. now for some reason the controller wont recognize my subprograms. it just skips over them. can someone load this and see if Im doing something wrong. its pretty much my first real attempt at writting a program so be gentle pkease. ;)
-
Hi guynamedbathgate,
You need to remove the line number in front of the sub routines and it should work then. The O line cannot have a line number.
Regards,
-
yep that was it.
wonder how it even worked before?
thanks anyway. I promise ill never do it again. :P
-
I have the same problem with version 3.037. Version 3.032 works fine though.
Sample--2 simple squares.
Any help is appreciated.
G90 G01 X0.0 Y0.0 F1000
M98 P1
M98 P2
M30
O1
X0.0 Y0.0
X1.0 Y0.0
X1.0 Y1.0
X0.0 Y1.0
X0.0 Y0.0
M99
O2
X2.0 Y0.0
X3.0 Y0.0
X3.0 Y1.0
X2.0 Y1.0
X2.0 Y0.0
M99
-
Always make sure you have a return on the last line, that is the most common cause of non running subs.
Putting a % at the start and end of the programs helps.
Graham.
%
G90 G01 X0.0 Y0.0 F1000
M98 P1
M98 P2
M30
O1
X0.0 Y0.0
X1.0 Y0.0
X1.0 Y1.0
X0.0 Y1.0
X0.0 Y0.0
M99
O2
X2.0 Y0.0
X3.0 Y0.0
X3.0 Y1.0
X2.0 Y1.0
X2.0 Y0.0
M99
%
-
Still a no-go.
-
COuld it be that your are using an OH instead of a ZERO???
-
should be OH...shouldn't it ?
-
Add the red bits and it works, I don't know what has changed in Mach .037 but I will have a word with Brian about it.
Graham.
%
G90 G01 X0.0 Y0.0 F1000
M98 P1 L1
M98 P2 L1
M30
O1
X0.0 Y0.0
X1.0 Y0.0
X1.0 Y1.0
X0.0 Y1.0
X0.0 Y0.0
M99
O2
X2.0 Y0.0
X3.0 Y0.0
X3.0 Y1.0
X2.0 Y1.0
X2.0 Y0.0
M99
%
-
Thank you Graham. Works great. How you figured that one out I'll never know.
-
YEP you are correct. OH it is(;-)
(;-) TP
-
Not just a pretty face, or is that not a pretty face. ;D
Graham.
-
I added code to tell Mach not to run a sub if thre is an L of 0 and looks like the default is 0 not and not 1 :( . I will see if I can change that :)
Thanks
Brian