Arthur Lima Posted April 15, 2022 Report Share Posted April 15, 2022 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. RNT_VI_UPPR_Timed_v11.vi Quote Link to comment
JKSH Posted April 16, 2022 Report Share Posted April 16, 2022 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. Quote Link to comment
ShaunR Posted April 16, 2022 Report Share Posted April 16, 2022 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.