NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass FileGlobals values from one sequence file to another?

Hi,

 

In my scenario I have two sequence files A and B.

 

From the Main sequence in the A file I have to call (in the same execution)  the one of subsequences from file B.

 

The files A and B have the same FileGlobals  variables definied.

 

How to secure the called subsequence (in the file B) will be executed having the FileGlobals values inherited from the caller (Main sequence in the file A)?

 

K. 

 

 

0 Kudos
Message 1 of 2
(4,205 Views)

Why wouldn't you use parameters?  The subsequence in file B should have everything it needs from the caller passed through as parameters.  This is the correct way to write software.

 

However, you can access the fileglobals of a caller by using Caller.FileGlobals

 

If you are set on making file Bs FileGlobals the same as File As FileGlobals then you would need to use some sort of copy where you loop through all the subproperties and copy them.  You would have to do this at the beginning of subsequence in file B.  Because it doesn't have a runstate until you enter it.

 

Regards,

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