IF and GOTO gcode statements Syntec controller "syntax error"


Results 1 to 5 of 5

Thread: IF and GOTO gcode statements Syntec controller "syntax error"

  1. #1

    Default 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

    Similar Threads:


  2. #2

    Default 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.



  3. #3
    Flies Fast Superman's Avatar
    Join Date
    Dec 2008
    Location
    Antarctica
    Posts
    2828
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by jabtronic View Post
    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
    Try using letter O instead of number zero in GOTO

    Sometimes, a space may be needed between addresses
    ie. #100 EQ 1 verses #100EQ1



  4. #4

    Default 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.



  5. #5
    Member
    Join Date
    Jan 2005
    Location
    USA
    Posts
    302
    Downloads
    0
    Uploads
    0

    Default 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.



Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

IF and GOTO gcode statements Syntec controller "syntax error"

IF and GOTO gcode statements Syntec controller "syntax error"

IF and GOTO gcode statements Syntec controller "syntax error"