07-15-2017 09:33 AM
Your event case is probably has the checkbox set to lock the front panel until the event completes. Since the Mouse Down event is still running, the front panel is locked and you can't press the stop button to cause the inner loop to stop, which is what you need to have happen for the event case to complete and the front panel to unlock.
It is a catch-22. Event structures really should not have long running code or loops that need other interactions to stop them inside of them.
Read Caveats and Recommendations when Using Events in LabVIEW - LabVIEW 2016 Help
07-15-2017 12:30 PM
@RavensFan wrote:
Your event case is probably has the checkbox set to lock the front panel until the event completes. Since the Mouse Down event is still running, the front panel is locked and you can't press the stop button to cause the inner loop to stop, which is what you need to have happen for the event case to complete and the front panel to unlock.
It is a catch-22. Event structures really should not have long running code or loops that need other interactions to stop them inside of them.
Read Caveats and Recommendations when Using Events in LabVIEW - LabVIEW 2016 Help
Thank you. You are a star! That was the vital piece of information I was looking for through this whole thread. I had missed that check box and now it works beautifully. Well done.
BTW, there is no getting away from the fact I have to loop 10 times, at 4 second intervals and I have to have a way of pausing it. Thanks again.
Andrew
07-16-2017 10:41 AM
@ASH2020 wrote:
@RavensFan wrote:
Your event case is probably has the checkbox set to lock the front panel until the event completes. Since the Mouse Down event is still running, the front panel is locked and you can't press the stop button to cause the inner loop to stop, which is what you need to have happen for the event case to complete and the front panel to unlock.
It is a catch-22. Event structures really should not have long running code or loops that need other interactions to stop them inside of them.
Read Caveats and Recommendations when Using Events in LabVIEW - LabVIEW 2016 Help
Thank you. You are a star! That was the vital piece of information I was looking for through this whole thread. I had missed that check box and now it works beautifully. Well done.
BTW, there is no getting away from the fact I have to loop 10 times, at 4 second intervals and I have to have a way of pausing it. Thanks again.
Andrew
Ummm... no. You are using a band-aid to cover bad habits. The proper thing to do is make it so you don't have to lock the front panel.
07-16-2017 02:17 PM
@billko wrote:
@ASH2020 wrote:
@RavensFan wrote:
Your event case is probably has the checkbox set to lock the front panel until the event completes. Since the Mouse Down event is still running, the front panel is locked and you can't press the stop button to cause the inner loop to stop, which is what you need to have happen for the event case to complete and the front panel to unlock.
It is a catch-22. Event structures really should not have long running code or loops that need other interactions to stop them inside of them.
Read Caveats and Recommendations when Using Events in LabVIEW - LabVIEW 2016 Help
Thank you. You are a star! That was the vital piece of information I was looking for through this whole thread. I had missed that check box and now it works beautifully. Well done.
BTW, there is no getting away from the fact I have to loop 10 times, at 4 second intervals and I have to have a way of pausing it. Thanks again.
Andrew
Ummm... no. You are using a band-aid to cover bad habits. The proper thing to do is make it so you don't have to lock the front panel.
The front panel isn't locked now. That's the whole point. That's what the problem was all along. And BTW, people don't learn very well if they are criticised. I have done my best, it is moderately tidy and it works very well, oh, and I've delivered it on time.
07-17-2017 01:28 AM
Hi Andrew,
BTW, there is no getting away from the fact I have to loop 10 times, at 4 second intervals and I have to have a way of pausing it.
We didn't say so.
We suggested to implement a producer-consumer scheme, maybe combined with state machines. You still should handle UI events with an event structure!
I have done my best, it is moderately tidy and it works very well, oh, and I've delivered it on time.
If it's ok for you and you done your job, it might be ok in general.
As long as nobody else has to support any future development based on your VI…