NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Property Loader with Renamed Steps

If I have a test step in a loop where the step is renamed using RenamePreviousStep after each iteration, is there a simple way to use Property Loader to load test limits corresponding to the dynamically changing test name?

The only way I have found to do this so far causes errors at runtime on the non-existent step names in the file which have to be ignored. Also it is not very slick to call PropertyLoader every time the loop iterates.

Is there a more elegant way to load limits for steps which "don't yet exist"?

0 Kudos
Message 1 of 7
(3,898 Views)
Hi,
 
Does each iteration have different limits?
 
regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 2 of 7
(3,895 Views)



Does each iteration have different limits?




Yes they may well do.
0 Kudos
Message 3 of 7
(3,889 Views)

Hi,

How do you organise your limit file.

Do you have a different Start/End Marker for each of your iterations so that you have the correctly named step(s) between the markers?

You could try loading an array of limits into a local array(s) from your Limit File then index through the array as the datasource for your limits. Remember its a PropertyLoader, so its not limited to just limits. That way you only read it once and you are not tied to the Step name.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 4 of 7
(3,860 Views)


How do you organise your limit file.

Do you have a different Start/End Marker for each of your iterations so that you have the correctly named step(s) between the markers?

You could try loading an array of limits into a local array(s) from your Limit File then index through the array as the datasource for your limits. Remember its a PropertyLoader, so its not limited to just limits. That way you only read it once and you are not tied to the Step name.



I originally had all limits within a single Start-End marker pair. Having now given each limit set an individual Start-End marker and setting PropertiesListSource dynamically in the Loader Step in the loop, that works OK.  Perhaps not so elegant still as each iteration of the loop requires a Property Loader step instead of loading everything in one hit (I'm guessing there has to be some performance overhead in multiple property loader calls vs. a single load of all limits) but at least there are no errors on the loader step now I am only loading that test which exists after the loop rename.

The alternative of loading data into arrays had ocurred to me and I may experiment with this if performance becomes an issue with the first approach.

Thanks for your reply Ray, its much appreiated.


0 Kudos
Message 5 of 7
(3,852 Views)
Hi,
 
Unfortunately, you cannot load all steps because all steps are not phyically available.
 
You could create a Custom Step Type which has an array of limits, you would probably have to modify the PropertyLoader to handle your array of limits.
 
Or Maybe you could use the MultipleLimit Step Type and do the looping inside code module and return an array of results.
 
Another alternative is to dynamical create you sequences with all the steps, then you would be able to set all the limits with one load.
 
Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 6 of 7
(3,847 Views)

We set up an arrays of data containeders to do this.

Each test is an element in the array.

The array size can even change, changing the number of times the loop is run.

 

The Property loader first read a variable for the size of the array from the Property file.

Then the size of the array is set in TestStand.

Then load each item in the array into an array in TestStand.

Then the flow control "For Each" is use to loop though the array for each element in the array.

The data type of each element of the array contains the limits, switch chanels and every the name of the test step to rename it for the report file.

 

Just one way to do it.

 

Omar

 

0 Kudos
Message 7 of 7
(3,634 Views)