Spindle orient PID tuning [re-solved, yay]

More
4 years 4 months ago #246310 by andypugh
I am not sure why it is a problem to zero the encoder early. Once the encoder has zeroed at index it should remain zeroed to the index.

Adding a spindle-index-enable option to the orient component might be a helpful idea.

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

More
4 years 4 months ago #246316 by spumco
I don't know the inner working of LCNC, but I wonder if those g-codes which require an index signal (tapping, threading) have an internal equivalent of index-enable?  And thus an edge-case (arguably, anyway) like orient never had one?

I'm not the only person who orients their spindle.  Why haven't other people reported the same inability to maintain the same orient-0 position between LCNC sessions?

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

More
4 years 4 months ago #246327 by andypugh

I don't know the inner working of LCNC, but I wonder if those g-codes which require an index signal (tapping, threading) have an internal equivalent of index-enable?

It isn't "internal", they actively toggle the status of the spindle.N.index-enable pins when they want to zero the spindle index.

I'm not the only person who orients their spindle.  Why haven't other people reported the same inability to maintain the same orient-0 position between LCNC sessions?


No, but I am wondering if your encoder ratio is not exactly correct. Every full turn of the spindle should increase the spindle position by exactly 1.0000
Orient assumes this, and simply commands a position that is relative to the current number of full turns.
Try zeroing the spindle (manually set index-enable then rotate through index) and then manually turn the spindle a further 10 times. Does 10.0 align with where 0.0 was?


You should only leed to re-home if your encoder loses counts at high speed or the encoder ratio is not exactly 1:1
The following user(s) said Thank You: spumco

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

More
4 years 4 months ago #246335 by spumco
Manually turned the spindle 10 times and encoder.00.position = 10.000978, right where  it dropped to 0 after index-enable triggered the reset.

And orient.0.position has the same value as encoder.00.position.

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

More
4 years 4 months ago #246355 by andypugh
OK, that ought to mean that it doesn't matter when the index reset happens, everything should still be correct for the M19.

You could run a short G33 move before the M19, to force a new index-reset.

G33 Z#<_z> -0.1 K0.1
G33 Z#<_z> +0.1 K0.1
The following user(s) said Thank You: tommylight

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

More
4 years 4 months ago #246363 by spumco
That would do it.  Basically, I can do anything which triggers the index-enable.

Since I need to turn on/off the air cylinder lock a simple M19 isn't going to be enough on its own and I need a multiple-step orient sequence.

Might as well use the tristate-bit through a digital-out; no G33 head movement required.

G64 P7 (tristate)
G65 P7
M3 S300
M5
M64 P4 (spindle lock)
M19 R0
M65 P4
M5

I'm sure something will go wrong, but for now the above seems to get the spindle oriented under all circumstances.
The following user(s) said Thank You: tommylight

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

Time to create page: 0.152 seconds
Powered by Kunena Forum