Delta Robot Application of EtherCAT Motion Controller

Click the above Positive Motion Assistant, stay tuned for new updates!

ZMC406 Hardware Introduction
ZMC406 is a multi-axis high-performance EtherCAT bus motion controller launched by Positive Motion, featuring communication interfaces such as EtherCAT, Ethernet, RS232, CAN, and USB. The ZMC series motion controllers can be applied in various scenarios requiring offline or online operation.

Delta Robot Application of EtherCAT Motion Controller

ZMC406 supports 6-axis motion control and can be expanded to a maximum of 32 axes, supporting functions such as linear interpolation, arbitrary arc interpolation, spatial arc, spiral interpolation, electronic cam, electronic gear, and synchronized following.

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

Delta Robot Application of EtherCAT Motion Controller

ZMC406 supports 6-axis motion control and can use pulse axes (with encoder feedback) or EtherCAT bus axes. The general I/O includes 24 input ports and 12 output ports, with two analog AD/DA channels each, and the EtherCAT refresh cycle can be as fast as 125us.

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

(1) No slot usage, better stability;
(2) Can choose MINI computers or ARM industrial computers to reduce overall costs;
(3) The controller can be directly used as a wiring board, saving space;
(4) The controller can run programs in parallel, requiring only simple interaction with the PC, thus reducing the complexity of PC software.
The ZMC controller is debugged through the RTSys development environment, which is a convenient programming, compiling, and debugging environment. RTSys can establish connections with the controller via serial port, Ethernet, PCI, and LOCAL. Applications can be developed using VC, VB, VS, C++Builder, C#, etc. During debugging, RTSys software can be connected to the controller, and the program requires the dynamic library zmotion.dll.
Delta robots support 3-4 axes, with joint axis 1 + joint axis 2 + joint axis 3 + [end rotation axis 4]. Controllers with the suffix R support Delta robot functions, such as ZMC406R.
ZMC406R can download edited programs to the controller offline, and trajectories can be edited using a touch screen teaching method. It can also be operated using PC API function calls or real-time command sending, with applications developed in C#, C++, LabVIEW, Python, etc.
Delta Robot Application of EtherCAT Motion Controller

▶▶▶

Concepts Related to Robots

1. Joint Axes and Virtual Axes

(1) Joint Axis: Refers to the rotating joints in the actual mechanical structure, generally displayed as rotation angles in the program (some structures are also translational axes). Since there is a gear ratio between the motor and the rotating joint, when setting the pulse equivalent UNITS (the number of pulses required for the motor to move 1mm or 1°), it must be set according to the actual rotation of the joint, and when filling in the structural parameters in the TABLE, it should be calculated based on the center of the rotating joint, not the center of the motor shaft.
(2) Virtual Axis: Does not actually exist and is abstracted as the 6 degrees of freedom of the world coordinate system, namely X, Y, Z, RX, RY, RZ. It can be understood as three linear axes and three rotational axes of the Cartesian coordinate system, used to determine the processing trajectory and coordinates of the robot’s end working point.

2. Forward Kinematics and Inverse Kinematics

(1) Forward Kinematics: By operating the joint coordinates, the end position in the Cartesian coordinate system can be calculated based on the mechanical structure parameters. This process is called forward kinematics. At this time, the actual joint axes are operated, and the virtual axes automatically calculate the coordinates. At this time, only the joint axes can be operated, and the forward mode is generally used for manual adjustments of joint positions or zeroing at power-on.
(2) Inverse Kinematics: Given a spatial position in the Cartesian coordinate system, the coordinates of each joint axis are derived. This process is called inverse kinematics. At this time, the virtual axes are operated, and the actual joint axes automatically calculate the coordinates and move. The controller uses the CONNFRAME instruction to establish the inverse kinematics mode, which acts on the joint axes. At this time, only the virtual axes can be operated, and movement commands can be sent to the virtual axes to perform linear, arc, and spatial arc movements in the Cartesian coordinate system. The joint axes will automatically move to the positions derived from the inverse kinematics under the action of the CONNFRAME.

▶▶▶

Robot Operation Steps

1. Confirm whether the motor direction is correct.

When the 3 joint axes rotate downwards, it is the positive direction. The end rotation axis rotating counterclockwise is the positive direction (top view). Connect the robot simulation tool, and through the RTSys software menu bar, select 【Tools】 – 【Manual Motion】, operate the three joint axes at a small speed respectively, and observe whether each joint axis moves towards the end working point. If so, it indicates that the motor direction is correct.

Delta Robot Application of EtherCAT Motion Controller

2. TABLE Register (automatically generated after the controller is powered on) stores the robot structural parameters sequentially.
When establishing a connection with the robot, the mechanical structure parameters need to be filled into the TABLE array in the following order. The structural parameters of the Delta robot FRAME12 model are as follows.

Delta Robot Application of EtherCAT Motion Controller

Delta Robot Application of EtherCAT Motion Controller

‘From TableNum number, sequentially store the robot structural parameters: upper spacing radius, lower spacing radius, upper arm length, lower arm length, the number of pulses for the first joint axis to rotate one circle, the number of pulses for the second joint axis to rotate one circle, the number of pulses for the third joint axis to rotate one circle, X offset from the end to the center point below, Y offset from the end to the center point below, Z offset from the end to the center point below, the number of pulses for the fourth joint axis to rotate one circle into the Table. 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.

Each axis’s axis type and pulse equivalent (units) must be set correctly, set to the number of pulses required for the motor to move 1°. The virtual axis’s units are unrelated to the actual number of pulses sent, and are used to set the motion accuracy. The pulse number for 1mm of the virtual axis is generally recommended to be set to 1000, indicating an accuracy of three decimal places.

'Set joint axis type to pulse axis type 1 BASE(Axis_JList(0),Axis_JList(1),Axis_JList(2),Axis_JList(3))' 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 joint axis speed, acceleration (generally set to 10 times the speed), and 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)' Set virtual axis BASE(Axis_VList(0),Axis_VList(1),Axis_VList(2))' Set virtual axis type to 0 ATYPE = 0,0,0' Set virtual axis pulse equivalent to 1000 -- indicating an accuracy of three decimal places UNITS = 1000,1000,1000' Set virtual axis speed, acceleration (generally set to 10 times the speed), and 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 position.

When establishing the robot algorithm, a zero position is needed as a reference. When the connecting rods of each joint axis of the Delta robot are in a horizontal position, it is considered the joint zero position. The actual field robot platform generally has positioning pins, and if there are no positioning pins, the connecting rod L1 can be adjusted to horizontal using a level.
Delta Robot Application of EtherCAT Motion Controller

5. Establish forward or inverse control of the robot according to requirements..

▶▶▶

Robot Command Description

Different robot model parameters have differences, which can be confirmed by referring to the “Positive Motion Robot Command Manual” (scan the QR code at the end of the article) to check the corresponding robot model parameters.
This article introduces the command description of robot forward and inverse kinematics using the Delta FRAME12 model (with end rotation axis, operating the rotation axis with joint axes) as an example.

Delta Robot Application of EtherCAT Motion Controller

1. CONNREFRAME — Establish Forward Kinematics Connection
Instruction Description: Associate the coordinates of the virtual axis with the coordinates of the joint axes. After the joint axes move, the virtual axis automatically moves to the corresponding position.
Instruction Syntax:
CONNREFRAME(frame,tablenum,Axis_J1,Axis_J2,Axis_J3,Axis_J4)
Parameter Description:
frame: Coordinate system type. Refer to the 【Positive Motion Robot Command Manual】, frame is 12, indicating that this robot model is a 4-axis Delta and the joint axes operate the end rotation axis.
Tablenum: The starting position of the TABLE storing the robot structure parameters, sequentially storing the corresponding model’s robot structure parameters.
Axis_J1: The 1st joint axis number
Axis_J2: The 2nd joint axis number
Axis_J3: The 3rd joint axis number
Axis_J4: The 4th joint axis number

2. CONNFRAME — Establish Inverse Kinematics Connection

Instruction Description: Associate the target position of the current joint coordinate system with the position of the virtual coordinate system; the maximum speed of the joint coordinate system’s movement is limited by the SPEED parameter; when the joint axes have alarms or errors, this movement will be CANCELLED.
Instruction Syntax:
CONNFRAME(frame,tablenum,Axis_Vx,Axis_Vy,Axis_Vz,Axis_J4)
Parameter Description:
frame: Coordinate system type. Refer to the 【Positive Motion Robot Command Manual】, frame is 12, indicating that this robot model is a 4-axis Delta and the joint axes operate the end rotation axis.
Tablenum: The starting position of the TABLE storing the robot structure parameters, sequentially storing the corresponding model’s robot structure parameters.
Axis_Vx: The 1st virtual axis number
Axis_Vy: The 2nd virtual axis number
Axis_Vz: The 3rd virtual axis number
Axis_J4: The 4th joint axis number

▶▶▶

Establishing Delta Robot Mode

1. Establish Forward Kinematics

Taking the Frame12 model of the Delta robot as an example. First, store the robot structure parameters from a certain Table starting number sequentially into the Table array, then select the corresponding model’s axis list and use the CONNREFRAME instruction to establish the forward kinematics mode.

Instruction description can be found by searching for CONNREFRAME in the 【Common】 – 【Help Document】 – 【RTBasic Help】 – 【Index】 section of the RTSys software menu.

'Store the robot parameters sequentially from the number TableNum into the Table array 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 axis list BASE(Axis_Vx,Axis_Vy,Axis_Vz,Axis_J4)' Establish robot forward kinematics CONNREFRAME(FrameType,TableNum,Axis_J1,Axis_J2,Axis_J3,Axis_J4)
If the forward kinematics of the robot is successfully established, the virtual axis MTYPE (current motion type) will display as 34. At this time, only the joint axes can be operated in the joint coordinate system to adjust the robot’s posture. Manual motion can be performed through the RTSys software menu bar 【Tools】 – 【Manual Motion】; after the 【Manual Motion】 interface pops up, select the joint axis number (in this article, the joint axes are exemplified as axis 0, axis 1, axis 2, and end rotation axis axis 3), then select the jog or step mode according to actual needs. The virtual axis will automatically calculate the end working point’s position in the Cartesian coordinate system.

Delta Robot Application of EtherCAT Motion Controller

Delta Robot Application of EtherCAT Motion Controller

2. Establish Inverse Kinematics

Taking the Frame12 model of the Delta robot as an example. First, store the robot structure parameters from a certain Table starting number sequentially into the Table array, then select the corresponding model’s axis list and use the CONNFRAME instruction to establish the inverse kinematics mode. Instruction descriptions can be found by searching for CONNFRAME in the 【Common】 – 【Help Document】 – 【RTBasic Help】 – 【Index】 section of the RTSys software menu.

'Store the robot parameters sequentially from the number TableNum into the Table array 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 axis list BASE(Axis_J1,Axis_J2,Axis_J3,Axis_J4) 'Establish robot inverse kinematics CONNFRAME(FrameType,TableNum,Axis_Vx,Axis_Vy,Axis_Vz,Axis_J4)
If the inverse kinematics of the robot is successfully established, the joint axis MTYPE (current motion type) will display as 33. The method of operating the virtual axes in the 【Manual Motion】 interface is the same as above. At this time, the processing command can only operate the virtual axes, and the pre-edited movement trajectory will move in the Cartesian coordinate system. (In this article, the virtual axes are exemplified as axis 10, axis 11, and axis 12), and the joint axes will automatically calculate how to move jointly in the joint coordinate system.

Delta Robot Application of EtherCAT Motion Controller

Delta Robot Application of EtherCAT Motion Controller

▶▶▶

Program Editing

RTSys software supports mixed programming of Basic, HMI, and PLC. This example uses Basic combined with HMI interface for demonstration. You can drag and drop controls to design the interactive interface through the 【HMI】 – 【Toolbox】 in the RTSys software menu.

Delta Robot Application of EtherCAT Motion Controller

In this example, global SUB functions are defined in the bas file first, and the functionality of the sub-functions (engineering source code can be seen at the end of the article) is edited and then bound to the controls, with the actions of the controls calling the functions. The operation flow is shown in the figure below.

Delta Robot Application of EtherCAT Motion Controller

▶▶▶

Application Example

1. Requirement Description

The Delta robot establishes inverse kinematics with the zero position as a reference, determining a safe height. The basic action is for the robot to rise to a safe height above the fixed picking point, then descend to open the Op port and pick up the material using vacuum suction, delay and raise to a safe height, then move to the fixed 2*2 pallet position, descend to the pallet position to close the Op for unloading, and then raise and repeat until the pallet is full and then stop.

2. Processing Code
'Start flag position 1 StartFlag = 1 LOCAL SafeHigh,i' Safe height SafeHigh = DPOS(Axis_VList(2))-25' Row, Column LOCAL Row,Col' Fixed picking 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 processing speed, acceleration, deceleration SPEED = SpeedVList(0) ACCEL = AccelV(0) DECEL = DecelV(0)' Open continuous interpolation MERGE = ON' Reset temporary total count TmpSum = 0' Move to zero position reference safe height MOVEABS(0,0,SafeHigh) FOR Col=1 TO 2    FOR Row=1 TO 2        ' Move to above the picking point        MOVEABS(SrcBorrow_X,SrcBorrow_Y,SafeHigh)        ' Descend to the picking point        MOVEABS(SrcBorrow_X,SrcBorrow_Y,SrcBorrow_Z)        ' Open Op port to suck and pick        MOVE_OP(8,ON)        ' Delay        MOVE_DELAY(300)        ' Rise to safe height        MOVEABS(SrcBorrow_X,SrcBorrow_Y,SafeHigh)        ' Move to the unloading point above the pallet        MOVEABS(-5*Row,5*Col,SafeHigh)        ' Descend to the pallet unloading position        MOVEABS(-5*Row,5*Col,SrcBorrow_Z)        ' Close Op port for unloading        MOVE_OP(8,OFF)        ' Delay         MOVE_DELAY(300)        ' Rise to safe height        MOVEABS(-5*Row,5*Col,SafeHigh)        ' Increment temporary total count        TmpSum = TmpSum+1    NEXT NEXT' 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 Analysis

1. Download the program to the controller and click on the RTSys software menu bar 【Tools】 – 【Plugin】 – 【XPLC SCREEN】 in sequence.

Delta Robot Application of EtherCAT Motion Controller

2. After the interactive interface pops up, select “Robot Forward Kinematics” in the main interface.

Delta Robot Application of EtherCAT Motion Controller

3. After establishing the forward kinematics connection, open the Positive Motion Robot Simulation Software ZRobotView, click “Connect” to pop up the “Connect Controller” window, then select the connection method (the simulation tool supports serial and network connections). Here, taking network connection as an example, select the controller’s IP in the IP field and then connect.

Delta Robot Application of EtherCAT Motion Controller

4. After successful connection, the simulation tool will display the current robot type at the top, and the robot structure parameters stored in the program’s Table can also be viewed in the simulation tool, and the corresponding parameter robot model will be constructed.

Delta Robot Application of EtherCAT Motion Controller

5. Switch to the RTSys programming software, click 【Common】 – 【Oscilloscope】 in sequence. After the oscilloscope window pops up, select XYZ mode to observe the action demonstration effect in three-dimensional space. Choose DPOS (planned position) as the data source, and select the virtual axis number as the data source number. After confirming the oscilloscope parameters, click 【Stop】 – 【Start】 – 【Manual Trigger】 in sequence.

Delta Robot Application of EtherCAT Motion Controller

6. Switch to the interactive interface, select “Robot Inverse Kinematics” in the main interface, and establish the inverse kinematics mode. Then click “Start” to carry out the processing flow of the required process.

Delta Robot Application of EtherCAT Motion Controller

7. Switch to the oscilloscope interface of RTSys software to observe the processing effect. The Delta robot maintains a safe height during the entire material picking and placing process to ensure smoothness in actual processing.

Delta Robot Application of EtherCAT Motion Controller

Teaching Video.
The following video is sourced from Positive Motion Assistant

Complete Code Access Address

Delta Robot Application of EtherCAT Motion Controller

This time, the application of Positive Motion Technology EtherCAT Motion Controller Delta Robot is shared here.

For more exciting content, please follow the “Positive Motion Assistant” public account. For related development environments and example codes, please consult Positive Motion Technology sales engineers: 400-089-8936.

This article is original by Positive Motion Technology. Everyone is welcome to reprint it for mutual learning and to improve China’s intelligent manufacturing level together. The copyright of the article belongs to Positive Motion Technology. Please indicate the source when reprinting.
Delta Robot Application of EtherCAT Motion Controller

About Positive Motion Technology

Shenzhen Positive Motion Technology Co., Ltd. was established in 2013, focusing on the research of purely domestic motion control technology and the development of general motion control software and hardware platforms and products. It is a national high-tech and specialized “Little Giant” enterprise.

Positive Motion Technology gathers excellent talents from companies such as Huawei and ZTE. Striving for innovation, the company currently holds more than fifty intellectual property rights such as patents and copyrights. While insisting on independent innovation, it actively collaborates with major universities and research institutes to jointly research the basic technology of motion control, making it one of the fastest-growing enterprises in the domestic industrial control field, and one of the few enterprises that fully master core motion control technology and real-time industrial control software platform technology.

In addition to the main R&D center, Positive Motion Technology has three R&D branches in Zhongshan, Wuhan, and Shanghai. To better serve customers, it has two regional service centers outside the headquarters, and has sales and technical service institutions in Foshan, Xiamen, Qingdao, Xi’an, Wuhan, Chengdu, Tianjin, Zhengzhou, and other places.

After years of development applications with numerous partners, Positive Motion Technology’s products are widely used in fields such as 3C electronics, semiconductors, new energy, robots, packaging and printing, textile and clothing, laser processing, medical and pharmaceutical, CNC machine tools, and traditional processing.

Delta Robot Application of EtherCAT Motion Controller

Leave a Comment