Share this

Introduction to EtherCAT Motion Controller Zeroing Mode

2026-04-06 01:33:02 · · #1

ZMC408CE - High-performance bus-type motion controller

The ZMC408CE 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 ZMC408CE 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.

ZMC408CE Hardware Features:

1. Supports 8-axis motion control (pulse + EtherCAT bus), with EtherCAT synchronization cycle as fast as 125µs;

2.24 general-purpose inputs, 16 general-purpose outputs, two analog AD/DA converters;

3.8 channels of 10MHz high-speed differential pulse output, with mixed interpolation for bus axis and pulse axis;

4. High-performance processor, improving processing speed, response time, and scan cycle;

5. One-dimensional/two-dimensional/three-dimensional, multi-channel vision aerial photography, high speed and high precision;

6. Position synchronization output (PSO) enables precise control of adhesive dispensing volume and laser energy during continuous trajectory machining;

7. Multi-axis synchronous control, independent control of multiple coordinate systems, etc.;

8. Linear interpolation, arbitrary spatial circular interpolation, spiral interpolation, spline interpolation, etc.;

9. Flexible application; it can be developed for PC-based applications or run independently offline.

PCIe 464M - PCIe EtherCAT Bus Motion Control Card

The PCIE464M is a PCIe-based PCI Express EtherCAT bus motion control card with multiple real-time and high-precision motion control functions.

The PCIE464M motion control card has 16 inputs and 16 outputs, allowing third-party image processing industrial PCs or PCs to realize an IPC-type machine vision motion control all-in-one machine without the need for additional configuration of IO data acquisition cards and PLCs. This simplifies the hardware architecture, saves costs, and integrates hardware and software.

PCIe 464M hardware features:

1. Optional 6-64 axis motion control, supporting EtherCAT bus/pulse/stepper servo drivers;

2. The maximum number of linkage axes can reach 16, and the minimum motion cycle is 100μs;

3. Standard configuration includes 16 inputs and 16 outputs, including 4 high-speed latch inputs, 4 high-speed PWM inputs, and 12 high-speed hardware compare outputs (PSOs).

4. Supports PWM output, 1D/2D/3D PSO hardware position comparison output, visual capture, continuous trajectory interpolation, etc.

5. Supports forward and inverse kinematics algorithms for 30+ robotic arm models, such as SCARA, Delta, UVW, 4-axis/5-axis RTCP, etc.

6. Supports power-off storage and power-off interruption, with multiple encryption layers, providing a more secure mechanism for the program;

7.8-channel single-ended pulse shaft, 4-channel single-ended encoder shaft;

8. Features one-dimensional and two-dimensional pitch compensation control for higher machining accuracy;

ECI2A18B - High-performance 10-axis motion control card

The ECI2A18B is a high-performance, cost-effective 10-axis pulse-type, modular network motion control card from Zheng Motion. It utilizes an optimized network communication protocol for real-time motion control and supports multiple communication protocols, facilitating connection and integration with other industrial control equipment. Installation and configuration are relatively convenient, making it suitable for control systems with high modularity and flexibility requirements.

The ECI2A18B control card can be expanded to a maximum of 12 pulse axes, supports 8 high-speed inputs and 4 high-speed outputs, and integrates a wealth of motion control functions, including multi-axis point-to-point motion, electronic cams, linear interpolation, circular interpolation, continuous interpolation motion, etc., to meet diverse industrial application needs.

ECI2A18B Hardware Features:

1. Supports motion control of 6 differential pulse axes + 4 single-ended pulse axes;

2. Supports one dedicated handwheel input interface;

3. The maximum output pulse frequency of the differential pulse axis is 10MHz;

4. Standard configuration includes 24+12 inputs and 16+6 outputs, supporting 4 high-speed latches, 4 high-speed PWM, and 2 high-speed hardware compare outputs (PSO) (optional support for HW2 function);

5. Supports mixed programming with RTSys and other high-level host computer programming languages;

6. Supports RTBasic multi-tasking programming;

01. Basic Concepts of Returning to Zero

High-precision automated equipment has its own reference coordinate system. The motion of the workpiece can be defined as the motion on the coordinate system. The origin of the coordinate system is the starting position of the motion. All kinds of processing data are calculated with the origin as the reference point.

Therefore, before the controller is started to execute motion commands, the device must perform a zero-return operation to return to the origin of the set reference coordinate system. If the zero-return operation is not performed, it will lead to errors in the subsequent motion trajectory.

1. The purpose of returning to zero

(1) Establish an accurate reference coordinate system: The processing data is calculated based on the origin, and returning to zero ensures that the motion trajectory is correct.

(2) Initialize position parameters: such as resetting the position value and correcting MPOS (actual position) by setting DPOS=0.

2. The Importance of Returning to Zero

Eliminate cumulative errors: Avoid long-term errors caused by mechanical transmission backlash or position drift.

The positive motion controller offers multiple zero-return modes. By setting the DATUM single-axis zero-return command, different zero-return modes can be selected for different mode values, and each axis will automatically return to zero according to the set zero-return mode.

02. Key Configurations for Returning to Zero

The DATUM command is a single-axis homing command, applied to one axis at a time; for multi-axis homing, the DATUM command needs to be used for each axis.

1. Hardware Preparation

(1) Ensure that the equipment is connected to the origin switch (a position sensor that indicates the position of the origin) and the positive and negative limit switches (both are sensors; after the sensor detects a signal, it indicates that there is an input signal, which is then transmitted to the controller for processing).

(2) Set the input ports of the origin switch and limit switch according to the equipment model and configuration.

2. Hardware signals

(1) Origin switch: The input port is set via DATUM_IN.

(2) Limit switches: Positive and negative limits are set via FWD_IN and REV_IN respectively.

(3) Signal triggering logic: ECI control card is triggered by 1 (ON state trigger), ZMC controller is triggered by 0 (OFF state trigger), and normally open signals need to use INVERT_IN inverted level.

3. Parameter Configuration

(1) Speed ​​parameters: SPEED (movement speed) and CREEP (crawling speed), CREEP

(2) Acceleration parameters: ACCEL, DECEL, FASTDEC (deceleration during emergency stop triggered by limit switch).

(3) Select the appropriate zero-return mode as needed (such as mode 1, 3, 5, etc.).

There are two ways to return the device to zero: controller return and servo parameter return.

Controller homing: This involves connecting a zero-point position sensor to the motion controller, which then searches for the sensor's position to return to zero. This article primarily introduces the homing modes provided by the controller.

Servo parameter homing: This involves connecting a zero-point sensor to a servo driver, and the controller sending commands to the servo driver, which then performs the homing operation.

03. Explanation of the zeroing command

DATUM is the zero-return command for the motion controller. The appropriate mode must be selected according to the current position of the axis or efficiency requirements. After the DATUM command is executed, the axis starts to move, searches for the origin signal, and stops automatically when the origin signal is encountered, clearing the current position to zero, and the zero-return is successful.

Syntax: DATUM (mode), DATUM(21,mode2)

mode: Origin search mode.

The mode value +10(10+n) means that after encountering the limit, the search will reverse and will not stop when it encounters the limit. For example, DATUM(13)=DATUM(3+10) is used to reverse the positive limit and return to zero. It is mostly used when the origin is in the middle.

A mode value of +100 (100+n) indicates that MPOS will be automatically cleared after a successful return to zero in mode n. This applies to ATYPE=4 and can automatically clear MPOS after connecting an encoder (limited to specific series controllers, such as DATUM(103) and DATUM(104).

The mode value +110(100+10+n) indicates that after a successful zeroing in mode 10+n, MPOS will be automatically cleared. This applies to ATYPE=4 and can automatically clear MPOS after connecting an encoder (limited to specific series controllers). For example, DATUM(113) and DATUM(114).

mode2: Effective when mode=21, default is 0. When non-zero, it is set to the drive return-to-zero mode. The value is set according to the drive manual data dictionary 6098h.

04. Detailed Explanation of Zero-Return Mode

1. Zero-return mode 1/2: mode=1/2

Taking mode 1 as an example, the axis runs in the forward direction at CREEP speed. After detecting the Z signal, it decelerates and stops. When it stops, its position is zero. At this time, the DPOS value is reset to 0. If it encounters a limit switch during the return to zero, it stops immediately.

The zero-return mode 2 moves in the opposite direction to the origin-finding mode 1. (The image below uses mode 1 as an example.)

2. Zero-return mode 3/4: mode=3/4

Taking mode 3 as an example, the axis first moves forward in the SPEED direction to find the origin switch. After encountering the origin switch, it begins to decelerate. After decelerating to 0, it moves in the CREEP direction in the reverse direction until it leaves the origin switch. After the axis stops, the DPOS value is reset to 0, and the current position is the zero point. If it encounters a limit switch during the return to zero, it stops immediately.

The zero-return mode 4 moves in the opposite direction to the origin-finding mode 3. (The image below uses mode 3 as an example.)

3. Zero-return mode 5/6: mode=5/6

Taking mode 5 as an example, the axis first moves forward in the SPEED direction to find the origin switch. After encountering the origin switch, it begins to decelerate. After decelerating to 0, it moves in the CREEP direction in the reverse direction until the Z signal is detected and it stops. After the axis stops, the DPOS value is reset to 0, and the current position is the zero point. If it encounters a limit switch during the return to zero, it stops immediately.

The zeroing mode 6 moves in the opposite direction to the origin-finding mode 5. (The image below uses mode 5 as an example.)

4. Zero-return mode 8/9: mode=8/9

Taking mode 8 as an example, the axis runs forward at SPEED speed. After hitting the origin switch, it decelerates and stops. When it stops, its position is zero. At this time, the DPOS value is reset to 0. If it hits the limit switch during the return to zero, it stops immediately.

The zeroing mode 9 moves in the opposite direction to the origin-finding mode 8. (The image below uses mode 8 as an example.)

5. Zero-return mode 13: mode=13

The axis first runs in the forward direction at SPEED. If it encounters a limit switch, it will not alarm or stop. Instead, it will run in the reverse direction at SPEED. After encountering the origin switch, it will decelerate to CREEP until it leaves the origin switch and stops immediately. The return to zero is successful, and the position is cleared.

If the origin signal is encountered first, it is the same as in mode 3.

05. Example of returning to zero

1. Zero-return mode 3: mode=3

Example 1 code is as follows:

·

'Basic Settings BASE(0) 'Select Axis 0 DPOS = 0 'Reset Axis Command Position MPOS = 0 'Reset Encoder Feedback Position ATYPE = 1 'Set Axis Type (e.g., Pulse Axis) SPEED = 100 'Set Motion Speed ​​(Units/s) CREEP = 10 'Set Crawling Speed ​​(Units/s) DATUM_IN = 5 'Set Origin Input Port (Assuming IN5) INVERT_IN(5, ON) 'Reverse Origin Signal Level (Normally Open Sensor) TRIGGER 'Automatically Trigger Oscilloscope' Zeroing Flag DIM home_done 'Zeroing Status: 0 - Zeroing Not Started 1 - Zeroing in Progress 2 - Zeroing Complete home_done = 0 'Initialize Zeroing Complete Flag' Execute Zeroing Operation WHILE 1 IF home_done = 0 THEN DATUM(3) 'Execute Mode 3 Zeroing AXIS_STOPREASON = 0 home_done = 1 ENDIF IF home_done = 1 AND IDLE(0) THEN IF AXIS_STOPREASON = 0 THEN home_done = 2 'Successfully returned to zero, set flag PRINT "Successfully returned to zero, current position:" DPOS(0) EXIT WHILE ENDIF ENDIFWEND

The axis status AXISSTATUS shows 40h, indicating that it is searching for the origin. It returns to 0h after successfully returning to zero.

The running result is shown in the following image:

Axis 0 moves forward at a speed of SPEED=100 until it encounters the origin switch signal IN(5), and then moves backward at a speed of CREEP=10 until it stops when it leaves the position of the origin switch again. At this time, the return to zero is completed, and the axis's DPOS is automatically set to 0. If it encounters a limit switch in the middle, the axis stops immediately.

2. Zero-return mode 13: mode=13

Example 2 code is as follows:

·

'Basic Settings BASE(0)' Select Axis 0 DPOS = 0' Reset Axis Command Position MPOS = 0' Reset Encoder Feedback Position ATYPE = 1' Set Axis Type (e.g., Pulse Axis) SPEED = 100' Set Motion Speed ​​(units/s) CREEP = 10' Set Crawling Speed ​​(units/s) DATUM_IN = 5' Set Origin Input Port (assuming IN5) FWD_IN=6' Set Positive Limit Input Port (assuming IN6) INVERT_IN(5, ON)' Reverse Origin Signal Level (Normally Open Sensor) INVERT_IN(6, ON)' Reverse Positive Limit Signal Level (Normally Open Sensor) TRIGGER' Auto Trigger Oscilloscope' Zero Return Flag DIM home_done' Zero Return Status: 0 - Zero Return Not Started 1 - Zero Return in Progress 2 - Zero Return Complete home_done = 0' Initialize the zeroing completion flag ' Execute the zeroing operation WHILE 1 IF home_done = 0 THEN DATUM(13) ' Execute mode 13 zeroing AXIS_STOPREASON = 0 home_done = 1 ENDIF IF home_done = 1 AND IDLE(0) THEN IF AXIS_STOPREASON = 0 THEN home_done = 2 ' Zeroing successful, set the flag PRINT "Zeroing successful, current position:" DPOS(0) EXIT WHILE ENDIF ENDIFWEND

The AXISSTATUS status reading 50h indicates that a positive hard limit was encountered and the search for the origin was underway. The reading returned to zero successfully and then changed to 0h.

The running result is shown in the following image:

Axis 0 runs forward at a speed of SPEED=100. When it encounters the forward limit switch IN(6), it starts to reverse to find the origin switch signal until it encounters the origin switch signal IN(5). Then it moves in the reverse direction at a speed of CREEP=10 until it leaves the position of the origin switch again and stops. At this time, the zero return is completed and the axis's DPOS is automatically set to 0.

That concludes our introduction to the zero-mode of the EtherCAT motion controller.

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 Q 92CM Body with TPE Material

Height: 92cm Weight: 13kg Shoulder Width: 25cm Bust/Waist/Hip: 47/47/56cm Oral Depth: 3-5cm Vaginal Depth: 3-13cm Anal ...

Articles 2026-02-22