Naoki Posted February 13, 2019 Report Share Posted February 13, 2019 Hello. I am trying to make a measurement program. Since this measurement takes a long time, it is necessary to be interrupted by the user's operation so that it can return to the measurement standby state. Is there a smarter way than inserting lots of checking the local variable of the break button during the measurement sequence? 1 Quote Link to comment Share on other sites More sharing options...
Jim Kring Posted February 13, 2019 Report Share Posted February 13, 2019 Hi Naoki, You can explicity call the “Idle” (“Event Structure”) state, in your measurement sequence, to check for events. There some lessons on how to do this in the JKI State Machine Online Training. -Jim Quote Link to comment Share on other sites More sharing options...
Naoki Posted February 14, 2019 Author Report Share Posted February 14, 2019 20 hours ago, Jim Kring said: Hi jim. I initially thought that calling explicitly "idle" would complicate transition between states. However, we believe that complexity can be avoided by presetting the place to return after "idle". Thanks for the good advice. 1 Quote Link to comment Share on other sites More sharing options...
Jim Kring Posted February 14, 2019 Report Share Posted February 14, 2019 Hi @Naoki. Yes, you can just put the call to "Idle" inside of your sequence of calls, and then the JKI SM will handle the subsequent states after checking for user interface events. There are some considerations, but it's totally possible and works well. Remember to set a Timeout greater than zero (but NOT zero, due to CPU usage concerns!) so that if there are no events, the Timeout frame will execute and your sequence will resume. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.