11-10-2008 11:25 AM
I had a look again at my example and indeed it DOES lock if I set the event case to NOT lock the UI until completed. I had totally missed this setting in my testing. My VI posted was actually set to lock the UI until finished, so I suppose the behaviour was as expected. Turning off the UI Lock still freezes the VI however, so I have to agreewith TonP on the difference between the two problems.
Shane.
11-24-2008 07:55 AM
Hi,
I have filed a CAR (Corrective Action Request) so that R&D can take a look at the issue. The CAR number is #134531.
Best regards,
11-24-2008 08:13 AM
Well that's a bit unexpected because I got a mail back saying that it was an "uncomfortable Error" and that I should do a complete uninstall and re-install of all NI products on my computer.
Funnily enough, that didn't solve the problem.
So is this officially a bug?
Shane.
11-25-2008 01:49 AM
Hi,
it may very well be that other engineers have looked through the matter more thoroughly. Since I didn't personally find anything directly related to what you have described and was able to reproduce the problem, I thought it best to file a CAR and to see what comes of it, since to me it is unclear whether it is 'expected' behaviour or not.
11-25-2008 05:11 AM
I appreciate having a CAR for it. Thanks.
I seriously believe it's a bug.
Shane.
01-16-2009
03:21 PM
- last edited on
06-11-2025
10:55 AM
by
Content Cleaner
tst wrote:However, I think I also agree with Ton that this is probably not a bug.
True, this is not a bug. Event Structures can be confusing at times
, and we have tried to document the common Event Structure questions in the LabVIEW Help...
Avoid Using an Event Structure Outside a Loop
LabVIEW can generate events even when no Event structure is waiting to handle them. Because the Event structure handles only one event each time it executes, place the Event structure in a While Loop that terminates when the VI is no longer interested in events to ensure that an Event structure handles all events that occur.
|
Caution If no Event structure executes to handle an event and front panel locking is enabled, the user interface of the VI becomes unresponsive. If this occurs, click the Abort button to stop the VI. You can disable front panel locking by right-clicking the Event structure and removing the checkmark from the Lock front panel until the event case for this event completes checkbox in the Edit Events dialog box. You cannot turn off front panel locking for filter events. |
For example, in the following block diagram, the Event structure is outside the While Loop and front panel locking is enabled for the numeric Value Change case.
If you change the value of the numeric control, an event occurs. The Event structure executes once and handles the Value Change event. If you change the value of the numeric control again, another event occurs, and the user interface locks because front panel locking is enabled. The Event structure already executed once, and because it is not inside a While Loop, it is unable execute again to handle the second event. If you click the stop Boolean control to stop the While Loop and the VI, the VI cannot stop because the block diagram still has not handled the second event, and LabVIEW does not process the event when you click the stop Boolean control until the block diagram handles that event. You can avoid this behavior by placing the Event structure inside the While Loop.
Event structures begin waiting for events as soon as the VI runs. For example, if you configure two Event structures within the same Sequence structure to wait for a mouse click on the same front panel object, both Event structures execute as soon as the event occurs for the first time. If you want the second Event structure to execute the second time the event occurs, do not use a Sequence structure. Instead, place one Event structure inside a For Loop that you configure to execute twice.
See all: Caveats and Recommendations when Using Events in LabVIEW
Cheers!
01-18-2009 07:10 AM
If you go back to the examples quoted earlier, the panel was locking even when the option to lock the UI was not selected.
In that case it's not expected behaviour. Locking when the UI lock option is selected I now understand, but when the UI lock option is not selected, why then should the UI lock up?
Shane.
01-19-2009 10:16 AM
Hey Shane!
I looked at both "Freezes.vi" and "UI Locking Bug.vi", and I can't get panel to lock without that option checked, Just let me know what you were seeing, and we should be able to sort it out. Cheers!
01-20-2009 02:53 AM
01-20-2009 03:26 AM
I am not seeing the bug on LabVIEW 8.6 ( I have seen it on 8.5).
Ton