modbus_set_runstate_dependent_choice(signal_name, runstate_choice)

Sets the output signal levels depending on the state of the program.

Parameters

signal_name:

A string identifying a digital or register output signal that in advance has been added. Can not be empty.

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:

modbus_set_runstate_dependent_choice("output2", 3)

  • Example Parameters:

    • Signal name = output2

    • Runstate dependent choice = 3 ! set Low when a program is stopped and High when a program is running