RTI ds1104 encoders

5 visualizaciones (últimos 30 días)
Nassim Benhabib
Nassim Benhabib el 4 de Jun. de 2018
Editada: SMEAC el 17 de En. de 2019
Hello! I use the RTI1104 toolbox to control two engines. I have accutuellment a DAQ interface cp1104 and I would like to exploit the data provided by the encoders (using Inc1 and Inc2). Problem, my encoders do not provide an INDEX signal. Would anyone have an idea to get the rotation angles of my engines using Simulink?

Respuestas (1)

SMEAC
SMEAC el 17 de En. de 2019
Editada: SMEAC el 17 de En. de 2019
Hello NB,
You don't actually need the Index Signals to use the encoders. You just have to note that both encoders, on program start, are set to 0. So you will be working in a relative angular offset to where you have started at.
To actually determine the angle, you have to know how many pulses your encode gives per rotation. Then you can divide the encoder block output by this number, multiply by 2pi, and you have the angles in radians.
Because you do not have the index, you can run into an overflow. If you read the dSpace Help for the DS1104 you will see it uses a 24bit counter, but due to the 4-fold subdivision of each encoder line, the counter allows you to measure up to 2^22 encoder lines in the range –2^21 … +2^21 – 1. This is the integer representation of the encoder lines, which can be enlarged by the 4-fold subdivision increments up to +2^21 - 0.25. The count direction depends on the encoder’s rotation direction.
So, just to remember to watch for the overflow in your software, use the set_encoder block to reset the value to some value representing the same angle and you should be right.
Hope that helps
SMEAC

Categorías

Más información sobre Quantizers en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by