11. Node graph programming
11.1. Basic information
11.1.1. Introduction
Node graph programming is programming software developed for robots. Its main functions and technical features are as follows:
The connections between nodes better present the contextual logic of the program;
Through operations such as creating nodes, connecting nodes, and editing node parameters, robot programming can be completed with just dragging operations and a small amount of parameter input;
Helps to better visualize code and script complex and repetitive tasks faster;

Figure 11.1-1 Node graph programming interface
11.1.2. Toolbar
Use the toolbar at the top left of the Node Graph Programming page.

Figure 11.1-2 Toolbar
Note
name:Open
effect:Open user program file, choose to load or delete files in the pop-up box
Note
name:Save
effect:Save node graph edits
Note
name:Overload
effect:Reload the node graph content of the last operation to the local
Note
name:New
effect:Create a new node graph programming file
Note
name:Export
effect:After creating/opening the node graph programming file, click the “Export” button to pop up the “Export Node Graph Programming” pop-up box, select the workspace file name to export the file (json format)
Note
name:Import
effect:Click the “Import” button to pop up the import prompt box. Select the file to be imported and click Import. The file content will be displayed in the node graph programming workspace
Note
name:Code
effect:After the node graph is connected, Lua code is generated
11.2. Node graph operations
11.2.1. Node program
For node programs, you need to right-click the mouse in a blank space to open the node program selection bar. Program instructions are mainly divided into logic instructions, motion instructions, force control instructions, control instructions, Modbus instructions, expansion axis and other instructions.
The input box above the node program selection bar allows fuzzy search to quickly locate the required node instructions.
The specific node program operation process is as follows:
Click “Begin” to start the node and create the starting node programming location;
Click on the selected program instruction node, the corresponding node diagram is displayed in the workspace, and the instruction parameters can be selected and entered in the drop-down box;
The functions of the arrows on the right side of the command node: 1. A single arrow icon connects to the next node; 2. Multiple arrow icons, the first “Body” arrow icon connects to the content node, and the second “Completed” icon connects to the next node;
Connect the “Begin” start node to the completed node program to end the node programming operation;
11.3. If/Else instruction
Click the “If/Else” related command node to enter the node diagram editing interface. (This command requires a certain programming foundation. If you need help, please contact us)
“If/Else” command:
First: Connect the node instructions within the if condition
Second: If only two judgment conditions are entered on the left, it means connecting the node instructions in the else condition; if all three judgment conditions on the left exist, it means connecting the node instructions in the elseif condition.
Third: If all three judgment conditions on the left exist, it means connecting the else condition.
Completed: Connect subsequent node instructions

Figure 11.3-1 “If/Else” command node interface
11.4. While instruction
Click the “While” related command node to enter the node graph editing interface.
Enter the waiting condition in the input box behind While, enter the action instructions during the loop in the input box behind do, and click Save. (For the convenience of operation, you can enter any do content and edit other instructions in the program to insert them instead).
“While” command:
Condition: while loop condition

Figure 11.4-1 “While” command node interface
11.5. Goto instruction
Click “Goto” on the relevant command node to enter the node graph editing interface.
“Goto” command, the first “Body” arrow icon connects to the body content node, and the second “Completed” arrow icon connects to the subsequent jump position goto instruction node. (This command requires a certain programming foundation. If you need help, please contact us).
Jump name: Enter the jump name to determine the jump location

Figure 11.5-1 “Goto” command node interface
Important
Jump name cannot start with a number.
11.6. Wait instruction
Click the “Wait” related command node to enter the node diagram editing interface.
This instruction is a delay instruction, divided into four parts: “WaitMs”, “WaitDI”, “WaitMultiDI” and “WaitAI”.
“Wait” command node, parameters:
Waiting time (ms): The unit of delay waiting time is milliseconds. Enter the number of milliseconds to wait.

Figure 11.6-1 “Wait” command node interface
“WaitDI” command node, parameters:
DI port number: Ctrl-DI0 ~ Ctrl-CI7(WaitDI,[0~15]), End-DI0 ~ End-DI1(WaitToolDI,[0~1])
Status: false/true
Maximum time (ms): 0 ~ 10000
Waiting for timeout processing: stop reporting errors/continue execution/wait forever

Figure 11.6-2 “WaitMultiDI” command node interface
“WaitMultiDI” command node, parameters:
Condition: and/or
Conditional selection: Select the port number that the bit status is enabled, separated by commas, for example DI0, DI1
True value corresponding port: Select the port number of the true value, separated by commas, for example DI0, DI1
Maximum time (ms): 0 ~ 10000, maximum waiting time
Waiting for timeout processing: stop reporting errors/continue execution/wait forever

Figure 11.6-3 “WaitMultiDI” command node interface
“WaitAI” command node, parameters:
Condition: and/or
AI port number: Ctrl-AI0 ~ Ctrl-AI1(WaitAI,[0~1]), End-AI0(WaitToolAI,[0])
Condition: greater than/less than
Value (%): 1 ~ 100
Maximum time (ms): 0 ~ 10000
Waiting for timeout processing: Stop error reporting/continue execution/keep waiting. When waiting for timeout processing and keep waiting, the maximum time defaults to 0.

Figure 11.6-4 “WaitAI” command node interface
11.7. Pause instruction
Click the “Pause” command node to enter the node graph editing interface.
This command is a pause command. Insert this command in the program. When the program executes this command, the robot will be in a paused state. If you want to continue running, click the “Pause/Resume” button in the control area.
“Pause” command node, parameters:
Pause type: no function, cylinder not in place, etc.

Figure 11.7-1 “Pause” command node interface
11.8. Dofile instruction
Click the “Dofile” command node to enter the node graph editing interface.
This command is a dofile command. Insert this command in the program. When the program executes this command, the robot will be in a paused state. If you want to continue running, click the “Pause/Resume” button in the control area.
“Dofile” command node, parameters:
dofile: create the generated file name
Which layer to call: first layer/second layer
ID number: the corresponding position id of the level to which it belongs

Figure 11.8-1 “Dofile” command node interface
11.9. Set system variable command
Click the “Set system variable command” command node to enter the node graph editing interface.
This instruction is a setting system variable instruction, which is divided into setting system variables and obtaining system variables. It is used in conjunction with while, if-else and other instructions.
“Configure system variable command” command node, parameters:
Var: custom variable name
Value: Enter according to actual situation

Figure 11.9-1 “Configure system variable command” command node interface
“Obtain system variable command” command node, parameters:
Var: custom variable name

Figure 11.9-2 “Obtain system variable command” command node interface
Important
The variable name must be a defined name.
11.10. PTP instruction
Click the “PTP” command node to enter the node graph editing interface.
You can select the point you need to reach. The smooth transition time setting can realize the continuous movement from this point to the next point. Whether to set the offset, you can choose the offset based on the base coordinate system and the offset based on the tool coordinate, and x, y will pop up. z, rx, ry, rz offset settings, the specific PTP path is the optimal path automatically planned by the motion controller.
“PTP” command node, parameters:
Point name: Teaching point
Debugging speed (%): 0 ~ 100
Stop: false/true
Smooth transition (ms): smooth transition time 0 ~ 500
Whether to offset No/base coordinate offset/tool coordinate offset. When No is selected, the dx~drz parameter values will not take effect.
dx~drz: offset

Figure 11.10-1 “PTP” command node interface
11.11. LIN instruction
Click the “LIN” command node to enter the node graph editing interface.
The function of this command is similar to the “point to point” command, but the path to the point reached by this command is a straight line.
“LIN” command node, parameters:
Point name: Teaching point
Debugging speed (%): 0 ~ 100
Stop: false/true. When true is selected, the smooth transition parameter value does not take effect
Smooth transition (mm): Smooth transition radius 0 ~ 1000
Whether to seek position: false/true
Position search point variables: REF0~99/RES0~99. When false is selected for position search, the parameters will not take effect
Whether to offset: No/base coordinate offset/tool coordinate offset. When No is selected, the dx~drz parameter values will not take effect
dx~drz: Offset.

Figure 11.11-1 “LIN” command node interface
11.12. LIN(seamPos) instruction
Click the “LIN(seamPos)” command node to enter the node graph editing interface.
This command function is used in welding scenarios using laser sensors.
“LIN(seamPos)” command node, parameters:
Point name: Teaching point
Debugging speed (%): 0 ~ 100
Stop: false/true. When true is selected, the smooth transition parameter value does not take effect
Smooth transition (mm): Smooth transition radius 0 ~ 1000
Weld cache data selection: execution planning data/execution record data
Board type: corrugated board/corrugated board/fence board/oil drum/corrugated shell steel
Whether to offset: No/base coordinate offset/tool coordinate offset/Laser raw data offset. When No is selected, the dx~drz parameter values will not take effect.
dx~drz: Offset.

Figure 11.12-1 “LIN(seamPos)” command node interface
11.13. ARC instruction
Click the “ARC” command node to enter the node graph editing interface.
The arc motion contains two points. The first point is the transition point in the middle of the arc, and the second point is the end point. Both the transition point and the end point can be offset or not. You can choose to offset based on the base coordinate system or offset based on the tool coordinate. Shift, set x, y, z, rx, ry, rz offset, the end point can set a smooth transition radius to achieve continuous motion effect.
“ARC” command node, parameters:
Arc middle point: teaching point
Whether to offset: No/base coordinate offset/tool coordinate offset. When No is selected, the dx~drz parameter values will not take effect
dx~drz: offset
Arc end point: teaching point
Whether to offset: No/base coordinate offset/tool coordinate offset. When No is selected, the dx~drz parameter values will not take effect
dx~drz: offset
Debugging speed (%): 0 ~ 100
Stop: false/true. When true is selected, the smooth transition parameter value does not take effect.
Smooth transition (mm): Smooth transition radius 0 ~ 1000

Figure 11.13-1 “ARC” command node interface
11.14. Circle instruction
Click the “Circle” command node to enter the node graph editing interface.
The full circle motion includes two points. The first point is the middle transition point 1 of the full circle, and the second point is the middle transition point 2 of the full circle. Transition point 2 can be set to be offset. This offset takes effect on both transition point 1 and Transition point 2.
“Circle” command node, parameters:
Middle point 1 of the whole circle: teaching point
Middle point 2 of the whole circle: teaching point
Debugging speed (%): 0 ~ 100
Whether to offset: No/base coordinate offset/tool coordinate offset. When No is selected, the dx~drz parameter values will not take effect.
dx~drz: offset

Figure 11.14-1 “Circle” command node interface
11.15. Spiral instruction
Click the “Spiral” command node to enter the node graph editing interface.
The spiral motion contains three points, which form a circle. On the third point setting page, the parameter settings include the number of spiral turns, attitude correction angle, radius increment and rotation axis direction increment. The number of spiral turns is The number of movement circles of the spiral. The attitude correction angle corrects the attitude at the end of the spiral and the attitude of the first point of the spiral. The radius increment is the increment of the radius of each circle. The rotation axis direction increment is the direction of the spiral axis. Increment. Set whether to offset, the offset takes effect on the entire spiral trajectory.
“Spiral” command node, parameters:
Spiral middle point 1: Teaching point
Spiral middle point 2: teaching point
Spiral middle point 3: teaching point
Debugging speed (%): 0 ~ 100
Whether to offset: No/base coordinate offset/tool coordinate offset. When No is selected, the dx~drz parameter values will not take effect.
dx~drz: offset
Number of spiral turns: 0 ~ 100
Attitude angle correction rx(°): -1000 ~ 1000
Attitude angle correction (°): -1000 ~ 1000
Attitude angle correction rz(°): -1000 ~ 1000
Radius increment (mm): -100 ~ 100
Increment in rotation axis direction (mm): -100 ~ 100

Figure 11.15-1 “Spiral” command node interface
11.16. N-Spiral instruction
Click the “N-Spiral” command node to enter the node graph editing interface.
The new spiral motion is an optimized version of spiral motion. This instruction only requires one point and the configuration of each parameter to achieve spiral motion. The robot takes the current position as the starting point, and the user sets the debugging speed, offset or not, the number of spiral turns, the spiral inclination angle, the initial radius, the radius increment, the rotation axis direction increment and the rotation direction. The number of spiral turns is the length of the spiral. The number of movement circles, the spiral inclination angle is the angle between the Z axis of the tool and the horizontal direction, the attitude correction angle corrects the attitude at the end of the spiral and the attitude of the first point of the spiral, the initial radius is the radius of the first circle, and the radius increment That is, the increment of the radius of each circle, the increment of the rotation axis direction is the increment of the spiral axis direction, and the rotation direction is clockwise and counterclockwise.
“N-Spiral” command node, parameters:
Starting point of spiral: teaching point
Debugging speed (%): 0 ~ 100
Whether to offset: No/base coordinate offset/tool coordinate offset. When No is selected, the dx~drz parameter values will not take effect.
dx~drz: offset
Number of spiral turns: 0 ~ 100
Helix inclination angle (°): -100 ~ 100
Initial radius: 0 ~ 100
Radius increment (mm): -100 ~ 100
Increment in rotation axis direction (mm): -100 ~ 100
Direction of rotation: clockwise/counterclockwise

Figure 11.16-1 “N-Spiral” command node interface
11.17. H-Spiral instruction
Click the “H-Spiral” icon to enter the H-Spiral command editing interface.
The “H-Spiral” command is a horizontal space spiral motion. This command is set after the single-segment motion (straight line) command.
“H-Spiral” command node, parameters:
Spiral radius: 0~100mm
Helix angular speed: 0~2rev/s
Direction of rotation: spiral clockwise/counterclockwise
Helix inclination angle: 0~40°

Figure 11.17-1 “H-Spiral” command node interface
11.18. Spline instruction
Click the “Spline” command node to enter the node graph editing interface.
This command is divided into three parts: the start of the spline group, the spline segment and the end of the spline group. The start of the spline group is the starting mark of the spline movement. The current node graph of the spline segment only contains the SPL segment. The end of the spline group is The end mark of the spline movement.
“Spline-SPTP” command node, parameters:
Point name: Teaching point
Debugging speed (%): 0 ~ 100

Figure 11.18-1 “Spline” command node interface
11.19. N-Spline instruction
Click the “N-Spline” command node to enter the node graph editing interface.
This instruction is a spline instruction algorithm optimization instruction. It will replace the existing spline instruction later. This instruction is divided into three parts: multi-point trajectory start, multi-point trajectory segment and multi-point trajectory end. The multi-point trajectory starts with multi-point trajectory. The starting mark of the movement. The multi-point track segment means setting each track point. Click the icon to enter the point adding interface. The end of the multi-point track is the end mark of the multi-point track movement. Here you can set the control mode and debugging speed. The control mode is divided into for a given control point and a given path point.
“N-Spline” command node, parameters:
Control mode: teaching point
Global average connection time: integer, greater than 10, default value is 2000 ms
“N-Spline-SPL” command node, parameters:
Point name: Teaching point
Debugging speed (%): 0 ~ 100
Smooth transition radius: 0 ~ 1000
whether last point: no/yes

Figure 11.19-1 “N-Spline” command node interface
11.20. Weave instruction
Click the “Weave” command node to enter the node graph editing interface.
This command consists of two parts. The first part selects the weaving number of the configured parameters. The program for connecting the Body to represent the connection node is executed between “Start Weaving” and “Stop Weaving”.
“Weave” command node, parameters:
Number: 0~7

Figure 11.20-1 “Weave” command node interface
11.21. TPD instruction
Click the “TPD” command node to enter the node graph editing interface.
In this command, the user first needs to have a recorded trajectory.
When programming, first use the point-to-point command to reach the starting point of the corresponding trajectory, then select the trajectory in the trajectory recurrence command, select the smooth trajectory, and set the debugging speed. The trajectory loading command is mainly used to read the trajectory file in advance and extract it into trajectory instructions, which can be better applied to conveyor belt tracking scenarios.
“TPD” command node, parameters:
Track name: recorded track
Smooth trajectory: No/Yes
Debugging speed (%): 0 ~ 100, default value is 25

Figure 11.21-1 “TPD” command node interface
11.22. Offset instruction
Click the “Offset” command node to enter the node graph editing interface.
This command is an overall offset command. Enter each offset. The program connecting the Body to represent the connection node is executed between start and close. The motion command in the middle will be offset based on the base coordinates (or workpiece coordinates).
“Offset” command node, parameters:
Δx: offset, -300~300
Δy: offset, -300~300
Δz: offset, -300~300
Δrx: offset, -300~300
Δry: offset, -300~300
Δrz: offset, -300~300

Figure 11.22-1 “Offset” command node interface
11.23. ServoCart instruction
Click the “ServoCart” command node to enter the node diagram editing interface.
Servo control (Cartesian space motion) instruction, which can control robot movement through absolute pose control or based on the current pose offset.
“ServoCart” command node, parameters:
Movement mode: absolute position/base coordinate offset/tool coordinate offset
x: offset, -300~300
y: offset, -300~300
z: offset, -300~300
rx: offset, -300~300
ry: offset, -300~300
rz: offset, -300~300
Proportional coefficient x: 0~1
Proportional coefficient y: 0~1
Proportional coefficient z: 0~1
Proportional coefficient rx: 0~1
Proportional coefficient ry: 0~1
Proportional coefficient rz: 0~1
Acceleration (%): 0~100
Speed (%): 0~100
Instruction cycle (s): 0.001~0.016
Filter time (s): 0~1
Scale up: 0~100

Figure 11.23-1 “ServoCart” command node interface