04-14-2004 09:24 AM
04-14-2004
11:16 AM
- last edited on
11-12-2025
07:51 AM
by
Content Cleaner
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
04-15-2004 01:47 AM
04-15-2004
03:56 AM
- last edited on
11-12-2025
07:52 AM
by
Content Cleaner
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 [broken link removed] 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.
12-07-2005 05:00 AM
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
05-16-2008 03:28 AM
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??
05-21-2008 03:13 AM