G33.1 problems.
I am getting unexpected results. using NGCGUI linuxcnc 26~pre. GMOCCAPY
After I generate the code and run it:
First time it does not reverse the spindle and on a -1.5 depth it goes to 2 inches and then straight to home. This would be a diagonal move.
On the second run it goes to -1.5 depth and it stops spindle still running.
If I pause stop the spindle then reverse the spindle by hand it backs out super fast.
I do not know if it is my setup or if there is a problem.
I use the od G76 and it works fine.
Jim
Please Log in or Create an account to join the conversation.
I did a few dozen holes on my mill with G33.1 and a fairly recent build of LinuxCNC at the weekend, and it seemed to work. So it seems likely that the problem is something specific to your machine rather than a generic problem.I am trying to work with G33.1 on my lathe.
I am getting unexpected results. using NGCGUI linuxcnc 26~pre. GMOCCAPY
First time it does not reverse the spindle and on a -1.5 depth it goes to 2 inches and then straight to home. This would be a diagonal move.
I assume that you are doing this without a tap in place. Otherwise you would be sounding more annoyed.
Can you test that the system is capable of reversing the spindle? ie, do M3 and M4 work as expected if you issue the commands with the spindle running?
While doing this, if you run a halmeter showing motion.spindle-pos-in then can you check that the position counts up and down correctly as the spindle reverses?
Please Log in or Create an account to join the conversation.
motion.spindle-pos-in
I did find this pin.
motion.spindle-revs - (float, in) For correct operation of spindle synchronized moves, this signal must be hooked to the position pin of the spindle encoder. The spindle encoder position should be scaled such that spindle-revs increases by 1.0 for each rotation of the spindle in the clockwise (M3) direction
It counts up in forward and counts down in reverse.
M03 spindle runs forward.
M04 spindle run in reverse.
setp hm2_5i20.0.encoder.02.counter-mode 1
setp hm2_5i20.0.encoder.02.filter 0
setp hm2_5i20.0.encoder.02.index-invert 0
setp hm2_5i20.0.encoder.02.index-mask 0
setp hm2_5i20.0.encoder.02.index-mask-invert 0
setp hm2_5i20.0.encoder.02.scale 500
#net spindle-velocity <= hm2_5i20.0.encoder.02.velocity
net spindle-index-enable <=> hm2_5i20.0.encoder.02.index-enable
net spindle-revs <=> hm2_5i20.0.encoder.02.position
#net spindle-index-enable <= hm2_5i20.0.encoder.02.reset
# ---setup spindle control signals---
net spindle-enable <= motion.spindle-on
net spindle-cw <= motion.spindle-forward
net spindle-ccw <= motion.spindle-reverse
net spindle-brake <= motion.spindle-brake
net spindle-revs => motion.spindle-revs
#net spindle-velocity => motion.spindle-speed-in
net spindle-index-enable <=> motion.spindle-index-enable
net spindle-speed-out abs.2.in <= motion.spindle-speed-out
# Change velocity to RPM
setp scale.1.gain 60
net spindle-velocity motion.spindle-speed-in near.0.in2 scale.1.in <= hm2_5i20.0.encoder.02.velocity
#net spindle-velocity => abs.0.in
#net spindle-v-abs near.0.in2 scale.1.in <= abs.0.out
# End Velocity to RPM
Jim
Please Log in or Create an account to join the conversation.
I am uable to find this pin in any doc or in my hal file.
motion.spindle-pos-in
I did find this pin.
motion.spindle-revs - (float, in)Sorry, yes, I was working from memory, that is the one.
It counts up in forward and counts down in reverse.
I find that hard to reconcile with:
setp hm2_5i20.0.encoder.02.counter-mode 1
If it is a quadrature encoder then you want counter-mode 0. I guess that quadrature into pulse + direction inputs might work, but only because the "direction" pin has a different value on the rising edge in each direction.
It might be that this is the problem.
Please Log in or Create an account to join the conversation.
I changed setp hm2_5i20.0.encoder.02.counter-mode 1 to 0
Reversed the wiring on the encoder.
Things are the same. I still get a diagonal retract on the first run. But now I get a joint error at -1.5 when it should reverse and retract.
Baby steps.
Jim
Please Log in or Create an account to join the conversation.
I still get a diagonal retract on the first run.
I have no idea why that is, we will have to get back to that bit.
This could be because the spindle reverses faster than the Z axis can change direction.But now I get a joint error at -1.5 when it should reverse and retract.
You might be able to slow the spindle VFD reversal, or increase the Z-axis acceleration. How did you choose the Z-accel?
Please Log in or Create an account to join the conversation.
I am not seeing the system even try to reverse the spidle.
Z accel is set to maximum prior to joint error.
Please Log in or Create an account to join the conversation.