LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event structure latch controls not resetting

Hi,

 

I'm having a bit of trouble with my controls associated with an event structure.

 

Controls stay active until the loop runs again, so I put in a reset case that gets called by an event programmatically.

 

What I find really weird, is that it works when highlight execution is on but fails to reset when it is off.

 

Anyone got any ideas? 

 

Using LabVIEW 13.0f2.  Example attached.

 

Thanks,

Sean

0 Kudos
Message 1 of 7
(1,774 Views)

Hi Sean,

 

good advice: put buttons into the event cases where they are handled to allow the latching operation take place.

 

As I can't open your VI right now: did you follow that good advice?

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
Message 2 of 7
(1,773 Views)

Hi GerdW,

 

That's the first thing I did, I expected it just to work but it didn't.

 

I just went back and changed a control to classic and tried again and it worked, (attached). 

 

It looks like ti is an issue with the silver boolean buttons

0 Kudos
Message 3 of 7
(1,762 Views)

Try using the value change event instead of mouse down.

0 Kudos
Message 4 of 7
(1,749 Views)

When it comes to buttons, you should almost always

  1. Set to Latch When Released
  2. Use the Value Change event
  3. Put the terminal in the corresponding event case

Yes, there are exceptions.  But this will cover at least 90% of applications.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 7
(1,742 Views)

@SeanJ wrote:

 

I just went back and changed a control to classic and tried again and it worked, (attached). 


You also change the mechanical action. In the original code, the "rst" button was "switch until released" (like a car horn!). This generates two events, one when pressed and one when released.

 

What's the point of the signaling value property node?


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 6 of 7
(1,733 Views)

altenbach wrote:

What's the point of the signaling value property node?


Probably to get the latching buttons to reset (must go through the loop at least once more for the terminals to get read).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 7
(1,725 Views)