10-02-2020 10:44 AM
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!
Solved! Go to Solution.
10-02-2020 07:07 PM
@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
10-02-2020 08:39 PM
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?
10-05-2020 02:35 PM
@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.
10-05-2020 03:08 PM - edited 10-05-2020 03:30 PM
I probably would re-architect the entire code. (You did not include your subVIs. are they complicated?)
just some ideas....
10-05-2020 05:15 PM
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.