Share this

EtherCAT Ultra-High-Speed ​​Real-Time Motion Control Card XPCIE1032H Host Computer C# Development (Part 1): Driver Installation and Connection Establishment

2026-04-06 04:51:58 · · #1

XPCIE1032H Functionality Overview

The XPCIE1032H is a PCI Express-based EtherCAT bus motion control card, offering optional 6-64 axis motion control and supporting multiple high-speed digital inputs and outputs. It easily achieves multi-axis synchronous control and high-speed data transmission. The XPCIE1032H integrates powerful motion control functions, combined with the MotionRT7 real-time motion control soft core, solving the pain point of non-real-time development in high-speed, high-precision applications using PC Windows. Its command interaction speed is 10 times faster than traditional PCI/PCIe.

The XPCIE1032H supports PWM and PSO functions, and features 16 inputs and 16 outputs of general-purpose I/O ports. All output ports are high-speed outputs, configurable as either 4 PWM outputs or 16 high-speed PSO hardware compare outputs. The input ports include 8 high-speed inputs, configurable as either 4 high-speed color mark latches or 2 encoder inputs.

The XPCIE1032H is equipped with the MotionRT7 real-time kernel and uses the local LOCAL interface for connection. Through high-speed intra-kernel interaction, it can achieve faster instruction interaction, with the interaction time for a single instruction or multiple instructions reaching about 3-5us.

The combination of XPCIE1032H and the MotionRT7 real-time kernel offers the following advantages:

1. Supports development using multiple host computer languages; all product series can call the same API function library.

2. Utilizing intra-core interaction, motion commands can be invoked rapidly, with response times down to the microsecond level, 10 times faster than traditional PCI/PCIe;

3. Solves the problem of non-real-time performance of traditional PCI/PCIe motion control cards in Windows environments;

4. Supports 1D/2D/3D PSO (high-speed hardware position comparison output), suitable for applications such as vision-based aerial photography, precision dispensing, and laser energy control;

5. Provides a high-speed input interface for easy position latching;

6. Supports hybrid linkage and hybrid interpolation of EtherCAT bus and pulse output.

➜ When developing projects using XPCIE1032H and MotionRT7, the following steps are typically required:

1. Install and sign the driver to recognize the XPCIE1032H;

2. Open and execute the file "MotionRT710.exe" to configure parameters and run the real-time motion control kernel;

3. Connect to the controller using ZDevelop software for parameter monitoring. Please use the PCI/LOCAL connection method and ensure that the ZDevelop software version is 3.10 or higher.

4. Complete the development of the control program and connect it to the motion control card via a local link to achieve real-time motion control.

➜ Comparison of test data results with traditional PCI/PCIe cards and PLCs:

The test results show that the XPCIE1032H motion control card, paired with the MotionRT7 real-time motion control kernel, exhibits very stable command interaction efficiency in LOCAL linking (internal kernel interaction). Even when the number of tests increased from 10,000 to 100,000, the interaction time for single and multiple commands remained relatively stable, making it highly suitable for high-speed, high-precision applications. XPCIE1032H card installation.

§ Turn off the computer power.

§ Open the computer case, select an unused XPC I/O slot, and use a screwdriver to remove the corresponding baffle strip.

Insert the motion control card into the slot and tighten the fixing screws on the baffle strip.

Remove one of the baffle strips adjacent to the slot and use screws to fix the adapter plate to the slot in the chassis.

First, to install the driver, you need to download the "MotionRT7 Motion Control Real-Time Kernel" installation package from the Zmotion Technology website. Then, ensure the PCIe card is properly installed in the industrial PC's PCIe slot, with no obvious looseness or warping. Download address: http://www.zmotion.com.cn/download_list_4.html

Method 1: Use the installation wizard software dpinst_amd64.exe included in the driver directory to automatically install. Follow the software guide for specific instructions.

Method 2: Manual installation. 1. Open the "Device Manager" menu and select "PCI devices" under "Other devices".

2. If multiple PCI devices exist, right-click "Properties" to view details, select "Hardware ID" in the properties, and confirm that it is a PCI device starting with PCI\VEN_EF34&DEV_1000&.

3. Right-click and select "Update driver".

4. Select "Manual Browse" to find the driver.

5. Click Browse and select the driver folder.

6. Click Next.

7. Wait for the installation to complete, then click Close.

8. If ZMotionRT Controller appears in Device Manager, the installation is successful.

II. Establishing a Connection 1. Run the console program

(1) Open the location of the console program and run the executable file "MotionRt710.exe".

(2) Click “Start”.

(3) Save the XPCIE card configuration. a. First, click the [Stop] button to close the MontageRT7 console, then click UpdateCard to update the card information.

b. Click "-->" to save the current configuration to the history configuration so that you can use it directly next time you open it.

c. After saving, click OK.

2. Create a new C# project (VS2022)

3. Go to the download center on the official Zmotion website and select the required platform library file. Download address: http://www.zmotion.com.cn/download_list_21.html

4. Unzip the downloaded installation package and locate "Zmcaux.cs", "zauxdll.dll", and "zmotion.dll" and place them in your project file.

(1) Place “Zmcaux.cs” in the project root directory file, at the same level as the bin directory.

(2) "zauxdll.dll", "zmotion.dll" are placed in bin → Debug.

5. Open the newly created project file in Visual Studio. In the Solution Explorer on the right, click "Show All," then right-click the zmcaux.cs file and click "Include in Project."

6. Double-click Form1 in Form1.cs to open the code editing interface. At the beginning of the file, write `using cszmcaux` and declare the controller handle `g_handle`.

7. Introduction to relevant PC functions

In the form design interface, find the controls you need and drag them onto the form to design the UI interface. The result is as follows.

8. Related Procedures

(1) Link the controller through the message response function of the link button in the LOCAL link mode.

·

private void button4_Click(object sender, EventArgs e){ // Connect via LOCAL mode int ret = zmcaux.ZAux_FastOpen(5, "LOCAL", 1000, out g_handle); if (ret == 0) { label2.Text = "Connected"; label2.BackColor = Color.Green; MessageBox.Show("Controller connected successfully!", "Prompt"); } else { MessageBox.Show("Connection failed, please select the correct LOCAL!"); }}

(2) Calculate the interaction cycle and total time of a single instruction by using the event handling function of the test button for the single instruction interaction cycle.

·

private void SingleRun(object sender, EventArgs e){ float dpos = 0; DateTime beforeDT = System.DateTime.Now; for (int i = 0; i <10000; i++) { zmcaux.ZAux_Direct_GetDpos(g_handle, 0, ref dpos); } DateTime afterDT = System.DateTime.Now; TimeSpan ts = afterDT - beforeDT; label14.Text = (ts.TotalMilliseconds).ToString(); label2.Text = ((ts.TotalMilliseconds * 1000) / 10000).ToString(); label16.Text = dpos.ToString();}

(3) Calculate the interaction cycle and total time of multiple instructions by using the event handling function of the test button with multiple instruction interaction cycles.

·

private void MuchRun(object sender, EventArgs e){ int[] status = { 0, 0, 0, 0 }; float[] dpos = { 0, 0, 0, 0 }; uint[] num = { 0, 0, 0, 0 }; string cmd; int star = 0; StringBuilder cmdBuff = new StringBuilder(2048); string[] tmp = new string[12]; cmd = "?dpos(0),dpos(1),dpos(2),dpos(3),axisstatus(0),axisstatus(1),axisstatus(2),axisstatus(3),in(0),in(1),in(2),in(3)"; DateTime beforeDT = System.DateTime.Now; for (int i = 0; i < 10000; i++) { zmcaux.ZAux_DirectCommand(g_handle, cmd, cmdBuff, 2048); } DateTime afterDT = System.DateTime.Now; TimeSpan ts = afterDT - beforeDT; label23.Text = (ts.TotalMilliseconds).ToString(); label16.Text = ((ts.TotalMilliseconds * 1000) / 10000).ToString(); string s = cmdBuff.ToString(); string[] arrS = new string[20]; for (int i = 0; i < s.Length; i++) { if (s[i] != 9) { arrS[star] += s[i]; } else { star++; continue; } } label24.Text = arrS[0]; label25.Text = arrS[1]; label26.Text = arrS[2]; label27.Text = arrS[3]; label28.Text = arrS[4]; label30.Text = arrS[5]; label32.Text = arrS[6]; label34.Text = arrS[7]; if (Convert.ToInt32(arrS[8]) == 0) { label29.BackColor = Color.Red; label29.Text = "Signal not touched"; } else { label29.BackColor = Color.Green; label29.Text = "Signal touched"; } if (Convert.ToInt32(arrS[9]) == 0) { label31.BackColor = Color.Red; label31.Text = "Signal not touched"; } else { label31.BackColor = Color.Green; label31.Text = "Signal touched"; } if (Convert.ToInt32(arrS[10]) == 0) { label33.BackColor = Color.Red; label33.Text = "Signal not touched"; } else { label33.BackColor = Color.Green; label33.Text = "Signal triggered"; } if (Convert.ToInt32(arrS[11]) == 0) { label35.BackColor = Color.Red; label35.Text = "Signal not triggered"; } else { label35.BackColor = Color.Green; label35.Text = "Signal triggered"; }}

(4) Disconnect the controller by using the message response function of the disconnect button.

·

private void button1_Click(object sender, EventArgs e){ zmcaux.ZAux_Close(g_handle); g_handle = (IntPtr)0; label2.Text = "Not connected"; label2.BackColor = Color.Red;}

9. Running effect

Full code download address

This concludes our presentation on the development of the EtherCAT XPCIE1032H ultra-high-speed real-time motion control card in C# (Part 1): Driver installation and connection establishment.

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 146CM Sasha TPE (Customer Photos)

Height: 146cm A-cup Weight: 26kg Shoulder Width: 32cm Bust/Waist/Hip: 64/54/74cm Oral Depth: 3-5cm Vaginal Depth: 3-15c...

Articles 2026-02-22