Single joint control

<!-- Initialization program -->
const mycobot = require('mycobot')

const obj = mycobot.connect('COM15',115200)

<!-- Set the angle of a single robot arm mycobot.sendAngle(robot arm ID, angle value, speed of the robot arm when adjusting the angle)-->
<!-- Note: When setting the value of changing the angle, you need to pay attention to the number of robot arm joints. If there are 4 joints, enter 1~4; if there are 6 joints, enter 1~6, otherwise an error will be reported -->
<!-- For details on the angle setting of the four-axis and six-axis robot arms, please refer to Figure 1-3 -->
obj.write(mycobot.sendAngle(1,110,10))

<!-- Set the coordinates of a single robot arm mycobot.sendCoord(robot ID, coordinate value, movement speed of the robot when adjusting the coordinate)-->
obj.write(mycobot.sendCoord(1,20,10))

Multi-joint control

Note: When operating multiple joints, fill in the corresponding number of parameters according to the number of joints of the robot

<!-- Initialization program -->
const mycobot = require('mycobot')

const obj = mycobot.connect('COM15',115200)

<!-- Set the multi-joint robot angle mycobot.sendAngles([joint 1 angle, joint 2 angle, joint 3 angle, joint 4 angle, joint 5 angle, joint 6 angle], joint operation speed) -->
obj.write(mycobot.sendAngles([-110,23,-22,110],20))

<!-- Set the coordinates of the multi-joint robot arm mycobot.sendCoords([joint 1 coordinate, joint 2 coordinate, joint 3 coordinate, joint 4 coordinate, joint 5 coordinate, joint 6 coordinate], joint operation speed) -->
obj.write(mycobot.sendCoords([22.5,12,-22,45],20))

Four-axis and six-axis robot arm angle coordinate parameter standard

  • Four-axis
Joint ID Limit
1 -160~160
2 0~90
3 -90~45
4 Unlimited value
  • Six-axis
Joint ID Limit
1 -170~170
2 -170~170
3 -170~170
4 -170~170
5 -170~170
6 Infinite value

results matching ""

    No results matching ""