Load Sequencer configuration at run time
- Last UpdatedJul 20, 2024
- 2 minute read
At run time, you can load Sequencer object configuration (step program, Aliases, and settings) by
-
stopping the current step program execution
-
specifying a file name
-
writing the load command
To save the run-time configuration to an XML file:
-
Verify that the step program execution is stopped by reading the attribute ExecutionState. If it is not stopped, write the value Stop to the enum attribute ExecutionStateCmd.
For more information on these attributes, see Sequencer object help.
-
Write the file name with path to the string attribute PrgFileNameToLoadSave.
-
Write the value Load to the enum attribute PrgSeqConfigCmd.
-
Check the attribute PrgSeqConfigStatus for details on the load:
Value
Description
Loading
The load is in progress.
Ready
The load has completed successfully and the run-time configuration now contains the configuration of the specified XML file.
Note: If a failover occurs during the load, the value of PrgSeqConfigStatus remains Ready.
Caution: If a failover occurs while a Load, Save or Update operation is in progress, the operation is aborted. PrgSeqConfigStatus returns to Ready. The existing sequence program is retained. Error is not raised.
Error
The load encountered a problem. This could be due to invalid file location or invalid data contained within the file.
A file error does not affect the error status of the Sequencer object.
Additional feedback and results from the load are reflected in the following attributes:
-
PrgSeqConfigStatus.Error
-
PrgSeqConfigStatus.Desc
-
PrgSeqConfigStatus.Code
For a detailed overview of these attributes and their properties, see Sequencer object help.
After configuration data is successfully loaded from the XML file
-
the step program starts execution based on the value of the InitialCommand specified in the loaded file
-
all attributes from the Settings node are updated per the configuration in the XML file.
Caution: If any of these attributes such as InitialCommand are missing or are blank in the XML file then they are set to their default values. If the Settings node is not specified in the XML file, the corresponding object attributes are not updated.
After a successful load or update, the sequencer starts executing InitialCommand that it is explicitly specified in the sequence program that was just loaded or updated. If an Initial Command is not explicitly specified, the default InitialCommand "Stop" is used.
When you load configuration data from a file that does not contain all parts of a Sequencer object (for example, the Aliases section is missing), the configuration from the file is merged with the currently active run-time configuration.