06-20-2014 09:25 AM
Hello everyone!
I have following problem. I have a very simple state machine with two cases. In the Idle case there is an event structure receiving input from a Table Control. When pressing Run the Vi enters the Run state. To exit the RUn state I have a Finish button, but IF I during the running state press anything on the Table Control the entire front panel will lock. Disabling the Table Control in the running state doesn´t help in the same way it helped for Button 1 and 2. Any help would be appreciated. I have tried unsuccesfully with the Registering and Unregistering event functions.
Attached is a simplified version of the problem. Thanks in advance.
Solved! Go to Solution.
06-20-2014 09:42 AM
LabVIEW is doing what it has to do. In the Mouse down event of the Table control you can see an option "Lock Front panel" which did this magic. Unmark that option and check it. Also for the Boolean button they are value change event thats why you didn't face the problem with that.
06-20-2014 09:50 AM
O my god, it was so simple. I have never paid any attention to that field in the Edit Events window. Thank you very much! Now I can enjoy some football/soccer in peace 🙂
06-20-2014 09:51 AM
I ran your VI and I saw a few problems, try to keep your controls outside the events structure, also do what said P@Anand previously.
Here is your VI with some corrections. (Hope it fix the problem)
Good Luck.
06-20-2014 10:29 AM
06-23-2014 03:01 AM
Hi 13Cmmkl,
Thanks for the tip but for the reaons P@Anand mentioned I have been putting for a very long time the controls inside the their corresponding event state.
Nevertheless now I have seen another problem. Since the GUI remembers the clicks/actions that were done in the table or menu (Menu not seen in the reduced example) this actions will be performed when the run state has finished. This creates very odd behaviour and doesn´t looks so pretty. Does it exist any ways to ignore the clicks/actions being done during the run state as soon as the run state has finished?
06-23-2014 03:36 AM
You can find a way out of it but I would recommend you to go for a proper design pattern. Check the producer/Consumer design pattern and re-structure your code so that you can develop your application in future without problem.
06-23-2014 06:57 AM
Thanks P@Anand I was alrady planning for that due to other reasons. If that solution also solve this problem then it is a bonus.