2.1. Robot Main State

The robot main state describes the current operating state of the voraus Robot Control. It determines which commands are accepted, whether the regulators of the axes are switched on, and whether the robot can move. The robot main state is published via OPC UA (see OPC UA).

A schematic overview of all states and transitions is shown in Fig. 2. The states are described in section States, the transitions in section Transitions.

robot_main_state_overview

Fig. 2 Overview of the Robot Main States and Transitions

Note

The states GRAVCOMP and COLLISIONREACTION are robot-specific and only available on robots that support hand guiding or collision reaction, respectively. When an external robot driver is used, that is, if VRC_USE_ROBOT_DRIVER is set to True (see Robot Control Settings), both states are not supported.

2.1.1. States

The column OPC UA Value, in Table 1, contains the numeric value of the OPC UA variable RobotMainState (see OPC UA).

The column Real-Time State indicates whether the voraus Robot Control executes the state with real-time performance. File operations that could violate the real-time cycle, such as writing data files, are only performed in non-real-time states (see Writing JSON Files).

Table 1 Overview of Robot Main States

State

OPC UA Value

Description

Real-Time State

Regulators On

INIT

0

Initialization of the robot and establishment of communication with the drives.

No

No

STANDBY

1

The robot is initialized and ready for the regulators to be switched on. The robot cannot move.

No

No

READY

2

The regulators are switched on and the robot holds its position. Motion commands, jogging commands, and cyclic position commands are accepted.

Yes

Yes

STOPPING

3

Reserved, not in use

–

–

ERROR

4

An error has occurred. The robot decelerates to a standstill and the regulators are switched off. The state is kept until a reset or a shutdown is performed (see Behavior in the ERROR State).

No

Until standstill

ACTIVE

5

The robot executes motion commands. The setpoints of all axes are calculated by the interpolator in each cycle.

Yes

Yes

RESET

6

Active errors are reset. The communication with the drives is re-established if it was lost (not with an external robot driver).

No

No

GRAVCOMP

7

Gravity compensation: the robot compensates its own weight and can be moved manually (hand guiding).

Yes

Yes

SHUTDOWN

8

The robot is brought to a standstill and the regulators are switched off. Afterwards, the voraus Robot Control process is terminated.

No

Until standstill

COLLISIONREACTION

9

A collision has been detected and the configured collision reaction is executed (see collisionReactionStrategy in Robot Data).

Yes

Yes

2.1.2. Transitions

The numbers in Table 2 correspond to the numbers in Fig. 2. Transitions that are not listed are not triggered by the voraus Robot Control. Requesting a state that is already active has no effect.

Triggers caused by the safety controller only apply to robots whose safety controller is connected directly to the voraus Robot Control. They do not apply when an external robot driver is used.

Table 2 Robot Main State Transitions

No.

Transition

Trigger

INIT → STANDBY

Automatic, as soon as the communication with the drives is established, the robot-specific initialization is completed, and all pending file write operations are finished.

STANDBY → READY

SetRegulatorsOn is called. The transition takes place automatically as soon as all axes are in regulation.
Robots that require indexing return to READY automatically after the indexing is completed.

READY → STANDBY

SetRegulatorsOff is called.
An axis leaves regulation unexpectedly. In this case, a Quick Stop is triggered (not with an external robot driver).
Robot-specific procedures: the indexing switches off the regulators temporarily, the brake torque test switches them off after its completion.

READY → ACTIVE

The execution of a motion command, a jogging command, or a cyclic position command starts (see Command Execution and Cyclic Position Commands).

ACTIVE → READY

The last setpoint of all queued commands has been calculated, including after a completed stop. At this point, the measured axis positions can still lag behind the commanded ones.
The safety controller signals a monitored standstill or prohibits motion. The robot is decelerated and all queued commands are discarded.

READY → GRAVCOMP

SetGravCompOn is called or the hand-guiding button is pressed (see OPC UA for the preconditions).

GRAVCOMP → READY

SetGravCompOff is called, the hand-guiding button is released, or the safety controller prohibits motion. The transition takes place as soon as all axes are back in position control.

READY → COLLISIONREACTION

A collision is detected while no error is active and the safety controller does not request a Safe Stop 1 (SS1) or Safe Stop 2 (SS2). The parameter collisionReactionStrategy must be set to TORQUECONTROL (see Robot Data).

COLLISIONREACTION → READY

The robot has been moved beyond the radius CollisionReactionMovementRadius (see System Parameter). The robot switches back to position control.
The safety controller requests an SS1. The robot switches to READY and subsequently to ERROR.

ACTIVE → COLLISIONREACTION

Same as (8).

COLLISIONREACTION → GRAVCOMP

Same as (6).

COLLISIONREACTION → STANDBY

SetRegulatorsOff is called while the robot is at a standstill, or an axis leaves regulation unexpectedly (see (3)).

GRAVCOMP → STANDBY

Same as (12).

Any state → ERROR

An error occurs. During SHUTDOWN, only a shutdown timeout or the loss of the fieldbus communication leads to ERROR. When an external robot driver is used, SHUTDOWN does not lead to ERROR; after a timeout, the process is terminated.

ERROR → RESET

SystemReset or SetSystemToRealMode is called.

RESET → INIT

All errors have been reset successfully and the communication with the drives is active. On robots with a safety controller, the safety controller must also be ready. If the reset does not complete within a timeout, the robot returns to ERROR.

Any state → SHUTDOWN

SystemShutdown is called. In INIT, the command is executed after INIT is left.
The process receives SIGTERM or SIGINT. In this case, a Quick Stop is triggered (not with an external robot driver).
The safety controller requests a shutdown.

STANDBY → RESET

SetSystemToRealMode is called while the simulation mode is active. The virtual devices are replaced by the real hardware and the robot is initialized again.

On real systems, after the start of the voraus Robot Control, the robot passes through INIT into STANDBY. The regulators are not switched on automatically.

2.1.3. Behavior in the ERROR State

When the robot enters ERROR, the following reaction is executed:

  1. The robot is decelerated with the stop method configured for the stop source errorStop. If this stop method cannot be executed, e.g., during position streaming, a fallback applies (see Robot Stops).

  2. All queued and prepared motion commands are discarded.

  3. After standstill is reached, the regulators are switched off.

If the robot does not reach standstill within the expected braking time, or the regulators are not switched off after standstill, a Quick Stop is triggered.

The robot remains in ERROR until it is reset or shut down (see transitions (15) and (17) in Table 2). A reset is only executed if the robot is at a standstill and the regulators are switched off. Otherwise, the reset is rejected with an error and the robot remains in ERROR. After a successful reset, the robot passes through RESET and INIT into STANDBY (see transitions (15), (16), and (1) in Table 2).

2.1.4. OPC UA

Under the node Robot (NodeId: 100000) the following information is provided:

Table 3 OPC UA Variable of the Robot Main State

NodeId

Name

Description

100007

RobotMainState

Current robot main state as UInt32, see column OPC UA Value in Table 1

The commands that change the robot main state are located at Robot/Commands/Control (NodeId: 100240), except for SystemReset, which is located at Error (NodeId: 100). None of these commands has output arguments. Table 4 describes their behavior if VRC_USE_ROBOT_DRIVER is set to False. If an external robot driver is used, see the note at the end of this section.

Table 4 OPC UA Commands of the Robot Main State

NodeId

Name

Valid States

Behavior in Other States

100243

SetRegulatorsOn

STANDBY

The command is ignored. In any state, an error is raised if the communication with the drives is not active or if the value of IndexingRequired is incorrect.

100244

SetRegulatorsOff

READY, GRAVCOMP, COLLISIONREACTION, SHUTDOWN
The robot must be at a standstill.

An error is raised if the robot is in ACTIVE or moving. Otherwise, the command is ignored.

100241

SetGravCompOn

READY, COLLISIONREACTION
The robot must support hand guiding, and the safety controller must be in manual mode and must not prohibit motion. No axis must require indexing and no brake torque test must be running.

The command is ignored. An error is raised if the communication with the drives is not active.

100242

SetGravCompOff

GRAVCOMP

The command is ignored.

104

SystemReset

ERROR
The robot must be at a standstill and the regulators must be switched off.

The command is ignored if no error is active. An error is raised if the robot is moving or the regulators are switched on.

100258

SetSystemToVirtualMode

STANDBY
The safety controller must be in manual mode. The robot remains in STANDBY.

An error is raised. The command is ignored if the simulation mode is already active.

100259

SetSystemToRealMode

STANDBY, ERROR
The robot passes through RESET and INIT into STANDBY.

An error is raised. The command is ignored if the simulation mode is not active.

100250

SystemShutdown

Any state

In INIT, the command is executed after INIT is left.

The input argument IndexingRequired of SetRegulatorsOn confirms whether the robot has to be indexed after the regulators are switched on. Set it to true only if indexing is currently required. If the value does not match the indexing status of the robot, an error is raised.

The commands are executed asynchronously: the OPC UA method call returns Good as soon as the command has been queued. The result of the command is indicated by the change of RobotMainState. An ignored command does not change RobotMainState. An error raised by a command leads to ERROR, see Behavior in the ERROR State.

Note

When an external robot driver is used, SetGravCompOn, SetGravCompOff, SetSystemToVirtualMode, and SetSystemToRealMode are not supported and raise an error. SetRegulatorsOff is additionally accepted in ERROR and raises an error in all other states not listed above. The input argument IndexingRequired is ignored.