07-03-2019 03:10 PM
When I try to change an enum on my front panel with an event structure my labVIEW code locks up. I have to use the abort execution button to stop the program. Right now I'm just sending a picture. I'll need to isolate the event structure from a larger program to send you a vi.
Solved! Go to Solution.
07-03-2019 03:20 PM
07-03-2019 03:23 PM - edited 07-03-2019 03:24 PM
Your post is too ambiguous to help. Please answer the following:
My guess is a deadlock due to the code executing something else and "lock front panel until event completes" is enabled. This probably hits at more serious architectural issues in the code, so please attach it.
07-03-2019 03:34 PM
I know the wait function doesn't belong there in the enum. I can change that. I want the local so the operator can see the change.
07-03-2019 03:37 PM
@MPerlick wrote:
I know the wait function doesn't belong there in the enum. I can change that. I want the local so the operator can see the change.
You really need to answer all questions.
It makes no sense to write the newval to a local variable of the control that just changed. The values will always be identical already. (Or do you have several controls with the same label?)
07-03-2019 03:38 PM
I can't duplicate the problem with a separate vi. There should be nothing else running but this loop with the event structure. I'll make sure I'm using a local for the event structure. Thanks for your help. I'll check my code, but so far only the enum causes this problem.
07-03-2019 03:41 PM
@MPerlick wrote:
I'll make sure I'm using a local for the event structure.
That sentence makes no sense!
(...and I just said that the local is not needed)
07-08-2019 11:53 AM
I finally was able to make it work by taking your advice. I use a local variable to change the enum "Code" in the event structure. Now it no longer locks up.
07-08-2019 12:06 PM
Something sounds suspicious and strange here. I believe you treated the symptom, but not the cause.
07-08-2019 02:21 PM
I still don't understand why you think you need the local. Unless this is a different "Code" from the one that triggers the event structure then it already has the value. Is this "Code" an indicator?
Also, how is this different from the code in your first post? I don't believe that you have fixed your underlying problem as I suspect that the problem lies elsewhere.
Do you intend for this loop to exit when Code changes?
Perhaps a more precise definition of what you're trying to do would help in the absence of posting code.