LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connect driver reference between subVIs

Hi everybody,

 

I try to set up the acquisition for a Keysight 34972A data acquisition unit (DAU). The example provided by Keysight helped me to get it up and running but it takes only a single measure, I need to do several acquisitions. In order to achieve this I put the measurement reading step in a separate subVI which can be looped on but I don't know how I can pass it the driver reference - in the example it's start driver + configure + read measurement, all in one VI using the same reference obtained in an initialization step. I don't want to loop on that initialization because I want the DAU to take several measures using the same configuration. In my current setup I have that reference after the initialization but I found no way to make it appear on the front panel/connector pane to be able to pass it to other VIs.

 

Best regards

0 Kudos
Message 1 of 4
(3,721 Views)

Don,

 

If i am understanding your question correctly, there is a reference wire running between a start, configure, and read VI's within an example, and you want to bury the read within another VI so that you don't need to start and configure each time (a wise decision).

 

You should be able to simply right-click on the reference wire, then select Create->Constant, then drag that to the front panel of the VI you are creating.  An image or code snippet of the problem would help as well.

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

This sounds like a State Machine, with the DAQ Reference being held in a Shift Register. The Start state creates the reference, which is used (from the Shift Register) in the Configure State, then there can be multiple Read States for as long as acquisition is taking place, followed by a Close State.  You could also code it as an Action Engine, the point being that a single VI initialkizes the DAQ device, and hence gets the DAQ Task, and saves it locally in a Shift Register so other related functions can use the same Reference.

 

Bob Schor

0 Kudos
Message 3 of 4
(3,679 Views)

You'd want to right-click and choose Create->Control.  Constants live on the block diagram alone.  You'd want the control so it'd map well as an input on the subVI.

0 Kudos
Message 4 of 4
(3,660 Views)