04-06-2015 08:31 PM
Hi All,
I am having an issue with on an NI USB 6289 DAQ. I am trying to collect EMG (differential), load cell data (differential) and 3 accelerometer (RSE) inputs. For the EMG I want to sample the data at 5000 Hz using the Analog 1D Wfm Nchan Nsamp vi. If I let the sample to read default to -1 I do not get any buffer issues but the data from the load cells & accelerometer aren't generated when I read so I get NaN and it affects other parts of my program.
If I specifiy 1 as the samples to read, or if I change to Nchan 1Samp I get buffer issues when I try to clear the task. It says that data is missing.
I've tried increasing the buffer size to really high numbers and that doesn't seem to help. Does anyone have a suggestion on how I can collect data at different rates using this DAQ or how I can make it wait to read for only the load cells and accelerometers while still collecting EMG data?
Thank you for any help
04-06-2015 08:38 PM
04-06-2015 09:26 PM
Hi Dennis,
I have attached the vi. It does a few more things that what I described. The vi is used to control a tilt platform where we put animals. It sends digital outputs to an arduino that controls a servo. The program decides the different kinds of tilts and gets feedback from the arduino.
In addition to that we need to collect the load cell and accelerometer data ( they are part of the tilt platform). The animals get implanted with EMG.
Thank you again.
04-06-2015 10:12 PM
04-06-2015 10:32 PM
I posted a screenshot of the section that acquires the data from the DAQ. I can't get a screenshot of the whole vi.
04-06-2015 11:34 PM
04-07-2015 10:27 AM
I'm still not very proficient with labview I didn't think find a better way at the time instead of array to cluster. I only get NaN when I sample the data at 5k Hz. When I bring that down to 1k I don't have the issue with NaN. Am I sampling data faster then it's being generated for the accelerometer and load cells?
04-07-2015 10:58 AM - edited 04-07-2015 10:59 AM
I tested all the channels in NI Max and they do produce data.
I am re-attaching the vi after clicking ctrl + u. It looks less sloppy. I added a property node for DAQmx Read the sayd "ReadAllAvailSamp" and set it to False.
I collected about 32MB of data and didn't get an error when I got to clear task at the end. I am worried that since I am holding up the data collection this is effectively downsampling. Can you confirm if this would be the case?
Sorry for the double post.
04-07-2015 10:30 PM
I thought this was resolve but the issue not resolved. I am still getting NaN for the readings of the accelerometer and load cells if I try to collect at 5k Hz and a buffer over run error if I specify -1 for the read vi.
04-09-2015 10:32 AM
Do you consistently get NaN for the readings of the accelerometer when you try to collect at 5kHz or just intermittently?