External controller could communicate with CS model via port 30001 based on TCP/IP protocol. CS model could send fixed length data with 100ms frequency to controller, which is in specifed format and users should inteprete this info by themselves. Also they can send scripts to control the movement of robot arm with this port.
For example, if host pc needs to get current robot position data, it could send the following script to robot system via this port, and users could define the responding port (like 23333) to recieve the feedback data after executing the script.
The host pc:
ip: 192.168.230.1,
port work as server :23333
Robot ip:
192.168.230.138
If robot is in remote mode,host pc send the following script to robot via port 30001, the robot will stop executing the task right now if it is engaged in some tasks, meanwihle it will execute the script if it is idle.
def t1():
pose = get_actual_tcp_pose()
x = pose[0]
y = pose[1]
z = pose[2]
socket_open("192.168.230.1",23333,"socket_1")
socket_send_string(str(x)+","+str(y),"socket_1")
sleep(5)
# sleep cammand here is for host pc to monitor the feedback info easily
end
But if users send script as below, robot will keep on running without interrupting the task process right now
sec t1():
pose = get_actual_tcp_pose()
x = pose[0]
y = pose[1]
z = pose[2]
socket_open("192.168.230.1",23333,"socket_1")
socket_send_string(str(x)+","+str(y),"socket_1")
sleep(5)
end