DOBOT CR5 User Guide 6 Program Language
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
95
Get the current pose of the robot under the Joint coordinate system
Joint coordinate of the current pose
local armPose
local joint = GetAngle()
--Get the current pose
local liftPose = {armOrientation = armPose , joint = {joint.joint[1], joint.joint[2], joint.joint[3],
joint.joint[4]}, tool = 0, user = 0}
TCP
Table 6.45 Create TCP command
err, socket = TCPCreate(isServer, IP, port)
Create a TCP network
Only support a single connection
isServer: Whether to create a server. 0: Create a client; 1: Create a server
IP: IP address of the server, which is in the same network segment of the client without conflict
port: Server port
When the robot is set as a server, port cannot be set to 502 and 8080. Otherwise, it will be in
conflict with the Modbus default port or the port used in the conveyor tracking application,
causing the creation to fail
err:
0: TCP network is created successfully
1: TCP network is created failed
Socket: Socket object
Please refer to Program 6.1 and Program 6.2
Table 6.46 TCP connection command
TCPStart(socket, timeout)
Connect a client to a server with the TCP protocol
socket: Socket object
timeout: Wait timeout. Unit: s. If timeout is 0, the connection is still waiting. If not, after
exceeding the timeout, the connection is exited.