LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically trigger cursor release?

Solved!
Go to solution

Hello,

 

I am using the Actor Framework to develop a large application in LabVIEW. I have cursors on a graph that trigger data to be populated into actors using an event structure and a cursor release event. The data is also populated (initialized) when the program starts.

 

I currently accomplish this initialization using a structure below, and a value change event on the 'Init' Boolean:

 

init.jpg

 

also described here:

 

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Add-First-Run-event-on-event-structure/idc-p/1044975#M...

 

The problem with using the "init" Boolean is that I duplicate the same code within two events: "init":Value Change and "graph":Cursor Release events (the two event do the exact same thing).  Does anyone know a slick way combine these the Init event with the cursor release event so that the cursor release event fires on startup? This way I would not have to duplicate my code in two places...

 

I have searched and didn't find exactly what I needed, Sorry if this has been covered somewhere in the forum.

0 Kudos
Message 1 of 4
(2,477 Views)
Solution
Accepted by mkabatek

Where will your common code run? In the Event Structure? Could you just register for both events:

 

Example_VI_BD.png

 

 

Or register the event separately to send it to the nested actor:

 

Example_VI_BD.png

Message 2 of 4
(2,458 Views)

Hi Todd,

 

The code will run in the event structure. Thank you very much!! I didn't realize you could register multiple events to call the same code!

0 Kudos
Message 3 of 4
(2,446 Views)

There are a few other things to learn about events here:

http://wirebird.co/LabVIEW-Events-Tips-Tricks-Sundry

0 Kudos
Message 4 of 4
(2,437 Views)