On 07/20/2020 05:27 PM, Matthew Herd wrote:
Working through Jon’s suggestions, the answers to his questions are as follows.
Also, I’m running version 2.7.11 if that helps. No internet in my shop means
it gets infrequent updates.
Running the universal stepper diagnostics program with the command sudo .univstepdiags 378 bus
indicates board 0 is firmware version 3. No board 1 is shown, boards 2 and 4-f are "No
Board" and board 3 is "Unknown."
Running the command sudo .univstepdiags 378 indexres 3 (from a forum post)
gives me +517.00, +517.00, +517.00, and a jittery +0.000/+/-1.000 that seems to
increase/decrease (depending on CW/CCW rotation) then go back to zero as fast
as I turn the spindle. I can see numbers greater than 1, but they flash back
to zero within a fraction of a second and keep jittering.
Yes, that is normal. The position count is being reset to
zero each time the encoder passes the index position.
Turning it by hand, you might want to see it count up to
whatever your quadrature counts/rev is, before it resets.
If it keeps resetting to zero with just a little rotation,
then you are getting pulses on the Z channel that is
resetting the counter in between the index positions. That
would be a hardware issue with the encoder or encoder wiring.
The encoder scale on axis 03 is "setp ppmc.0.encoder.03.scale 2048" which is
consistent with a 512 CPR encoder in quadrature. That’s what I’ve got installed.
the connection to LinuxCNC looks like this:
newsig spindle-index-en bit
linkps motion.spindle-index-enable => spindle-index-en
linksp spindle-index-en => ppmc.0.encoder.03.index-enable
AND
newsig spindle-pos float
linkps ppmc.0.encoder.03.position => spindle-pos
linksp spindle-pos => motion.spindle-revs
At 3600 RPM (as reported from the encoder) the velocity is 60. At 3600 RPM
CCW, the velocity is -60. I don’t readily have a means of verifying actual
RPM, but the dial on the vari-speed head seems to read lower than actual RPMs,
though I understand this is consistent with a worn varispeed drive. I also
confirmed that one revolution appears to correspond to one increase/decrease of
the ppmc.0.encoder.03.position as displayed by Hal Meter. I took care to
rotate it one revolution as closely as I could manage and the results checked
out.
Regarding the index, I probed it with a meter and found the position at which
it triggers. I can confirm that it should work as it showed 4.64V when at the
index position.
See below for my HAL files:
univstep_motion.hal: https://paste.ubuntu.com/p/h66KJZx3hC/
<https://paste.ubuntu.com/p/h66KJZx3hC/>
univstep_io.hal: https://paste.ubuntu.com/p/gMNkMwKDVw/
<https://paste.ubuntu.com/p/gMNkMwKDVw/>
univstep_load.hal: https://paste.ubuntu.com/p/d36HgfwZ5Z/
<https://paste.ubuntu.com/p/d36HgfwZ5Z/>
univstep_servo.hal: https://paste.ubuntu.com/p/wyb6JPX7ts/
<https://paste.ubuntu.com/p/wyb6JPX7ts/>
xhc-hb04.hal: https://paste.ubuntu.com/p/w9mNn8hSdT/
<https://paste.ubuntu.com/p/w9mNn8hSdT/>
pycp_panel.hal: https://paste.ubuntu.com/p/dVNwxHWJD2/
<https://paste.ubuntu.com/p/dVNwxHWJD2/>
I realize most of these are not likely to be relevant, but I’ve included them
anyway. The encoder is connected in the univstep_motion.hal file.
Also, re-testing the behavior, I seem to get two different outcomes when I run G33.1. First
error behavior is shown here: https://youtu.be/GMspKB5ZkoQ <https://youtu.be/GMspKB5ZkoQ>
and the second error behavior is shown here: https://youtu.be/HJBOtFtXF5o
<https://youtu.be/HJBOtFtXF5o>. In the first behavior (which appears to be random, but I
didn’t restart axis repeatedly to test), the spindle is running before the G33.1 command. It
feeds downward past the commanded 0.5" to 0.8125 or so, then stops Z motion while it
decelerates. Then it reverses, spins up to speed, and retracts in what appears to be
synchronized motion. The second error appears to do the same until it hangs somewhere after
reversing. It also won’t respond to MDI commands. I had to go to manual mode and click the
spindle stop button to get it to respond.
I have no idea what is causing this. You might set up
halscope to trigger on the spindle reverse command and show
Z velocity and spindle encoder position. The G33.1 is
supposed to follow the encoder count until the command has
completed. Clearly, it follows it for a while, then stops
following it, and then in the first video it eventually
follows it in the reverse direction.
I did not see anything wrong in your hal files.
Jon
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users