Share this

Applications of EtherCAT motion controllers in SCARA and palletizing robots

2026-04-06 03:48:29 · · #1

XPLC104H8R Hardware Introduction

The XPLC104H8R is a high-performance, cost-effective multi-axis EtherCAT bus + pulse motion controller launched by Zheng Motion. It features communication interfaces such as EtherCAT, EtherNET, RS232, CAN, and USB flash drive. It is a motion control product that integrates three programming methods: Basic, PLC ladder diagram, and HMI configuration.

The XPLC104H8R supports 4-axis motion control, expandable to a maximum of 32 axes. Its general-purpose I/O includes 32 input ports and 32 output ports, with 2 analog AD/DA channels and a 1ms EtherCAT refresh cycle. It supports linear interpolation, arbitrary circular interpolation, helical interpolation, electronic cams, electronic gears, and synchronous following functions.

The XPLC104H8R high-performance multi-axis motion controller can be used in electronic semiconductor equipment (testing equipment, assembly equipment, fastening equipment, soldering machines), dispensing equipment, non-standard equipment, printing and packaging equipment, textile and garment equipment, medical equipment, production lines and other applications.

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 to reduce overall costs; (3) The controller can be used directly as a wiring board, saving space; (4) Programs can run in parallel on the controller, and only simple interaction with the PC is required, reducing the complexity of PC software, etc.

XPLC controllers are debugged using the RTSys development environment, a convenient environment for programming, compiling, and debugging. RTSys can connect to the controller via serial port, Ethernet, PCI, and local connections. 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 XPLC series controllers support various robot models, including SCARA and standard palletizing. Edited programs can be downloaded to the controller offline (or monitored via PC or operated by sending commands in real time). The desired motion trajectory can be edited using a touchscreen teaching method.

▶▶▶

ZHD400X Hardware Introduction

The ZHD400X is a network-enabled touchscreen teach pendant. It must be used with a controller that supports ZHMI functionality, and the controller software requires ZDevelop version 2.6 or higher. The ZHD400X features an 800*480 resolution true-color display, 18 buttons, and an emergency stop switch.

▶▶▶

FRAME1 -- ​​Standard SCARA

SCARA robotic arms support 2-4 axes, including large joint axes, small joint axes, [+Z-axis], and [+end-effector rotation axis].

This system is applied to a standard 4-axis SCARA robot, with two joint axes X and Y, one vertical Z axis, and one end-effector rotation axis R.

SCARA robotic arm operation steps: 1. Confirm that the motor rotation is correct. The motor direction and angle range are defined as follows: the positive direction of each joint motor is shown by the blue arrow in the figure below.

2. Confirm the axis sequence of each joint axis of the robot arm corresponding to the controller command parameters.

Select the axis number for each joint and the corresponding virtual axis number.

3. Set the relevant mechanical structure parameters in the TABLE.

When establishing a robot connection, the mechanical structure parameters need to be filled into the TABLE array in the following order.

Starting from TableNum, the following parameters are sequentially entered into the robot's structure: distance from the rotation center of the large joint axis to the rotation center of the small joint axis; distance from the rotation center of the small joint axis to the rotation center of the end effector axis; number of pulses per revolution of the large joint; number of pulses per revolution of the small joint; number of pulses per revolution of the end effector axis; distance from the rotation center of the end effector axis to the end working point; and distance traveled by the telescopic axis per revolution of the end effector axis. The example code is: TABLE(tablenum,L1,L2,Pules1OneCircle,Pules2OneCircle,[Pules3OneCircle,L3] [,ZDis]). The routine starts from TABLE(10000) and sequentially enters the required mechanical parameters for the Frame.

4. Motor parameter settings.

The axis type and pulse equivalent of each axis must be set correctly. The length unit for all virtual axes and joint axes of the robot must be consistent, generally in mm. The UNITS of a virtual axis is unrelated to the actual number of pulses sent; it is used to set the motion accuracy. It is generally recommended to set the number of pulses per mm for a virtual axis to 1000, indicating an accuracy of 3 decimal places. This example has already been configured internally and does not require further setting. 5. Move each joint axis to the specified zero point position.

When establishing the robot algorithm, a zero-point position is needed as a reference, and the direction of motor rotation needs to be determined.

When the zero point of SCARA is the zero point of the two joint axes, they form a straight line, pointing in the positive direction of the virtual X-axis.

Coordinate direction: When the joint axis is at its zero point, the coordinates of the virtual axis zero point are (L1+L2,0). There are no special requirements for the zero point positions of the vertical telescoping axes. After establishing the inverse kinematics connection, the DPOS coordinates of the virtual axis are automatically corrected to (L1+L2,0).

6. Establish the forward and inverse kinematics solutions for the robotic arm.

Forward solution creation: First, select the corresponding robot model. Different robot models have different table lists. Use the CONNREFRAME command to create the forward solution mode, and then select the axis list corresponding to the model. Command instructions can be found in the RTSys software menu bar under 【General】-【Help Documentation】-【RTBasic Help】-【Index】. Search for CONNREFRAME in the search bar.

·

TABLE(ScaraTableId,ga_L1,ga_L2,JOnePulses(0),JOnePulses(1),JOnePulses(2),ga_L3,ga_Ratio)'SCAR robot parameter list TABLE(MaDuoTableId,LargeX,LargeZ,JOnePulses(0),FRAME3_L1,FRAME3_L2,JOnePulses(1),JOnePulses(2),SmallX,SmallZ,JOnePulses(3))'Standard palletizing robot parameter list RAPIDSTOP(2)IF Mode=1 THEN 'Robot solution IF Roobat_Flag= 0 THEN 'Scara robot solution BASE(gcAxisVx,gcAxisVy,gcAxisVu,gcAxisVz) 'Select axis list CONNREFRAME(1,ScaraTableId,gcAxisJ1,gcAxisJ2,gcAxisJu,gcAxisJz) WAIT LOADED 'Wait for motion loading'

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, the joint axes are referred to as Axis 0 (J0 axis), Axis 1 (J1 axis), Axis 2 (J2 axis)), Axis 3 (J3 axis)). Then, select jogging or inching according to the actual needs. The virtual axis will automatically calculate the position of the end effector working point in the Cartesian coordinate system.

Inverse kinematics setup: First, select the corresponding robot model. Different robot models have different table lists. Then, select the axis list of the corresponding model and use the CONNFRAME command to establish the forward kinematics mode. Command instructions can be found in the RTSys software toolbar under 【Common】-【Help Documentation】-【RTBasic Help】-【Index】. Search for CONNFRAME in the search bar.

·

IF Roobat_Flag = 0 THEN 'Scara robot reverse engineering setup BASE(gcAxisJ1,gcAxisJ2,gcAxisJu,gcAxisJz) CONNFRAME(1,ScaraTableId,gcAxisVx,gcAxisVy,gcAxisVu,gcAxisVz) 'The 6th/7th axis is used as a virtual XY axis, and the reverse engineering connection is started. WAIT LOADED 'Wait for motion loading; the virtual axis positions will be automatically adjusted at this time.

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 on the virtual axis. The pre-edited motion trajectory moves in the Cartesian coordinate system (the virtual axes in this article are axis 6, axis 7, axis 8, and axis 9 as examples). The joint axis will automatically calculate how to coordinate the motion in the joint coordinate system.

▶▶▶

FRAME3 - Standard Palletizing

This example uses FRAME3—a standard palletizing robot, with two joint axes (X and Y), one vertical Z-axis, and one end-effector rotation axis (R). The steps for using the standard palletizing robot are as follows.

1. Confirm that the motor rotation direction is correct.

Define the positive direction of each joint axis as shown by the blue arrow.

2. Confirm the axis sequence of each joint axis of the robot arm corresponding to the controller command parameters.

Select the axis number for each joint and the corresponding virtual axis number.

3. The TABLE register is used to store the robot arm's structural parameters in sequence.

Starting from TableNum, the following parameters of the robot's structure are sequentially entered into Table: Distance in the x-direction from the rotation center of the base rotation axis to the rotation center of the large joint axis in the xz plane at zero point; Distance in the z-direction from the rotation center of the base rotation axis to the rotation center of the large joint axis in the xz plane at zero point; Number of pulses per revolution of the base axis; Length of the upper arm axis; Length of the forearm axis; Number of pulses per revolution of the upper arm axis; Number of pulses per revolution of the forearm axis; Horizontal offset of the end effector; Number of pulses per revolution of the end effector axis. Table(tablenum,LargeX,LargeZ,PulesLargeOneCircle,L1,L2,Pules1OneCircle,Pules2OneCircle,SmallX,SmallZ,[PulesSmallOneCircle))

The routine starts by filling in the required mechanical parameters of the Frame in TABLE(80002).

4. Set joint axis parameters and virtual axis parameters. The axis type and pulse equivalent (units) for each axis must be set correctly, representing the number of pulses required for the motor to move 1°. The units of the virtual axis are independent of the actual number of pulses sent and are used to set the motion accuracy. The pulse equivalent of the virtual axis is generally set to 1000, indicating an accuracy of 3 decimal places.

5. Determine the zero point position of the robotic arm.

Define the 0-point position of the large joint axis as the vertical position of the upper arm; define the 0-point position of the small joint axis as the horizontal position of the forearm. The zero point of the rectangular coordinate system is the center of the base.

6. Establish the forward and inverse kinematics solutions for the robotic arm.

Forward solution creation: First, select the corresponding robot model. Different robot models have different table lists. Use the CONNREFRAME command to create the forward solution mode, and then select the axis list corresponding to the model. Command instructions can be found in the RTSys software menu bar under 【General】-【Help Documentation】-【RTBasic Help】-【Index】. Search for CONNREFRAME in the search bar.

·

ELSEIF Roobat_Flag = 1 THEN 'Palletizing robot setup BASE(gcAxisVx,gcAxisVy,gcAxisVz,gcAxisVu)'Select axis list CONNREFRAME(3,MaDuoTableId,gcAxisJ1,gcAxisJ2,gcAxisJz,gcAxisJu) WAIT LOADED 'Wait for motion loading ENDIF

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, the joint axes are referred to as Axis 0 (J0 axis), Axis 1 (J1 axis), Axis 2 (J2 axis)), Axis 3 (J3 axis)). Then, select jogging or inching according to the actual needs. The virtual axis will automatically calculate the position of the end effector working point in the Cartesian coordinate system.

Inverse algorithm setup: First, select the corresponding robot model. Different robot models have different corresponding table lists. Use the CONNFRAME command to establish the forward algorithm mode. Command descriptions can be found in the RTSys software toolbar under 【Common】-【Help Documentation】-【RTBasic Help】-【Index】. Search for CONNFRAME in the search bar.

·

ELSEIF Roobat_Flag = 1 THEN BASE(gcAxisJ1,gcAxisJ2,gcAxisJz,gcAxisJu) 'ConfRAME(3,MaDuoTableId,gcAxisVx,gcAxisVy,gcAxisVz,gcAxisVu) 'Use the 6th/7th axis as a virtual XY axis, start the reverse engineering connection. WAIT LOADED 'Wait for motion loading; the virtual axis position will be automatically adjusted at this time. ENDIF

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 on the virtual axis. The pre-edited motion trajectory moves in the Cartesian coordinate system (the virtual axes in this article are axis 6, axis 7, axis 8, and axis 9 as examples). The joint axis will automatically calculate how to coordinate the motion in the joint coordinate system.

▶▶▶

Example Demonstration

RTSys software supports mixed programming of Basic, HMI, and PLC. This example demonstrates mixed programming using Basic combined with an HMI interface. The interactive interface can be designed by dragging and dropping elements in the HMI-Toolbox menu of the RTSys software.

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, click the "Menu" button, select "Structural Parameters", enter the password, and enter. Alternatively, press the "F3" button on the 400X, enter the password, and enter. Select the corresponding robot model and configure the corresponding mechanism parameters.

3. After selecting the robot model and setting the mechanical parameters, click the "Axis Parameters" button to configure the axis parameters.

4. After setting up, click "Main Interface" to return to the main interface, click "Menu" to select "Manual Motion", or press "F6" on the 400X to bring up the manual motion interface, switch between forward and reverse solving, and operate the corresponding axis for motion.

5. Using the robot simulation tool. Open the 【ZRobotView】 software, click 【Connect】, enter the controller's IP address (default IP: 192 168.0.11), click Connect, and after successful connection, click Switch to simulate the robot's movement in 3D.

Full code download address

That concludes our discussion on the application of EtherCAT motion controllers in SCARA and palletizing robots.

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 126CM Rosie (TPE Body + Hard Silicone Head)

Height: 126cm Weight: 23kg Shoulder Width: 32cm Bust/Waist/Hip: 61/58/66cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm Anal...

Articles 2026-02-22