Page 1 of 3 123 LastLast
Results 1 to 12 of 34

Thread: Issue with G Code

  1. #1
    Registered
    Join Date
    Oct 2010
    Location
    USA
    Posts
    61
    Downloads
    0
    Uploads
    0

    Issue with G Code

    This may not be the right place for this, but since I'm using a Kflop board and I'm not sure if this may be setting issue in KMotion, I thought I'd ask.

    When I try to cut the Mach3 roadrunner the second outline always ends up about 1/2" off in the Y axis.

    When I try to cut the attached machine check pattern I created, everything's perfect until the first circle is cut. The first quarter of the circle cuts fine and then the second quarter ends up being a straight line along the x-axis. (Basically the Y positions in the G1 code are ignored) The tail end of the second quarter (like the last 1/16") cuts fine and then the last half of the circle completes fine. Clear as mud...good. Once this happens, the remainder of the pattern is about a 1/2" off, but cuts OK.

    This is totally repeatable. Running slow or fast or even a different position on the table, the error occurs in the same spot.

    I attached a picture of what I'm try to explain.

    I've already changed the IJ Mode to Inc, which fixed a lot of arc cutting issues. But these two issues have above have been the same no matter what the IJ Mode is set to.

    I've attached my machine check pattern if someone could take a look, that would be awesome.

    Thanks,
    Dennis
    Attached Thumbnails Attached Thumbnails Issue with G Code-img_20120209_112806.jpg  
    Attached Files Attached Files


  2. #2
    Registered holbieone's Avatar
    Join Date
    Feb 2007
    Location
    usa
    Posts
    634
    Downloads
    1
    Uploads
    0
    this is what it plot out to for me
    Attached Thumbnails Attached Thumbnails Issue with G Code-capture.jpg  


  3. #3
    Registered
    Join Date
    Oct 2010
    Location
    USA
    Posts
    61
    Downloads
    0
    Uploads
    0
    Did you try it on your mill? Mine looks fine in Mach3 as well. The issue would be noticeable even if you did an air cut.

    Thanks,

    Dennis


  4. #4
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,306
    Downloads
    0
    Uploads
    0
    Is your Y motor stalling?
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

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


  • #5
    Registered
    Join Date
    Oct 2010
    Location
    USA
    Posts
    61
    Downloads
    0
    Uploads
    0
    No. I thought that at first so I ran very slow so i had plenty of torque and it still has the same problem.

    I had the problem on a production piece I ran last night. The part of the Gcode where the issue happened was a list of G1's making an arc. Same as in the Machine Check program and the Roadrunner.

    I replace the line segments in the production part so now the Gcode is using one G2 instead of 15 G1's to create the arc. I'm going to run it in a little bit to see if it helps.


    Dennis


  • #6
    Registered
    Join Date
    Oct 2010
    Location
    USA
    Posts
    61
    Downloads
    0
    Uploads
    0

    Thumbs up

    Well, I think it's fixed.

    I replaced the motor and the problem seams to have gone away. I'm cautiously optimistic right now.

    I don't really understand how the motor could be the issue since the problem could be reproduced at different speeds and table locations...

    Time will tell.

    Thanks for the input,

    Dennis


  • #7
    Registered
    Join Date
    Oct 2010
    Location
    USA
    Posts
    61
    Downloads
    0
    Uploads
    0
    Well that success was short lived.

    Same issue, different motor and acceleration.

    I could cut my test pattern, but the Roadrunner looked like a baby's artwork and the production part I tried to cut failed with the same issue it had before, but in a different area.

    I had to skip over one little part of a job I cut last night because the Y-axis just wouldn't follow the Gcode. It's always the Y-axis.

    Tom or anyone, could this be a timing issue between Mach3 and KFlop of some kind? Grasping at straws right now.

    This is really getting frustrating. I need to get orders out the door, but I'm wasting time and material...

    Thanks,

    Dennis


  • #8
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,306
    Downloads
    0
    Uploads
    0
    Perhaps some loose wiring connections on that motor?
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

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


  • #9
    Registered TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    454
    Downloads
    0
    Uploads
    0
    Hi Dennis,

    It does sound like a Stepper Motor Stall to me.

    Can you run Simple GCode and demonstrate a problem? It sounds like you did at one point. Is that still failing?

    There is a GCode Example called Polygon.ngc in the KMotion\GCode Programs directory that can generate polygons with any number of sides that might make a good test.

    What type of Stepper Drives do you have? KFLOP outputs ~ 1.9us pulses by default. That can be increased and optionally inverted with a line of C code.

    Maybe post all your settings for Mach3 so we can look them over?

    Is this a new machine or was it working fine before? What is the mechanical arrangement? Size, etc...

    Regards
    TK
    TK
    http://dynomotion.com


  • #10
    Registered
    Join Date
    Oct 2010
    Location
    USA
    Posts
    61
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by TomKerekes View Post
    Hi Dennis,

    It does sound like a Stepper Motor Stall to me.

    Can you run Simple GCode and demonstrate a problem? It sounds like you did at one point. Is that still failing?

    There is a GCode Example called Polygon.ngc in the KMotion\GCode Programs directory that can generate polygons with any number of sides that might make a good test.

    What type of Stepper Drives do you have? KFLOP outputs ~ 1.9us pulses by default. That can be increased and optionally inverted with a line of C code.

    Maybe post all your settings for Mach3 so we can look them over?

    Is this a new machine or was it working fine before? What is the mechanical arrangement? Size, etc...

    Regards
    TK
    Tom,

    I could accept it being a motor stall if it did it randomly. The fact that the problem happens in the exact same spot in the job regardless of motor speed or where on the table I position the job just make the stalling motor idea hard to swallow.

    I've ran the Roadrunner that comes with Mach3, which I still can't cut.

    I've ran my machine check pattern that I created, which I can cut now that I've replaced the Y-axis motor.

    I've cut about 10 different products that I sell of which 2 have repeatable failures points still.

    I've attached the spec sheets for both the motor and the drive I'm using.

    The motor is wired Bipolar (Parallel).

    The drive is set to half step, half current and 6 amps.

    I'm running the motors on 48VDC.

    I've been running this machine for over a year using EMC2 without any issues. I just upgraded the Y-axis to linear rails (which move nice and smooth without binding), but the .1 pitch acme screw has been running on the Y-axis for about 10 months, see attached picture.

    The other upgrade was to the KFlop and dual screws on the X-axis, which was working fine until I changed from JP7 to JP5.

    Thanks,

    Dennis
    Attached Thumbnails Attached Thumbnails Issue with G Code-dsc_2982.jpg  
    Attached Files Attached Files


  • #11
    Registered TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    454
    Downloads
    0
    Uploads
    0
    Hi Dennis,

    It sounds like the problem is a Stepper Motor Stall. When we say this it doesn't necessarily mean that it is the fault of the motor or your mechanism. It could well be a bug or hardware problem or wrong setting. But the more facts we can get the more we can help you. Usually a stall is pretty obvious where the motor just stops, buzzes, and then the position is shifted by the amount it was supposed to move while it was sitting still and buzzing. As soon as the motor slows down enough the stepper will come back into sync and start moving again.

    Looking through the XML I noticed you have the Dynomotion Buffer Time set at 3000 seconds. That shouldn't matter but please try setting it to 10 seconds instead.

    Looking at the Driver Manual the specs on the Driver pulses are min pulse of 1.2us and min direction setup of 5us. The default pulse from KFLOP is 2us so that should be ok. But the default Dir Setup in that case is either almost zero or 2us depending on the pulse polarity. The manual says you need to look inside to find out the polarity (??). But unfortunately the max setting for KFLOP is 4us of setup which doesn't quite meet their spec. But I doubt if that is the problem. Not enough Dir Setup usually causes a possible step in the wrong direction whenever the direction reverses. This can result in a drift after many reversals. But lets set the pulse length to max anyway to see if that helps. Let's also try inverting the pulse polarity to see if that helps. Add the following line to your Init.c program near the beginning.


    FPGA(STEP_PULSE_LENGTH_ADD) = 0x80 + 63; // set inverted and to max 4us

    if that doesn't help try max puls without inverting as:

    FPGA(STEP_PULSE_LENGTH_ADD) = 63; // to max 4us



    Besides that I'm a little suspicious of your Y axis. Your acceleration is fairly slow and half stepping which is a good combination to stall under certain motions which seems to be what is happening. And ironically friction can dampen resonances to avoid problems but apparently you just made a change to reduce friction. I'm just guessing and grasping at straws here.


    I don't see why you are half stepping? Increasing the microstepping should smooth things out and help avoid resonant stalls. Why not try that? Just change the drive then change the Mach3 motor resolution to match.

    BTW I don't understand what the Drive setting "Half Current" does?

    Sorry for not having a simple answer...
    Regards
    TK
    http://dynomotion.com


  • #12
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,306
    Downloads
    0
    Uploads
    0
    The drive is set to half step, half current and 6 amps.
    First, you should be using 1/8 or 1/10 microstepping. Half step is much more likely to stall from resonance.

    Second, what is half current? I didn't see it mentioned in the .pdf.
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

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


  • Page 1 of 3 123 LastLast

    Similar Threads

    1. Need Help!- G code issue
      By bipe in forum Mastercam
      Replies: 4
      Last Post: 12-13-2010, 07:01 PM
    2. Haas OL1 M code issue...live spindle HELP
      By Devet14 in forum G-Code Programing
      Replies: 0
      Last Post: 09-14-2010, 05:43 PM
    3. Need Help!- G-code issue on G81 / G99
      By tikka308 in forum BobCad-Cam
      Replies: 5
      Last Post: 03-30-2008, 04:01 PM
    4. Solid cam issue, filleted corners in g code
      By ozturbo in forum Solidworks
      Replies: 1
      Last Post: 09-19-2006, 06:15 PM
    5. Help with selector switch wiring issue (***actually a motor issue***)
      By BEDFORD in forum Industrial Hobbies (Support forum)
      Replies: 7
      Last Post: 04-07-2006, 04:19 PM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.