01-09-2023 09:33 AM
"That code just "smells" " 🤣. I need to work a little harder I guess to get rid of all the smells.
Thanks a lot for your great feedback. Haha.
But I would like to know if there is a way I can see the info on the text file without stopping the run. Usually, the info would populate on the text file file when I stop the while loop. Is there any way I can modify the code so the info entered can be seen while the program is running?
01-09-2023 10:31 AM
@GRCK5000 wrote:
Is there any way I can modify the code so the info entered can be seen while the program is running?
It depends what you are using to read the configuration file. Since you are opening the file before the loop, LabVIEW will probably prevent access by other applications. This is an important safety feature. It would be unpredictable if multiple programs modify the same file in parallel. You could probably use the deny access function in "deny none" mode, but that seems dangerous.
Done correctly, you could read the contents if the other program is configured for read-only mode. I think in the past notepad ignored file locks, but I might misremember.
Alternatively, you could place the file open/close around the FOR loop, but then you might not be able to write a new entry while you have the file open in another program.
Why not keep it all in the same program and add a button to display the file contents in a text indicator?