Quantcast
Channel: Measurement Studio for .NET Languages topics
Viewing all articles
Browse latest Browse all 1999

Configure an analog task to read N samples with a given time interval between the samples?

$
0
0

Hi,

 

I am trying to sample a signal every 200 μs, basically 5000 times a second.

 

I created a C# code that reads a single sample and sleeps a thread until enough time has elapsed and it then reads the next sample in a loop.

 

In addition to not being the most elegant solution, it is not that stable because the time between the measurements fluctuates.

 

I was trying to use the ReadMultiSample function but it reads the values in a fraction of the time it should take to read all the samples (it takes some milliseconds to return 5000 values ) so I assume that there is something odd with the frequency that I am reading the samples.

 

I read on the manual that is possible to use different clocks (10Mhz,100KHz, 25MHz) and how this affects different sampling rates and such so I played with the analogInTask.Timing.ConfigureSampleClock( ... )  function and its parameters and other things like analogInTask.Timing.SamplesPerSecond. I tried several things, but I cannot get it to work.


How does one configure an analog task to read N samples with a given time interval between the samples?

 

I am using a PCIe 6323 DAQ and BNC-2110 connector block.

Visual Studio 2019 on Windows 10 Pro 64bit build 2004.

 

Let me know if you need any other information to help me.

Any links to possible solutions would help!

 

Thanks for your time,

Alexandre


Viewing all articles
Browse latest Browse all 1999

Trending Articles



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