12-04-2018 06:13 AM
Hello:
I have a simple finite state machine sub vi and a main vi which is used to call subvi to do something. I have some problem:
1. My FSM sub vi have several state. In first state called "idle", if I enter some new value , the vi will crash! It showed no error message.
2. In Main vi , I want to use mouse to do righ-click on the graph , then asynchronous call sub vi and pass new freq. value to the subvi. But the subvi can not update the value.
Any help is appreciated. Thanks!
12-04-2018 10:14 AM - edited 12-04-2018 10:15 AM
Hi howard,
it's all your fault…
1. My FSM sub vi have several state. In first state called "idle", if I enter some new value , the vi will crash! It showed no error message.
Because you implemented event structures in several cases.
Because you implemented the same event in several event structures.
Because you didn't read the help for event structure nor the caveats mentioned in there!
Use only one event structure in the subVI.
Use only one loop in the subVI.
Create a proper statemachine in this subVI!