Why is a Linux system embedded in the XPLC516E controller for positive motion technology? What are its advantages?
When discussing the advantages of a positive motion controller with a Linux system, it's essential to first explain the inherent advantages of the Linux system itself.
Linux has become one of the most popular operating systems today, mainly because it is a completely free and open-source operating system based on POSIX and Unix, supporting multi-user, multi-tasking, multi-threading, and multi-CPU systems.
The Linux family inherits the characteristics of Unix, has very powerful networking capabilities, a complete toolchain, and a suitable development environment can be configured with simple operations, which can simplify the development process and make the system highly portable.
The XPLC516E from Zheng Motion Technology is a controller equipped with an open Linux system, allowing users to freely add application software under the Linux platform. It facilitates the installation of Qt software, supports the development of human-computer interaction user interfaces using Qt, and allows direct file upload and download via USB flash drives through the system (reading and writing USB flash drives on a bare metal device typically requires writing code; after embedding into the system, it's as simple as using a USB flash drive on a computer).
The positive motion technology effectively combines the advantages of the Linux system with the motion control advantages of the XPLC516E controller itself (up to 16-axis motion control, supporting linear interpolation, arbitrary circular interpolation, spatial circular interpolation, helical interpolation, electronic cam, electronic gear, synchronous following, virtual axis setting, etc.; and adopts an optimized network communication protocol to achieve real-time motion control).
Meanwhile, the XPLC516E has multiple camera hardware interfaces, supports third-party vision, and is widely used in 3C electronics, laser processing, printing and packaging, automated production lines, electronic semiconductors, textiles and clothing, robotics, special machine tools, stage entertainment, medical devices and other fields.
To help those who love learning to study more efficiently, the team at Zheng Sports Techniques has prepared detailed illustrated explanations.
Video Tutorial : "Video Tutorial: Using the XPLC516E Open Linux Platform for Positive Motion Technology (Part 1)"
This deserves applause!
I. Hardware Configuration
● One XPLC5 16E controller
● One 24V DC power supply
● 1 network cable
● One display with an HDMI port
● One HDMI cable
● 1 mouse
● 1 keyboard
II. Software and Platform Development
a. Software development
b. Development Platform
The XPLC516E controller supports Linux desktop systems and includes Qt software (version 5.5.1) for embedded Qt development. It features a powerful and comprehensive Qt dynamic link library with easy-to-read motion control library function manuals, ensuring strong code portability and facilitating easy learning of motion control development. This significantly reduces the development time for intelligent equipment.
III. How to connect the wires?
Connect the controller hardware interface according to the controller hardware interface diagram, and connect the mouse, keyboard, and HDMI interface monitor to install Qt software for project development.
IV. How to use Qt software for project development? Supports Windows Qt development and Linux Qt development.
1. Create a new Qt project using Qt software.
2. Copy the dynamic library and related files (libzmotion.so, zaux.cpp, zaux.h, zmotion.h) into the newly created Qt project.
3. Add the dynamic library (libzmotion.so) to the Qt project.
a. Right-click the project and click Add Library.
b. Select the second external library and click next.
c. Click Browse Library Files, select the dynamic library you just copied, and click Next.
d. Click finish to complete adding the dynamic library.
Note: The name of the dynamic library must start with "lib" to be recognized.
4. Add header files (zmotion.h, zaux.h) to the Qt project.
a. First, right-click Headers and click Add Existing Files...
b. Locate the zmotion.h file that you just copied and put into the project, double-click zmotion.h to add the header file zmotion.h to the project.
c. Repeat the above two steps to add the zaux.h file to the project as well.
5. Add a cpp source file (zaux.cpp) to the Qt project.
a. First, right-click Sources and click Add Existing Files...
b. Locate the zaux.cpp file that you just copied and put into the project, and double-click the zaux.cpp file to add the source file zaux.cpp to the project.
6. Add the following to widget.h: #include "zmotion.h" and #include "zaux.h", and define the connection handle for the controller.
7. Use the button's slot function to connect the controller via Ethernet.
a. First, add a button in the Qt UI design interface and rename it to "link". Right-click the "link" button and click "Go to slot..." to jump to the slot function of the button.
b. Then consult the ZMotion PC programming manual to learn how to use the Ethernet connection controller interface functions.
c. Next, write code in the slot function according to the usage of the ZAux_OpenEth function in the PC programming manual to implement the function.
8. The controller implements interpolation motion, and the code implementation process.
a. First, add a button in the Qt UI design interface and rename it to move. Right-click the move button and click Go to slot... to jump to the slot function of the button.
b. Then consult the ZMotion PC programming manual to understand the usage of the multi-axis interpolation motion interface functions.
c. Next, based on the usage of the ZAux_Direct_Move function in the PC programming manual, write code in the slot function to implement the multi-axis interpolation function.
9. Compile the Qt program and test the functionality.
a. First, compile the Qt project.
b. Click the link button to connect to the controller, and simultaneously connect to the controller using ZDevelop software to monitor the controller's axis parameters.
Note: When the host computer connects to the controller via Ethernet, the controller and the PC must be on the same network segment for the connection to be successful.
10. Download and run Qt programs developed on the PC to the controller. Qt projects on the PC can be downloaded to the controller via USB flash drive or WicSCP software.
This article was originally created by Zheng Motion Assistant. We welcome everyone to reprint it for mutual learning and to improve China's intelligent manufacturing capabilities. Copyright belongs to Zheng Motion Technology. Please indicate the source if you reprint this article.
Zheng Motion Technology is a national high-tech enterprise specializing in the research and application of motion control technology. It primarily engages in the research, development, production, sales, and service of motion controllers, motion control cards, IO expansion modules, and integrated motion display and control systems. The company has assembled outstanding talent from companies such as Huawei and ZTE. While adhering to independent innovation, it actively collaborates with major universities to dedicate itself to the research and application of motion control technology. It is one of the fastest-growing companies in China's industrial control field and a leading enterprise in China that has fully mastered core motion control technologies and real-time industrial control software platform technologies.