02-11-2015 11:15 AM
Hi all,
I'm having problems with a state machine getting stuck in one of the states. It is supposed to execute in a cool state for X number of seconds, then a hot state for Y number of seconds. This cool-heat cycle repeats until the time elapsed since running the machine = the time set by the user.
Currently my machine is stuck in a cycle of cool -> heat -> heat-> heat.... etc. until the timer elapses. Under inspection with highlighted mode, it doesn't show an error (shows cool-heat-cool-heat cycle), however when running without it wont.
Any help is greatly appreciated.
Cheers
Solved! Go to Solution.
02-11-2015 11:32 AM
In your heat and cool cycles, you are comparing the tick count function to the number 30,000. Tick count is the number of milliseconds since your PC has been turned on. It has nothing to do with how long that VI has been running or a particular state has been running.
You need to use the elapsed time express VI, or store the initial tick count when the state starts in a shift register and compare the new tick count to that.
02-12-2015 05:08 AM - edited 02-12-2015 05:11 AM
Ooops, I uploaded the old version of the VI. I'm now using the time elapsed function rather than tickcount- the problem is occuring on the VI I have uploaded in this post.
02-12-2015 07:26 AM
Hi,
Maybe you coud do it like this:
Reseting elapsed time via state transition.
Regards
andreas
02-13-2015 03:05 AM
Yes i thin that "Reseting elapsed time via state transition" is the best solution 😉