07-12-2016 09:06 PM
Hi all, I have a question when I was writing my program. The structure is like this, there is a flat sequence, the first part is an event structure, and when i receive an exit from the first part, it will jump to the second part for some coding. Then it will be the last part where i have a while loop waiting for the user to press exit button.
Everything is working, but when i am in the last part which is in the while loop, and when i pressed some controls that had event in the first part of the sequence, it hangs. I just wondering if there is a way to help. i tried to search threads here and i got the 'ProducerConsumerEvents 2' example, but it just didn't work.
I have attached the modified 'ProducerConsumerEvents 2' here asking for help.
Thank you.
07-12-2016 09:40 PM
Read Caveats and Recommendations when Using Events in LabVIEW - LabVIEW 2015 Help
A couple of your events are set to lock the front panel until that event is complete.
07-12-2016 10:38 PM
Hi RavensFan, i know that it is locked, but i would like to know if it can be solved by only a small change. I read the thread you posted but I appreciate your help.
07-12-2016 10:49 PM
Go int and editt those event cases that lock the front panel, and uncheck the box that locks it. Just like you did in the other event cases.
07-12-2016 10:50 PM
07-12-2016 10:52 PM
You need to change the architecture. you cannot leave an event structure behind with no way for it to react to events. Just use a state machine, no sequence needed, ever! You need to get away from the linear thinking!
(As a quick and dirty bandaid fix, you could disable all the controls that no longer have any use once the first equence frame has completed. This way they can no longer trigger the event structure. This is not a satisfactory long-term solution, you should fix the desing problem at this stage, it will be much harder later.)
07-12-2016 11:05 PM
I am not sure what do you mean by unchecking the box, is there any example? Thank you.
07-12-2016 11:08 PM
Hi PalanivelIT
It did actually affect even the event structure is not in the last sequence, i had tried. I think i have to look for the state machine architecture, thanks for the reply.
07-12-2016 11:10 PM
Hi altenbach,
I am not quite familiar with the state machine achitecture but definately i will look into it.
i had the same thinking as you just dis-visible the control but it is not going to be a long term solution.
Thanks for the reply
07-12-2016 11:11 PM