NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I import module parameters to create variables automatically?

Solved!
Go to solution

Hello All,

 

  I am attempting to re-use an existing Labview VI as a code module in TestStand.  There are alot of input and output parameters, and I need to create a seperate variable for most of them (probably file globals) so that I can change the values dynamically during the test sequences.  I see that when the code module is loaded, the associated parameters are automatically imported into the step settings, but I would like to know if there is a way to automatically create variables by "converting" the parameters from the code module.  I've read a few threads about dynamic variable creation, and the property loader steps, but these don't seem to have what I am looking for.  Please advise.  And, as usual, if it sounds like I am misunderstanding how TestStand operates, please correct me.  I'm only a few weeks into using it.  Thanks much.  

 

GSinMN

0 Kudos
Message 1 of 3
(4,065 Views)
Solution
Accepted by topic author GSinMN

The short answer is no you cannot.

 

You can have TestStand create complex datatypes for you.  There is a little button next to the parameter and it will create the type definition.  However, you still have to create all instances and then pass those to and from the VI.

 

By default TestStand will connect up the error out wire to the Step.Result.Error.  The rest are pretty much up to you.

 

I guess the question/s would be: How would it know where to create the instances?  FileGlobals? Locals? Parameters? Station Globals?  Step Properties?  Constant Value?  There are a ton of places that seem to be options here.  This may be a good feature request... 🙂

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 3
(4,062 Views)

Hello jigg,

 

  Thanks for the quick and honest response.  Believe it or not, you helped me more than you may think.  All of my parameters (except my master stop button) happen to already be in clusters, so creating a custom "container" type still saves me a lot of time.  Particularily since the names of the parameters are retained in the custom data type.  Now all I have to do is link the parameter to the new variables of the same name.

 

Well done.

 

GSinMN    

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