LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I avoid one SCXI-channel to be scanned 9 times?

I am doing measurements on channel 0 of a PCI6036E connected to SCXI-1104C. Curiously I receive values 9 times scanned of my first SCXI-channel. How can I prevent this an get just one curve? I attached my VI.
Thanks.
0 Kudos
Message 1 of 4
(2,293 Views)
I'm not sure what you mean by "getting just one curve". You have set your acquisition to continuously scan at 200 samples per second. In your loop, your AI read is set to read (-1) samples, which means whatever is in the buffer. It is definitely possible there are 9 samples in the buffer by the time the AI Read has run, so it returns 9 values. This is the proper way to read a continuous acquisition; otherwise, your buffer may overflow.

If you're truly only interested in taking one data point per loop, you only have to add one step. Currently you are taking the output of the AI Read and extracting a single row from the data. If you wire a "0" to the other input, you'll get a single point of data every iteration, which sounds like what you want.

Mark
0 Kudos
Message 2 of 4
(2,293 Views)
Hi Mark. I found my mistake: "number of clusters" was 9, that's why I got 9 curves. Sorry, a simple mistake. Thanks for answering.
0 Kudos
Message 4 of 4
(2,293 Views)
I'm not sure what you mean by "getting just one curve". You have set your acquisition to continuously scan at 200 samples per second. In your loop, your AI read is set to read (-1) samples, which means whatever is in the buffer. It is definitely possible there are 9 samples in the buffer by the time the AI Read has run, so it returns 9 values. This is the proper way to read a continuous acquisition; otherwise, your buffer may overflow.

If you're truly only interested in taking one data point per loop, you only have to add one step. Currently you are taking the output of the AI Read and extracting a single row from the data. If you wire a "0" to the other input, you'll get a single point of data every iteration, which sounds like what you want.

Mark
0 Kudos
Message 3 of 4
(2,293 Views)