CDRFLEx.set_safe_stop_reset_type
Features
This is a function for defining a series of motions that are executed automatically after the state conversion using set_robot_control function when the information on the operation state of the robot controller is SAFE_STOP. When the robot operation mode is automatic, program replay can be defined and set, and when it is manual, the setting is ignored.
Parameter
Parameter Name | Data Type | Default Value | Description |
|---|---|---|---|
eResetType | enum.SAFE_STOP_RESET_TYPE | SAFE_STOP_RESET_TYPE_DEFAULT | Refer to the Definition of Constant and Enumeration Type |
Return
Value | Description |
|---|---|
1 | Error |
Example
void OnMonitoringStateCB(const ROBOT_STATE eState)
{
switch((unsigned char)eState)
{
case eSTATE_SAFE_STOP:
if (drfl.get_robot_mode(ROBOT_MODE_AUTONOMOUS) {
// Replays the program after conversion of state if the current state is an automatic mode
drfl.set_safe_stop_reset_type(SAFE_STOP_PROGRAM_RESUME);
drfl.set_robot_control(eCONTROL_RESET_SAFET_STOP);
}
else {
// Converts to STATE_STANDBY if the current state is a manual mode
drfl.set_robot_control(eCONTROL_RESET_SAFET_STOP);
}
break;
//...