Share this

Motion control and real-time data acquisition using EtherCAT motion controller in LabVIEW

2026-04-06 03:12:53 · · #1

This article takes the EtherCAT motion controller ZMC408CE as an example to introduce how to use LabVIEW to acquire controller parameters and generate oscilloscope waveforms.

01 ZMC408CE Hardware Introduction 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 8-axis motion control, expandable to a maximum of 32 axes, and supports linear interpolation, arbitrary circular interpolation, spatial circular interpolation, helical interpolation, electronic cams, electronic gears, synchronous following, and other functions. The ZMC408CE supports three programming methods: PLC, Basic, and HMI configuration. PC API programming supports interfaces such as C#, C++, LabVIEW, Matlab, Qt, Linux, VB.Net, and Python.

The ZMC408CE supports 8-axis motion control and can use pulse axes (with encoder feedback) or EtherCAT bus axes. The general-purpose I/O includes 24 input ports and 16 output ports. Some I/O are high-speed I/O, with two analog AD/DA channels and an EtherCAT refresh cycle of up to 125us.

The ZMC408CE supports 8 channels of hardware compare output, hardware timer, precise output during motion, and also supports 8 channels of PWM output, with corresponding output ports OUT0-7, supporting simultaneous triggering of hardware compare output on all 8 channels.

02. Motion Control Development using LabVIEW

1. Create a LabVIEW project.

2. Download the LabVIEW Vi function library "zauxdll" folder from the "CD-ROM data" to your computer, and then copy it to the LabVIEW/user.lib folder under the LabVIEW installation path.

Zauxdll function library path

Paste the path to the Zauxdll function library.

3. Introduction to relevant PC functions.

The PC function manual is also included in the CD-ROM materials. The specific path is as follows: "CD-ROM materials\8.PC functions\function library 2.1\ZMotion function library programming manual V2.1.pdf".

(1) Description of the ZAux_OpenEth() interface.

(2) Obtain the contents of the table register and import it into the oscilloscope data source.

(3) Obtain the planned location.

(4) Obtain feedback speed.

(5) Obtain the planning speed.

(6) Obtain the feedback location.

(7) Electronic cam motion.

4. Data acquisition for motion control using LabVIEW.

(1) Create a new Vi. On the front panel, right-click the mouse and select controls to design the UI. As shown in the figure, the left side is the connection interface and the acquisition of points, data sources, etc., and the right side is the location of the oscilloscope graphic planning.

(2) In the program editing box, use the mouse to add a "While loop" in the added frame, and add an "Event structure" in the "While loop". Right-click and select Add Event Branch, select the "Timeout" event, get the number of sampling points of the current data source, and import the data source data into the oscilloscope and display it as a waveform.

(3) Select the event structure, right-click and select Add Event Branch. In the loop structure, when the handle is empty, the controller with the current IP will be automatically obtained. Then, the "Z Aux Open Eth.vi" function is used in the event branch to connect to the controller to realize the function of connecting the controller button.

(4) Select the event structure, right-click and select Add Event Branch, select the "Disconnect" value to change, and then use the "Z Aux Close.vi" function in the event branch to disconnect the controller to realize the function of the disconnect button.

(5) Select the event structure, right-click and select Add Event Branch, select the "Trigger" value to change, and then use the "Z Aux Trigger.vi" function in the event branch to trigger the oscilloscope capture, so as to realize the trigger instruction capture data source and store the data in the table register.

(6) Select the event structure, right-click and select Add Event Branch, select Start Acquisition and change the value, and then use the "Z Aux Execute.vi" function to call the instruction SCOPE to start and acquire data from the data source and store it in the table register.

(7) Select the event structure, right-click to select the event, select "XY plot:" the mouse changes, and then read the coordinate position of the mouse in the corresponding range of the XY oscilloscope and XY2 oscilloscope in real time in this event branch and display it on the interface.

(8) Select condition structure. When the sine motion button is pressed, the two-stage trigger sine motion uses the tiling sequence structure to execute the two electronic cam motion instructions in sequence. The “Z Aux Cam.vi” function is used to perform the corresponding electronic cam motion according to the data pre-loaded in the table register.

03. Debugging and monitoring the compiled and running routines, connecting to ZDevelop software, and using a single-axis small routine to move a sine wave trajectory, capturing the waveform for comparison with the LabVIEW oscilloscope waveform and the ZDevelop software waveform. 1. The algorithm instructions for generating sine wave data are as follows.

·

DIM num_p,scale,m,t 'Variable definition num_p=100 scale=500 FOR p=0 TO num_p TABLE(p,((-SIN(PI*2*p/num_p)/(PI*2))+p/num_p)*scale) 'table stores cam table motion parameters NEXT

2. The waveform of the ZDevelop software oscilloscope is shown in the figure below.

3. LabVIEW oscilloscope waveform: The oscilloscope data source is DPOS data content, which is consistent with the DPOS waveform of the ZDevelop software oscilloscope.

4. LabVIEW oscilloscope waveform: The oscilloscope data source is VP_Speed ​​data, which is consistent with the VP_speed waveform of the ZDevelop software oscilloscope.

That concludes our presentation on motion control and real-time data acquisition using the EtherCAT motion controller in LabVIEW.

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 130CM Nanako (Customer Photos)

Height: 130cm Weight: 27kg Shoulder Width: 31cm Bust/Waist/Hip: 64/60/72cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm Anal...

Articles 2026-02-22
CATDOLL Laura Hard Silicone Head

CATDOLL Laura Hard Silicone Head

Articles
2026-02-22
CATDOLL 138CM Ya TPE

CATDOLL 138CM Ya TPE

Articles
2026-02-22