LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 7 occurred at write to measurement

Solved!
Go to solution

Hi all,

 

Labview newbie here. My goal for this project is to be able to have a program running, start recording data on a button click, stop recording data on a button click, be able to move the data files to a different location or rename them outside of labview (just using file explorer) while the VI is still running, and then do that any number of times without ever having to stop the VI. I've been using the Write to measurement sub vi and a True/False loop to start and stop recording on demand - this has been working great (see attached code). However, if I stop recording and then move or rename the existing files and then try to start recording again, my VI crashes and throws up this error (this happened in a slightly different VI but with all the same recording settings). 

 

ByrneLab_0-1722282988656.png

It almost seems like labview is searching for an existing file to write to, but with the settings I have it shouldn't need an existing file to write a brand new file. 

 

Any help is appreciated!

 

 

0 Kudos
Message 1 of 4
(288 Views)

Personally I would avoid using any express VIs. 

I would recommend you use Producer/Consumer Read Waveform Data and Write to TDMS at Two Different Rates

NI-DAQmx has a built-in logging feature. Since you need to apply filtering before logging the data, a producer/consumer architecture would be more appropriate. For file name, I usually Set Filename with Current Date/Time

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 2 of 4
(259 Views)

Thanks for the recommendation, but it doesn't solve my problem. I could learn how to program the backend of the express VI with the TDMS function, but that would be a whole other can of worms that I would then have to debug. Trying to debug the devil I know is better than trying to debug the devil I don't. 

0 Kudos
Message 3 of 4
(227 Views)
Solution
Accepted by topic author ByrneLab

Just passing in True to Reset seems to work (moving/renaming the file doesn't cause Error 7) - it still appends to the file as well if that's how you've configured it.

 

PauloAurum_0-1722366553434.png

 

Regards,
Paulo
CLA, CTD
Aurum Automation Inc.

CLACTD
0 Kudos
Message 4 of 4
(211 Views)