Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx exception and optimization

Hi community,

 

I use software Ni DAQmx to receive data in a .net application.

I use hardware NI cDAQ-9188 with interface NI 9215 to read rotational speeds.

There I create a CIChannel and add a CounterSingleChannelReader on which I read ReadSingleSampleDouble().

 

  1. Question: Exception

But at speed 0 rpm the interface waits until the timeout and raises an exception  -200474 (that means that no pulses were seen in the normal sampleTime + timeout)

For me speed 0 is a valid value.

Is it possible to configure the CounterSingleChannelReader to output 0 after the normal sample-Period (without timeout), when no pulses were seen instead the exception?

 

  1. Question: Buffer

When I call the CounterSingleChannelReader.ReadSingleSampleDouble() I noticed that the values are not the newest ones. When I change the speed and call the read several times I still get the old speed values.

How can I discard these no more actual values and only read the most actual counter (speed) value when I call the method?

 

  1. Question: Read-Time optimization

I also read Temperatures from NI 9212, create an AIChannel and add a AnalogMultiChannelReader.

When I call the AnalogMultiChannelReader.ReadSingleSample (), 1 read last around 2,3 sec.

I think there is an internal averaging active that reads 8 temperature channels.

Is it possible to display the values taken before averaging to get an idea about their variation?

Is it possible to modify the count of values used for averaging, to minimize the read time?

 

Thanks for any help.

0 Kudos
Message 1 of 1
(129 Views)