EasyManua.ls Logo

Dobot M1 - Page 107

Dobot M1
140 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Dobot M1 User Guide 6 Operation
Issue V1.3.4 (2019-05-23) User Guide Copyright © Yuejiang Technology Co., Ltd
104
print(commandtype)
#get the value of command
# index = strCMD.find(',')
# tempStr1 = str[index+1 : ]
#get X coord
# index = tempStr1.find(',')
# tempStr2 = tempStr1[:index]
# PosX = tempStr2
# print(PosX)
# tempStr1 = tempStr2
#get Y coord
if (strCMD == "exit"):
print("stop")
server.shutdown()
exit(0)
elif (strCMD == "MoveP1" or strCMD == "p1"): // Send Move P1 or P1 command, Dobot M1
will move as the following commands
dType.SetArmOrientation(api, 1, 1)
dType.SetPTPCmd(api, 0, 229, 212, 120, 0, 1)
dType.SetARCCmd(api, [62,265,120,50], [-58,266,120,76], 1)
elif (strCMD == "MoveP2" or strCMD == "p2"): //Send Move P2 or P2 command, Dobot M1
will move as the following commands
dType.SetArmOrientation(api, 1, 1)
dType.SetPTPCmd(api, 0, 229, 212, 120, 0, 1)
dType.SetARCCmd(api, [62,265,120,50], [-58,266,120,76], 1)
HOST, PORT = "192.168.1.10", 50030 // IP address and Port of the server
socketserver.TCPServer.allow_reuse_address = True
server = ThreadedTCPServer((HOST, PORT), ThreadedTCPRequestHandler)
ip, port = server.server_address
server_thread = threading.Thread(target=server.serve_forever)
server_thread.daemon = True
server_thread.start()

Table of Contents

Other manuals for Dobot M1

Related product manuals