LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Value Change Event

Solved!
Go to solution

Hi

As you see the attachment I have a "Numerical Control" (X) and a "Numerical Indicator" (Z) whose value is changing by a "Numerical Control" (Y). 

When I run the code and change "X" the Event Produce a notification but when I change the value of the indicator "Z" using "Y", the Event Structure does not produce any notification.

Why is that and How should I be notified when the value of "Z" changed?

 

Best Regards

V.S

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

Hi VS,

 

an event is either fired by USER action (aka mouse clicks or key strokes) or by using user events.

 

Setting an indicator programmatically (by a wire ) will NOT produce an event. You can however fire an event using a "Value (signalling)" property node…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 7
(4,258 Views)
Solution
Accepted by topic author V.S

Hello V.,

attached something that would work.

 

Depending on the nature of your application, there must be a better way to do what you need.

 

Normally when I tend to use this property node I start questionning my design.

Message 3 of 7
(4,243 Views)

Hi Gerd W

when I use the "Value Signaling" it fires the event for every cycle of the while loop not only the first time I change the value. 

 

Regards

0 Kudos
Message 4 of 7
(4,242 Views)

Hi VS,

 

yes, it does so.

 

When this is a problem for you you should only call that properety node when your value really changes…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 7
(4,236 Views)

@V.S wrote:

Hi Gerd W

when I use the "Value Signaling" it fires the event for every cycle of the while loop not only the first time I change the value. 

 

Regards


Then why don't you just use a Y:Value Changed event?

 

Based on this code, you should not have the timeout.  You should also make an event for the stop button being pressed.  There is no need for this loop to keep running when there is no GUI interaction happening.


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 6 of 7
(4,232 Views)

 

0 Kudos
Message 7 of 7
(4,226 Views)