Spindle synchronization with only one Initiator / one pulse - Emulate an encoder

More
07 May 2021 05:08 - 07 May 2021 05:16 #208180 by Sviper
Hello

Is it possible to use spindle synchronization with only one initiator that monitors the spindle speed?
Since the syncronization needs different signals from a real encoder, I would be interested if you could emulate an encoder with Hal functions.
You would have to generate the encoder signals phase-A and phase-B, phase-Z from the one pulse and the direction of rotation command.

I would like to use the G33.1 unfortunately this requires all encoder signals A,B,Z . I am still looking for a way to bypass a conversion of my milling spindle, since it is a motor spindle and this conversion would be quite extensive.

Example from the documentation
# connect the HAL encoder outputs to LinuxCNC.
net spindle-position encoder.3.position => spindle.0.revs
net spindle-velocity encoder.3.velocity => spindle.0.speed-in
net spindle-index-enable encoder.3.index-enable <=> spindle.0.index-enable

# connect the HAL encoder inputs to the real encoder.
net spindle-phase-a encoder.3.phase-A <= parport.0.pin-10-in
net spindle-phase-b encoder.3.phase-B
net spindle-index encoder.3.phase-Z <= parport.0.pin-11-in

Would this be possible?
Possibly I would also use external hardware
Last edit: 07 May 2021 05:16 by Sviper.

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

More
07 May 2021 12:06 #208204 by andypugh

Is it possible to use spindle synchronization with only one initiator that monitors the spindle speed?


Yes. No need for anything particularly clever.
loadrt encoder
...
addf encoder.0.capture-position servo-thread
addf encoder.0.update-counters base-thread
...
net pulse-index-combined parport.0.pin-NN-in    encoder.0.phase-A    encoder.0.phase-Z
setp encoder.0.counter-mode 1
net spindle-position encoder.0.position-interpolated => spindle.0.revs
net spindle-velocity encoder.0.velocity => spindle.0.speed-in
net spindle-index-enable encoder.0.index-enable <=> spindle.0.index-enable

Basically connect phase-A and phase-Z of the counter to your parport pin, make sure that you set the encoder to counter-mode and ensure that you use the position-interpolated pin to smooth the motion.

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

More
22 Oct 2024 10:52 #312838 by xenon-alien

Is it possible to use spindle synchronization with only one initiator that monitors the spindle speed?

Yes. No need for anything particularly clever.
loadrt encoder
...
addf encoder.0.capture-position servo-thread
addf encoder.0.update-counters base-thread
...
net pulse-index-combined parport.0.pin-NN-in encoder.0.phase-A encoder.0.phase-Z
setp encoder.0.counter-mode 1
net spindle-position encoder.0.position-interpolated => spindle.0.revs
net spindle-velocity encoder.0.velocity => spindle.0.speed-in
net spindle-index-enable encoder.0.index-enable <=> spindle.0.index-enable

Basically connect phase-A and phase-Z of the counter to your parport pin, make sure that you set the encoder to counter-mode and ensure that you use the position-interpolated pin to smooth the motion.

Hello.
Is it possible with this one index signal make a spindle orientation always in one position?
Spindle stop at the same position after index input goes active.
I'm reading out now with this example the current rpm of the spindle. (just on a mesa board 24v input)

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

More
22 Oct 2024 13:05 #312851 by tommylight
See the included spindle "orient" component, might do what you need.

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

More
23 Oct 2024 14:46 #312971 by xenon-alien

See the included spindle "orient" component, might do what you need.

I saw it before, but not really understand how to use it with a VFD (mesa 7i96s analog output generated with the PncConf) and with one fake encoder.

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

Time to create page: 0.085 seconds
Powered by Kunena Forum