Error in my G code, post processor, controller settings, etc. Help!


Results 1 to 15 of 15

Thread: Error in my G code, post processor, controller settings, etc. Help!

  1. #1
    Member
    Join Date
    Apr 2008
    Location
    USA
    Posts
    90
    Downloads
    0
    Uploads
    0

    Default Error in my G code, post processor, controller settings, etc. Help!

    I get error code: 9 N 0 SYNTAX ERROR

    I have done some research but it's inconclusive. One thing I read was I could have it in ASCII mode rather than ISO mode or something, but I cannot find out how to change that.

    I am using the generic post for fanuc from autodesk in inventor CAM thing.

    My code looks like:
    Code:
    : (PGM, NAME="4")
    ; T5  D=4 CR=0 - ZMIN=-1 - FLAT END MILL
    : G90 G40 G94
    G17
    G71
    M26
    ; FACE3
    :T5 M6
    S1511 M3
    H0
    M8
    G0 X-8.4 Y-50.132
    Z15
    Z5
    G1 Z-0.6 F500
    G18 G3 X-8.8 Z-1 I-8.8 K-0.6
    G1 X-11
    X-61.8 F1000
    G17 G2 Y-46.501 I-61.8 J-48.317
    G1 X-11
    G3 Y-42.871 I-11 J-44.686
    G1 X-61.8
    G2 Y-39.241 I-61.8 J-41.056
    G1 X-11
    G3 Y-35.611 I-11 J-37.426
    G1 X-61.8
    G2 Y-31.98 I-61.8 J-33.795
    G1 X-11
    G3 Y-28.35 I-11 J-30.165
    G1 X-61.8
    G2 Y-24.72 I-61.8 J-26.535
    G1 X-11
    G3 Y-21.089 I-11 J-22.905
    G1 X-61.8
    G2 Y-17.459 I-61.8 J-19.274
    G1 X-11
    G3 Y-13.829 I-11 J-15.644
    G1 X-61.8
    G2 Y-10.199 I-61.8 J-12.014
    G1 X-11
    G3 Y-6.568 I-11 J-8.383
    G1 X-61.8
    G2 Y-2.938 I-61.8 J-4.753
    G1 X-11
    G18 G2 X-10.6 Z-0.6 I-11 K-0.6
    G0 Z15
    G17
    M9
    M26
    G0 X0 Y0
    M30
    M2
    It shows up on the controller a little differently, as in this picture:
    Attachment 487805

    The post processor I used is as follows:
    Attachment 487807
    I cannot find the exact post processor used on my desktop, if anybody knows the location for inventor let me know!

    Any tips?

    it makes me think there might be an EOL issue, like does one flavor of g-code use a different end of line (is this the correct terminology?) character than others?



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

    Default Re: Error in my G code, post processor, controller settings, etc. Help!

    SYNTAX is what is written (or the way it is written)in your code is NOT expected in the control...

    -Usually a program starts with an Oxxxx
    -mix of : & ; at beginnings of lines. Usually ; symbolises EOL
    -control may not like quotes "". I would delete these 1st



  3. #3
    Member mactec54's Avatar
    Join Date
    Jan 2005
    Location
    USA
    Posts
    15362
    Downloads
    0
    Uploads
    0

    Default Re: Error in my G code, post processor, controller settings, etc. Help!

    Quote Originally Posted by michaelwoodcock View Post
    I get error code: 9 N 0 SYNTAX ERROR

    I have done some research but it's inconclusive. One thing I read was I could have it in ASCII mode rather than ISO mode or something, but I cannot find out how to change that.

    I am using the generic post for fanuc from autodesk in inventor CAM thing.

    My code looks like:
    Code:
    : (PGM, NAME="4")
    ; T5  D=4 CR=0 - ZMIN=-1 - FLAT END MILL
    : G90 G40 G94
    G17
    G71
    M26
    ; FACE3
    :T5 M6
    S1511 M3
    H0
    M8
    G0 X-8.4 Y-50.132
    Z15
    Z5
    G1 Z-0.6 F500
    G18 G3 X-8.8 Z-1 I-8.8 K-0.6
    G1 X-11
    X-61.8 F1000
    G17 G2 Y-46.501 I-61.8 J-48.317
    G1 X-11
    G3 Y-42.871 I-11 J-44.686
    G1 X-61.8
    G2 Y-39.241 I-61.8 J-41.056
    G1 X-11
    G3 Y-35.611 I-11 J-37.426
    G1 X-61.8
    G2 Y-31.98 I-61.8 J-33.795
    G1 X-11
    G3 Y-28.35 I-11 J-30.165
    G1 X-61.8
    G2 Y-24.72 I-61.8 J-26.535
    G1 X-11
    G3 Y-21.089 I-11 J-22.905
    G1 X-61.8
    G2 Y-17.459 I-61.8 J-19.274
    G1 X-11
    G3 Y-13.829 I-11 J-15.644
    G1 X-61.8
    G2 Y-10.199 I-61.8 J-12.014
    G1 X-11
    G3 Y-6.568 I-11 J-8.383
    G1 X-61.8
    G2 Y-2.938 I-61.8 J-4.753
    G1 X-11
    G18 G2 X-10.6 Z-0.6 I-11 K-0.6
    G0 Z15
    G17
    M9
    M26
    G0 X0 Y0
    M30
    M2
    It shows up on the controller a little differently, as in this picture:
    Attachment 487805

    The post processor I used is as follows:
    Attachment 487807
    I cannot find the exact post processor used on my desktop, if anybody knows the location for inventor let me know!

    Any tips?

    it makes me think there might be an EOL issue, like does one flavor of g-code use a different end of line (is this the correct terminology?) character than others?
    Yes, there is no way that is going to run like that, words like (Faces3) and (Flat End Mill) and all things that are not related to the program will have to be in Parentheses (--) or just remove all the junk not related to the program and try it again

    Is it by design that you are using a different work plane G18 and G17

    Mactec54


  4. #4
    Member
    Join Date
    Jan 2013
    Location
    england
    Posts
    474
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by mactec54 View Post
    Yes, there is no way that is going to run like that, words like (Faces3) and (Flat End Mill) and all things that are not related to the program will have to be in Parentheses (--) or just remove all the junk not related to the program and try it again

    Is it by design that you are using a different work plane G18 and G17
    I agree, the program has syntax errors because of the reasons you mentioned. The control cannot execute blocks it doesn't recognise.
    Parentheses (or brackets) would help run the program.



  5. #5
    Member
    Join Date
    Apr 2008
    Location
    USA
    Posts
    90
    Downloads
    0
    Uploads
    0

    Default Re: Error in my G code, post processor, controller settings, etc. Help!

    Thanks guys! Mactec, I am not sure on the different work planes g18 & 17, I didn't intend for the code to come out this way, I just took it exactly as output from inventor - it seems I may have to hunt for a post that doesn't do this, or make one myself.

    Years ago, when I had done my own linuxCNC conversion, I imported the code directly from inventor and never had to alter anything. I hope I can find a post, or make my own to get there with the fanuc21 controls



  6. #6
    Member mactec54's Avatar
    Join Date
    Jan 2005
    Location
    USA
    Posts
    15362
    Downloads
    0
    Uploads
    0

    Default Re: Error in my G code, post processor, controller settings, etc. Help!

    Quote Originally Posted by michaelwoodcock View Post
    Thanks guys! Mactec, I am not sure on the different work planes g18 & 17, I didn't intend for the code to come out this way, I just took it exactly as output from inventor - it seems I may have to hunt for a post that doesn't do this, or make one myself.

    Years ago, when I had done my own linuxCNC conversion, I imported the code directly from inventor and never had to alter anything. I hope I can find a post, or make my own to get there with the fanuc21 controls
    Any Fanuc Post should work, there are quite a lot wrong with that format for it to work on a Fanuc control

    The G17 / G18 has come from how the cam software has been processed when you are doing your Tool Path, so that part needs to be looked at, the Postprocessor will output a Program to how the Tool Path has been created

    Programming
    G17 XY-Plane

    Programming
    G18 ZX-Plane

    Programming
    G19 YZ-Plane

    Mactec54


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

    Default Re: Error in my G code, post processor, controller settings, etc. Help!

    The G17/G18 is NOT the issue creating the SYNTAX error. That is caused by a programming choice (views) when creating the toolpath.

    The post proc. you are using is not compatible with your control, it nearly seems a heidenhain output as the semi-colon ; is used as a comment (on a fanuc it is an EOL marker)
    I don't know the purpose of the colon : ... did you type any of the code ?
    The colon : does not belong in fanuc code.

    A good sign if a character is not usable is to not use any character that is not on the control keypad.

    PS.. M30 and M2 do the same thing, only one is required



  8. #8
    Member mactec54's Avatar
    Join Date
    Jan 2005
    Location
    USA
    Posts
    15362
    Downloads
    0
    Uploads
    0

    Default Re: Error in my G code, post processor, controller settings, etc. Help!

    Quote Originally Posted by Superman View Post
    The G17/G18 is NOT the issue creating the SYNTAX error. That is caused by a programming choice (views) when creating the toolpath.

    The post proc. you are using is not compatible with your control, it nearly seems a heidenhain output as the semi-colon ; is used as a comment (on a fanuc it is an EOL marker)
    I don't know the purpose of the colon : ... did you type any of the code ?
    The colon : does not belong in fanuc code.

    A good sign if a character is not usable is to not use any character that is not on the control keypad.

    PS.. M30 and M2 do the same thing, only one is required
    No one referred that the G17 G18 was the cause of the SYNTAX error, you seem to be behind the 8Ball.

    Mactec54


  9. #9
    Armageddon's Avatar
    Join Date
    Jan 2004
    Location
    Deißlingen
    Posts
    769
    Downloads
    0
    Uploads
    0

    Default Re: Error in my G code, post processor, controller settings, etc. Help!

    This is no valid fanuc G-Code.

    Normaly after a charakter there must be a number.



  10. #10
    Member
    Join Date
    Apr 2008
    Location
    USA
    Posts
    90
    Downloads
    0
    Uploads
    0

    Default Re: Error in my G code, post processor, controller settings, etc. Help!

    I got a post that seems like it should work, but I still get the syntax error. The code I have now looks like:
    Code:
    %
    O0004
    (MACHINE)
    (  VENDOR EMCO)
    (T1 D=4. CR=0. - ZMIN=-1. - FLAT END MILL)
    N10 G90 G94 G17 G49 G40 G80
    N15 G21
    N20 G28 G91 Z0.
    N25 G90
    
    (FACE1)
    N30 T1 M06
    N35 S3500 M03
    N40 G54
    N45 G00 X75.4 Y1.811
    N50 G43 Z15. H01
    N55 G00 Z5.
    N60 G01 Z-0.6 F960.
    N65 G18 G03 X75. Z-1. I-0.4
    N70 G01 X72.8
    N75 X0.
    N80 G17 G02 Y5.584 J1.887
    N85 G01 X72.8
    N90 G03 Y9.357 J1.887
    N95 G01 X0.
    N100 G02 Y13.131 J1.887
    N105 G01 X72.8
    N110 G03 Y16.904 J1.887
    N115 G01 X0.
    N120 G02 Y20.677 J1.887
    N125 G01 X72.8
    N130 G03 Y24.45 J1.887
    N135 G01 X0.
    N140 G02 Y28.223 J1.887
    N145 G01 X72.8
    N150 G03 Y31.996 J1.887
    N155 G01 X0.
    N160 G02 Y35.769 J1.887
    N165 G01 X72.8
    N170 G03 Y39.543 J1.887
    N175 G01 X0.
    N180 G02 Y43.316 J1.887
    N185 G01 X72.8
    N190 G03 Y47.089 J1.887
    N195 G01 X0.
    N200 G02 Y50.862 J1.887
    N205 G01 X72.8
    N210 G18 G02 X73.2 Z-0.6 K0.4
    N215 G00 Z15.
    N220 G17
    
    N225 G28 G91 Z0.
    N230 G90
    N235 G49
    N240 G28 G91 X0. Y0.
    N245 G90
    N250 M30
    %
    I'm having a fun time learning these controls, could be a little more intuitive but it's workable. I should mention this is not to run an actual part, I'm just messing around with the different post processors to find and edit one that will work with my machine. As soon as I can get the machine moving under GCode I should be able to teach myself the rest (it's been almost 10 years since I've run a part)



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

    Default

    Quote Originally Posted by mactec54 View Post
    No one referred that the G17 G18 was the cause of the SYNTAX error, you seem to be behind the 8Ball.
    You did.... when you queried why he had it in his prog.
    It had NO BEARING on his issue... WTF did you have to mention it ?
    It is of no interest to you (or anyone else) on that part of his code

    Michael... that looks a better fanuc code
    ... try single stepping thru the prog.



  12. #12
    Member mactec54's Avatar
    Join Date
    Jan 2005
    Location
    USA
    Posts
    15362
    Downloads
    0
    Uploads
    0

    Default Re: Error in my G code, post processor, controller settings, etc. Help!

    Quote Originally Posted by Superman View Post
    You did.... when you queried why he had it in his prog.
    It had NO BEARING on his issue... WTF did you have to mention it ?
    It is of no interest to you (or anyone else) on that part of his code

    Michael... that looks a better fanuc code
    ... try single stepping thru the prog.
    It was just a question I was asking him, so stop pretending suppernut

    This is what I posted I guess you can't read, (Is it by design that you are using a different work plane G18 and G17)

    Mactec54


  13. #13
    Member mactec54's Avatar
    Join Date
    Jan 2005
    Location
    USA
    Posts
    15362
    Downloads
    0
    Uploads
    0

    Default Re: Error in my G code, post processor, controller settings, etc. Help!

    Quote Originally Posted by michaelwoodcock View Post
    I got a post that seems like it should work, but I still get the syntax error. The code I have now looks like:
    Code:
    %
    O0004
    (MACHINE)
    (  VENDOR EMCO)
    (T1 D=4. CR=0. - ZMIN=-1. - FLAT END MILL)
    N10 G90 G94 G17 G49 G40 G80
    N15 G21
    N20 G28 G91 Z0.
    N25 G90
    
    (FACE1)
    N30 T1 M06
    N35 S3500 M03
    N40 G54
    N45 G00 X75.4 Y1.811
    N50 G43 Z15. H01
    N55 G00 Z5.
    N60 G01 Z-0.6 F960.
    N65 G18 G03 X75. Z-1. I-0.4
    N70 G01 X72.8
    N75 X0.
    N80 G17 G02 Y5.584 J1.887
    N85 G01 X72.8
    N90 G03 Y9.357 J1.887
    N95 G01 X0.
    N100 G02 Y13.131 J1.887
    N105 G01 X72.8
    N110 G03 Y16.904 J1.887
    N115 G01 X0.
    N120 G02 Y20.677 J1.887
    N125 G01 X72.8
    N130 G03 Y24.45 J1.887
    N135 G01 X0.
    N140 G02 Y28.223 J1.887
    N145 G01 X72.8
    N150 G03 Y31.996 J1.887
    N155 G01 X0.
    N160 G02 Y35.769 J1.887
    N165 G01 X72.8
    N170 G03 Y39.543 J1.887
    N175 G01 X0.
    N180 G02 Y43.316 J1.887
    N185 G01 X72.8
    N190 G03 Y47.089 J1.887
    N195 G01 X0.
    N200 G02 Y50.862 J1.887
    N205 G01 X72.8
    N210 G18 G02 X73.2 Z-0.6 K0.4
    N215 G00 Z15.
    N220 G17
    
    N225 G28 G91 Z0.
    N230 G90
    N235 G49
    N240 G28 G91 X0. Y0.
    N245 G90
    N250 M30
    %
    I'm having a fun time learning these controls, could be a little more intuitive but it's workable. I should mention this is not to run an actual part, I'm just messing around with the different post processors to find and edit one that will work with my machine. As soon as I can get the machine moving under GCode I should be able to teach myself the rest (it's been almost 10 years since I've run a part)
    What Emco Mill do you have

    Mactec54


  14. #14
    Member
    Join Date
    Apr 2008
    Location
    USA
    Posts
    90
    Downloads
    0
    Uploads
    0

    Default Re: Error in my G code, post processor, controller settings, etc. Help!

    Quote Originally Posted by mactec54 View Post
    What Emco Mill do you have
    I have multiple, but this particular mill is the PC mill 55. It has Fanuc 21 controls on a windows PC.
    Thanks for the tips guys! I just went through each post processor that they had available for fanuc controls one by one and I found one that worked. To be specific I downloaded them to my own location on the PC and refered to those, it seems that the fanuc post processor that is installed be default with inventor (or HSM works or something, I have tons of autodesk stuff installed) did extra stuff, although I'm not sure. The working post outputs strictly the code with no comments or fancy stuff.

    The only thing I have been unable to figure out (Haven't looked much into it yet) is it gives an error code to the extent of "F value out of range" (not verbatim but you get the idea). I went in and changed the F value (Feed value, right?) manually from 960 to 100 then the machine accepted the code with no errors. If I remember correctly the F value should be in mm/min? I'm puzzled as to this error as the machine should be capable of 2000mm/min max feed.

    But for now all is working and I'm happy

    When you guys suggest things like single stepping through the code, I understand what you guys mean but I'm lost with this interface at the moment. I almost gave up and just retrofitted to linuxCNC, but now I'm going to learn a thing or two about the controls on this machine since I've got the post processor figured out (except for the f value)



  15. #15
    Member mactec54's Avatar
    Join Date
    Jan 2005
    Location
    USA
    Posts
    15362
    Downloads
    0
    Uploads
    0

    Default Re: Error in my G code, post processor, controller settings, etc. Help!

    Quote Originally Posted by michaelwoodcock View Post
    I have multiple, but this particular mill is the PC mill 55. It has Fanuc 21 controls on a windows PC.
    Thanks for the tips guys! I just went through each post processor that they had available for fanuc controls one by one and I found one that worked. To be specific I downloaded them to my own location on the PC and refered to those, it seems that the fanuc post processor that is installed be default with inventor (or HSM works or something, I have tons of autodesk stuff installed) did extra stuff, although I'm not sure. The working post outputs strictly the code with no comments or fancy stuff.

    The only thing I have been unable to figure out (Haven't looked much into it yet) is it gives an error code to the extent of "F value out of range" (not verbatim but you get the idea). I went in and changed the F value (Feed value, right?) manually from 960 to 100 then the machine accepted the code with no errors. If I remember correctly the F value should be in mm/min? I'm puzzled as to this error as the machine should be capable of 2000mm/min max feed.

    But for now all is working and I'm happy

    When you guys suggest things like single stepping through the code, I understand what you guys mean but I'm lost with this interface at the moment. I almost gave up and just retrofitted to linuxCNC, but now I'm going to learn a thing or two about the controls on this machine since I've got the post processor figured out (except for the f value)
    Yes, the interface when it gives you trouble, they are a pain, I have a modified PC120 and an older 140T.

    Mactec54


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

Error in my G code, post processor, controller settings, etc.  Help!

Error in my G code, post processor, controller settings, etc.  Help!