DOBOT CR5 User Guide 6 Program Language
Issue V3.5.3.1 (2020-05-09) User Guide Copyright © Yuejiang Technology Co., Ltd
77
The robot global variables can be defined in the global.lua file, including global functions,
global points, and global variables.
Global function:
function exam()
print("This is an example")
end
Define a joint coordinate point, of which R sets to 1, D sets to -1, N sets to 0, Cfg
sets to 1, the User and Tool coordinate systems are both default coordinate systems.
P = {armOrientation = {1, 1, -1, 1}, joint = {20,10,22,2.14,0.87,3.85}, tool = 0, user = 0}
Global variable
flag = 0
Motion Commands
Table 6.7 Motion command
Move from the current position to a target position in a
point-to-point mode under the Cartesian coordinate
system
Move from the current position to a target position in a
point-to-point motion under the Joint coordinate
system
Move from the current position to a target position in a
straight line under the Cartesian coordinate system
Move from the current position to a target position in
an arc interpolated mode under the Cartesian
coordinate system
Robot moves from the current position to a target
position in the Move mode. The trajectory looks like a
door
Move from the current position to a target position in a
circular interpolated mode under the Cartesian
coordinate system
Set the X, Y, Z axes offset under the Cartesian
coordinate system to return a new Cartesian coordinate
point
Set the joint offset under the Joint coordinate system to
return a new joint coordinate point
Move from the current position to the offset position in