NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Property Loader - How to set it up for all sequences?

Hi,
 
I made an attempt to use the property loader for the first time. (TS3.5).
I set it up in the setup section of the SequenceFileLoad and specified few parameters of the FileGlobals.
 
What happened was a proper operation for the SequenceFileLoad sequence, but as soon as the procedure stepped into the MainSequence, the values return to the original values.  I repeated the process with and without import to Run-time sequence only' and it behaved the same.
 
Is there a way to set it up so ti will apply to all sequences within my sequence file and also to the external sequence files called from the main sequence.  In short to replace the parameters of the FileGlobals for the duration fo the test.
 
Thanks
Rafi
0 Kudos
Message 1 of 3
(2,947 Views)
Rafi,

The behavior you are seeing with the SequenceFileLoad engine callback is expected.  The SequenceFileLoad callback occurs before the Sequence File is actually loaded.  In your case, you are setting the FileGlobals then loading the SequenceFile.  When the Sequence File is loaded by the engine, the FileGlobals are also loaded in with the file.  So the FileGlobals are reset to their default values.  If you want to set the FileGlobals from the property loader, put the Property Loader step in the Setup group of the MainSequence.  In this case, you are setting the values of the FileGlobals after the Sequence File is already loaded.

FileGlobals only have a scope that covers a SequenceFile.  You will not be able to load FileGlobals that are accessible to sequences in external sequence files.  You have a few options for getting the data into the external sequences:

(1)  Add parameter variables to the Parameters section of each external sequence.  When the sequence is then invoked, you can pass the data which will be used by the sequence.  This provides the proper data dependency between sequences and avoids confusion on when the data is being initialized.

(2)  For each Sequence File or each Sequence, create a separate property file.  When each sequence is called, then use the Property Loader step to load in the data.

(3)  Use StationGlobals instead of FileGlobals.  StationGlobals have a scope that covers all SequenceFiles on a test station.  However, this is not a recommended method, because the data is accessible to all sequences.  For large applications, it is easy to mistake points in the sequences where data is being initialized and used.  In these cases, you may expect the data to be a certain value that it isn't because another Sequence has already changed the data values.  That is why it is better to use smaller scoped data variables.

Let me know if you have any further questions.

Thanks,

Tyler T
0 Kudos
Message 2 of 3
(2,925 Views)

Rafi,

I think there are two different posts in the forum about this issue.
Tyler is right. You have to load the sequence file before setting the sequence file global values.
Using the "<All Sequences>" tag in order to set a File Global variable does not make any sense though.
The File Global variable will be available for all the sequences in the sequence file scope all the time.
Once you set the File Global variable at the beginning (after you load the sequence file) all the sequences should be able to access it.
The "<All Sequences>" tag is intended to set all the existing variables present in the different sequences in the specified sequence file.
For example it could be used to set the high and low limits for an specific numeric limit step present in all the sequences.
Remember that you can also load properties for an external sequence file using the property loader.
It would be great if you could attach a simple sequence file in order to understand the problem you are trying to solve.

Best Regards.

Antonio Lie.



 

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