In above article , we learnt how to do configure the development environment .
Today, let's see the second part, how to process, pause and resume small segment continuous trajectory in EtherCAT motion control card development by QT.
1. Hardware Support
Here, the same hardware is used, ECI2828 motion control card.
Let's review it briefly.
--Basic Introduction--
ECI2828 not only belongs to economical motion control card, but also supports rich motion control functions, such as, up to 16 axes linear interpolation, any circular interpolation, space arc, helical interpolation, electronic cam, synchronous follow, virtual axis, robot instructions, etc. And real-time motion control can be achieved through optimized network communication protocol.
--Hardware Configuration--
ECI2828 motion control card is linked with PC through ethernet and RS232, then card can receive the command from PC to run. When there is no enough motion axes, IO or analog resources, expansion modules can be connected through EtherCAT bus and CAN bus.
--Programming Method--
For Zmotion motion controller and motion control card, there are two programming methods, host computer programming languages or ZBasic, ZPLC, ZHMI that are developed by Zmotion. Here, upper computer programming platform QT is used for ECI2828, and VC, VB, VS, C++, C# , and others all can be used. It only needs to call dynamic library "zmotion.dl" when programming is running. While debugging, we could connect ECI2828 to ZDevelop that is one free programming software launched by Zmotion itself for debugging and observing.
2. How to Develop Motion Control by Qt
(1) New Build Qt Project
a. build one new Qt project
b. select project path
c. select Qt compile set (kits)
d. select basic type
(2) Copy Files Related to Function Library to New Created Project
(3) Add Static Library (zmotion.lib) of Function Library to New Created Project
a. add function library 1
b. add function library 2
c. add function library 3
d. add head file related to function library to project
e. state head file and define connection handle
3. Software Support
For host computer development, Zmotion provides one uniform PC function library, there are PC programming manual and examples of each platform and each programming language. They can be referred from here or contact us directly.
Generally, ethernet is used to connect controller to IPC, the corresponding connection interface is ZAux_OpenEth(), if the connection is successful, the interface will return one link handle, then it can control the controller through this handle.
Next, let's see some basic operation PC commands related to continuous trajectory processing, pause and resume.
(1) how to build the connection
(2) how to achieve continuous interpolation and S curve
(3) how to set corner mode
4. How to Achieve Small-Segment Trajectory Continuous Processing, Pause, Resume in Qt
(1) Routine in Qt Interface
(2) Development Steps
a. call controller link interface "ZAux_OpenEth()" in construct function to build the connection with controller, when connected successfully, open timer to monitor controller axis information.
b. update each axis' position and speed information through the timer.
(3) Processing of Continuous Small-Segment
a. use ZCADToMore2.0 mapping tool to export dxf format as Z3P format and download it into controller, the file name in controller should be ZCAD.z39 (for CAD usage, you could refer to "How To Use Zmotion CAD Mapping Software with Motion Controller" -- CAD Video Description)
b. search Z3P file in controller
c. open Z3P file through "open" button"
d. call stop command to stop axis motion through stop button
(4) Pause & Resume of Small-Segment Continuous Trajectory Processing
5. How to Transplant Routine to Linux Device
(1) Copy Corresponding Linux Library to Project Folder
(2) Add Function Library's Static Library (libzmotion.so) to New Created Project.
a. add function library 1
b. add function library 2
c. add function library 3
d. compile again, then run directly.
(3) Debug & Monitor
Compile and run the routine, at the same time connect to ZDevelop software to debug. In this way, axis parameters and motion situation all can be watched in real-time.
a. small-segment trajectory processing X-Y position waveform
b. small-segment trajectory processing speed waveform (corner deceleration is OFF in continuous interpolation)
c. small-segment trajectory processing speed waveform (corner deceleration is ON in continuous interpolation)
ABOUT ZMOTION
That's all, thank you for your reading -- EtherCAT Motion Control Card Development Tutorial QT (2) | Small-Segment Continuous Trajectory Processing & Pause & Resume
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 focuses on development of motion control technology and general motion control products, it is a national high and new technology enterprise. 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. Here, Zmotion provides motion controller, motion control card, vision motion controller, expansion module and HMI. In addition, there is one program software developed by Zmotion -- ZDevelop. It is a good choice for you to program and compile. And program through upper computer, there is PC manual.
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...)
Have a good day, best wishes, see you next time.