File Global Variable Set in SequenceFilelLoad Callback Does Not Persist into Other Sequences

Updated May 9, 2018

Reported In


  • TestStand

Issue Details

I set a File Global variable in my SequenceFileLoad Engine Callback in TestStand, but the values I set return to default when I run another sequence in the same file.


File Global variable values will reset to their defaults between executions. When the SequenceFileLoad callback is executed, that is a different execution than when you run another sequence, and the values set in SequenceFileLoad will not persist. Here are a couple of potential solutions:
  1. Use Station Globals, instead.
  2. In SequenceFileLoad, use the following expression to set the default value of your File Global:
RunState.SequenceFile.Data.FileGlobalDefaults.myFileGlobal = FileGlobals.myFileGlobal

Note that in option 2, the default values will persist until the sequence file is closed.