02-25-2012 10:37 AM
Hello,
My problem is that I am using Labview to monitor a cycle testing rig. Part of the cycle is to heat a sample with steam until it reaches a certain temperature. It is my desire to run this cycle at night when no one is there so I am attempting to build a timeout function into the program.
The idea is to stop the cycle if the steaming doesn't raise the sample to required temperature say in 5 minutes. This indicates a problem, thus the testing rig will shutdown until someone can look at it. The problem I am running into is that after the first cycle the elapsed time function is running in the background which is not a problem until the second cycle. Even though I have the code so that the elapsed time function resets to zero once it is called again it returns a "true" value for a split second which is enough to shutdown the program. So is there a way to either....
1) Reset the elapsed time function to zero before it returns a split second true.
2) Filter a value (boolean) to "ignore" the first second of data or these types of fleeting responses. Possibly some kind of switch function or a time average value over a few seconds
3)Use some other clever timeout function.
Before you ask. I cannot post my code as my boss is convinced it is a privacy issue.
02-25-2012 11:25 PM
If you are indeed resetting things, there is clearly a logical error in what you are doing. How is the timeout being communicated to the foreground task? Is that being reset? Is the stop logic in the foreground task being reset when it finishes shutting down the process? Beyond a few general suggestions there is really not a whole lot we can do without seeing some code.
Mike...