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;
The Java development environment used in this example is:
1. Operating System Environment: Win11 64-bit
2. Java version: Oracle OpenJDK 22.0.2
3. IntelliJ IDEA version: IntelliJ IDEA 2024.1.2
Java Development Process
1. New project
Open IntelliJ IDEA 2024.1.2, create a new project, select Spring Boot as the generator, Java as the language, Maven as the type, select the JDK version (JDK22.0.2 here), and select the Java version (17 here).
2. Configure Build
Configure the build, add the application under main, run the program once, and if there are no problems, proceed to the next step.
3. Create an interface
(1) Develop according to the standard and create the interface ZmotionDao in the current package path.
(2) The ZmotionDao interface inherits from StdCallLibrary and adds the corresponding Maven dependency.
4. Import DLL library
Add the positive motion DLL library function file to the resource path.
5. Interface Instance
Load the DLL "zauxdll.dll" using the Native.load method, create an instance of the ZMotionDao interface INSTANCE, and declare the PC functions to be called. The PC functions can be found in the ZMotion PC function library programming manual.
6. Data types
The data types corresponding to JNA in the C language in the function declaration need to be modified. The PC function prototypes can be found in the ZMotion PC function library programming manual. For example, in the function ZAux_OpenEth(char * ipaddr, ZMC_HANDLE*phandle) to open the network port connection, replace char * with String, and replace void** corresponding to ZMC_HANDLE* with PointerByReference.
Simple Application
1. Handle initialization
PC functions all require a parameter handle, and ZMC_HANDLE is actually wrapped as void*, so the parameter type is void**. According to the data type conversion table above, void** requires a PointerByReference object intptr to be created using PointerByReference(). That is, once the handle is initialized, intptr can be passed to the function.
2. Network port connection
Open the network port connection, enter the controller's IP address as the function parameter (here, the controller's IP address is 192.168.0.11), and note that the network segment of the computer's IP address and the controller's network segment must be consistent (i.e., the computer's IP address is set to 192.168.0.XX). Check the print result return value X1. If it is 0, the controller connection is successful.
3. Set axis parameters
The first parameter of this function is wrapped in data type ZMC_HANDLE, which is void*. The previously initialized double pointer object (in this case, intptr) is of data type void**. You need to call the intptr.getValue() method to get the first pointer before you can pass it to the function. Otherwise, the parameter cannot be set successfully. Check the printed result X to verify whether the controller parameter has been set successfully.
4. Printing Results
Check the printed result X to verify whether the controller parameters have been set successfully. A result of 0 indicates that the setting was successful.
5. Simple axis motion
Axis 0 continues to move in the positive direction.
6. Handling pointer type parameters
Note that the third parameter of the function to get the position is a first-level pointer type, and an array is needed here to receive the data returned by the function.
At this point, the first element of the array, dpos[0], corresponds to the position of axis 0. The program continuously obtains the position of axis 0 in an infinite loop until DPOS is 100, at which point the movement stops and the controller connection is closed.
The pentagram trajectory code is as follows:
(1) Variable definition.
int[] piAxislist = {0,1}; // List of motion axes int a = 30; // Side length of the pentagram int[] status_x = {0}; // Motion status of the x-axis int[] status_y = {0}; // Motion status of the y-axis float[][] pfDisancelists = new float[11][2]; // Initialize the list of motion distances int[] GetValue = {0}; // Current remaining buffer count
(2) Use a two-dimensional array to store the position of the pentagram trajectory.
float[][] pfDisancelists = new float[11][2]; // Initialize the motion distance list pfDisancelists[0] = new float[]{0, (float) (a * Math.cos(0.1 * Math.PI))}; pfDisancelists[1] = new float[]{(float) (a * Math.sin(0.1 * Math.PI)), 0}; pfDisancelists[2] = new float[]{(float) (a + a * Math.sin(0.1 * Math.PI)), 0}; pfDisancelists[3] = new float[]{(float) (a * Math.sin(0.1 * Math.PI) + a * Math.sin(0.2 * Math.PI) * Math.tan(0.1 * Math.PI)), (float) (-a * Math.sin(0.2 * Math.PI))}; pfDisancelists[4] = new float[]{(float) (a * Math.cos(0.2 * Math.PI)), (float) (-(a + a * Math.sin(0.1 * Math.PI)) * Math.tan(0.2 * Math.PI) - a * Math.sin(0.2 * Math.PI))}; pfDisancelists[5] = new float[]{0, (float) (-(a + a * Math.sin(0.1 * Math.PI)) * Math.tan(0.2 * Math.PI))}; pfDisancelists[6] = new float[]{(float) (-a * Math.cos(0.2 * Math.PI)), (float) (-(a + a * Math.sin(0.1 * Math.PI)) * Math.tan(0.2 * Math.PI) - a * Math.sin(0.2 * Math.PI))}; pfDisancelists[7] = new float[]{(float) (-a * Math.sin(0.1 * Math.PI) - a * Math.sin(0.2 * Math.PI) * Math.tan(0.1 * Math.PI)), (float) (-a * Math.sin(0.2 * Math.PI))}; pfDisancelists[8] = new float[]{(float) (-a - a * Math.sin(0.1 * Math.PI)), 0}; pfDisancelists[9] = new float[]{(float) (-a * Math.sin(0.1 * Math.PI)), 0}; pfDisancelists[10] = new float[]{0, (float) (a * Math.cos(0.1 * Math.PI))};
(3) Move according to the pentagram trajectory points using the function ZAux_Direct_MoveAbs.
// Loop through the motion function for (float[] pfDisancelist : pfDisancelists) { ZMotionDao.INSTANCE.ZAux_Direct_GetRemain_Buffer( intptr.getValue(), 0, GetValue); // Get the remaining buffer count for axis 0 System.out.printf("Current remaining buffer count is %d\n", GetValue[0]); if (GetValue[0]>0) { ZMotionDao.INSTANCE.ZAux_Direct_MoveAbs(intptr.getValue(), 2, piAxislist, pfDisancelist); }}
(4) Use the status_x[0] and status_y[0] obtained by the function ZAux_Direct_GetIfIdle to determine whether the motion has ended.
// Check if the motion has ended do { ZMotionDao.INSTANCE.ZAux_Direct_GetIfIdle(intptr.getValue(), 0, status_x); ZMotionDao.INSTANCE.ZAux_Direct_GetIfIdle(intptr.getValue(), 0, status_y);} while (status_x[0] != -1 || status_y[0] != -1);
RTSys oscilloscope monitoring trajectory
RTSys is a development software launched by Zheng Motion that integrates motion control and machine vision functions. First, use the RTSys software to connect to the controller. The default IP of the controller is 192.168.0.11. Monitor whether the parameter settings in the axis parameter window are successful. Open the oscilloscope and observe whether the trajectory is correct.
It has been synced to "Watch and Leave a Comment"
Full video details and code download address
▼
This concludes our tutorial on Java application development for the EtherCAT motion control card.
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.