Share this

Windows Real-Time Motion Control Soft Core (Part 5): High-Speed ​​Local Interface Testing with VC6.0

2026-04-06 04:48:23 · · #1

Today, Zheng Sports Assistant will share with you the installation and use of MotionRT7, as well as the preliminary preparations for developing MotionRT7 using VC6.0.

01

MotionRT7 Introduction

MotionRT7 is a cross-platform real-time motion control kernel launched by Shenzhen Zheng Motion Technology Co., Ltd. It is also the first domestically developed and controllable Windows motion control real-time soft kernel.

1. MotionRT7 has the following features

(1) Standalone software installation, suitable for various Windows computers; green and installation-free, quick experience; uses hardware-bound operating license authorization (can be tried even without authorization); can be easily configured, started, connected, simulated, etc.

(2) It is compatible with other versions of MotionRT. Once developed, it can be quickly switched to various platforms such as embedded systems and Linux.

(3) Unified function library interface, fast local LOCAL interface, motion function calls are as fast as microseconds, which is dozens of times faster than ordinary PCI cards.

(4) Integrate machine vision to quickly build various motion control + machine vision real-time applications.

(5) Powerful multi-card function, up to 240 axes linkage, supports cross-card linkage, pulse and bus linkage, galvanometer and platform linkage, and easily realizes advanced functions such as position latch/PSO.

2. MotionRT, a real-time motion control kernel that continuously iterates.

MotionRT is a real-time motion control kernel that has been continuously built and developed by positive motion technology. It has been iterated for 7 generations, from MotionRT1 to MotionRT7.

3. MotionRT7 adopts a modular software architecture.

The motion control program, vision algorithms, and MotionRT7 motion control engine interact with each other via high shared memory, significantly improving the efficiency of motion control and machine vision interaction. User-defined functions integrate algorithms such as Gmc, Gear/Cam, Frame, Robotics, and CNC to create customized control systems for individual users. 4. Unified and open API functions.

A unified and comprehensive SDK library, a single set of API interfaces for all third-party development environments, and a cross-platform product architecture improve efficiency and maintain compatibility.

5. Simple and easy-to-use motion control features

a. Point-to-point motion, linear interpolation, circular interpolation, helical interpolation, and continuous trajectory machining;

b. Electronic cam, electronic gear, synchronous following, position latching, virtual axis overlay;

cS curve acceleration/deceleration, SS curve acceleration/deceleration, resulting in smoother trajectory motion;

d. 1D/2D/3D high-speed position synchronous output PSO, fully meeting the needs of vision-based imaging, high-speed dispensing, and laser processing;

e. Customers can customize motion control algorithms or robot forward and inverse kinematics algorithms;

f. Facilitates collaboration with third-party visual design firms.

6. Open EtherCAT and configuration/debugging tools

ZDevelop offers open and easy-to-use tools for configuration, development, debugging, and diagnostics. ZDevelop is not only free and green software, but also includes tools for axis debugging, axis status monitoring, and oscilloscope functionality.

MotionRT7 widely supports the EtherCAT bus, including widely used and easy-to-use EtherCAT servos, EtherCAT steppers, EtherCAT IO, EtherCAT valve islands, and EtherCAT sensors.

Our company will continue to improve the EtherCAT configuration tools and strive to make the best motion control solution.

02

Installation and use of MotionRT7

Step 1: Install the driver

1. Open "Device Manager", select "Action" and then "Add legacy hardware", then select "Manual selection".

2. Click "Next".

3. Click "Install from disk".

4. Click the "Browse" button to select the path where the driver is located, open the folder "driver_signed", and select "ZMotionRt64.inf".

5. Keep clicking Next until the installation is complete.

Note: When updating drivers, you must remove the device from Device Manager, and be sure to delete the driver files as well. 6. MotionRT7 driver installation video demonstration.

Step 2: Run the console application

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

2. Click “Start”.

Step 3: Use ZDevelop software to connect to the controller and monitor parameters.

ZDevelop Link Controller, software version 3.10 and above, uses PCI/LOCAL connection method.

Step 4: Extend the network port to support EtherCAT master protocol

1. Check network connections.

2. Select the network adapter to be used for EtherCAT, right-click and select Properties, then install the protocol.

3. Click Install from disk, select the path of the drive, open the folder "driver_signed", and select "MotionRtPacket.inf".

4. After successful installation, confirm that ZMotionRT64 Packet Protocol Driver is selected.

In the RT console program, select AddEcat. You will then see the corresponding network card. Select it and start RT.

5. MotionRT7 EtherCAT protocol installation video demonstration.

The EtherCAT network card integrated with the PC has a certain level of real-time performance. To improve EtherCAT performance, other protocols on the network port need to be removed. For further improvements in real-time performance, please use the dedicated EtherCAT motion control card XPCIE1032 from MotionRT. For more information on MotionRT7 parameter settings and related issues, please refer to the "MotionRT7 Manual".

For related information, please visit the official website of Zheng Motion Technology, www.zmotion.com.cn, or contact relevant personnel at Zheng Motion.

03

Developing the MotionRT7 project using VC6.0

1. Open VC++ 6.0 and create a new project.

2. Select "MFC APPWizard(exe)", choose the project save path, set the project name, and click OK.

3. In the Application Type dialog box, select Basic to complete the project creation.

4. Copy the dynamic link libraries “zmotion.dll” and “zauxdll.dll”, the header file “zauxdll2.h”, and the lib file “zauxdll.lib” from the “..\function library\dll” folder on the product's accompanying CD to the project folder.

5. Select the "Settings…" menu item under the "Project" menu. Switch to the "Link" tab, and enter the lib file name: zauxdll.lib in the "Object\library modules" field.

6. Add the declaration of the function library header file to the application file, such as: #include “zauxdll2.h”, and define a link handle for a controller.

Now, users can call any function in the function library in VC6.0 to write applications. For specific usage and functions, please refer to the ZMotion PC Function Library Programming Manual in the CD-ROM.

(1) Introduction to relevant PC functions

Note: When connecting to MotionRT7 using IP mode, the value of the Eth num configuration item in motionRT710 should be set to a number greater than 0 (1-12). The IP address entered is the local machine IP address, which can be viewed directly in ZDevelop.

(2) Related code ① Connect the controller via the message response function of the link button in the IP link method (IP link method).

·

·

// IP connection method to connect controller void CVcRunSpdDlg::OnButton1() { CString str; GetDlgItem(IDC_EDIT1)->GetWindowText(str); std::string ip = str.GetBuffer(100); if (!ZAux_OpenEth(&ip[0],&handle)) { MessageBox("MotionRT7 connection successful!"); } else { MessageBox("MotionRT7 connection failed!"); }}

② Link the controller using the message response function of the link button in the LOCAL linking method.

·

·

//Local link method link controller void CVcRunSpdDlg::OnButton3() { CString s; GetDlgItem(IDC_EDIT2)->GetWindowText(s); std::string str = s.GetBuffer(100); if (!ZAux_FastOpen(5, &str[0], 1000, &handle)) { MessageBox("MotionRT7 link successful!"); } else { MessageBox("MotionRT7 link failed!"); }}

③ Disconnect the controller by using the message response function of the disconnect button.

·

·

// Disconnect the host computer from the controller void CVcRunSpdDlg::OnButton2() { ZAux_Close(handle); MessageBox("Disconnected!");}

④ Test the cycle of a single instruction interaction using the test button for the single instruction interaction cycle.

·

·

void CVcRunSpdDlg::OnButton5() { clock_t start,end; CString s; std::string S; float dpos; double tme; GetDlgItem(IDC_EDIT3)->GetWindowText(s); getdlgitem(idc_edit4)-="" s.format(_t(?%lf?),tme);="" 1000;="" *="" ans="ans" start)="" tme="(double)(end-" end="clock();//End of timer" }="" &dpos);="" 0,="" zaux_direct_getdpos(handle,="" {="" i++)="" <="ans;" i="1;" for="" start="clock();//Start timing">SetWindowText(s); tme = (double)(end - start); s.Format(_T("%lf"),tme); GetDlgItem(IDC_EDIT5)->SetWindowText(s); s.Format(_T("%lf"),dpos); GetDlgItem(IDC_EDIT6)->SetWindowText(s);}

⑤ Test the cycle of multiple command interactions using the test button for multiple command interaction cycles.

·

·

void CVcRunSpdDlg::OnButton6() { clock_t start,end; CString s; std::string S; int i,ans=0; char get[255]; float data[12] = { 0 }; double tme; std::string 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)"; GetDlgItem(IDC_EDIT3)->GetWindowText(s); S = s.GetBuffer(100); for(i=0;i<s.size();i++) s.format(_t(?%lf?),tme);="" 1000;="" *="" ans="ans" start)="" tme="(double)(end-" end="clock();//Timer ends" }="" {="" i++)="" <="ans;" i="1;" for="" start="clock();//Timer starts" -="">SetWindowText(s); tme = (double)(end - start); s.Format(_T("%lf"),tme); GetDlgItem(IDC_EDIT8)->SetWindowText(s); ZAux_TransStringtoFloat(&get[0], 12, data); s.Format(_T("%f"),data[0]); GetDlgItem(IDC_EDIT9)->SetWindowText(s); s.Format(_T("%f"),data[1]); GetDlgItem(IDC_EDIT10)->SetWindowText(s); s.Format(_T("%f"),data[2]); GetDlgItem(IDC_EDIT11)->SetWindowText(s); s.Format(_T("%f"),data[3]); GetDlgItem(IDC_EDIT12)->SetWindowText(s); s.Format(_T("%f"),data[4]); GetDlgItem(IDC_EDIT13)->SetWindowText(s); s.Format(_T("%f"),data[5]); GetDlgItem(IDC_EDIT14)->SetWindowText(s); s.Format(_T("%f"),data[6]); GetDlgItem(IDC_EDIT15)->SetWindowText(s); s.Format(_T("%f"),data[7]); GetDlgItem(IDC_EDIT16)->SetWindowText(s); s.Format(_T("%f"),data[8]); GetDlgItem(IDC_EDIT17)->SetWindowText(s); s.Format(_T("%f"),data[9]); GetDlgItem(IDC_EDIT18)->SetWindowText(s); s.Format(_T("%f"),data[10]); GetDlgItem(IDC_EDIT19)->SetWindowText(s); s.Format(_T("%f"),data[11]); GetDlgItem(IDC_EDIT20)->SetWindowText(s);}

(3) Running effect

IP connection method testing (10,000 times)

Testing of LOCAL linking methods (10,000 times)

IP connection method testing (100,000 times)

Testing of LOCAL linking methods (100,000 times)

04

Analysis and Conclusion

The above are the command interaction tests for connecting MotionRT7 via IP and LOCAL. The data from the above screenshots shows that when performing 10,000 single-command interactions and 100,000 multi-command interactions, the LOCAL connection method is faster than the IP connection method (average time of approximately 5.8us and 5.3us for single-command interaction, and approximately 6.7us and 6.9us for multi-command interaction, respectively) in both cases.

Secondly, we can see from the results that MotionRT7's command interaction efficiency is very stable in the LOCAL linking mode. When the number of tests increased from 10,000 to 100,000, the interaction time for a single command and the interaction time for multiple commands did not fluctuate much, which will greatly ensure the stability of the process operation.

The emergence of MotionRT7 is definitely a major surprise and upgrade. It provides us with better efficiency and stability in the process of large-scale command interaction, creating higher efficiency and more value for production! For related functions, please refer to the "ZMotion PC Function Library Programming Manual".

Code download address

This concludes our presentation on the Windows Real-Time Motion Control Soft Core (Part 5): High-Speed ​​LOCAL Interface Testing with VC6.0.

For more exciting content, please follow the "Zheng Motion Assistant" WeChat official account. For related development environment and example code, please contact Zheng Motion Technology 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 improve China's intelligent manufacturing level together. Copyright of this article belongs to Zheng Motion Technology. Please indicate the source if you reprint it.

Read next

CATDOLL 146CM Ya 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