ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 6, Error message given

Hi guys I can't seem to decipher why this error message is being given and how to get around it.

 


 

Error 6 occurred at Open/Create/Replace File in NI_LVConfig.lvlib:Save Config File.vi->NI_LVConfig.lvlib:Close Config Data.vi->write settings.vi:5->LP3000+.vi

 

Possible reason(s):

 

LabVIEW:  Generic file I/O error.

 

C:\LP3000+\stop watches\ ljlogud.cfg


the stopwatch timer with the boolean array gives times for each individual array element and saves the valus to a cfg file. Even if the error message is shown the timer does not stop counting (which is good!!!). Also the error message apprears only periodically and not always. How do I get rid of the error message window? Any comment about the shortcomings of the code is also appreciated.

0 Kudos
Message 1 of 2
(2,651 Views)

Well,

You only need to save the new values AFTER the main loop ends.  Reading them once to start is good- write them once to save them for the next launch- the file isn't used by something else is it?

 

And we are off to the races.... the Local "Array" is read without regard to when the terminal "Array" is written.  a classic race condition that nearly garuntees the last value written to the file is 1 iteration late.   Again by getting the file writing outside the main loop you'll fix this issue too.

 

I'ld have used Shift registers instead of FB nodes but that's a matter of personal taste.  The flat sequence structure should be removed (almost all of them should be obliterated, they are the devil's work.


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 2
(2,639 Views)