LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Config data files are lost

I am using "Open Config Data" and reading Keys out of a config data. I'm also updating the data and writing it out. Per a document I found on the NI website I actualy open the file only once for the program and call "Config Data Write To File" each time the data is updated.

The problem I'm having is that the Config disk file is occassionally wiped out completely - no data and no sections. I have various VIs that could update the data, and most things are re-entrant. Any ideas on where to look?

Thanks,
Jeff
0 Kudos
Message 1 of 5
(2,906 Views)
The reentrant execution is suspicious, which means that multiple copies of a VI can run simultaneously. I'm guessing that two VIs are manipulating the same file, giving unexpected results. Is there a reason these VIs must be reentrant?
0 Kudos
Message 2 of 5
(2,906 Views)
Even though you have reenterant subVIs, you can still highlight execution of your VIs. Have you tried running your code and seeing what reenterant code wipes the data config file? You will have to monitor the file with notpad or IE by opening it or refreshing it often. Debugging this problem is going to take some time, but it is the only way I can think of to proceed.
0 Kudos
Message 3 of 5
(2,906 Views)
Thanks for your reply. I think you have a good idea to monitor when the file is being corrupted, but the bug is too sporadic to do this with notepad. I can write a little executable that'll frequently open the file and see if it's emptied or not.
0 Kudos
Message 4 of 5
(2,906 Views)
Thanks for your reply. The VIs must be reentrant because I have 6 identical processings running, each with the same windows and doing the same thing but on different IO points. I use templates when I VI has a front panel and just rentrancy with there is no window. (Because of hardware (FieldPoint and Traditional DAQ) limitations I can't use 6 copies of 1 program but rather 1 program with 6 windows.)

I think you are right to be suspicious about reentrancy only because the problem is so sporadic that it must happen only when the execution is just right to overlap or something. Perhaps I'll use a semaphore to lock access to the files.

Thanks,
Jeff
0 Kudos
Message 5 of 5
(2,906 Views)