NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling labview-vi and set Visa Resource Name

Hello,

i inserted an instrument driver which was downloaded from ni website.

In here all the VIs like "initialiate, Reset, Selftest" have the parameter VISA Resource Name.

The value for VISA Resource Name.Device Name and VISA Resource Name.Session Number is stored in StationGlobals.

 

Currently i manually add this global link to the Parameter value.

 

Is there a faster way to do this? Like a preexpression?

 

Thx

0 Kudos
Message 1 of 6
(679 Views)

Hi,

 

I am not sure if i fully understood your question.

 

However each step in TestStand has a pre expresssion and also post expression.

Go to Properties tab of the step and click on the expressions.

RaviShrigiri_0-1693914846465.png

Ravi

0 Kudos
Message 2 of 6
(622 Views)

I mean someting else.

After inserting the vi in an empty Labview-action-step i can see all of itzs parameters in the module tab.

One of the parameters that all vis have is parameter "VISA Resource Name".

This container contains:

VISA Resource Name.Device Name and

VISA Resource Name.Session Number

 

I also have the two StationGlobals.

StationGlobals.Project.Device and

StationGlobals.Project.Session

 

Is there a way to set a PreExpression to write the StationGlobals in the vi-parameters WITHOUT changing the parameter value. Only by a preexpression.

0 Kudos
Message 3 of 6
(616 Views)

So you want to have a pre-expression which assigns the according data from your station globals as values for the code module parameters, but you don't want to have this assignment saved in the sequence file (WITHOUT changing the parameter value)?

 

To get the data to and from a code module, you technically have to change the parameter value

 

 

Message 4 of 6
(611 Views)

Correct

0 Kudos
Message 5 of 6
(606 Views)

Having a breakpoint before a step using a VI Call gives theoretical access to the parameters

 

RunState.Sequence.Main["Numeric Limit Test"].TS.SData.ViCall.Parms

 

You have to consider yourself how maintainable this is. 

 

 

0 Kudos
Message 6 of 6
(596 Views)