Author Topic: Losing steps in Z  (Read 5811 times)

Jarhead

  • Posts: 16
    • View Profile
Losing steps in Z
« on: April 13, 2016, 11:14:24 PM »
Hello,
I just found out I'm losing steps in the Z axis, never noticed until I just tried to cut a lithophane. All the rapid Z movements involved really showed it.
I tried everything I could think of to figure out why, including lowering vel and accel, changing cables, swapping motors, swapping pc's, and rewiring everything.
No changes.
I then started looking at the USB connection. I took the PMDX-410 out of my control cabinet and it did get better but It's still happening.
Is there any way to determine if it is the 410 causing this??

My setup is originally an intel NUC running Win 10 Pro (went to a win7 pro when I swapped PC), to the 410, parallel to a G540, to a NEMA23 380 oz-in motor with a 1/2"- 10 single start leadscrew, Velox ZA800QR Z carriage with a porter cable 7518 and superPID.
All cables are shielded and grounded at the control box end, all to a common ground.

The lost steps are always moving the Z in the + direction, so If I start at 0, by the end of the lithophane I'll be somewhere near +.1.

Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: Losing steps in Z
« Reply #1 on: April 14, 2016, 01:18:16 AM »
(1) When this happens, does the Z axis DRO reflect the actual, incorrect, height (i.e. around +0.1)?  Or does the DRO reflect the the ideal position (i.e. 0.0, I presume)?

(2) If the Z axis ends up more positive that it should, that means that it is missing motion in the *negative* direction, not the positive direction.  Is positive Z motion going up (i.e. if Z is at zero and you enter "G0Z1" does the z axis move up or down)?  If so, the missing

(3) What version of Mach4 and SmartBOB plug-in are you running?

Eventually I may ask for a profile package and possibly a GCode file that exhibits this problem.  But not yet.

Bob
Engineering Hell: Everything's right and nothing works.
Bob's Corollary: If everything's right and nothing works, double check your assumptions.

Jarhead

  • Posts: 16
    • View Profile
Re: Losing steps in Z
« Reply #2 on: April 14, 2016, 08:15:34 AM »
1) It shows as 0.
2) Positive is going up. Looks like you didn't finish this question?
3) Latest of both, Mach4 = 2914. PMDX = 0.38.188

Is there an option to extend the pulse width in the 410? I can't remember but I think I saw that option. I think I remember the G540 was "funny" with pulse width settings. Is that something you would suggest to try?

Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: Losing steps in Z
« Reply #3 on: April 14, 2016, 11:13:26 AM »
Oops, yeah I didn't finish #2.  Danger of responding late at night.  If the Z axis ends up more positive, meaning higher up, that means that it is missing steps in the downward (negative) direction.  This is not the usual case for Z axis errors as the "up" direction is usually harder since up requires working against gravity.  Going down you have gravity helping.

Yes, you can change the step pulse width.  Go to our plug-in configuration dialog and click on the "Motor Config" tab.  You can select 5, 10 or 20 microsecond pulse widths.  According to the G540 documentation, 5us pulse width *should* be fine.  But it couldn't hurt to try 10 or even 20 (if your max velocity will allow that - the plug-in will warn you if not).

If the DRO shows the correct position according to the GCode, that means that the PMDX-410 is generating the proper step pattern.  Hmmm... or else the PMDX-410 it is somehow missing an equal number of positive and negative going steps.  But that wouldn't give you the physical position error you are seeing. 

You say you tried swapping motors, cables, etc.  Did you try using a different G540 motor output?  For example run the Z axis from what the G540 labels as the "Y" axis (and changing the axis mapping in Mach4 accordingly).

I am puzzled that  removing the PMDX-410 from the control cabinet changed (but didn't fix) the problem.  I'll have to think about that a bit.

Possible causes of the physical position error include:
- under powered motor (driving with too low a current setting), though again this usually manifests itself
  with the Z axis ending up lower than expected.
- motor voltage too low and/or step rate too high and the motor can't physically respond fast enough.
  I would expect this kind of problem to affect both directions of travel, unless the down motion is always
  faster (in the GCode) than the up motion.  And you said you tried lowering the max velocity, which
  should work around this issue *if* you lowered it enough (and how much is "enough" I can't say
  other than try 1/2 and 1/4 of your original velocities).
- Time between changes in the direction signal relative to step pulses (called setup and hold times).
  The G540 manual calls for 200 microseconds [EDIT: that should be NANO seconds] for setup and hold,
  which the SmartBOB devices should easily meet.  Unless you have an incredibly high acceleration
  and feed rate.  But again, I would expect
  that is this were the issue that it would manifest itself with a more random position error.

Of these possible causes, the last (setup/hold times) would be a SmartBOB issue, if that is an issue.  Try changing the step pulse width and swapping motor connections on the G540 (if you haven't already) and see if that changes anything.
« Last Edit: April 15, 2016, 10:51:12 AM by Bob at PMDX »
Engineering Hell: Everything's right and nothing works.
Bob's Corollary: If everything's right and nothing works, double check your assumptions.

Jarhead

  • Posts: 16
    • View Profile
Re: Losing steps in Z
« Reply #4 on: April 14, 2016, 10:50:10 PM »
Bob, I need some clarification on something... You asked what the DRO reading is, after running a litho gcode, if I do a G0 Z0 MDI, the DRO obviously shows 0 but the bit is above the material.
After changing the pulse width to 20us, it's better but still not right. So G0 Z0 ends above material, but if I then move to tip to touching the material the DRO now reads -.026". So the bit ends up .026 above the material at where Mach4 thinks it's at zero.
Make sense?? not sure if that's what you meant?
Really confusing myself at this point, being that the pulse width made a difference but still not right.

Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: Losing steps in Z
« Reply #5 on: April 15, 2016, 10:49:52 AM »
Yes, that is what I meant.  If the SmartBOB were somehow missing motion info from the Mach motion planner, the actual position reported back to Mach4 would not match the commanded position.  So after your "G0 Z0" command, the DRO would have read some non-zero value.  Since the DRO *does* match the commanded position, that means that the SmartBOB believes it has generated all requested step pulses (see note below).

Changing the step pulse width to 20us changed (improved) the behavior but did not fix it.  That is baffling.  As was your earlier report that removing the SmartBOB from your chassis also improved but did not fix this issue.  There is something I'm missing here.

- Have you checked the X and Y axis to see if they also have this issue?
- Please send me a profile package, and if possible a GCode file that causes this problem (the smaller the better).
  You can post them to this forum topic or email them directly to me at bob at this domain.

NOTE: The PMDX-410 uses hardware inside the processor to generate the step pulses.  The hardware generates an interrupt every time it starts a pulse, and that interrupt increments or decrements the position value that is reported back to Mach4.  I guess it is hypothetically possible that the interrupt could be triggered yet the pulse not actually be generated.  Or the pulse be corrupted somehow.  But again, *if* that were happening I would expect it to affect both directions of travel.

Bob
Engineering Hell: Everything's right and nothing works.
Bob's Corollary: If everything's right and nothing works, double check your assumptions.

Jarhead

  • Posts: 16
    • View Profile
Re: Losing steps in Z
« Reply #6 on: April 15, 2016, 11:06:24 AM »
Have you checked the X and Y axis to see if they also have this issue?

I haven't seen any problem with the other two axes but I also didn't see a problem with the Z until doing a lithophane. I have done other 3d carvings with no noticeable deviation in the Z.
So to answer your question, No, I have not checked the X and Y but only because I have no idea how to. I've been trying to come up with a way to generate the type of movement the litho causes in the Z, in the other two axes, but I am not having any luck there. I will say that I changed the pulse width on all motors though, just because I'm guessing it may be effecting all of them. I also do not think there was any difference between going to 20us as opposed to 10us. I will have to double check this tonight but I think the amount of change that the 10us pulse made was the same as the 20us pulse.

Quote
Please send me a profile package, and if possible a GCode file that causes this problem (the smaller the better).

As far as the file, I've actual been using 3 different files with the same results from all of them. I'll send the one I used last night but it is a lithophane, so it won't be 'very' small.

Also, I guess I forgot to mention that I did swap the motor outputs, as you asked, with no difference. I used the Y output, with the Z cable. So the only thing common at that point was the motor and cable but I have previously replaced them individually with no improvement.
« Last Edit: April 15, 2016, 11:10:14 AM by Jarhead »

Jarhead

  • Posts: 16
    • View Profile
Re: Losing steps in Z
« Reply #7 on: April 16, 2016, 10:10:49 AM »
Here's an interesting turn. With all the problems Mach4 has, figured I'd try Mach3 again. Took a while to config it, a lot different than Mach4, forgot how much so, but got it going, ran the same gcode one time, perfect Z from start to finish!

So the problem is somewhere from Mach4, out the PMDX-410. Used the parallel port straight to the G540 with Mach3, actually with a C26 (cnc4pc.com) in between, ran perfect!

Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: Losing steps in Z
« Reply #8 on: April 16, 2016, 09:17:54 PM »
Have you sent your profile and sample file yet?  I haven't seen them yet.
Engineering Hell: Everything's right and nothing works.
Bob's Corollary: If everything's right and nothing works, double check your assumptions.

Jarhead

  • Posts: 16
    • View Profile
Re: Losing steps in Z
« Reply #9 on: April 20, 2016, 08:43:34 AM »
This is ridiculous, cutting lithophanes left and right and every one of them is perfect with Mach3 and a parallel port.

Need to know, what's the return policy from you guys??

Steve Stallings

  • Administrator
  • Posts: 527
  • www.PMDX.com/Images/Avatar120.jpg
    • View Profile
Re: Losing steps in Z
« Reply #10 on: April 20, 2016, 06:12:41 PM »
We can offer a refund on the PMDX board, but the Artsoft license policy does not
allow refunds on software.

We are looking at the files that you sent to us. Because of the needle in a haystack
aspect of running such huge files, it is slow going. We think we have seen one type
of occurrence that may be generating timing that the G540 would be unhappy with
and are trying to figure out how to prevent that. We would like a few more days to
try to implement a firmware update that will correct that issue, and then have you
test it again.

Regards,
Steve Stallings
PMDX
Steve Stallings
www.PMDX.com

Jarhead

  • Posts: 16
    • View Profile
Re: Losing steps in Z
« Reply #11 on: April 20, 2016, 10:06:40 PM »
No, I'm done with Mach4.
I'll take the refund.
If you want me to test for your own benefit, I'll do it, but You can probably reproduce the problem on your own.
Bob has my email, let me know how you want to proceed.