IF and GOTO gcode statements Syntec controller "syntax error"
Hi, wondering if anyone can help with my Syntec FC60WA controller (same as Syntec 6MB)
If I try and do an IF statement I get a syntax error no matter what I try.
The reasoning for the IF statement in my code is I want to not turn spindle on for a particular tool. My post processor doesn't allow condition loops (Vetric Aspire) so I'm trying to handle it in gcode.
So my code would be something like this
Code:
#100 = 1 (1 is the tool number)
N10 M06
N20 T1
IF [#100EQ1]GOTO40
N30 M3 S8000
N40...
N50..
But it throws a syntax error for the line containing the IF loop. If I remove the IF loop and have the GOTO only, it works without error. Can anyone help? Maybe there is another way to do this?
Thanks
Re: IF and GOTO gcode statements Syntec controller "syntax error"
I have received an email from Syntec they say I need to use a macro, so I am looking into that now.
Re: IF and GOTO gcode statements Syntec controller "syntax error"
What the Syntec guy said in his email was that I can do this using "macro" instead of your standard ISO gcode, to me it appears to be similar code but the main exception is there needs to be %@MACRO header line at the beginning of the file, and every line of code needs to end with ;
He gave an example:
Code:
%@MACRO
#100 = 1;
IF #100 = 1 THEN
GOTO 200;
END_IF;
M30;
I did a quick test and it appears to work, I will need to rewrite the post processor to format the file the way that is is required.
Re: IF and GOTO gcode statements Syntec controller "syntax error"
I have found that on some controls I need to use brackets around the variable number.
IF[[#100]EQ1]GOTO40
Try that to see.