キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

labview event force trigger

解決済み
解決策を見る

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 件の賞賛
メッセージ1/6
2,591件の閲覧回数
解決策
受理者 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."
メッセージ2/6
2,548件の閲覧回数

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 件の賞賛
メッセージ3/6
2,537件の閲覧回数

@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 件の賞賛
メッセージ4/6
2,404件の閲覧回数

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....

メッセージ5/6
2,397件の閲覧回数

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 件の賞賛
メッセージ6/6
2,378件の閲覧回数