Old mouse instead of encoder

More
10 years 6 months ago #72689 by aleksamc
I don't have encoders on my CNC machine.
Is it possible to connect encoders programmatically of old mouse to LPT port.

Please Log in to join the conversation.

More
10 years 6 months ago #72711 by andypugh

aleksamc wrote: Is it possible to connect encoders programmatically of old mouse to LPT port.


You can't do it programmatically. You will need wires.
Once physically connected it should be possibly to use the quadrature signals in HAL.

Please Log in to join the conversation.

More
10 years 6 months ago #72772 by aleksamc
If I'll connect them in in HAL by net function, how I should tell linuxcnc - that it's encoder's input? Or I need somehow to calculate speed of motor and tell it to linuxCNC?

Please Log in to join the conversation.

More
10 years 6 months ago #72773 by andypugh
You need to wire the quadrature signals into a HAL encoder module

linuxcnc.org/docs/2.7/html/man/man9/encoder.9.html

Please Log in to join the conversation.

More
10 years 6 months ago #72810 by aleksamc
I will wire signal of parport to encode but what next?
How to wire position ot axis?

In main hal-file there is lines:

zpos-cmd axis.2.motor-pos-cmd => stepgen.2.position-cmd
zpos-fb stepgen.2.position-fb =>axis.2.motor-pos-fb
zstep <=stepgen.2.step
zdir <= stepgen.2.dir

I suppose I must somehow change zpos? And to write it incustom.hal.

If I'll connect such encoder, will this loop be closed ot I need to set PID-regulator for it?

Please Log in to join the conversation.

More
10 years 6 months ago #72814 by andypugh
Can you explain what you are trying to do?

Just adding an encoder to a stepper system doesn't gain you very much. What do you propose to do if the stepgen and encoder disagree about where the axis is? It isn't like you can turn up the motor torque to recover the error.

Please Log in to join the conversation.

More
10 years 6 months ago #72823 by aleksamc
I want to add feedback for one axis Z through parallel port. If I will connect it successfully and it will work and compensate error of losing steps, I will by hardware for encoder end encoders for all 3 axis.

Now I already have openloop step motors that works very slowly. I don't want to buy expensive drivers with feedback instead of mine but make feedback through linuxCNC. I'm new in linuxCNC. Now I study documentation. On the first pages of guick start manual It was written that linuxCNC can serv feedback of motors.

Please Log in to join the conversation.

More
10 years 6 months ago #72827 by andypugh
All you can really do with encoder feedback on a stepper motor is detect loss of steps and stop the machine with an error.

Steppers make peak torque at low step rates. A closed loop system can only increase step rate after a missed step, which will lower the torque, making a lost step _more_ likely.

Unless you have a way to increase the drive _current_ on the basis of measured position error the encoder will not help in your situation.

Please Log in to join the conversation.

More
10 years 6 months ago #72830 by aleksamc
And what should I do in this situation?
Can driver for stepper motor change this situation?

It would be nice that linuxCNC sends impulses till position of motor not get's to check point. I supposed it works like this when encoder is connected.

Please Log in to join the conversation.

More
10 years 6 months ago #72832 by andypugh

aleksamc wrote: It would be nice that linuxCNC sends impulses till position of motor not get's to check point.


It is very unlikely to work, but feel free to try.

Please Log in to join the conversation.

Time to create page: 0.214 seconds
Powered by Kunena Forum