Hello, I have created a program using the JKI state machine template to test a product. The unit is initially powered and then the program continually monitors the current to see if it drops and then performs certain events. One of the events is to wait a certain amount of time before the next event. I have put an indicator on the front panel entitled "Stabilization Time" to see a live timer of this "wait time" but it does not work. The program does wait the desired amount of time but it isn't displayed "live" on the front panel. Anyone know what I am doing wrong?
My second problem is that when I start the test by pressing the "Start Test" button the front panel, the program becomes unresponsive. When I use the "Stop" button on the front panel I expect the VI to shutdown but it does not do anything. I am using an event structure to register to continually monitor and response to front panel buttons. Any ideas?
I have attached my code. Thanks,
Solved! Go to Solution.
Think DATAFLOW, you have placed an "Time Delay" Express VI in parallel to your "Elapsed Time" Express-VI, both initialized with the same waiting time. Now, the Time-Delay will just wait until it is finished, so the Elapsed Time is called only once.
Change your code to something like this:
Think about your States!!
You go from
Start Test to Cycle Test: Start
Cycle Test: Start to Cycle Test: Run
Then you enter an infinite loop of Cycle Test Run
In Cycle Test: Run
these are the states
PSU: Get Current
Time Delay: Delay >> 0.5
Cycle Test: Run
In PSU: Get Current in one of the cases you go back to Cycle Test: Run.
There is no escape.