set_runstate_output_to_value(alias, state)

Configures an output to automatically toggle when the robot reaches a specific state. This sets the output signal level depending on the state.

Analog outputs are set to the lowest or highest supported value. Digital outputs are forced to either low or high.

See also I/O labels.

Parameters

alias: The symbolic name of the pin (string). It can represent a digital or an analog output.

state: Number. One of the following:

0 = Preserve signal state (default).

1 = Set signal Low when the program is not running.

2 = Set signal High when the program is not running.

3 = Set signal High when the program is running and Low when it is stopped.

4 = Set signal Low when the program terminates unexpectedly.

5 = Set signal High at program start and Low when a program terminates unexpectedly.

6 = Set signal High when the robot has drive power. Applicable to control box outputs only.

7 = Set signal Low when the robot has drive power. Applicable to control box outputs only.

Example command: set_runstate_output_to_value("CB_DO4", 2)

  • Example Parameters:
    • Set control box digital output DO4 high when the program has stopped: set_runstate_output_to_value("CB_DO4", 2)
    • Set control box analog output 1 to the lowest value when power is applied to arm motors: set_runstate_output_to_value("CB_AO1", 7)

Replaces: set_runstate_configurable_digital_output_to_value, set_runstate_standard_analog_output_to_value, set_runstate_standard_digital_output_to_value.