Quantcast
Channel: Counter/Timer topics
Viewing all articles
Browse latest Browse all 1271

ReadSingleSampleDouble

$
0
0

I'm trying to use a two edge separation counter, and I have it configured as such...

 

CWCounter3Task = new Task();
CWCounter3FirstEdge = CITwoEdgeSeparationFirstEdge.Rising;
CWCounter3SecondEdge = CITwoEdgeSeparationSecondEdge.Rising;
CWCounter3Task.CIChannels.CreateTwoEdgeSeparationChannel("Dev1/Ctr3", "Outbound",
minVal, maxVal, CWCounter3FirstEdge, CWCounter3SecondEdge,
NationalInstruments.DAQmx.CITwoEdgeSeparationUnits.Seconds);

 

The resulting call to ReadSingleSampleDouble, doesn't seem to be returning consistent results.  In some of the cases it's returning a value that is approximately half of the expected value.

 

If I put a 1 second delay between the configuration of the counter and where I issue the ReadSingleSampleDouble, it works perfectly.


I have run into a similar situation with another project, and eventually I had just left the delay in the code so that it works.

 

Do you know of any reason why the delay is necessary with the .NET version of the library?  

 

Thanks in advance.


Viewing all articles
Browse latest Browse all 1271

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>