12-03-2009 10:06 AM
Hi All,
My application needs to keep track of the no. of time in seconds various banks of pumps have been running. This code runs on a cRIO. A section of the timed loop that executes this code is in the attached picture. It all works fine, but sometimes the thread seems to stop for no apparent reason. Any ideas? I never see any error info printed out the error out display control.
Thanks,
Sean
Solved! Go to Solution.
12-04-2009 01:01 PM
Hello,
What exactly do you mean by the thread stopping? The Timed Loop stops when it should not? I don't see what stop condition has been set to quit the loop.
12-04-2009 08:48 PM
12-05-2009 11:34 AM
Thanks for the response, I thought some type of error encountered could be causing the problem. In the attached diagram below is my proposed new solution. If there is an error opening the file, the counter is set to zero (not sure what else I could set it to). If there is an error writing the updated value to the file, the error code is sent up to the host GUI via a network shared variable but the program should still continue. Still not sure exactly what I can do if the system can no longer write the file. Is there any generic way of storing non-volatile values in LabviewRT? All this messing around with files is quite low-level. I also have Labview DSC (the databasepackage), but it doesn't look like LabviewRT can interface to it.
Thanks for your time,
Sean
12-05-2009 12:57 PM
If you have any errors opening the file, then you are going to have to figure out what they are and how to fix them. That or figure a way to work around it.
The DSC system does work with RealTime module and shared variables. Now somethings you can't do such as shared variable logging on a SV hosted on a realtime module, but can if the SV is hosted on a PC.
The only other thing I'd be concerned about it is frequent writing to a file that is stored in non-volatile memory. Some forms of non-volatile memory have a limited number of writes they can take. So if this is one of those types, and you are doing frequent writing such as every 5 seconds, you could possibly kill the use of the memory faster than you might think.