Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Action Engine DAQ Sample

Solved!
Go to solution

Attached is a picture of a DAQMX example.  If I created an action action engine (AE) and put the first two nodes (create channel and start task) in the "initialize" action of the AE and save the reference in a function globel (FG), would I run the risk of losing the reference if I use the DAQMX Write Action later with the reference stored in the FG? I am afriend that LV is going to clearn up the reference when I am not using it.  

 

Do you foresee any problem with an action engine with this example?  First two nodes (initialize), 3rd node (write), and last node (close).  Thanks!

 

 

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 1 of 3
(3,386 Views)
Solution
Accepted by jyang72211

Shouldn't be any problem at all -- I do the same sort of thing all the time.  Just one little tip -- I wouldn't bother making a separate FG for the task refnum.  I would just put it on its own USR (uninitialized shift register) inside the action engine itself.

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 2 of 3
(3,367 Views)

You meant the reference is saved inside the action engine, right?  That's my intention.  Thank you!

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 3 of 3
(3,363 Views)