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: 

AnalogMultiChannelReader Read Latency

Hello, 

 

DAQ: cDAQ-9171 

Device: TB-9212

 

I have a program in C# that is repeatedly calling AnalogMultiChannelReader.ReadSingleSample() that behaves very differently depending on the sampling mode. By default, it is initialised with sampling mode set to OnDemand. This is taking ~500ms for a read. To speed this up, I tried using Timing.ConfigureSampleClockMethod() and setting the sampling mode to continuous. This caused the ReadSingleSample() to occur ~1ms, however, the values read from the function are incorrect and do not accurately reflect changes to the value being measured. I know there is some buffering system going on with the other parameters in ConfigureSampleClockMethod(), however I could not find documentation to understand what is happening.

 

I have the following two questions:

1. Is the OnDemand sampling supposed to take ~500ms?

2. Is there a way for me to configure my system such that the continuous sampling method gives me accurate values?

 

Thanks!

0 Kudos
Message 1 of 1
(726 Views)