Bring Values and Sucesses To Our Customers

Home / Support and services / Technical Support

Technical support

Technical Support

EtherCAT Motion Control Card Development Tutorial QT (2)

QT(2): Small-Segment Continuous Trajectory Processing & Pause & Resume

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.

1.png


--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.png



2. How to Develop Motion Control by Qt


(1) New Build Qt Project

a. build one new Qt project

3.png

b. select project path

4.png

c. select Qt compile set (kits)

5.png

d. select basic type

6.png


(2) Copy Files Related to Function Library to New Created Project

7.png


(3) Add Static Library (zmotion.lib) of Function Library to New Created Project

a. add function library 1

8.png

b. add function library 2

9.png

c. add function library 3

10.png

d. add head file related to function library to project

11.png

e. state head file and define connection handle

12.png



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

13.png


(2) how to achieve continuous interpolation and S curve

14.png

15.png


(3) how to set corner mode

16.png

17.png

18.png

19.png

20.png




4. How to Achieve Small-Segment Trajectory Continuous Processing, Pause, Resume in Qt


(1) Routine in Qt Interface

21.png


(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.

22.png

b. update each axis' position and speed information through the timer.

23.png


(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)

24.png

b. search Z3P file in controller

25.png

c. open Z3P file through "open" button"

26.png

d. call stop command to stop axis motion through stop button

27.png


(4) Pause & Resume of Small-Segment Continuous Trajectory Processing

28.png



5. How to Transplant Routine to Linux Device


(1) Copy Corresponding Linux Library to Project Folder

29.png


(2) Add Function Library's Static Library (libzmotion.so) to New Created Project.

a. add function library 1

30.png

b. add function library 2

31.png

c. add function library 3

32.png

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

33.png

b. small-segment trajectory processing speed waveform (corner deceleration is  OFF in continuous interpolation)

34.png

c. small-segment trajectory processing speed waveform (corner deceleration is  ON in continuous interpolation)

35.png





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.


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

Contact Us-Youtube