G code error


Page 1 of 2 12 LastLast
Results 1 to 20 of 21

Thread: G code error

  1. #1
    Member
    Join Date
    May 2017
    Location
    United States
    Posts
    82
    Downloads
    0
    Uploads
    0

    Default G code error

    Huge problem machining a 1" thick piece of aluminum 28" x 12" with
    Numerous 1/2" deep pockets. Using fusion adaptive program it's a 5 hour program to run, complex part. I'm doing it on diy router. 3 hp spindle cuts aluminum like butter. Ran program and about 3 hours into the program i get a g code error message click out of the error message another message box comes up i click out of that box and now I click the stop on the screen and have to start over.

    I already cut the perimeter of the piece so I redo the code using the part piece to set my zero referance. All going good and almost in the same spot after cutting air for 3 hours i get the same g code error just about in the spot.

    Adaptive code line N202165 G1 X0.3122 Y-9.1589 Z.3 next line is where arrow stopped in code is pointing in kmotion screen N202170 G3X0.3593 Y-9.1727 IO.0506 JO.085.

    Big problem what causes the g code error, and is there a way to start the program where it stopped so I don't have to cut air for 3 hours to get back to where it stopped? If you get a g code error is there a way to just start where you stopped without losing position and have to go back and re-zero.

    Joe

    Similar Threads:


  2. #2
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4042
    Downloads
    0
    Uploads
    0

    Default Re: G code error

    Hi Joe,

    It looks like you have a letter 'O' instead of a zero '0' in your I J numbers.

    To start at a particular line of GCode right-mouse-click on the line of code and select "Set Next Statement". Note you must take care when doing this that it makes sense to do that instruction from where the tool currently is, that the proper tool is loaded, proper offset in use, etc. See here

    Regards
    TK http://dynomotion.com


  3. #3
    Member
    Join Date
    May 2017
    Location
    United States
    Posts
    82
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by TomKerekes View Post
    Hi Joe,

    It looks like you have a letter 'O' instead of a zero '0' in your I J numbers.

    To start at a particular line of GCode right-mouse-click on the line of code and select "Set Next Statement". Note you must take care when doing this that it makes sense to do that instruction from where the tool currently is, that the proper tool is loaded, proper offset in use, etc. See here
    Ran g code as simulation ran if a few seconds no error, I am able to switch off power to gecko drives and spindle and ran g code as if cutting material, ran for over five hours, completed g code with no errors.

    The g code failed twice when cutting material, I have had the happen 3 other times on other parts but re-ran the program and on the second run it worked.

    I have only used the machine to make about 25 parts. The machine is proving to be unreliable. What is causing the g code errors? Is it the computer glitching, the software unstable, the kflop board glitching, each time it gives a g code error stopping the program when I restart i loose my zero referance. Restarting with a newly established zero reference is not precisely as as the first, even .001 off causes ridges. Restarting the g code from the beginning and have another g code error is frustrating.

    What is the way to trouble shoot the g code error problem. The aluminum stock was expensive and machining with kmotion has proven unreliable. Again is it a computer issue, hard drive issue, software issue or kflop issue.

    I can't use the machine till the intermittent g code error issue is fixed.

    Joe



  4. #4
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4042
    Downloads
    0
    Uploads
    0

    Default Re: G code error

    Hi Joe,

    Sorry you are having difficulties. KFLOP and KMotionCNC are normally very reliable.

    I'm assuming you just copied the GCode into your last post incorrectly. But the code in the computer is ok?

    It would be helpful to know exactly what error you receive. Is it always at the same line?

    What type of system do you have? Open loop steppers?

    What Version of KMotion are you running? V4.34?

    Regards
    TK http://dynomotion.com


  5. #5
    Member
    Join Date
    May 2017
    Location
    United States
    Posts
    82
    Downloads
    0
    Uploads
    0

    Default Re: G code error

    I am running version 4.33 on open loop stepper motors. I am in the process of making the parts for the gantry for my machine. The sides of the gantry pictured below were machined out of 1" aluminum. The other picture is the back plate for the z axis and is also 1" aluminum with 1/2" pockets machined in it. This was done on my machine using version 4.33 with open loop stepper motors. In machining the back plate, which is a 5 hour program to run, produces the g code error after about 3 hours and did it for a second time.

    I am thinking there is a glitch somewhere, should I try installing a new hard drive in the computer is it a computer problem, is kmotion or kflop the problem, the g code program is generated by fusion 360 and runs in simulated mode without error and with the stepper motor power supply off and the spindle off the g code I ran it without error but it is an intermittent problem. I have run 25 parts yet have at least have had 5 times of those 25 time that a g code error has stopped the program.

    I did not write down any error code, but when I get the g code error and click out of the error another message box appears that I click out of and I restart kmotion and initialize kflop to get kmotion back to working.

    To watch the machine run for 3 hours the have to start over watch it for another 3 hours and stop, has not gotten my part done as in the picture is sitting there half done.

    I nee advice on what to do

    Joe




    G code error-img_0609-jpgG code error-img_0610-jpg

    Attached Thumbnails Attached Thumbnails G code error-img_0609-jpg   G code error-img_0610-jpg  


  6. #6
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    537
    Downloads
    0
    Uploads
    0

    Default Re: G code error

    Quote Originally Posted by mirocha View Post
    Ran g code as simulation ran if a few seconds no error, I am able to switch off power to gecko drives and spindle and ran g code as if cutting material, ran for over five hours, completed g code with no errors.

    The g code failed twice when cutting material, I have had the happen 3 other times on other parts but re-ran the program and on the second run it worked.

    I have only used the machine to make about 25 parts. The machine is proving to be unreliable. What is causing the g code errors? Is it the computer glitching, the software unstable, the kflop board glitching, each time it gives a g code error stopping the program when I restart i loose my zero referance. Restarting with a newly established zero reference is not precisely as as the first, even .001 off causes ridges. Restarting the g code from the beginning and have another g code error is frustrating.

    What is the way to trouble shoot the g code error problem. The aluminum stock was expensive and machining with kmotion has proven unreliable. Again is it a computer issue, hard drive issue, software issue or kflop issue.

    I can't use the machine till the intermittent g code error issue is fixed.

    Joe
    Those are nice looking parts to be made on a router! I have seen this a couple times when running from a USB drive. Run a program several times and its fine, then suddenly an error. But its very rare, like maybe once every couple months and i use my machine a fair bit. I just assumed it was an error with the USB drive, ive never seen it running from hard drive.



  7. #7
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4042
    Downloads
    0
    Uploads
    0

    Default Re: G code error

    Hi Joe,

    I am running version 4.33 on open loop stepper motors. I am in the process of making the parts for the gantry for my machine.
    You might upgrade to V4,34 as well as use Windows Device Manager to update the Drivers to those in V4.34.

    I am thinking there is a glitch somewhere, should I try installing a new hard drive in the computer is it a computer problem, is kmotion or kflop the problem, the g code program is generated by fusion 360 and runs in simulated mode without error and with the stepper motor power supply off and the spindle off the g code I ran it without error but it is an intermittent problem. I have run 25 parts yet have at least have had 5 times of those 25 time that a g code error has stopped the program.
    Its hard to say, but I think it is unlikely to be any of those if it runs without errors with Motor and Spindle power off.

    Sounds possibly like a noise issue from the Spindle or Motor Drivers. Possibly causing Windows to disconnect the USB communication. Or do you have limit switches configured to disable axes that could be falsely triggered by noise?

    You might also try running tests with only Spindle Power or only Motor Drive Power to try to determine the noise source.

    Can you describe your system with regard to wiring, supplies, grounding, shielding? Is the USB cable short, with ferrite cores, and away from noise sources? Did you check the shield continuity to be less than 1 ohm? You might see this.

    I did not write down any error code
    Please be sure to write down exactly what error messages you receive. Also any other possible clues. Such as what the machine was doing, what was the state afterward, etc...

    Regards
    TK http://dynomotion.com


  8. #8
    Member
    Join Date
    May 2017
    Location
    United States
    Posts
    82
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by mmurray70 View Post
    Those are nice looking parts to be made on a router! I have seen this a couple times when running from a USB drive. Run a program several times and its fine, then suddenly an error. But its very rare, like maybe once every couple months and i use my machine a fair bit. I just assumed it was an error with the USB drive, ive never seen it running from hard drive.
    I copy my g code from my computer in my house to a usb thumb drive and use the usb thumb drive on the machine's dedicated computer to load the g code into kmotion. Am I understanding what you are saying is that the usb thumb drive may cause the problem. If so what's your recommendation to transfer the g code?



  9. #9
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    537
    Downloads
    0
    Uploads
    0

    Default Re: G code error

    Quote Originally Posted by mirocha View Post
    I copy my g code from my computer in my house to a usb thumb drive and use the usb thumb drive on the machine's dedicated computer to load the g code into kmotion. Am I understanding what you are saying is that the usb thumb drive may cause the problem. If so what's your recommendation to transfer the g code?
    I normally do the same thing, I run off USB drive 99% of the time, but when I did get an error i just copied the file to the hard drive of the machines dedicated computer and it ran fine. Cant hurt to try anyway especially on a large file like that. I would think kmotioncnc can access the file quicker from the hard drive then from usb, Im not an expert with computers though, could be wrong.



  10. #10
    Member
    Join Date
    May 2017
    Location
    United States
    Posts
    82
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by TomKerekes View Post
    Hi Joe,

    You might upgrade to V4,34 as well as use Windows Device Manager to update the Drivers to those in V4.34.

    Its hard to say, but I think it is unlikely to be any of those if it runs without errors with Motor and Spindle power off.

    Sounds possibly like a noise issue from the Spindle or Motor Drivers. Possibly causing Windows to disconnect the USB communication. Or do you have limit switches configured to disable axes that could be falsely triggered by noise?

    You might also try running tests with only Spindle Power or only Motor Drive Power to try to determine the noise source.

    Can you describe your system with regard to wiring, supplies, grounding, shielding? Is the USB cable short, with ferrite cores, and away from noise sources? Did you check the shield continuity to be less than 1 ohm? You might see this.

    Please be sure to write down exactly what error messages you receive. Also any other possible clues. Such as what the machine was doing, what was the state afterward, etc...
    Ran program again, ran it from the USB and with tool in spindle cutting material to see what g code error message I was getting after 5 hours the program did not fail finished the part. Intermittent problems are the worst. Now all I can do is wait and see.



  11. #11
    Member
    Join Date
    May 2017
    Location
    United States
    Posts
    82
    Downloads
    0
    Uploads
    0

    Default Re: G code error

    I finished the part that took over 5 hours without error. I went to reface the spoil board a simple back and forth cut. I ran the program and took off .003 with out problem 30" X 30" by .003 cut with out problem. Ran the same program to take off another .003 and the I received a G code error. I shut down the machine rebooted the computer and ran the program again and again I got a G code error. The error I got was "Kmotion DDL code error abort" when I closed that window another window popped up "Kmotion Auto Disconnect" and that's that.

    When the machine stopped the all axis stopped and the spindle remained running.

    The Kanalog is mounted using the ungrounded mounting holes.

    I have run this same program at least 30 time before without problem. Nothing has changed, the wiring has remained the same and the Kmotion version 4.33 on open loop stepper motors did not have problems before. The G Code error problem is getting more frequent. The only difference is the thumb drive is the same, 3.8 gig capacity and 1.77mb free its is about maxed out but I don't see that being a problem the program ran the first time and then failed twice the first time on line 90 of the program and the second time after rebooting it failed on line 10.

    Attached is the wiring diagram I am using, the limit switches are fed from a separate 24 volt power supply and optically separated, the usb cable is I believe the one supplied with the kanalog anyway it does have ferrite cores, the shields on the twisted pair limit switch cables are earth grounded not grounded to the kanalog ground but that has been that way all along.

    The spindle is fed with 4 conductor one is a ground wire earth grounded on both ends.

    I have not set up a 4th axis yet so that part of the drawing has not been connected yet, the wiring to the gecko server drive is in place but not connected.

    What do the error messages indicate, is it a kanalog error, computer error, it has run without issue and now the g code error is becoming more frequent making the system unusable.

    Should I consider putting in a new hard drive or a usb isolator. Can I send back the kanalog for you to test it to see if it fails for you under a controlled known noise free environment?

    I know you say KFLOP and KMotionCNC are normally very reliable, I like the program, I like your product and I hate to have to design and rewire for different controller but I'm at a lose I had no g code error issue and now it is getting more frequent and shorter run time before happening.

    Attached Files Attached Files


  12. #12
    Member
    Join Date
    Apr 2007
    Location
    Canada
    Posts
    54
    Downloads
    0
    Uploads
    0

    Default Re: G code error

    I would:
    - Run a full chkdsk on the thumb drive. Also run one on all drives on the computer that is running KmotionCNC.
    - delete unused files from the thumb drive, or ideally just try another one that is otherwise empty with just the file to reface the spoil board. See how that goes.
    - are you ejecting the thumb drive from the other computer before you bring it to the workshop computer? It's possible that the files are being corrupted.
    - how old is the thumb drive? Have you used it a lot? Perhaps it's at it's end of life.
    - It's not clear to me from your schematic but it looks like you have pin 16 of JP11 also tied to chassis ground? Or are you just showing that this is Kanalog ground? Shouldn't be tied to chassis ground.
    - The wire that you use for the analog +/-10vdc between Kanalog JP11 and your spindle VFD, is that shielded? Should be shielded and shield should only be connect at source end (Kanalog ground not chassis). Also this wire should not run parallel to any high voltage power cables, should cross them at 90 degrees. Do you have it in the same cable tray as the VFD power cable?
    - Is your VFD power cable (between VFD and motor) shielded? Should be quality VFD rated shielded cable, grounded at both ends.
    - have you changed any settings in the VFD recently? Like carrier frequency?
    - that it's becoming more frequent could suggest that it's a wiring issue. Perhaps one is being stressed from frequent motion. Are all your cables rated for machine use?
    - check all screw terminals for loose connections!
    - try to use a different computer to run KMotionCNC.

    FWIW I run a system with 3 VFD's all connected to Kanalog, with very long cable runs (65 feet to some limit switches and motors), and while my gcode programs are fairly short they do run for hours. Never seen this problem. I'm running 4.34j.

    Good luck.



  13. #13
    Member
    Join Date
    May 2017
    Location
    United States
    Posts
    82
    Downloads
    0
    Uploads
    0

    Default Re: G code error

    Ran chkdsk on thumb drive and hard drive no errors.
    I do eject I do not just pull out thumb drives.
    I did buy a new thumb drive and will use the new one.
    Pin 16 o JP11 is connected to chassis/earth ground I will remove that.
    The wire for the analog +/- 10vdc is shielded but is ground at the vfd side only as per the Delta C200 instructions should I disconnect the shield from the vfd side and connect it to the Kanalog side?
    I did not change any stings in the vfd.
    All cables are rated for machine use.
    I bought a Samsung solid state hard drive and will change out the hard drive in the computer, just think that would be better for a machine environment, maybe over kill, if problem persists I will try another computer after I fix all the other stuff.
    The power cable from the vfd and motor is shielded, bought as a vfd shielded cable from uargra however I did not ground the cable shield at either end, I will do that.
    The cables to the limit switches are twisted shielded and chassis grounded on one end at the control panel, is that proper?
    The cables to the stepper motors are twisted shield cables grounded on one end at the control panel, is that proper?
    The negative side of the power supplies feeding the Gecko drives feeding the stepper motors are chassis grounded on the negative side in the control cabinet, is that proper?
    The usb cable is draped over a gecko drive, I will move that. Should I get a usb isolator or wait and see if the other fixes solve the problem or is it just a good practice to use an isolator?

    Please let me know about the questions I asked and I will let you know the results, It will take me a week or two to getter done.

    Thanks Joe



  14. #14
    Member
    Join Date
    Apr 2007
    Location
    Canada
    Posts
    54
    Downloads
    0
    Uploads
    0

    Default Re: G code error

    The Delta manual wiring diagram most likely shows grounding the shield at the VFD when the VFD is the source of the analog signal, such as when using a potentiometer. However now the source is the KAnalog, so ground the shield at the source, KAnalog. See https://www.winemantech.com/blog/top...-test-systems/

    Typically, only one end of a shied is terminated, and is terminated at the zero-signal reference potential (common) for the signals contained within a shield.
    For best practices for wiring VFD see this document:
    https://info.belden.com/hubfs/resour...=1531332510474

    From above:
    Do I terminate the shield at both ends?
    Drive cable shields should always be terminated at the motor and
    at the drive. Intermediate termination of the ground or shield is not
    recommended. The shield acts as a conductor for common mode current
    containment. Failure to terminate the shields and grounds properly could
    result in harmful electrical noise or destructive common mode currents
    flowing in the ground grid. Intermediate grounding of the shield can cause
    the unintended release of shield currents and resulting electrical noise.
    I don't have the answers to all your questions. I would check with Gecko. If you mean the DC power supply V- output, I would think no. As you've now coupled your DC ground to the noisy AC ground. But I don't have any experience with that type of setup.

    My simple rules are to keep the AC high voltage ground (VFD, power supplies etc) separate from the low voltage control common/grounds (kflop/kanalog, 5/24VDC power supply).

    An isolator can't hurt. I use one between my laptop and KFLOP.


    Greg.



  15. #15
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4042
    Downloads
    0
    Uploads
    0

    Default Re: G code error

    Hi Joe,

    Could you check the USB shield connectivity with an ohm meter like I asked before?

    I assume you meant to say KMotionDLL - GCode Error.

    From your diagram it looks like you have a lot of earth gnd connections and ground loops. Basically no KFLOP or Kanalog connectors should have earth ground connections. Ideally all the Gecko 70V motor power circuitry and the 24V circuitry should be totally isolated or connected together at one point. I like to remove all earth ground connections and verify infinite resistance between circuits to be sure there are no connections then either leave the circuits isolated or add one connection. A USB isolator may be needed to achieve this.

    Regards
    TK http://dynomotion.com


  16. #16
    Member
    Join Date
    May 2017
    Location
    United States
    Posts
    82
    Downloads
    0
    Uploads
    0

    Default Re: G code error

    Thanks for the replies, I installed a solid state hard drive and have a new thumb drive I will use. I upgraded to version 4.34 and copied the data files to the upgraded version. When I added the copied files I had to copy all the individual data files copying the entire folder did not work kmotion would not run but copying only the files and replacing files seems to work.

    You said "You might upgrade to V4,34 as well as use Windows Device Manager to update the Drivers to those in V4.34."

    I can get to the Windows Device Manager but don't know how to update the drivers to those in V4.34 I need the steps to do that.

    After installing the solid state hard drive now when I run a simulation of g code in kmotion it runs so fast the only way you can tell it ran is the axis numbers change to the last command. I intentionally put a bad line of code in the g code and the simulation stops at the bad line of code with an error so I know its working.

    This is a work in progress. I will remove the chassis ground from the stepper motor supplies, I will connect the stepper motor wire shield only at one end to the VDC negative at the stepper motor power supply.

    I will connect the limit switch wire shields only at one end taking them off of chassis ground and connect them to the isolated VDC Negative.

    I will add a USB isolator, I will check for less than 1 ohm when I get new batteries for my meter or would the USB isolator take care of any issue with the cable? Should I just get a new cable?

    Does the above sound like the proper way to ground the shields?

    Thanks Joe



  17. #17
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4042
    Downloads
    0
    Uploads
    0

    Default Re: G code error

    Hi Joe,

    You said "You might upgrade to V4,34 as well as use Windows Device Manager to update the Drivers to those in V4.34."

    I can get to the Windows Device Manager but don't know how to update the drivers to those in V4.34 I need the steps to do that.
    See here

    This is a work in progress. I will remove the chassis ground from the stepper motor supplies, I will connect the stepper motor wire shield only at one end to the VDC negative at the stepper motor power supply.
    I'm thinking that earth ground might actually be ok or not a major issue. Probably more important to remove the KFLOP/Kanalog connections to earth ground.

    I will add a USB isolator, I will check for less than 1 ohm when I get new batteries for my meter or would the USB isolator take care of any issue with the cable?
    Even with a USB isolator the cables should be shielded. In fact you will then have 2 cables and both should be shielded.

    Should I just get a new cable?
    Our experience it that there are many cables that have poor shield connections. So it is best to check to be sure. Basically they lay a wire against the shield and hope it makes connection. Ironically twisting and flexing the cable often "fixes" the cable. So it is also a good idea to flex the cable a bit and verify there is always a solid connection.

    Thanks for your patience.

    Regards
    TK http://dynomotion.com


  18. #18
    Member
    Join Date
    May 2017
    Location
    United States
    Posts
    82
    Downloads
    0
    Uploads
    0

    Default Re: G code error

    G Code error work in progress

    The good !

    Grounded spindle cable shield on both ends, at spindle and at VFD.

    Moved limit switch cable shields from chassis ground to 24vdc power supply negative.

    Removed chassis ground from Pin 16 on JP11.

    Upgraded to solid state hard drive.

    Will use new thumb drive.

    Connected the wire shield for the VFD analog +/- 10vdc to the ground on the Kanalog ground.

    Upgraded Kmotion to version 4.34.

    Installed usb isolator SMAKN USB Isolator USB Digital Isolator, bought on Amazon, plugs into USB port, no extra cable required, uses same isolation chip as Olimex.

    Left power supplies negative for stepper motors chassis grounded based on reading Gecko recommendation on noise prevention.

    The stepper motor cable shields are connected to chassis ground at the power supply end only but I did find one stepper motor shield was laying on the metal frame of the machine, I missed shrink tubing around it, it is now shrink tube insulated.


    The not so good !

    My USB cable shield resistance is way over 1 ohm, cable is 6 feet long, ordered and waiting for a new 3 foot cable.

    Found I also chassis grounded Kflop JP4 pins 8 and 9, I removed those grounds.

    Found I also chassis grounded Kflop JP6 pins 8 and 9, I removed those grounds.

    When I get the new usb cable I give it a try and see if all this solves the intermittent G code error.

    Just giving an update.

    Joe



  19. #19
    Member
    Join Date
    May 2017
    Location
    United States
    Posts
    82
    Downloads
    0
    Uploads
    0

    Default Re: G code error

    Just an update, I did all the upgrades as in the previous posts. I have run the machine for 3 days without a G code error, still concerned, will have to wait and see if this did the trick.


    Joseph



  20. #20
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4042
    Downloads
    0
    Uploads
    0

    Default Re: G code error

    Hi Joe,

    Thanks for taking the time to post back.

    Regards
    TK http://dynomotion.com


Page 1 of 2 12 LastLast

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

G code error

G code error