Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Simultaneous reading of analog data and counter input

We are using a counter to count pulses from a step motor. We want to trigger a analog voltage measurement (it has an additional trigger)after each n number of steps. This is easy. But the stepper motor does not stop for the measurement, so we are losing the step count during the measurement. How can we keep counting during the measurement? The software is LabV 7.1, with latest drivers, the card is PCI-6143.

Thanks
0 Kudos
Message 1 of 2
(3,208 Views)
Hello Mlahdes,

The way to keep counting during the measurement is by putting two parallel loops: One containing the counter Vi's, the other containing the analog input vi's for the measurement and using local variables to communicate between them.

Attached you will find a small example I wrote that simulates what you are doing. In this example, when the number of analog edges is greater than two, it triggers an analog acquisition. You will see also that when this happens, the counters keep on counting the digital edges.

Please let me know if this helped or if you have any additional questions.

Best regards,

LA
0 Kudos
Message 2 of 2
(3,208 Views)