NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Scope of a file global

I created a file global that I overwrite in SequenceFileLoad in TestStand 2013.

 

The changes I made there do not make it to PreUUT or MainSequence. Is this expected?

0 Kudos
Message 1 of 5
(3,245 Views)

Hi stephenb2,

 

This is expected as you are editting the execution's values only. If you want to edit the values as they are stored in the sequence file, you can use a statement such as: RunState.SequenceFile.FileGlobalsDefaultValues.SetValVariant("golden",0, {"one","two"})

 

If you want to edit the runtime values of the main sequence execution without changing the values stored in the sequence file on disk, you will need to use a different callback to do so, most likely a model callback such as ProcessSetup.

Steven Gloor
Staff Customer Engineer - CTA, CLD
0 Kudos
Message 2 of 5
(3,224 Views)

Thanks for the reply. I was not aware of the distinction between the execution value and the value stored in the sequence file.

 

This solution works when I put the assignment in SequenceFileLoad in PreUUT and Main, but not in SequenceFileLoad itself, which happens not to be a problem in my case.

 

I guess another more straightforward option is to write to a station global in SequenceFileLoad.

 

What I am trying to avoid with this is editing the StationGlobals.ini file in each of my deployed stations every time this global changes. If the first thing I do is write to the station global and treat the variable as read-only after that, then I avoid editing the global file on each test station.

0 Kudos
Message 3 of 5
(3,219 Views)

Another possibility may be to set the sequence file to share fileglobals between executions:

 

Edit → Sequence File Properties... → General → Sequence File Globals

 

ExecutionsShareFileGlobals2.png

I hope this helps,

Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)

Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor

0 Kudos
Message 4 of 5
(3,209 Views)

This will only work for Batch and possible Parallel executions and it probably still work for the SequenceFileLoad.

 

regards

Ray

0 Kudos
Message 5 of 5
(3,205 Views)