LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview event force trigger

Solved!
Go to solution

In a event structure case, can I trigger another event case to execute?

My application is like this:

event 1, cursor move on a intensity plot1, the case will update intensity plot2

event 2, cursor move on intensity plot2 , the case will update the graph1

 

In event1 case, can I call event 2 somehow? Such that all the plots are updated. Or can I trigger event 2 even the cursor is not moved?

A labview VI is attached, in this program I have three intensity plots, and below each there is a 2D graph. The 2D graph plot is triggered by the cursor on the intensity plots.

Thanks!

 

0 Kudos
Message 1 of 6
(1,606 Views)
Solution
Accepted by topic author gy10c

@gy10c wrote:

In a event structure case, can I trigger another event case to execute?

My application is like this:

event 1, cursor move on a intensity plot1, the case will update intensity plot2

event 2, cursor move on intensity plot2 , the case will update the graph1

 

In event1 case, can I call event 2 somehow? Such that all the plots are updated. Or can I trigger event 2 even the cursor is not moved?

A labview VI is attached, in this program I have three intensity plots, and below each there is a 2D graph. The 2D graph plot is triggered by the cursor on the intensity plots.

Thanks!

 


You want to use the "Value (Signalling)" property of the plots

"If you weren't supposed to push it, it wouldn't be a button."
Message 2 of 6
(1,563 Views)

Thanks! That works.

According to my search, seems like it is better to avoid signal property node. Maybe put certain event case as timeout event which can be controlled to run or bypass by a timer shift register. Any comment on this?

0 Kudos
Message 3 of 6
(1,552 Views)

@gy10c wrote:

Thanks! That works.

According to my search, seems like it is better to avoid signal property node. Maybe put certain event case as timeout event which can be controlled to run or bypass by a timer shift register. Any comment on this?


There's nothing wrong with using Value (Signalling); however if you use it incorrectly you can have a race condition.

In general, using a Value Changed event is preferable to polling with a Timeout event.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 4 of 6
(1,419 Views)

I probably would re-architect the entire code. (You did not include your subVIs. are they complicated?)

 

  1. Place all your data in a shift register, containing a cluster of properly named elements. No need for any locals. Add a few elements for metadata information (e.g. cursor positions).
  2. Each event case should be very simple, just updating the relevant data.
  3. Keep the timeout in a shift register and set it to -1 in the timeout case.
  4. Each event should just set the timeout to a small value if a graph update is needed.
  5. In the timeout case, process and display all update data.

just some ideas....

Message 5 of 6
(1,412 Views)

You may already have a solution that works for you and if so that's fine, but for reference, there are a couple of things I didn't see anyone else point out:

 

 

The assorted event values you get on the left side of the event case will be only the values common to both, so you have to set it up to run in a way that doesn't need those.  You can have the "update" cases both be user-event triggered and then event 1 sends both user events to run both cases.

0 Kudos
Message 6 of 6
(1,393 Views)