From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQMX read query

I have been using the DAQMX read function for a long time and suddenly I had a doubt 😉 Maybe very basic ....
 
I configure a DAQMX read for "Analog 1D DBL 1Chan NSamp" and set the NSamp value to 250. I then place this function inside a Timed Loop of 50mS.  When I now I connect the output of this function directly to a chart ( without averaging etc) , I will see a point plotted once every 50mS.
 
So the query is ,
 
- Since the 250 samples are being sent to the chart I should see a "thick" plot line as it consists of 250 samples ( that vary between each other ) once every 50ms. On the contrary I see a thin clean plot that seems to improve as the samples are further increased ?
 
 
Raghunathan
LabVIEW to Automate Hydraulic Test rigs.
0 Kudos
Message 1 of 2
(2,445 Views)
Hello Raghunathan,

Thank you for your post!

So I see you are using the DAQmx Read function in a timed loop of 50ms. At one point you mention that    "
I will see a point plotted once every 50mS." As for the point plotted what should be happening is that the read funtion will plot all 250 samples each time the loop iterates if the Nsample value is set to 250. Is that what you are seeing or is the read function only plotting 1 point?

As for the "thick" plot. What kind of signal are you bringing in and what is your sampling rate? The faster you sample the more accurate your representation will be thus creating a smoth picture of your signal. However if your signal is not a "clean signal" then you will sample all the noise more acuratlly as well.

There is a shipping example program that does this analog read. Open the program "Acq&Graph Voltage-Int Clk.vi". Go to Help >> Find Examples, does the same smoth plot occur if you run this example using the same incoming signal?

Also would it be possible for you to post your code?

Good Luck
Corby_B
0 Kudos
Message 2 of 2
(2,395 Views)