Share this

EtherCAT motion controller Delta robotic arm application

2026-04-06 04:12:32 · · #1

ZMC406 Hardware Introduction

The ZMC406 is a multi-axis, high-performance EtherCAT bus motion controller launched by Zheng Motion. It has communication interfaces such as EtherCAT, EtherNET, RS232, CAN and USB flash drive. The ZMC series motion controllers can be used in various occasions that require offline or online operation.

The ZMC406 supports 6-axis motion control and can be expanded to 32 axes. It supports linear interpolation, arbitrary circular interpolation, spatial circular interpolation, helical interpolation, electronic cam, electronic gear, synchronous following and other functions.

The ZMC406 supports three programming methods: PLC, Basic, and HMI configuration. PC-based API programming supports interfaces such as C#, C++, LabVIEW, Matlab, Qt, Linux, VB.Net, and Python.

The ZMC406 supports 6-axis motion control and can use pulse axes (with encoder feedback) or EtherCAT bus axes. Its general-purpose I/O includes 24 input ports and 12 output ports, two analog AD/DA channels, and an EtherCAT refresh cycle of up to 125µs.

·

This type of motion controller has the following advantages compared to PCI motion control cards:

·

(1) No slots are used, resulting in better stability; (2) MINI computers or ARM industrial control computers can be selected, reducing overall costs; (3) The controller can be used directly as a wiring board, saving space; (4) Programs can run in parallel on the controller, requiring only simple interaction with the PC, reducing the complexity of PC software, etc. The ZMC controller is debugged through the RTSys development environment, which is a convenient programming, compilation, and debugging environment. RTSys can establish a connection with the controller via serial port, Ethernet, PCI, and LOCAL. Applications can be developed using software such as VC, VB, VS, C++Builder, and C#. During debugging, the RTSys software can be connected to the controller simultaneously. The program requires the dynamic library zmotion.dll to run. The Delta robot supports 3-4 axes: joint axis 1 + joint axis 2 + joint axis 3 + [end rotation axis 4]. Controllers with the suffix R support Delta robot functions, such as the ZMC406R. The ZMC406R can download the edited program to the controller offline, and the desired trajectory can be edited using the touch screen teaching method. Alternatively, you can use PC API function calls or real-time command sending to develop Delta robot applications on a PC using languages ​​such as C#, C++, LabVIEW, and Python.

▶▶▶

robotic arm related concepts

1. Joint axis and virtual axis

(1) Joint axis: refers to the rotary joint in the actual mechanical structure, which is generally displayed as the rotation angle in the program (some structures are also translation axes). Since there is a reduction ratio between the motor and the rotary joint, the pulse equivalent UNITS (the number of pulses required for the motor to move 1mm or 1°) should be set according to the actual rotation of the joint. At the same time, when filling in the structural parameters in the TABLE, the calculation should be based on the center of the rotary joint, not the center of the motor axis. (2) Virtual axis: does not actually exist, but is abstracted as the 6 degrees of freedom of the world coordinate system, namely X, Y, Z, RX, RY, and RZ. It can be understood as the three linear axes and three rotation axes of the rectangular coordinate system, used to determine the machining trajectory and coordinates of the working point of the robot arm.

2. Forward and Inverse Motion

(1) Forward Motion: By manipulating the joint coordinates and calculating the spatial position of the end effector in a Cartesian coordinate system based on the mechanical structure parameters, this process is called forward motion. At this time, the actual joint axis is manipulated, while the virtual axis automatically calculates its coordinates. Only the joint axis can be moved at this time. Forward mode is generally used for manually adjusting the joint position or returning the power-on point to zero. (2) Inverse Motion: Given a spatial position in a Cartesian coordinate system, the coordinates of each joint axis are deduced. This process is called inverse motion. At this time, the virtual axis is manipulated, while the actual joint axis automatically calculates its coordinates and moves. The controller uses the CONNFRAME instruction to establish inverse mode. This instruction acts on the joint axis. At this time, only the virtual axis can be manipulated. Sending motion commands to the virtual axis allows for linear, circular, and spatial circular motions in the Cartesian coordinate system. Under the action of CONNFRAME, the joint axis will automatically move to the position obtained after inverse motion.

▶▶▶

Operating steps for using a robotic arm

1. Confirm that the motor rotation direction is correct.

The three joint axes rotate downwards for the positive direction. The end effector axis rotates counterclockwise for the positive direction (viewed from above). Connect the robot simulation tool and use the "Tools" - "Manual Motion" menu in the Rtsys software to move the three joint axes at a low speed. Observe whether the lower rod of each joint axis tends to the end effector working point during its movement. If so, it means that the motor rotation direction is correct.

2. The TABLE register (automatically generated after the controller powers on) stores the robot's structural parameters sequentially. When establishing a robot connection, the mechanical structural parameters need to be filled into the TABLE array in the following order. The mechanical structural parameters of the Delta robot FRAME12 model are explained below.

·

·

Starting from TableNum, sequentially store the following robot structural parameters in Table: top spacing radius, bottom spacing radius, top rod length, bottom rod length, number of pulses per revolution of the first joint axis, number of pulses per revolution of the second joint axis, number of pulses per revolution of the third joint axis, X offset of the end effector relative to the bottom center point, Y offset of the end effector relative to the bottom center point, Z offset of the end effector relative to the bottom center point, and number of pulses per revolution of the fourth joint axis. TABLE(TableNum,Top_R,Under_R,Top_L,Under_L,OneCirPules_J1,OneCirPules_J2,OneCirPules_J3,Offset_X,Offset_Y,Offset_Z,OneCirPules_J4)

3. Set the joint axis parameters and virtual axis parameters.

The axis type and pulse equivalent (units) of each axis must be set correctly, and set to the number of pulses required for the motor to move 1°. The units of the virtual axis are not related to the actual number of pulses sent, and are used to set the motion accuracy. It is generally recommended to set the number of pulses per mm for the virtual axis to 1000, which means the accuracy is three decimal places.

·

·

'Joint axis settings BASE(Axis_JList(0),Axis_JList(1),Axis_JList(2),Axis_JList(3))' sets the pulse axis type to 1. If it is a bus axis type, it can be set to 65. ATYPE = 1,1,1,1 UNITS = UnitsJList(0),UnitsJList(1),UnitsJList(2),UnitsJList(3)' Set the joint axis speed, acceleration (generally set to 10 times the speed), deceleration (generally set to 10 times the speed) SPEED = SpeedJList(0),SpeedJList(1),SpeedJList(2),SpeedJList(3) ACCEL = ADSpeedJList(0),ADSpeedJList(1),ADSpeedJList(2),ADSpeedJList(3) DECEL = ADSpeedJList(0),ADSpeedJList(1),ADSpeedJList(2),ADSpeedJList(3)' S curve SRAMP = SrampJ(0),SrampJ(1),SrampJ(2),SrampJ(3)'Virtual axis settings BASE(Axis_VList(0),Axis_VList(1),Axis_VList(2))'Virtual axis axis type set to 0 ATYPE = 0,0,0'Virtual axis pulse equivalent set to 1000 -- indicating precision to 3 decimal places UNITS = 1000,1000,1000'Set virtual axis speed, acceleration (generally set to 10 times the speed), deceleration (generally set to 10 times the speed) SPEED = SpeedVList(0),SpeedVList(1),SpeedVList(2)ACCEL = AccelV(0),AccelV(1),AccelV(2)DECEL = DecelV(0),DecelV(1),DecelV(2)'S curve SRAMP = SrampV(0),SrampV(1),SrampV(2)

4. Move each joint axis to the specified zero point position.

When establishing the robot arm algorithm, a zero-point position is needed as a reference. The zero-point position is considered to be when all the links L1 of the Delta robot arm's joint axes are in a horizontal position. In actual field use, robot arm consoles usually have locating pins; if no locating pins are available, a level can be used to adjust link L1 to be horizontal.

5. Establish forward or inverse solutions to control the robotic arm according to requirements.

▶▶▶

Robot Arm Instructions

Different robot models have different parameters. You can refer to the "Forward Motion Robot Instruction Manual" (scan the QR code at the end of the article) to check the corresponding robot model parameters for confirmation and selection. This article uses Delta's FRAME12 model (with an end-effector rotation axis, using joint axes to operate the rotation axis) as an example. The instructions for forward and inverse kinematics of the robot are explained below.

1. CONNREFRAME -- Establishes a forward motion connection command. Description: Associates the coordinates of a virtual axis with the coordinates of a joint axis. After the joint axis moves, the virtual axis automatically moves to the corresponding position. Command syntax: CONNREFRAME(frame, tablenum, Axis_J1, Axis_J2, Axis_J3, Axis_J4) Parameter description: frame: Coordinate system type. Refer to the "Forward Motion Robotic Arm Command Manual". A frame of 12 indicates that this robotic arm model is a 4-axis Delta with the joint axes being the end-rotation axes. Tablenum: The starting position of the TABLE storing the robotic arm's structural parameters, storing the corresponding robotic arm structural parameters for each model sequentially. Axis_J1: The axis number of the 1st joint axis. Axis_J2: The axis number of the 2nd joint axis. Axis_J3: The axis number of the 3rd joint axis. Axis_J4: The axis number of the 4th joint axis.

2. CONNFRAME -- Establish reverse engineering connections

Command Description: Associates the target position in the current joint coordinate system with the position in the virtual coordinate system; the maximum speed of the joint coordinate system is limited by the SPEED parameter; this movement will be canceled when there are errors such as joint axis alarms. Command Syntax: CONNFRAME(frame,tablenum,Axis_Vx,Axis_Vy,Axis_Vz,Axis_J4) Parameter Description: frame: Coordinate system type. Refer to the "Forward Motion Robotic Arm Command Manual". A frame value of 12 indicates that this robotic arm model is a 4-axis Delta with the joint axis operation end rotation axis. Tablenum: The starting position of the TABLE storing the robotic arm structural parameters, which sequentially stores the corresponding robotic arm structural parameters of the model. Axis_Vx: The first virtual axis number. Axis_Vy: The second virtual axis number. Axis_Vz: The third virtual axis number. Axis_J4: The fourth joint axis number.

▶▶▶

Delta robotic arm mode establishment

1. Establish the correct solution

Taking the Delta robot's Frame12 model as an example, first store the robot's structural parameters sequentially into the Table array starting from a certain Table number. Then, select the axis list corresponding to the model and use the CONNREFRAME command to establish the forward traversal mode.

Instruction descriptions can be found in the Rtsys software menu bar under 【General】-【Help Documentation】-【RTBasic Help】-【Index】. Search for CONNREFRAME in the search bar.

·

·

'Store the robot parameters sequentially into the Table array starting from TableNum: TABLE(TableNum,Top_R,Under_R,Top_L,Under_L,OneCirPules_J1,OneCirPules_J2,OneCirPules_J3,Offset_X,Offset_Y,Offset_Z,OneCirPules_J4)' Select the axis list: BASE(Axis_Vx,Axis_Vy,Axis_Vz,Axis_J4)' Create the robot's forward kinematics: CONNREFRAME(FrameType,TableNum,Axis_J1,Axis_J2,Axis_J3,Axis_J4)

If the robot's forward motion is successfully established, the virtual axis MTYPE (current motion type) will display as 34. At this point, only the joint axes can be manipulated to adjust the robot's posture in the joint coordinate system. Manual motion can be achieved through the RTSys software menu bar: 【Tools】-【Manual Motion】. After the 【Manual Motion】 interface pops up, select the joint axis number (in this article, we take axis 0, axis 1, axis 2, and end effector rotation axis 3 as examples), and then select jogging or inching according to actual needs. The virtual axis will automatically calculate the position of the end effector's working point in the Cartesian coordinate system.

2. Inverse solution establishment

Taking the Delta robot's Frame12 model as an example, first store the robot's structural parameters sequentially into a Table array, starting from a certain Table number. Then, select the corresponding axis list for the model and use the CONNFRAME command to establish the forward traversal mode. Command instructions can be found in the Rtsys software toolbar under 【General】-【Help Documentation】-【RTBasic Help】-【Index】; search for CONNFRAME in the search bar.

·

·

'Store the robot arm parameters sequentially into the Table array starting from TableNum: TABLE(TableNum,Top_R,Under_R,Top_L,Under_L,OneCirPules_J1,OneCirPules_J2,OneCirPules_J3,Offset_X,Offset_Y,Offset_Z,OneCirPules_J4)' Select the axis list: BASE(Axis_J1,Axis_J2,Axis_J3,Axis_J4)' Create the robot arm inverse kinematics: CONNFRAME(FrameType,TableNum,Axis_Vx,Axis_Vy,Axis_Vz,Axis_J4)

If the reverse engineering of the robot is successfully established, the MTYPE (current motion type) of the joint axis will be displayed as 33. The method for operating the virtual axis in the [Manual Motion] interface is the same as above. At this time, the machining process commands can only operate the virtual axis. The pre-edited motion trajectory moves in the Cartesian coordinate system (the virtual axes in this article are axis 10, axis 11, and axis 12 as examples). The joint axis will automatically calculate how to coordinate the motion in the joint coordinate system.

▶▶▶

Program Editor

RTSys software supports mixed programming of Basic, HMI, and PLC. This example demonstrates mixed programming using Basic combined with an HMI interface. You can design the interactive interface by dragging and dropping controls through the 【HMI】-【Toolbox】 menu in the RTSys software.

In this example, we first define global SUB sub-functions in the BAS file, edit the functionality of the sub-functions (see the project source code at the end of the article) to meet the requirements, and then bind controls. All control actions are selected to call functions. The operation flow is shown in the following diagram.

▶▶▶

Application routines

1. Requirements Description

When establishing the reverse engineering algorithm for the Delta robot, a safe height is determined with the zero point position as a reference. The basic operation is as follows: the robot rises to the safe height above the fixed material picking point, then descends and opens the Op port to pick up the material by vacuum suction. After a delay, it rises to the safe height and then moves to the fixed 2*2 encoder position. It descends to the encoder position, closes the Op port, and releases the material. This process is repeated until the encoder is full and then stops.

2. Processing Code

·

·

'Start Flag Position 1 StartFlag = 1 LOCAL SafeHigh,i' Safe High = DPOS(Axis_VList(2))-25' Row, Column LOCAL Row,Col' Fixed Pickup Point Position LOCAL SrcBorrow_X,SrcBorrow_Y,SrcBorrow_Z SrcBorrow_X = 5 SrcBorrow_Y = 5 SrcBorrow_Z = SafeHigh-20' Select Virtual Axis BASE(Axis_VList(0),Axis_VList(1),Axis_VList(2))' ​​Set Machining Speed, Acceleration, and Deceleration SPEED = SpeedVList(0) ACCEL = AccelV(0) DECEL = DecelV(0)' Turn on Continuous Interpolation MERGE = ON' Reset Temporary Total to Zero Each Start TmpSum = 0' Safe High Reference for Moving to Zero Position MOVEABS(0,0,SafeHigh) FOR Col=1 TO 2 FOR Row=1 TO 2 'Move to above the pick-up point MOVEABS(SrcBorrow_X,SrcBorrow_Y,SafeHigh) 'Descend to the pick-up point MOVEABS(SrcBorrow_X,SrcBorrow_Y,SrcBorrow_Z) 'Open Op port to pick up material MOVE_OP(8,ON) 'Delay MOVE_DELAY(300) 'Rise to safe height MOVEABS(SrcBorrow_X,SrcBorrow_Y,SafeHigh) 'Move to above the pallet unloading point MOVEABS(-5*Row,5*Col,SafeHigh) 'Descend to the pallet unloading point MOVEABS(-5*Row,5*Col,SrcBorrow_Z) 'Close Op port to unload material MOVE_OP(8,OFF) 'Delay MOVE_DELAY(300) 'Rise to safe height MOVEABS(-5*Row,5*Col,SafeHigh) 'Temporary total increment TmpSum = TmpSum+1 NEXTNEXT 'Wait for all axes to stop WAIT UNTIL IDLE(Axis_VList(0)) AND IDLE(Axis_VList(1)) AND IDLE(Axis_VList(2)) DELAY(10) RAPIDSTOP(2) DELAY(10) 'Start flag position 0 StartFlag = 0

▶▶▶

Debugging and Analysis

1. Download the program to the controller and run it. Click on 【Tools】-【Plugins】-【XPLC SCREEN】 in the RTSys software menu bar.

2. After the interactive interface pops up, select "Robot Arm Correct Solution" in the robot arm mode on the main interface.

3. After establishing the forward connection, open the forward motion robot simulation software ZRobotView, click "Connect" to bring up the "Connect Controller" window, and then select the connection method to the controller (the simulation tool supports serial port and network port connections). Here, we take network port connection as an example. Select the controller's IP address in the IP field and then connect.

4. After successful connection, the simulation tool will display the current robot type at the top. The simulation tool can also view the robot structure parameters stored in the Table in the program and build a robot model with the corresponding parameters.

5. Switch to the RTSys programming software, and click on 【Common】-【Oscilloscope】 in the menu bar. After the oscilloscope window pops up, select XYZ mode to observe the motion demonstration effect in 3D space. Select DPOS (Planned Position) as the data source and virtual axis number as the data source number. After confirming the oscilloscope parameters, click on 【Stop】-【Start】-【Manual Trigger】 in sequence.

6. Switch to the interactive interface, select "Robot Reverse Engineering" in the main interface's robot mode to establish the reverse engineering mode. Then click "Start" to proceed with the required processing flow.

7. Switch to the oscilloscope interface of the RTSys software to observe the processing effect. During each material loading and unloading process, the Delta robot always maintains a safe height during lifting and lowering, thus ensuring stability during actual processing.

Full code download address

That concludes our sharing of the application of EtherCAT motion controller Delta robotic arm technology.

For more exciting content, please follow the "Zheng Motion Assistant" WeChat official account. For related development environment and example code, please contact Zheng Motion's technical sales engineer: 400-089-8936.

This article is original content from Zheng Motion Technology. We welcome everyone to reprint it for mutual learning and to jointly improve China's intelligent manufacturing level. Copyright belongs to Zheng Motion Technology. Please indicate the source if you reprint this article.

Read next

CATDOLL 135CM Vivian

Crafted with attention to detail, this 135cm doll offers a well-balanced and realistic body shape that feels natural in...

Articles 2026-02-22