08-15-2023 05:58 PM
I've seen many articles and videos on this and I've drastically improved some things. But I keep running into new problems and this one is stumping me.
First - my colleague has a code that has been working for the instrumentation that we originally had. It was already code spaghetti.
I had the task of adding accelerometer data. When I did, I had to change how the DAQ.mx were set up because it kept throwing errors. For right or wrong, I added a Sample Clock and the error is gone.
When I did that - the sampling rate for items this DAQ are now WAAAAAY faster than those coming from the other acquisition unit
.
I've attached 3 files, the VI, some example data, and a screenshot from the original data.
Just from the screenshot, you can see the Temperature and Accelerometer recorded about 15x more data points.
Those 2 signals are coming from acDAQ and the others from the USB-6009.
- I have 2 modules in the cDAQ - one is a max of 51.2 kHz and the other 100 kHz.
- I also know the USB can only collect at 48 kHz.
The first thing I did, was update the DAQ.mx setup he had and it helped a little. I've attached 3 similar files. Now I'm reading temp and acceleration about 50% faster.
1.how do I speed up the data coming from the USB-6009.
2. I need the time stamp for every data point - ideally. It's okay if the channels that read slower have blanks at these times because...
3. One of the channels from one of the modules on the cDAQ will need to run as fast as physically possible to collect the data I need. How do I speed that sensor up?
Please help! School us!
08-15-2023 06:07 PM - edited 08-15-2023 06:09 PM
Missing attachment.
You need a common trigger that will tie the starting point of all the three modules and rely on hardware timing to estimate the timestamp of every sample from thereon.
Please list the DAQ modules you wish to synchronize.
08-16-2023 01:08 AM
Hi This!,
@EngineerThis! wrote:
1.how do I speed up the data coming from the USB-6009.
2. I need the time stamp for every data point - ideally. It's okay if the channels that read slower have blanks at these times because...
3. One of the channels from one of the modules on the cDAQ will need to run as fast as physically possible to collect the data I need. How do I speed that sensor up?
08-16-2023 10:12 AM - edited 08-16-2023 10:18 AM
You have 3 devices to collect data. (at different sample rates, or you are lucky to find a common samplerate, so digg in the manuals/specs since the SR is usually not arbitary)
If you want to syncronise the data streams, you can
Best: use one common clock to derive all sample clocks and use one common start trigger.
(Seems possible with cDAQ in one chassis (Never used it) , the 6009 is out here , usually PXI(e) is the way to go)
Use absolute (or relative with common strat trigger) timestamping. Just keep in mind that without a common (locked) clock all internal timebases are different (or should I say unknown within some PPM, Woun't hurt for some seconds but ...)
Or share one channel at each device with a common signal. (sine, pulse , sweep... ) and do some resampling and alining later.
Oh, and for multiplexed DAQs remember that they are sampled in sequence...
08-23-2023 08:57 AM
I swear I submitted the attachments. I'll go back and see if I can edit it.
Nonetheless, I am trying to sync the NI-9234, NI-9219, and USB-6009.
I was having trouble with some analog inputs into the NI-9219, so all but 1 are feeding into the USB-6009. I also need the USB-6009 for an analog output, which I will be replacing with an NI-9263 (hopefully today). At that time, I will try my luck bring the analog inputs back to the NI-9219 and replace the counter with an analog speed sensor so I can eliminate the USB-6009 altogether. I hope this will eliminate some of my woes.
If it's helpful, here are more details
NI-9219 - thermocouple
NI-9234 - accelerometer
USB-6009 - Valve position command output (0-5V), Valve position, air temperature, air speed, counter (for tachometer), and bearing load.
08-23-2023 10:16 AM
@Henrik_Volkers wrote:
Best: use one common clock to derive all sample clocks and use one common start trigger.
(Seems possible with cDAQ in one chassis (Never used it) , the 6009 is out here , usually PXI(e) is the way to go)
USB multifunction DAQ's support this as well, you just have to connect a couple PFI lines with an external wire. Export your clock out of one device and tell the other device to use whichever PFI as its input clock source.