set_tcp(name)
Features
his function calls the name of the TCP registered in the Teach Pendant and sets it as the current TCP.
Parameter
Parameter Name | Data Type | Default Value | Description |
---|---|---|---|
name | string | - | Name of the TCP registered in the TP. |
Return
Value | Description |
---|---|
0 | Success |
Negative value | Failed |
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
P0 = posj(0,0,90,0,90,0)
movej(P0)
set_tcp("tcp1") # The TCP data registered as tcp1 in the TP is called and set to the current TCP value.
P1 = posx(400,500,800,0,180,0)
movel(P1, vel=10, acc=20) # Moves the recognized center of the tool to the P1 position.
Related commands
- fkin(pos, ref)
- ikin(pos, sol_space, ref, ref_pos_opt, iter_threshold)
- movel()
- movec()
- movesx()
- moveb()
- move_spiral()
- movel()
- movec()
- movesx()
- amoveb()
- amove_spiral()