Indian LabVIEW Users Group (IndLUG)

cancel
Showing results for 
Search instead for 
Did you mean: 

Teststand | Automatically creating local variables in main sequence while creating a parameter in sub sequence

Hi all,

I am adding a variable as parameter in my subsequence and the same variable should automatically get created in the main sequence as local variable with the same variable name and type.

 

Is this possible ?

Could anyone please let me know how to do the same.

 

Thanks in advance 

Sricharan

0 Kudos
Message 1 of 3
(2,837 Views)

Hellow Sri Charan,

 

Does subsequence means subvi?

why are u sticking to local variable? (can you try using FGV, global variable?)

what is the meaning of, the variable having different type? (is it means representation?)

Does variable name means label/caption?

0 Kudos
Message 2 of 3
(2,748 Views)

Hi, I would recommend you to use TestStand API for doing this. The process will be like this:

  1. Get subsequence active x refnum and get a property called Parameters.
  2. Use the Parameters refnum and invoke a method called GetVal<Number/String/Boolean> and get the values stored in them(if any)
  3. Get the main sequence active x refnum and get a property called locals.
  4. Use the Locals refnum and invoke a method called SetVal<Number/String/Boolean> and remember to use 1 in the options argument.
  5. If you do this in a FOR loop will populate the local variable of the main sequence.
0 Kudos
Message 3 of 3
(2,631 Views)