<

Bring Values and Sucesses To Our Customers

Home / Support and services / Technical Support

Technical support

Technical Support

How to use Open Linux Platform of ZMotion XPLC516E (1) ? -- detailed steps through Qt development

Open Linux OS & XPLC516E controller


Why XPLC516E motion controller of ZMotion Technology embeds Linux OS? What advantages it has?

Before we talk about XPLC516E embedded Linux platform advantages, let me introduce advantages of Linux OS itself.

Linux system becomes one of the most popular systems currently, because it is fully free open source, and it supports multi-user, multi-task based on POSIX and Unix, also supports operating system with multi-thread and multiple CPU

Linux platform OS series inherit properties of Unix. It has extremely powerful network function and full tool-link. What's more, required development environment can be configured through simple operations. Then, Linux platform can simplify development process, and make system with stronger portability.

And XPLC516E, this motion controller with opened Linux system on board, supports users add application software under Linux platform freely. And it is convenient for XPLC516E to install Qt and other software. In addition, human-machine interaction user interface through Qt development is valid for XPLC516E Linux controller, and files can be uploaded and loaded by U disk directly (generally, U disk reading and writing on bare computer need to edit codes, after embedding system, it can be used like plugging U disk into computer).

XPLC516E achieves 16-axis motion control, supports linear interpolation, any circular interpolation, space arc, helical interpolation, electronic cam, electronic gear, synchronous follow, virtual-axis setting, etc., and real-time motion control can be reached through optimized network communication protocol. Then, ZMotion combines these advantages of XPLC516E with Linux platform OS well. Details will be shown below.

At the same time, XPLC516E has several camera hardware interfaces, and the third party vision is valid. XPLC516E Linux controller is widely used in 3C electronics, laser processing, printing and packaging, automated assembly line, electronic semiconductor, textile and garment, robot, special machine, stage and entertainment, medical equipment, etc.

Help you effective learning, there are videos, images and words description.

Let's begin ! 

01.    Hardware Configuration


(1) one XPLC516E Linux motion controller

(2) one 24V DC power supply

(3) one network cable

(4) one display screen with HDMI interface

(5) one HDMI connecting line

(6) one keyboard

(7) one mouse



02.    Development Software and Platform


A. development software

image1.png

  • ZDevelop software: ZMotion provides powerful ZDevelop development environment, it supports ZBasic, ZPlc ladder of diagram and ZHmi configuration development, and hybrid program is valid. At the same time, there is simulator for offline operation. What's more, ZDevelop can achieve real-time watch and debug for the program of motion controller that is running.

  • Qt software : XPLC516E controller is with Linux system itself, which means XPLC516E supports human-machine interaction interface through Qt development. Qt development through virtual Ubuntu system is valid, it is also useful by installing Qt software in controller to develop.

  • WinSCP software : this is used to transfer files between PC and controller. If using Qt of virtual Ubuntu system to develop project, we can download developed Qt project into XPLC516E controller.

B. development platform

image 2.png

Controller Linux desktop, XPLC516E motion controller supports Linux OS, and provides Qt software (version 5.5.1), also, embedded Qt development is valid. In ZMotion Technology, there are Qt dynamic link library with powerful and full functions and function library manual of motion control that is easy to understand, including strong portability of codes, then, motion control development becomes easier, and period of intelligent equipment development can be reduced greatly.


03.     How to wire? 

image 3.jpg

For controller hardware interfaces, please refer to above, connect mouse and keyboard to displayer with HDMI interface, then install Qt software to develop the project.


04.     How to develop the project through Qt software ? 


--Windows Qt development & Linux Qt development--both is OK.

(1) New build one Qt project using Qt software.

image 4.jpg


(2) Copy dynamic library and related files (libzmotion.so, zaux.cpp, zaux.h, zmotion.h) into new built Qt project.

image 5.jpg

(3) Add dynamic library (libzmotion.so) into Qt project.

a. right click the project, then click "Add Library".

image 6.jpg


b. select the second "External library", and click "next".

image 7.jpg


c. click "Browse" to view library files, and select dynamic library copied just now, then click "next".

image 8.jpg

d. click "finish", dynamic library is added successfully.

image 9.jpg


Note: the name of dynamic library must be started with "lib", then, it can be identified

(4) Add head files (zmotion.h, zaux.h) in Qt project.

a. right click "Headers", click "Add Existing Files...".

image 10.jpg


b. find zmotion.h file that is copied and entered in project just now, double click zmotion.h, then, head file "zmotion.h" can be added into project.

image 11.jpg


c. repeat above two steps, add zaux.h file into project also.

(5) Add cpp source file (zaux.cpp) into Qt project.

a. right click "Sources", click "Add Existing Files...".

image 12.jpg


b. find "zaux.cpp"file that is copied and entered in project just now, double click "zaux.cpp", then, source file "zaux.cpp" can be added into project.

image 13.jpg


(6) Add #include “zmotion.h",  #include “zaux.h" into widget.h, and define link handle of controller.

image 14.png


(7) Use slot function of button, connect controller through Ethernet.

a. add one button in UI design interface of Qt, and rename it as "link". Then, right click "link" -- Go to slot... to jump into slot function of this button.

image 15.jpg


b. check ZMotion PC Program Manual to know how to use Ethernet for connecting function.

image 16.png


c. edit codes in slot function according to PC manual -- ZAux_OpenEth.

image 17.png


(8) Controller achieves interpolation motion -- codes achievement process.

a. add one button in UI design interface of Qt, and rename it as "move". Then, right click "move" -- Go to slot... to jump into slot function of this button.

image 18.jpg


b. check ZMotion PC Program Manual to know the usage of multi-axis interpolation motion interface function.

image 19.png


c. next, edit codes in slot function according to PC manual -- ZAux_Direct_Move for achieving multi-axis interpolation.

image 20.png


(9) Compile Qt program, then test function achievement effect.

a. compile Qt project.

image 21.jpg


b. click "link" button, connect to controller, at the same time, use ZDevelop software to connect with controller for watching axis parameters.

image 22.jpg


Note: when upper computer uses Ethernet to connect to controller, controller and PC should be in the same net segment.

image 23.png


image 24.png


(10) Download Qt program developed by PC into controller for running. Qt project on PC can be downloaded into controller through U disk or WicSCP software.

image 25.png


image 26.png

That's all, thank you for your reading -- How to use open Linux platform of ZMotion XPLC516E motion controller (1) ? -- detailed steps through Qt development

For more information, please pay close attention to  "Support" and  "Download"  , and there are other platforms about ZMOTION --  Youtube &  LinkedIn &  Twitter &  Tiktok &  Facebook  , including technical information (development environment, routine code), product showing, company development, etc.

Hope to meet you, talk with you and be friends with you.
 Welcome!

This article is edited by ZMOTION, here, share with you, let's learn together. ZMOTION: DO THE BEST TO USE MOTION CONTROL.
Note: Copyright belongs to ZMotion Technology, if there is reproduction, please indicate article source. Thank you
 .

ZMOTION Technology  has attracted experienced talents from famous companies or institutions, such as Huawei, ZET, Huazhong University of Science and Technology etc. ZMOTION insists self- innovating and collaborating with comprehensive universities, to research basic knowledge of motion control. Due to its concentration and hard work in motion control technology, ZMOTION already become one of the fastest growing industrial motion control companies in China, and is also the rare company who has managed core technologies of motion control and real time industrial control software completely.             

 

ZMotion Technology  provides motion control card, motion controller , vision motion controller, expansion module and HMI. ( more keywords  for ZMOTION: EtherCAT motion control card, EtherCAT motion controller, motion control system, vision controller, motion control PLC, robot controller, vision positioning...)


Reference

  1. Linux OS: https://en.wikipedia.org/wiki/Linux 

  2. Qt: https://en.wikipedia.org/wiki/Qt_(software) 

  3. XPLC516E controller:http://www.zmotionglobal.com/pro_info_259.html

  4. ZMotion Technology:http://www.zmotionglobal.com/index.html

  5. ZMotion PC Program Manual: http://www.zmotionglobal.com/index.html

  6. Application: APPLICATIONS,ZMOTION TECHNOLOGY (zmotionglobal.com)

  7. Video description: https://youtu.be/QLAM2Fqfw2U 

  8. More articles: Technical Support,ZMOTION TECHNOLOGY (zmotionglobal.com)

Copyright © 2013-2024 Shenzhen Zmotion Technology Co.,Ltd Design by Zmotion    粤ICP备13037187号 Motion Controller-Motion Control Card

Contact Us-Youtube