587,202 active members*
3,092 visitors online*
Register for free
Login
Page 1 of 2 12
Results 1 to 20 of 23
  1. #1
    Join Date
    Jan 2008
    Posts
    18

    G540 debug problem

    Let me start by saying I'm new to this stuff and just getting my first project together. It's an X - Y table with the following:

    KL23H284-35-4B Motors
    KL-350-48 48V/7.3A Power Supply
    G540 Drive
    Mach3 Software


    I'm having trouble with getting my table to move correctly. The problem is sometimes the X & Y move and sometimes they don't. They never fail to jog or home correctly - only when I'm running a program. For example, if I try to cut a square, it may start out cutting in the X direction fine, then when it gets to the Y move, it sometimes moves, sometimes don't, and sometimes after it's supposed to be halfway through the cut it will start to move. Then the same behavior on the X. All the while, the digits on Mach's DRO are clicking off as if it should be moving. I've tried feed rates of 2 -6 inches per minute and this happens even if cutting air. I added 2 micro seconds to the step with no appreciable improvement. I don't think it's cable connections otherwise it wouldn't jog and home correctly as it does.

    I'm not real tech savy so only thing I know to try is maybe a different parallel cable connecting the G540 to the computer. Any other suggestions GREATLY appreciated.

  2. #2
    Join Date
    Jan 2008
    Posts
    18
    Oh two other things. I tried changing the X output pins and run it on the Z driver and got the same results. And I also noticed the G540 was warm. Am I doing something to over heat it?

  3. #3
    Join Date
    Jan 2008
    Posts
    18
    Thought of something else. Computer:

    Dell 2350 with 1.8 GHz Processor and 512 Ram. I installed a separate video card last weekend and turned off the onboard driver.

  4. #4
    Join Date
    Apr 2007
    Posts
    327
    Are the steppers making any noises when they should be turning? If so, you may need to reduce the acceleration or speed in Mach. Unless you have a binding issue you should be able to get at least 100ipm out of those motors, if not more. I get over 120 out of mine and I am using a 24v psu.

    What are the settings in motor tuning? Speed and acceleration.

    Gary

  5. #5
    Join Date
    Jan 2008
    Posts
    18
    No, I don't recall any noise when they should be moving.

    Just went out and checked settings. Speed 75 in/min Acceleration 5 in/min. It seems to jog, home, and maybe even rapid fine. It's just flaky when I'm trying to run G code.

  6. #6
    Join Date
    Jan 2008
    Posts
    18
    I may have made an important observation today when trying out a new cable. Whenever I ran a program at 6 ipm it seemed to run and repeat fine. When I slowed it down to 2 ipm, the problem came back. Does this sound more like a Mach problem or G540 problem?

  7. #7
    Join Date
    Mar 2003
    Posts
    35538
    Quote Originally Posted by gotfdirtball View Post
    Does this sound more like a Mach problem or G540 problem?
    More like a PC problem. Is the port set to EPP in the bios? You have the pulse with set to 2 in the motor tuning? Try setting the pulse width to 30 or 40. It's worked for others who've had similar problems.
    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)

  8. #8
    Join Date
    Jan 2008
    Posts
    18
    Thanks Ger21. That just may have fixed it!!!!!!! I also noticed I didn't have the problem until I actually turned the mill on. It must be some noise feeding back from the 220V motor on the bridgeport and the added step pulse width seems to have cured it. I actually worked up the courage to cut a part and it came out perfect!!!

    I may also put a UPS on the computer and power supply to try to ward off noise.

    Thanks again,

    Jerry S.

  9. #9
    Join Date
    Mar 2003
    Posts
    35538
    The long step pulse is not a fix, it's a hack to work around an electrical issue. If it doesn't hinder you're speeds, then you probably don't need to worry about it.


    Quote Originally Posted by gotfdirtball View Post
    Thanks Ger21. That just may have fixed it!!!!!!! I also noticed I didn't have the problem until I actually turned the mill on. It must be some noise feeding back from the 220V motor on the bridgeport and the added step pulse width seems to have cured it. I actually worked up the courage to cut a part and it came out perfect!!!

    I may also put a UPS on the computer and power supply to try to ward off noise.

    Thanks again,

    Jerry S.
    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)

  10. #10
    Join Date
    Aug 2008
    Posts
    1166
    I have this exact same problem, but with my Z axis. See my post in the mach3 forum for more details:
    http://www.cnczone.com/forums/showthread.php?t=76084

    Gerry, I have not gotten to try your suggestion yet but I will once I get my Y axis thrust bearing working again, hopefully tonight. I was just surfing around for a few minutes looking for other things to try when I get the time and found this.

    Similarly, in the move I noticed the Z axis not moving, the Z was supposed to be moving very slowly. However, the X and A (slaved) were also moving very slowly and seemed to be doing fine. The Y was moving quickly - traversing 4 feet at ~ 150ipm. Also, the Z would randomly miss steps - it was not a consistent amount of motion that would be lost.

    One piece of information I can add is that my machine has this problem even when my router (spindle) is not running. Does anyone have an idea as to what could be causing noise problems or where to look? Would this be noise on the power input to the computer that makes it to the parallel port outputs or something like that? Could noise be making it in to the system from something connected to the G540? I'd rather understand it and fix the source.

  11. #11
    Join Date
    Aug 2008
    Posts
    1166
    I tried this (25us step pulse) this weekend and it seemed to fix the problem. It's hard to say for sure since it was intermittent, but I haven't had problems with the things I've been cutting.

  12. #12
    Join Date
    Aug 2008
    Posts
    1166
    So my Z-axis problem has reared it's head again after about 6 months of no problems. It failed to move up after a cut and destroyed all the parts I'd just been cutting for 2 hours by slicing through them at full depth. Then it plunged the bit through my spoil board into an aluminum rail on my machine because it thought it was above the material. That's when the router tripped the fuse in my power strip and everything shut down. Of course that part's my fault for not have a limit switch at the bottom of my z travel. I checked my code and it was fine.

    So the longer step pulse was not a permanent fix. Does anyone know what the root problem is here? Is it the the parallel port not putting out good pulses? I have a scope and can look at this stuff. I just don't really know what to look at or for. It seems odd to me that it would be the computer - I would think I would have been having random errors on all my axes before. The Z axis cable is the longest, so I would think it might be noise pick up (although the cable is shielded) or something in the G540 since it's only on the one axis. So I will try shortening my step pulse again tonight, try to duplicate the error, then try swapping to a different driver in the G540 for the Z axis to see if I still only have z axis errors. That should at least eliminate the cabling to the motor.

    Any thoughts appreciated. This is shutting down my production (even though it's just a part time thing), so I'm really anxious to figure this out.

  13. #13
    Join Date
    Aug 2008
    Posts
    1166
    After reading the thread right below this one (which of course I did not find until after I posted - http://www.cnczone.com/forums/showthread.php?t=86339), it appears I have a bad chip but I will still verify this problem stays with the board tonight. If it does I'll contact Gecko about a replacement.

  14. #14
    Join Date
    Aug 2008
    Posts
    1166
    I sent my G540 back to Gecko. They looked at it, said they couldn't find a problem and sent me a new one just in case. I installed it tonight and still have the same problem. I've now gotten a bit better at causing the problem (missing steps) - I just run any one of the axes at very low speed. Adjusting the trim pots seems to help - I don't get many lost steps on one axis, but the other three are still bad to varying degrees. However, I think I can now conclude that the problem is not the G540. That leaves me with my cables/motors/machine or my computer.

    Along those lines, what would be I looking for from the computer? I have an oscilloscope. Am I just looking for clean, rectangular, regularly spaced pulses at 5V on the step pin from the printer port?

  15. #15
    Join Date
    Aug 2008
    Posts
    1166
    I took a quick look at the step and direction outputs at the end of my db25 cable. I hooked pin 6 (z-axis step) to a 1kohm resistor to pin 20 (ground). At 5V that should make 5mA of current flow. I saw a max of about 4V which would be 4mA. My brain was getting frozen (along with my fingers), so it slipped my mind to measure a longer step pulse. However, I did look at the direction signal and that made it up to about 4.4V, or 4.4mA, so I'd say that's the max current that I was getting out of my port. Here's the pulse - 1V/div vertical, 0.5us/div horizontal, mach3 set to 2us pulses:



    This is with the LPT port on the motherboard.

    I read that the G540 needs 5mA to drive its inputs. Should I try loading my port with a lower resistance to see if it can source more current? If it can't, I assume that would mean I should look into getting a break out board for the LPT port. If it can source the current, what's the lowest voltage it can sag to for the G540 to still see the pulse as a pulse - 3.3V? Any comments appreciated.

  16. #16
    Join Date
    Dec 2004
    Posts
    1865
    Quote Originally Posted by jsheerin View Post
    I took a quick look at the step and direction outputs at the end of my db25 cable. I hooked pin 6 (z-axis step) to a 1kohm resistor to pin 20 (ground). At 5V that should make 5mA of current flow. I saw a max of about 4V which would be 4mA. My brain was getting frozen (along with my fingers), so it slipped my mind to measure a longer step pulse. However, I did look at the direction signal and that made it up to about 4.4V, or 4.4mA, so I'd say that's the max current that I was getting out of my port. Here's the pulse - 1V/div vertical, 0.5us/div horizontal, mach3 set to 2us pulses:



    This is with the LPT port on the motherboard.

    I read that the G540 needs 5mA to drive its inputs. Should I try loading my port with a lower resistance to see if it can source more current? If it can't, I assume that would mean I should look into getting a break out board for the LPT port. If it can source the current, what's the lowest voltage it can sag to for the G540 to still see the pulse as a pulse - 3.3V? Any comments appreciated.
    How about an inexpensive pci card lpt.
    Search the zone and you will find what other people use.
    Warning: DIY CNC may cause extreme hair loss due to you pulling your hair out.

  17. #17
    Join Date
    Aug 2008
    Posts
    1166
    Here are some more scope pictures. This is with the outputs of the x and y step pins of the lpt port loaded with 560 ohm resistors. The traces are of the y pin.

    Traveling up - 1V:


    And traveling down - 3.3V:


    So for some reason there's a dc voltage offset when the direction is decreasing y and way too low a voltage when the offset isn't there. Also, this voltage offset stays on after the pulses stop. So I guess that would make sense as to why my machine tends to go one way and not the other and thus lose its position... The strange thing (to me) is that in use, the motion seems fine at higher speeds, but looking at the step pulses, the behavior stays the same at higher speeds. So I don't know what is changing that lets things work as speed increases. Additionally, this behavior didn't change when I lengthened the pulse width to 20us, so I don't know why that was helping previously.

    So now the question is if it's my port not behaving correctly or something else (software or hardware setup), but I think the easiest way to eliminate the port is to find a card I can put in. That will be this weekend's project.

  18. #18
    Join Date
    Feb 2007
    Posts
    456
    Some PCs have a very tough time generating a proper pulse stream with the LPT. It is always best to start with a fresh install of Windows and them optimize per the instructions on Mach's site. Sometimes an add-on PCI parallel port card does the trick, sometimes it does not, even on new and otherwise high-end PCs.

    I would also suggest looking at more than pulse on the scope. It you see a lot of jitter it is a sign that Mach is having problems getting a consistent interrupt to service the LPT driver. One work around is to turn on 'Sherline 1/2 pulse mode'. This stretches the output pulse length and makes it easier on the driver.

    If your PC still won't produce a good pulse stream it is either replace it or try an external motion control card like a SmoothStepper.
    Jeff Birt

  19. #19
    Join Date
    Aug 2008
    Posts
    1166
    Thanks for tips. Just to clarify, this was a fresh install of XP and the computer was optimized per the mach instructions. From looking at the diagnostic tools with Mach, it should work fine. I haven't actually turned on the Sherline mode, but changing the step pulse length to 20us did help motion at higher speeds. However looking at the step signals on the scope, I'm not sure why this would be. In any case I still have motion problems at low speeds, so I've concluded that the lengthened pulse is not a solution for my setup. I've got a LPT card ordered, so hopefully I can try that later this week.

  20. #20
    Join Date
    Feb 2007
    Posts
    456
    The Mach driver test is based on the interrupt latency. If the driver test looks good then it is likely a hardware related problem. Sometimes a LPT card will do the trick, sometimes it is a problem with the mother-board's chipset and the PC will just not work with the LPT driver. Sometimes it can even be the LPT cable itself.
    Jeff Birt

Page 1 of 2 12

Similar Threads

  1. G540 Spindle speed output voltage problem
    By georgef8 in forum Gecko Drives
    Replies: 5
    Last Post: 09-22-2009, 04:18 PM
  2. G540 Rev.1 has problem
    By sse4 in forum Gecko Drives
    Replies: 6
    Last Post: 02-25-2009, 02:48 PM
  3. G540 problem, steppers not moving
    By CS900 in forum Gecko Drives
    Replies: 36
    Last Post: 11-13-2008, 05:38 PM
  4. G540 fault problem
    By jemmyell in forum Gecko Drives
    Replies: 12
    Last Post: 10-21-2008, 11:50 PM
  5. Help needed to Debug G41 G42 problem
    By Al_The_Man in forum Uncategorised CAM Discussion
    Replies: 4
    Last Post: 07-06-2004, 12:22 AM

Posting Permissions

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