I have received an email from Syntec they say I need to use a macro, so I am looking into that now.
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
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?Code:#100 = 1 (1 is the tool number) N10 M06 N20 T1 IF [#100EQ1]GOTO40 N30 M3 S8000 N40... N50..
Thanks
Similar Threads:
- Problem with "GOTO ZERO" & returning to where I started
- Need Help!- Need Help related to "Pitch Error Compensation" of Fanuc Controller
- Need Help!- K2 with kmotionCNC "G Code Error GCode Aborted"
- Build Thread- For Syntec system: how to change "mm" into imperial units "inch"
- Problem- How to remove error " Turret out of position" in Ge fanuc 21i-t controller for lathe?
I have received an email from Syntec they say I need to use a macro, so I am looking into that now.
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:
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.Code:%@MACRO #100 = 1; IF #100 = 1 THEN GOTO 200; END_IF; M30;
I have found that on some controls I need to use brackets around the variable number.
IF[[#100]EQ1]GOTO40
Try that to see.