LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use "Value signaling" for boolean-latch button?

Hello,

i hava an event-structure with a boolean-button on it (Mechanical Action: Latch when pressed).

For this button i have an event "Value Change" - works all fine.

Now i want to execute this event from an other event by sending a True into the Property-Node "ValueChangeSignaling" of this button.

But now labview tells me:

When a Boolean control has a latch mechanical

action, you cannot use the Value property to read or write its

value.

 

What can i do now to execute the existing event of the button?

 

Thanks

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

Use a user event. Instead of setting "ValueSignaling" you fire the event.

If you are not using a filter event, you can configure both sources for the same event case.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 3
(7,585 Views)

The reason the latched boolean cannot be set via Value property is described here:

http://digital.ni.com/public.nsf/allkb/0774F8F0498017B886256F080066E2E3

 

A little further info from the help:

Note  You cannot use any latch action for objects with a local variable. The first local variable to read a Boolean control with latch action resets its value to the default. If you configure your Boolean value with a latching mechanical action, the Value Property and the Value (Signaling) Property always return an error. Due to race conditions that can occur when you have a Boolean value with latching mechanical action, you cannot programmatically read Boolean values that are set with a latching mechanical action.

 

So your options are to either change the change mechanical action to switched, and programmatically set it back to False inside your event case, or use another method to fire your event (as previouosly mentioned, consider user events).

Thoric (CLA, CLED, CTD and LabVIEW Champion)


Message 3 of 3
(7,578 Views)