Jump to content

Logging Data from Multiple cDAQs


Recommended Posts

Hi,

I'm trying to build a VI to continuously collect cata from multiple cDAQs in parallel and am running into errors of it not being "able to keep up with hardware acquisition". I have 4 cDAQs total (see attached systems topology with all hardware used). I've used a similar system before and after some adjustment to Rate and Samples to Read managed to get it stable but this time I have not been able to.

I've build separate acquisition tasks for each of the sources in my topology (daisy chained cDAQs are treated as single) inside the same loop. I've managed to narrow it down to the issue happening when I'm attempting to save the data into a file (using the Write to Measurement File VI) so I've moved to trying to use the save TDMS functionality but could use some assistance in trying to improve my VI to be more reliable and be able to save data to a single file (currently saving each cDAQ to its own TDMS).

I've attached my VI for reference,

Thanks in advance for any thoughts.

2122.png

RNT_VI_UPPR_Timed_v11.vi

Link to comment
4 hours ago, Arthur Lima said:

I've used a similar system before and after some adjustment to Rate and Samples to Read managed to get it stable but this time I have not been able to.

Some hardware has a minimal sample rate. Double-check that the "SampClk.Rate" property does return exactly 250 Hz -- If it's actually higher, then you'll never empty your buffer and it just keeps growing.

 

4 hours ago, Arthur Lima said:

I've managed to narrow it down to the issue happening when I'm attempting to save the data into a file (using the Write to Measurement File VI) so I've moved to trying to use the save TDMS functionality but could use some assistance in trying to improve my VI to be more reliable

Use a producer-consumer architecture (example: https://forums.ni.com/t5/Example-Code/DAQmx-Encoder-Measurement-with-Producer-Consumer-Architecture/ta-p/3493445) Your DAQmx while-loops should be dedicated to calling DAQmx Read.vi only. The data should be sent to a different loop (via a queue or a Channel Wire) for writing.

Beware: Since you are writing waveforms but you discard some data chunks, your file timestamps will be wrong.

 

4 hours ago, Arthur Lima said:

and be able to save data to a single file

When you send your waveform to the data writing loop, send the relevant TDMS Group Name too.

Link to comment

In addition to JKSH comments, You are using an express VI which are known to be slow.

What is the throughput do you require? How much data are you trying to save (every second, every minute)?

A typical mechanical hard disk will be able to cope with about 50-100MB/sec. A decent SSD 200MB/sec at least.

The Win 32 File IO is much faster than the native LabVIEW. The link contains examples including queue buffered which JKSH commented on.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.