NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

File Global resets to default when subsequence called multiple times from Python

My sequence file MySeq.seq has a subsequence called 'ToggleFileGlobalBool' that toggles the File Global variable 'MyBool' each time it is called. 'ToggleFileGlobalBool' also uses a message popup to display the state of MyBool. The sequence file properties are set to "All Executions Share the Same File Globals". As expected, 'MyBool' does indeed toggle when MainSequence calls 'ToggleFileGlobalBool' multiple times.

 

However, when I call 'ToggleFileGlobalBool' multiple times from Python, 'MyBool' is always the default value instead of toggling. Here's the Python code.  I'm using TestStand 2014 SP1.

 

self._test_stand_engine = win32com.client.Dispatch('TestStand.Engine')
sequence_file = self.test_stand_engine.GetSequenceFileEx(r"C:\<path>\MySeq.seq")
for i in range(0, 4):
    execution = self.test_stand_engine.NewExecution(sequence_file,          # sequenceFileParam
                                                    "ToggleFileGlobalBool", # sequenceNameParam
                                                    None,                   # processModelParam
                                                    False,                  # breakAtFirstStep
                                                    0)                      # executionTypeMaskParam
    execution.WaitForEndEx(-1)

 

0 Kudos
Message 1 of 1
(113 Views)