From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean Value Signaling not generating Event

Value and Value Signal Event Triggering.png

 

I Just want to Trigger " Indicator value Change Event" that corresponds output to be shared to Target RT VI through Network Shared Variable

  • While Using Indicator Property Node Value (Signal), An event inspector window shows unhandled events in event queue. The Value is shared to Network shared variable.
  • At the same time if i change Indicator property node as Value , The Event is Not triggered in UI Event structure. The Value is not shared to Network shared variable.

How to achieve "Indicator Value Change Event " without unhandled events in UI event structure

0 Kudos
Message 1 of 10
(1,394 Views)

Are you sure that there are unhandled events? For me it works.

Events appear only briefly in the topmost line of the unhandled events list and immediately disappear. They never pile up.

I don't see why it would not work. Unless writing the shared variable is unbearably slow.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 10
(1,344 Views)

Kindly check Video

1.Value Property does not trigger any event in UI

2.Value (Signal) Property triggering event but its unhandled event

Download All
0 Kudos
Message 3 of 10
(1,337 Views)

Hi gowthameie,

 


@gowthameie wrote:

1.Value Property does not trigger any event in UI

2.Value (Signal) Property triggering event but its unhandled event


  1. This is expected behaviour!
  2. Because of the 10ms wait in your event handler loop!

Please read the LabVIEW help on event structure, especially the Caveats section…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 10
(1,332 Views)

There is a small latency, more in the display of the Event Inspector Window than in the event management itself, I believe. But eventually all events are handled in a short time.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 5 of 10
(1,323 Views)

Check the following modified version of your vi, in which I grab the times (from the millisecond timer) of both event generation and management.

You will see that most of the times, they differ by only one ms. I removed your 10 ms wait because it's useless, however it doesn't change much.

Also:

- I set the Stop button as Latch when released, which is the best choice

- it's misleading to call indicator what is actually a Control (although cosmetically similar to an indicator)

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 6 of 10
(1,318 Views)

 


@gowthameie wrote:

 

I Just want to Trigger " Indicator value Change Event" that corresponds output to be shared to Target RT VI through Network Shared Variable


 

If this is all you "just" want do do, I don't understand your extremely convoluted approach.

 

  • Your code should function. Not sure why you have problems.
  • It is very questionable to use a control as indicator. You can do exactly the same while leaving it an indicator and grabbing the value from the newval event data node.
  • Whys is there a 10ms wait in the event loop?
  • Why is there an unused timeout event?
  • Why is the stop button the wrong mechanical action?
  • Since you only write to the front panel in the stop event, only the LED resets, while the shared variable remains in an undetermined last state. Seems dangerous!
  • Events are primarily for user interaction, not for programmatic control. Especially if you are spinning a loop at the right rate already. You have the "tail wagging the dog".
  • If you want to update the indicator and shared variable every 100ms, all you need to do is the following:

 

altenbach_0-1614012400804.png

 

0 Kudos
Message 7 of 10
(1,295 Views)

Let me explain my actual application

 

 

  • I want to monitor Digital Inputs (Low oil Level, Any fault status) (True/False)  for every 100 msec. (Similar to second loop operation what i simulated)
  • Based on the Value of Digital Input status, Digital Output should be activated from my UI Event Structure (Similar to First loop operation). 

 

(i.e) if Oil Level is Low , software should give notification to operator through Red lamp ON.

 

How to achieve this?

Give a proper architecture.

 

0 Kudos
Message 8 of 10
(1,261 Views)

@gowthameie wrote:

(i.e) if Oil Level is Low , software should give notification to operator through Red lamp ON.


Use Altenbach's setup.  You just have the look monitor the level, do the comparison, and wire the output to the indicator.  No need for an Event Structure here.


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 9 of 10
(1,248 Views)

@gowthameie wrote:

Let me explain my actual application

 

 

  • I want to monitor Digital Inputs (Low oil Level, Any fault status) (True/False)  for every 100 msec. (Similar to second loop operation what i simulated)
  • Based on the Value of Digital Input status, Digital Output should be activated from my UI Event Structure (Similar to First loop operation). 

 

(i.e) if Oil Level is Low , software should give notification to operator through Red lamp ON.

 

How to achieve this?

Give a proper architecture.

 


You are spinning the loop anyway. As I said, events are primarily for user interactions and in your original code, the user could even click the LED and trigger an out of band event that could potentially interfere with proper operation or lead to dangerous conditions (i.e. low oil without indication!). Also note that a low oil level is probably a much rarer and more random occurrence. That shared variable update should be inside a case structure that only activates when the boolean actually changes (Note that I am avoiding the term "event" to keep you from falsely gravitating to the event structure again!). You can use a feedback node to compare current and previous.

0 Kudos
Message 10 of 10
(1,219 Views)