set_runstate_standard_digital_output_to_value(outputId, state)
Sets the output signal level depending on the state of the program (running or stopped).
Example: Set standard digital output 5 to high when program is not running.
>>> set_runstate_standard_digital_output_to_value(5, 2)
Parameters
outputId: The output signal number (id), integer: [0:7]
state:
0: Preserve signal state,
1: Set signal Low when program is not running,
2: Set signal High when program is not running,
3: Set signal High when program is running and low when it is stopped,
4: Set signal Low when program terminates unscheduled,
5: Set signal High from the moment a program is started and Low when a program terminates unscheduled.
Note: An unscheduled program termination is caused when a Protective stop, Fault, Violation or Runtime exception occurs.
Example command:
set_runstate_standard_digital_output_to_value(5, 2)
-
Example Parameters:
-
outputid = standard digital output on port 1
-
Runstate choice = 2 ! sets digital output on port 1 to High when program is not running
-