586,036 active members*
3,517 visitors online*
Register for free
Login
Results 1 to 19 of 19
  1. #1
    Join Date
    Aug 2007
    Posts
    55

    Why does my Gcode not work? Bobcad to Mach3

    Can someone please help me figure out what is going on with my Gcode, when i run a simulation under bobcad it looks perfect, when i import the code into Mach3 it looks mental. (the not blue part)
    I'm thinking it has to be my post processor.



    GCODE:

    %
    O1(LID)
    G17 G90 G40 G80 G54
    G00 Z1.
    X4.5158 Y2.5119
    G01 Z-1.4286 F100.
    G02 X2.5158 Y4.5119 I0. J2. F600. G41
    G01 Y48.5119
    G02 X4.5158 Y50.5119 I2. J0.
    G01 X36.5158
    G02 X38.5158 Y48.5119 I0. J-2.
    G01 Y4.5119
    G02 X36.5158 Y2.5119 I-2. J0.
    G01 X4.5158 G40
    Z-2.8571 F100.
    G02 X2.5158 Y4.5119 I0. J2. F600. G41
    G01 Y48.5119
    G02 X4.5158 Y50.5119 I2. J0.
    G01 X36.5158
    G02 X38.5158 Y48.5119 I0. J-2.
    G01 Y4.5119
    G02 X36.5158 Y2.5119 I-2. J0.
    G01 X4.5158 G40
    Z-4.2857 F100.
    G02 X2.5158 Y4.5119 I0. J2. F600. G41
    G01 Y48.5119
    G02 X4.5158 Y50.5119 I2. J0.
    G01 X36.5158
    G02 X38.5158 Y48.5119 I0. J-2.
    G01 Y4.5119
    G02 X36.5158 Y2.5119 I-2. J0.
    G01 X4.5158 G40
    Z-5.7143 F100.
    G02 X2.5158 Y4.5119 I0. J2. F600. G41
    G01 Y48.5119
    G02 X4.5158 Y50.5119 I2. J0.
    G01 X36.5158
    G02 X38.5158 Y48.5119 I0. J-2.
    G01 Y4.5119
    G02 X36.5158 Y2.5119 I-2. J0.
    G01 X4.5158 G40
    Z-7.1429 F100.
    G02 X2.5158 Y4.5119 I0. J2. F600. G41
    G01 Y48.5119
    G02 X4.5158 Y50.5119 I2. J0.
    G01 X36.5158
    G02 X38.5158 Y48.5119 I0. J-2.
    G01 Y4.5119
    G02 X36.5158 Y2.5119 I-2. J0.
    G01 X4.5158 G40
    Z-8.5714 F100.
    G02 X2.5158 Y4.5119 I0. J2. F600. G41
    G01 Y48.5119
    G02 X4.5158 Y50.5119 I2. J0.
    G01 X36.5158
    G02 X38.5158 Y48.5119 I0. J-2.
    G01 Y4.5119
    G02 X36.5158 Y2.5119 I-2. J0.
    G01 X4.5158 G40
    Z-10. F100.
    G02 X2.5158 Y4.5119 I0. J2. F600. G41
    G01 Y48.5119
    G02 X4.5158 Y50.5119 I2. J0.
    G01 X36.5158
    G02 X38.5158 Y48.5119 I0. J-2.
    G01 Y4.5119
    G02 X36.5158 Y2.5119 I-2. J0.
    G01 X4.5158 G40
    G00 Z1.


    Please help.

  2. #2
    Join Date
    Jan 2006
    Posts
    628
    My version of Mach (v3.042.029) actually renders the toolpath a little differently. I'm just seeing the blue and white and not the extra purple arcs. NCPlot does not show the odd white and purple arcs at all. (BTW, NCPlot is a nice program to have installed, just to do a sanity check on your code when these things happen.)

    If you single step through the code in Mach, it looks perfect. The correct movements are highlighted and I don't see any funny business. The odd stuff looks like it might should on the last straight (G01) line movement before the next downward Z movement.

    Those G01 moves have a G40 (cutter compensation off) at the end. I don't use cutter comp, so I don't know what Mach expects. I see G41 (cutter comp on) but I don't see any values indicating how much to offset for the cutter diameter.

    If you comment out the G40 codes (just use ;G40) then Mach renders everything ok. My guess it you are using a bad post processor or something is funny with the way Mach is setup to handle cutter comp.

    What happens if you try and run the code? No cutting, just set a safe Z height and run the code.

    Steve

  3. #3
    you can't apply cutter comp in an arc move
    use a right angle lead in
    A poet knows no boundary yet he is bound to the boundaries of ones own mind !! ........

  4. #4
    Join Date
    Aug 2007
    Posts
    55
    Quote Originally Posted by stevespo View Post
    My version of Mach (v3.042.029) actually renders the toolpath a little differently. I'm just seeing the blue and white and not the extra purple arcs. NCPlot does not show the odd white and purple arcs at all. (BTW, NCPlot is a nice program to have installed, just to do a sanity check on your code when these things happen.)

    If you single step through the code in Mach, it looks perfect. The correct movements are highlighted and I don't see any funny business. The odd stuff looks like it might should on the last straight (G01) line movement before the next downward Z movement.

    Those G01 moves have a G40 (cutter compensation off) at the end. I don't use cutter comp, so I don't know what Mach expects. I see G41 (cutter comp on) but I don't see any values indicating how much to offset for the cutter diameter.

    If you comment out the G40 codes (just use ;G40) then Mach renders everything ok. My guess it you are using a bad post processor or something is funny with the way Mach is setup to handle cutter comp.

    What happens if you try and run the code? No cutting, just set a safe Z height and run the code.

    Steve
    Im using the Post called Mach of the artsoft website along with the scrips that are also provided as part of the download. is there a newer ver. than this?
    machine is at the workshop so i can try cutting at safe Z. but i can say that the mach on the mill also shows the funny business.

    Ideas

  5. #5
    Join Date
    Jan 2006
    Posts
    628
    Post your .bbcd file and I'll try and take a look at it tomorrow.

    Like I said, I don't use cutter comp, but dertsap says you can't use G41 on an arc and I believe him. Change your lead in and see if that improves anything.

    Also, are you sure you're using the Mach3-Router.MillPst post processor? I don't remember what the installation process was, but it should be visible in your CAM tree.

    Steve

  6. #6
    1 problem that I've noticed with bobcad is that when g 41 or g42 is used it will program to the center of the tool , so you will need to add the d comp into your tool offsets manually or you can add a g10 to your code so that the program will put the compensation in there for you , other than that you will have undersized parts .
    A poet knows no boundary yet he is bound to the boundaries of ones own mind !! ........

  7. #7
    Join Date
    Feb 2006
    Posts
    992
    don't see anything wrong with your program...... my backplot is fine, I think Mach itself have trouble. Check the Mach setting, that's all I can see is wrong.
    The best way to learn is trial error.

  8. #8
    mach is fine , i put the code into my mach and had the same reaction , removed the g41 and all is good
    the problem is the d comp on an arc
    A poet knows no boundary yet he is bound to the boundaries of ones own mind !! ........

  9. #9
    Join Date
    Mar 2010
    Posts
    0
    do not suggest use PC to control machine. PC can do many good jobs but that is also its weakness. suggest use a professional controller like DSP or Syntec(with screen)

  10. #10
    Join Date
    Aug 2007
    Posts
    55
    The reason i suggested it was the post.p was because my mill has and does run perfectly.
    Mach in my opinion is a great product, the PC its running has also been problem free and versatile. will DSP or Syntec play Movies or MP3's while its running a job?

    Of course finding the solution to this problem may change all this.

  11. #11
    Join Date
    Aug 2007
    Posts
    55
    I found this post http://www.machsupport.com/forum/ind...ic,3820.0.html and have recreated the code using it, so far i have not produced the junk.

    I would have thought that a decent post for Bobcad and Mach3 would have been really easy to find, the artsoft website only had an old Mach1 post.
    Do peapol make there own? what are you other Mach+bobcad guys using.
    I use to have a perfect one by Sorin on my old machine but lost it when the HD failed. i have since been on Sorins website to DL the same one but can only seem to find posts for everything except Mach.

  12. #12
    Join Date
    Dec 2008
    Posts
    226
    Hi there,
    One thing is the I J commands are incremental in your code, but your machine in in absolute, you could try adding a g91.1 for incremental IJ to the file right after the g90. then its correct every time you run the file, but if you also do stuff in IJ absolute add a g90.1 to the other files...
    Second the white lines are something to do with cutter compensation. It is showing a weird curve because the CC is turned off for the z move then back on again. Third, I did a couple of experiments with the CC and found that unless I specified the tool# on the g41 line the CC did not make an offset.

    So
    G41 P1
    Would be cutter comp. keep left, using the diameter(radius?) of tool #1 in the tool table.
    Last the cutter comp needs some sort of lead in to get the tool in the correct position for cutting. the easiest might be just to start above your work and do an extra thickness cut in "AIR" but on more complex parts that might become an issue.

    If your software will do it, I suggest you let the CAM do the cutter compensation for the tool and not the controller.

  13. #13
    Join Date
    Mar 2003
    Posts
    35538
    you can't apply cutter comp in an arc move
    use a right angle lead in
    You can in some older versions of Mach. But only straight moves in newer versions.

    Third, I did a couple of experiments with the CC and found that unless I specified the tool# on the g41 line the CC did not make an offset.

    So
    G41 P1
    Would be cutter comp. keep left, using the diameter(radius?) of tool #1 in the tool table.
    Incorrect for Mach3.

    P= tool radius
    D = tool #

    G41 P0.25 for a .5 tool
    G41 D1 for tool #1
    G41 by itself uses the radius of the current tool.

    There are some comp bugs in Mach3 that only show up occasionally, and may be different in different versions. This may be one of those cases. Doing the comp on a straight move as Dertsap suggests will probably cure it.

    Whenever it get's released, the next version should have much better comp. If you can find it, 3.43.000(I think) has newer comp code, but it also has other bugs in it. It was a test version.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  14. #14
    Join Date
    Aug 2007
    Posts
    55
    So i basically understand about 20% of what is being said.

    Im not 100% clear about cutter comp or D offset, i know it has something to do with moving the tool in relation to the tool path, please explain?

    Ill explain what i do (have done) in basic terms, if i draw a box in bobcad that is 50mm x50mm and i want to use a 6mm cutter, ill use the "create offset geometry" button to put lines 3mm away from the outside of the box (my tool path). ill then open my NC cam and select this tool path, make sure cutter comp and all that other fancy stuff i dont know how to use is turned off and set the depth, cut auto, save code, open in Mach3 and cut.

    I have recently gone back over Sorins tutorials to look at how he sets up the post processors but dont understand enough to really know what im doing.

    It seems to me that a post processor is the format in which the code is outputted and should not be spesific to my hardware. Ie copy someone elses mach3 post with scrips set it up in Bobcad. - is it not that simple?

    thanks

  15. #15
    Join Date
    Jan 2006
    Posts
    628
    If that's the method you're using (with a manually created offset tool path), then you don't need cutter comp at all. You should be selecting the geometry and then using the Auto option to generate code. I'm guessing you're using V20 or V21, which I haven't used in a while.

    If you're getting G40/G41/G42 instructions then something is not configured properly in BobCAD and you need to make sure that cutter comp is turned off or not selected when it comes time to generate code. You can always go back and edit your gcode and remove those instructions.

    The BobCAD post processor generates code that is targeted for a specific controller (ie. Mach, Fanuc, etc). I think you may be using cutter comp when you think it's turned off. It might be that simple.

    Steve

  16. #16
    Join Date
    Aug 2007
    Posts
    55
    Quote Originally Posted by stevespo View Post
    If that's the method you're using (with a manually created offset tool path), then you don't need cutter comp at all. You should be selecting the geometry and then using the Auto option to generate code. I'm guessing you're using V20 or V21, which I haven't used in a while.

    If you're getting G40/G41/G42 instructions then something is not configured properly in BobCAD and you need to make sure that cutter comp is turned off or not selected when it comes time to generate code. You can always go back and edit your gcode and remove those instructions.

    The BobCAD post processor generates code that is targeted for a specific controller (ie. Mach, Fanuc, etc). I think you may be using cutter comp when you think it's turned off. It might be that simple.

    Steve
    Yes Steve V21 is correct
    When you talk about turning it off under bobcad, under the NC in bobcan i have selected no comp under contour. i'm not sure where else to switch it off.

    thanks.

  17. #17
    Join Date
    Aug 2007
    Posts
    55
    Ideas anyone

  18. #18
    Join Date
    Mar 2010
    Posts
    0
    I use Original Type3 software for designing. DSP and Syntec can read the type3 G code very well. Syntech system is a very good controller , the regular Syntec machine is with servo motor and drive, HSD ATC air cooling spindle, it can change many tools automaticly in one G code file.

  19. #19
    Join Date
    Sep 2010
    Posts
    0
    Hi there are you in New Zealand and can possibly help me

Similar Threads

  1. Replies: 15
    Last Post: 06-30-2016, 04:38 PM
  2. Conditional gcode execution in Mach3
    By bobeson in forum Tormach Personal CNC Mill
    Replies: 5
    Last Post: 12-14-2009, 03:39 AM
  3. Condition gcode execution is possible in Mach3
    By bobeson in forum G-Code Programing
    Replies: 2
    Last Post: 12-05-2009, 08:20 PM
  4. Replies: 7
    Last Post: 12-14-2006, 07:33 PM
  5. Shoptask CNC Lathe and Mach3: Gcode delima
    By KaptainKarst in forum Shopmaster/Shoptask
    Replies: 20
    Last Post: 08-05-2006, 11:55 PM

Posting Permissions

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