ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

ReadMultiSamples from MultiChannels - old values arrive

Hi!

I have a problem with the program which is included in the post:
I am using  DAQMx with my PCI-MIO-16E-1 card.
 
I just want to read in some voltages from all AI in a single task.
In my constructor I have declared the things. (look at the program code).
 
The only problem is, if I run the method "getAI" in a loop, I get old values, so If I measure with the multimeter and increase the voltage, on my pc it only shows realtime values 1-5sec later! 
 
why that?
I have 200Hz clock rate, and want to read with ReadMultiSample 10 Samples.
I used: Stream.ReadOverwriteMode = ReadOverwriteMode.OverwriteUnreadSamples; in the constructor, to be sure, that if my loop is too frequently, not the old 200 values which are stored in one second are used.
Is this right?
 
How can I get real Time values?
Please reply!

Thanks a lot!
Yours, Klaus
 
0 Kudos
Message 1 of 3
(3,237 Views)
I want also explain, that i  use my function in a loop witch needs at least 64msec of time.
maybe i am reading the old values from the buffer? but with continous samples, there is no buffer, am I right?

Please help!
0 Kudos
Message 2 of 3
(3,234 Views)

See my response here about the old data. Yes, there is an internal buffer with a cont. acquisition operation.

Bilal Durrani
NI
0 Kudos
Message 3 of 3
(3,227 Views)