From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

High speed buffered position measurement

I am currently developing a high speed position measurement tool. It consists of two optical encoders, a PXI-6602 counter/timer card and labVIEW 6i as the software in windows. Buffered position measurement is used to measure the position of the encoders and this is triggered by a hardware based signal generated by the 1/rev pulse from the encoder on the drive shaft. The data is recorded into an array which is then saved as a binary data file. This currently works well as I have been using part of the encoders signal as the gate. I now need to make both the encoders synchronous and generate the gate much quicker so that I gather more information. This is where the problems lie.

I now need to make sure that the buffered measurements are synchronous, hence I want them to use the same gate signal generated by an accurate high speed signal generator. So using one of the counters on the card I have developed a Vi that generates the signal as required. This works perfectly no matter what counter is used. The counters used for buffered position measurement then utilise a "Counter set attribute vi" that selects the gate signal (attribute ID - gate selection) as the signal from another counter (attribute value type - other counter output, attribute value number - "U32 integer of the counter number") to act as the gate signal.

If counter 0 is being used to measure position of just one encoder and counter 1 is being used as the signal generator then this works fine. If any other counter is used for measuring the position measurement or for the signal generator then this does not work - although the signal generator part works perfectly. It is noted that the value of the counter number being used for the gate signal generation must be wired to the set attribute vi that defines the gate selection for the position measurement. Hence if the counter being used to generate the gate pulse changes then you must change the attribute value number appropriately.

If I change the counter that is producing the pulse to another counter other than counter1, the signal is generated but the counter (counter 0) allocated for position measurement doesn’t see it. Likewise if the signal is generated on counter 1 but I tell the position measurement counter that it is being generated from a different counter it still sees it. So this tells me that the position measurement counter (counter 0) is only seeing counter 1 for the gate signal even if I tell it differently and I cant seem to change it Does anyone have any suggestions to what it might be as I cannot get on and get develop the vi so that both position measurement counters can work as I cannot make them see the same gate signal. Its driving me mad!!!

Cheers
0 Kudos
Message 1 of 2
(3,341 Views)
The counter terminology "other counter" with these functions actually relates to the counter pairs of the board. In the 6601/6602 User Manual, you will see that there are several counter pairs, such as 0 and 1, 2 and 3, 4 and 5, and so forth. Thus, as on page 4-14, the other counter output for counter 0 is counter 1 and vice versa. Instead of using "other counter output" for your signal selections, I recommend explicitly using the actual PFI pin numbers. Follow the model of the example Measure Buffered Position in the LabVIEW >> Examples >> Daq >> Counter >> ni-tio.llb directory for setting up the signal selections. Also, you can look at the LabVIEW help for the Buffered Position Measurement application for other details. The 6601/6602 User Manual is a
vailable at the http://www.ni.com/support pages.
Regards,

Geneva L.
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 2
(3,341 Views)