LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do Boolean switch events stop registering after a user prompt.

Let me start by saying my labview experience is limited. I was more of a labwindows guy. It has been over 10 years since my last time using labview so sorry for the dumb question.

 

I am trying to simulate a Keysight 66309D power supply. When the user clicks on the voltage switch the event pops up a prompt user box requesting the channel and voltage to set. After that, none of the other switches will toggle when clicked and no events can be registered. But if i don't select a switch that has a prompt user box, multiple switches can be clicked and the event s perform properly.  Any ideas on how this can be corrected? I'm not using the event register , could that be the issue?

0 Kudos
Message 1 of 14
(3,195 Views)

Welcome back to LabVIEW.  Here is some of the standard free training links on the forums.

 

NI Learning Center

NI Getting Started

-Hardware Basics

-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)

-LabVEW Basics

-DAQ Application Tutorials

-cRIO Developer's Guide

 

Learn NI Training Resource Videos

6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required

 

I'd focus on topics on the event structure.

 

Also you are going to need to post some code.  I'm guessing you are haveing a data flow issue, where by doing some action, your code no longer is able to check the event structure for events based on the user interacting with the UI.  Dynamic event registering, and user events are semi-advanced topics and from the sounds of it probably aren't necessary.

0 Kudos
Message 2 of 14
(3,190 Views)

Default setting for event structures (an my personal opinion is that it is a bad default as it causes so many problems) is to lock the front panel until that event completes.

 

If you call a subVI that requires user interaction, and that box is checked, you basically lock yourself up because the event case hasn't completed (you are still executing the subVI within it), but you can't finish the subVI because the front panel is locked and prevents user interaction.

 

Check the dialog box where you edit the event case.  If it is checked, uncheck it and try again. 

0 Kudos
Message 3 of 14
(3,188 Views)

@RavensFan wrote:

Default setting for event structures (an my personal opinion is that it is a bad default as it causes so many problems) is to lock the front panel until that event completes.


I'm sure you are aware of this, but the alternative would be that on the UI I could click a button 10 times a second, stacking up those events to be handled, and each click may take an unknown and long amount of time, so then clicking exit would do nothing because I have an exit request, after 9 other requests to do stuff.  Of course event filtering, and priority can help this but still I think this is why NI made this decision.

0 Kudos
Message 4 of 14
(3,175 Views)

took off the lock but still does the same thing

0 Kudos
Message 5 of 14
(3,156 Views)

Attached is the code so far. I still have a lot of switch combinations to add. 

0 Kudos
Message 6 of 14
(3,154 Views)

@Hooovahh wrote:

@RavensFan wrote:

Default setting for event structures (an my personal opinion is that it is a bad default as it causes so many problems) is to lock the front panel until that event completes.


I'm sure you are aware of this, but the alternative would be that on the UI I could click a button 10 times a second, stacking up those events to be handled, and each click may take an unknown and long amount of time, so then clicking exit would do nothing because I have an exit request, after 9 other requests to do stuff.  Of course event filtering, and priority can help this but still I think this is why NI made this decision.


True.  But that is only a problem if you have an event case with long running code.  That is a no-no and I avoid it.

0 Kudos
Message 7 of 14
(3,149 Views)

You have an event structure inside of an event structure.  Bad, bad, bad.

 

In the shift event, you have an OVP value change event.  It is set to lock the front panel.  If you hit OVP value change, it will lock the front panel until it executes.  But it can't execute until you hit the shift button.  But you can't hit the shift button because the FP is locked.

 

NEVER NEVER NEVER put an event structure inside another.

 

Read Caveats and Recommendations when Using Events in LabVIEW

0 Kudos
Message 8 of 14
(3,140 Views)

I'd also go so far to say that under only extreme circumstances should you have more than one event structure in a single VI, and LabVIEW R&D agrees.

 

https://lavag.org/topic/17781-suppose-we-limited-1-event-structure-per-block-diagram/

0 Kudos
Message 9 of 14
(3,135 Views)

I wouldn't go that far.

 

I have several VI's where I have multiple event structures.  But I would never recommend it to a Newbie until they thoroughly understand how they work.

 

The worst mistake is putting one event structure inside another like you see here.

The next worst mistake is putting event structures in parallel inside the same loop.

Next up is having long running code inside an event case.

0 Kudos
Message 10 of 14
(3,132 Views)