Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquire AI signals and Ctr signals from PCI 6221 M Series

I want to measure two type of signal from my setup
 
One AI which is configured to CH-1
Counting Pulses from Encoder through CTR-0 and CTR-1(Common Encoder)
 
CTR-0 will count for each 20 pulse and Come out of the loop . Inside the same loop i am using DAQ assistants(Express LV) to acquire the AI Signal(One Sample on demand , Diff input)
 
 
same time one DO is connected to true condition when CTR-0 reads 20. also this is the output for that sub vi.
 
this true case is used for the case loop to get the count from CTR-1 and and get the angular reading from that.
 
encoder details is 2500 count for 360Deg.
 
Pls suggest is there any other method to acquire data from encoder and AI simultaneously. Also i need a count of how many time i acquired 20 pulses from encoder.
 
Pls check the program which is attached and suggest ........
 
 
Joe
Using Ver. 8.0
0 Kudos
Message 1 of 2
(2,877 Views)

Hi,

I took a look at your code, and it looks like you are simultaneously acquiring the analog input data and the counter data from the encoder.

The easiest way to count the number of times your counter reaches 20 will be to simply divide the counter result by 20 after your program has finished counting. 

Regards,
Hal L.

0 Kudos
Message 2 of 2
(2,853 Views)