NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Run-Time setting of LabViewIOControl data type

Hello All,

 

  Need to plug a file global variable into a station global during sequence execution, but can't quite get the syntax right.  I think it is because the data type is "LabviewIOControl".

 

Example:

 

Hard Coded Syntax (that I know works):

StationGlobals.DAQmx.InstrumentX

(Data Type of this station globals if LabviewIOControl)

 

 

Variable Code Syntax? (that I can't get to work):

StationGlobals.DAQmx + "FileGlobals.InstrumentX"

(Data Type of the File Global is String)

 

Please let me know how to combine these two parts to make it work.  Thanks.

 

GSinMN

 

 

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

GSinMN,

 

Try this:

 

StationGlobals.NewSubProperty(("DAQmx."+FileGlobals.InstrumentX),PropValType_NamedType,False,"LabVIEWIOControl",0)

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

Hello Daniel,

 

  Tried your suggestion, but it didn't work.  Started playing around with the device name vs the resource name, got inconsistent results.  Decided to try to build the string in a previous step, assign it to a local variable, the call that variable when needed.  Seems to work now.  Still not sure why I couldn't call it directly, but I can work with it this way.  Thanks.

 

GSinMN

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