Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

incremental encoder, velocity, position and direction

hi,
A incremental encoder(With channel A and B)
I know that the velocity is proportionate with the frequence of the pulses and we can find the position with a simple edge count. But it's a bit difficult to find out the rotating direciton even if the principe is very evident.
are there any exemples for these kinds of application?
0 Kudos
Message 1 of 7
(8,646 Views)
Configure your counter for position measurement. The general idea is that one channel is used to count the pulses and the other sets the direction of the count.

Another solution is to use an external circuit like LS7084 from LSI. Connect its UP/!DN output to a digital input.

There are many hints and examples on ni.com. Make a search for "quadrature +encoder".

--> for example :
Quadrature Encoder / Position Measurement

Using Quadrature Encoders with E Series DAQ Boards

0 Kudos
Message 2 of 7
(8,646 Views)
Thanks a lot,JB.
I'd better specify the devices that I use:
NI-DAQ traditional
PCI-MIO-16E-1
SC-2345
SCC-Ft01(just 2 pieces)
is it possible that I could find out velocity,
position and direction with just these devices?
0 Kudos
Message 3 of 7
(8,646 Views)
PCI-MIO-16E-1 --> DAQ-STC --> see paragraphs concerning DAQ-STC in this
file

Unfortunately I have never used a SC-2345. But after a short overview of its specifications, it seems that you will need one SCC-FT01 to connect the A channel to the counter source and the other to connect B to the auxiliary line that will set the direction. See schematic in the file mentionned above. So your hardware will allow you to take this measurement.

See this example to see how to configure a DAQ-STC counter for position measurement.

1) Simple event counting
2) Up/down counting. Direction is given by hardware --> auxiliary line of the counter (DIO6 for counter 0 and DIO7 for counter 1)
3) Start the counter
4) Read periodically the counter value
5) Reset the task when finished

Don't be troubled by the BNC-2120. Use your SC-2345 instead. Obviously you will need to adapt the number of encoder pulses/rev to suit your encoder.

Add a shift register to store the position from one iteration to the other and compute the difference to determine the direction.

If you want to add the velocity, than you have two options :

1) If the accuracy must not be very high, then you can compute it (delta position / loop time).

2) If you need high accuracy, then it will necessary to use the second counter to measure the frequency of channel A. In order to avoid errors due to vibrations it is recommended to use the LS7084 in this case.

As you can see here, there are 3 methods to measure a frequency.

Obviously, the examples will not work with your DAQ-card because the 660X is a NI-TIO type counter.

If you want to measure the velocity at the same time than the position, then you will need to use the first method (Inverse period measurement) because the others will need 2 counters. (your card has only 2 counters and one is already used for the position measurement).

There is an example of period measurement for DAQ-STC that ships with LV (Measure Period (DAQ-STC).vi).

1) Single period measurement
2) Source specification --> internal timebase
3) Gate specification --> channel A
4) Start task
5) Wait for one pulse on Gate. I recommend to add a timeout to not enter in an endless wait if there is no pulse.
6) Read number of pulses of the internal timebase.
7) Check if counter overflow
😎 Reset task

You will need to combine both examples in one vi.

I hope this is clear enough to help you.
Message 4 of 7
(8,646 Views)

Hi JB,

 

I am trying to set up a position measurement using a PCMCIA 6024E card which is working on STC basis. Your explanation seem me very interesting but I could not access the examples you gave (the links don't work anymore).

Could you tell me were to find these examples.

 

Thanks.

Raoul

Raoul Chodziesner-Bonne
Ingénieur Instrumentation
CRIL TECHNOLOGY - Groupe ALYOTECH

"Celui qui pose une question peut paraitre idiot sur le moment, celui qui n'en pose pas le reste toute sa vie!"
0 Kudos
Message 5 of 7
(8,238 Views)

I'm building a sidestick using an incremental shaft encoder as well (http://www.ajptech.cz/data/bae/ink/BHW_d=80mm_vysoke_rozliseni.pdf)

and LS7184, and cd4156 to get the position.

I'v built the sidestick and having some really good accurate signal.

The problem is, how can i have correct signal when the first time i turn on the system and it is not at the initial position (cause it is incremental encoder)? It needs to always start from the middle (reset) before i have the right position. i'm thinking of putting LVDT to counter, but i am still confuse about it.. 😛

Also, i need to get the velocity of the thing...

Anybody have ideas on what should i do??

0 Kudos
Message 6 of 7
(6,804 Views)
Incremental encoders inherently cannot supply any information about absolute position, they only provide information about relative position (i.e. angular displacement), velocity and direction. There are also rotary encoders for absolute position but these need a quite different interface to the DAQ aystem, their output usually is in parallel format (i.e. 4 or 8 bits wide). Of course you can also detect velocity and direction with such an encoder, but the latter has to be done by software, i.e. comparing the actual position code to the one a certain time interval before.
0 Kudos
Message 7 of 7
(6,772 Views)