RTI ds1104 encoders

4 次查看(过去 30 天)
Nassim Benhabib
Nassim Benhabib 2018-6-4
编辑: SMEAC 2019-1-17
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?

回答(1 个)

SMEAC
SMEAC 2019-1-17
编辑:SMEAC 2019-1-17
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

类别

Help CenterFile Exchange 中查找有关 Quantizers 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by