06-07-2017 10:24 AM
Hi, I'm kind of new to this...
I'm trying to set my sampling rate to a constant value - say 1000 Hz (while acquiring data from 7 channels simultaneously) -
Right now it seems like the sampling rate is not constant , each time I look at the output of 1 minute of recording - I get a different number of samples. I tried setting a delay of 1 ms inside my loop but it didn't work..
Thanks,
Tamar
06-07-2017 12:57 PM
Hi Tamar,
You'll want to use a DAQmx Task to implement your sampling. For your purposes, this will probably mean creating a new task, specifying a clock, starting the task, and then reading from it. There are numerous examples in the NI Example Finder that provide templates for acquisition (look for multiple channel, continuous samples). You can find it under the Help tab in LabVIEW. In addition to checking out the examples, I would recommend you take a look at the DAQmx documentation and become familiar with using its API.
This link may help:
Cheers,
Duncan W.
06-07-2017 05:25 PM
To avoid (our) eyestrain, do not attach pictures of your LabVIEW Block Diagrams. We also cannot easily "modify" a picture, nor test its code, nor see "outside the edges" or "behind Case Statements". Attach the actual VI instead. Thank you.
Bob Schor
06-08-2017 05:11 AM
06-08-2017 05:29 AM
hi tamartau,
please get rid of all the sub array, build array, transpose stuff
you get the same, just wiring the 1D array of your DAQ-read into the 1D-array-Input of the write-to-csv function
(to test yourself, drop the snippet onto a blockdiagram and run it)