LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

inconsistent arrays with multiple buffered readings

I am attempting to use a PCI6601(device 3) and/or a AT-MIO-16E2(device 1) to take two measurements, one a buffered position(encoder) one a buffered event. These two are using the same external trigger in order to capture two data points for each event to indicate time and location the event occurred. The two arrays that I am getting back from these buffer readings are not the same size, with one of the arrays being nearly 100 readings larger than the other.
Attempting to take both readings on the 6601 card has not worked due to DMA limitations, but a different configuration I have not thought of may circumvent this.
What is causing the discrepancy? The encoder readings seem to be correct, while the time typic
ally contains extra readings.
0 Kudos
Message 1 of 2
(2,605 Views)
When doing position measurements, a signal on the selected gate transfers that value to memory upon every pulse that comes into its gate. It looks as though this is the signal connected to PFI 38. When doing event counting, the counter transfers the count value to the internal buffer when a gate signal is received. It looks as though this is the signal connected to PFI 4.

Are PFI 4 and PFI 38 the same signal? If so, it does appear that the two arrays should be the same size.

I suggest to set some breakpoints in your program to look at the array after every read buffer.vi to see if the correct values are there. This may give you some more insight on to what is causing the error.

Also, are the extra time readings interleaved with correct ones or just appene
d to the end?

Brian
0 Kudos
Message 2 of 2
(2,605 Views)