G33.1 problems.

More
13 Jan 2014 10:18 #42677 by jbunch
G33.1 problems. was created by jbunch
I am trying to work with G33.1 on my lathe.

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.

More
13 Jan 2014 18:28 #42693 by andypugh
Replied by andypugh on topic G33.1 problems.

I am trying to work with G33.1 on my lathe.
I am getting unexpected results. using NGCGUI linuxcnc 26~pre. GMOCCAPY

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.

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.

More
14 Jan 2014 01:37 - 14 Jan 2014 02:20 #42704 by jbunch
Replied by jbunch on topic G33.1 problems.
Is this a new pin. 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) 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
Last edit: 14 Jan 2014 02:20 by jbunch.

Please Log in or Create an account to join the conversation.

More
14 Jan 2014 02:46 #42707 by andypugh
Replied by andypugh on topic G33.1 problems.

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.

More
14 Jan 2014 04:12 #42711 by jbunch
Replied by jbunch on topic G33.1 problems.
Andy,

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.

More
14 Jan 2014 04:39 #42716 by andypugh
Replied by andypugh on topic G33.1 problems.

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.

But now I get a joint error at -1.5 when it should reverse and retract.

This could be because the spindle reverses faster than the Z axis can change direction.
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.

More
15 Jan 2014 08:38 #42790 by jbunch
Replied by jbunch on topic G33.1 problems.
My spindle reverse is realy slow (1-1.5 turns at 300 rpm).
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.

Time to create page: 0.164 seconds
Powered by Kunena Forum