stop(st_mode)
Features
This function stops the currently active motion. stop time is determined by the ‘st_mode’ and robot position does not deviate from the in-progress path.
This command is only used to stop the robot from operating and will not cause stop the program. To stop a program from running, use additionally exit() function. Values DR_QSTOP_STO and DR_QSTOP respond to Stop Category 1 (torque off after maximum deceleration) and 2 (maximum deceleration), but they are not linked with motions, such as torque off, after stopping. DR_SSTOP deceleration time is about 1.5 times longer that the maximum deceleration time. In the case of DR_HOLD, stop immediately with no deceleration time.
Parameter
Parameter Name | Data Type | Default Value | Description |
---|---|---|---|
st_mode | int | - | stop mode
|
Return
Value | Description |
---|---|
0 | Success |
Negative value | Error |
Exception
Exception | Description |
---|---|
DR_Error (DR_ERROR_TYPE) | Parameter data type error occurred |
DR_Error (DR_ERROR_VALUE) | Parameter value is invalid |
DR_Error (DR_ERROR_RUNTIME) | C extension module error occurred |
DR_Error (DR_ERROR_STOP) | Program terminated forcefully |
Example
#1. The motion is terminated with a soft stop 2 seconds after moving to x1
p0 = posj(-148,-33,-54,180,92,32)
movej(p0, v=30, a=30)
x1 = posx(784, 543, 570, 0, 180, 0)
amovel (x1, vel=100, acc=200) # Executes the next command immediately after the motion with x1.
wait(2) # Temporarily suspends the program for 2 seconds.
stop(DR_SSTOP) # Stops the motion with a soft stop.