Bring Values and Sucesses To Our Customers

Home / Support and services / Technical Support

Technical support

Technical Support

EtherCAT Motion Controller LabVIEW Motion Control Development

This article will introduce "how to develop motion control & how to capture data by LabVIEW for EtherCAT motion controller" .

Here, take ZMC408CE EtherCAT motion controller as an example.


ZMOTION

ZMC408CE EtherCAT Motion Controller

ZMC408CE is one 8-axis high-performance EtherCAT motion controller developed by Zmotion. This controller includes many communication interfaces, such as, EtherCAT, EtherNET, RS232, CAN, U disk, etc. In addition, it supports rich motion control functions, linear interpolation, circular interpolation, helical interpolation, electronic cam, electronic gear, synchronous follow, and so on.

1711414888808872.png

For the development, there are two methods. First one, ZMC408CE supports PLC, Basic, and HMI. Second one, ZMC408CE supports PC host computer languages, like, C#, C++, LabVIEW, Matlab, Qt, Linux, VB.Net, Python, etc., and they all use the same one set of API function.

1711414915691799.png

Motion control of ZMC408CE is 8-axis, but it can be up to 32 axes through expansion module. It can use pulse axis (with encoder feedback) or EtherCAT axis. For general IO, there are 24 inputs and 16 outputs, some are high-speed. Among outputs, 8 outputs (OUT0-OUT7) support hardware comparison output, hardware timer, motion precision in motion, and PWM.

3.png

ZMC408CE Video Introduction


1. How to Develop Motion Control by LabVIEW?

(1) Build LabVIEW Project

1711414971438316.png


(2) Download "zauxdll" folder of LabVIEW Vi function library into PC, then copy it into "LabVIEW/user.lib".


(3) PC Function | Related Interfaces

Zmotion provides general API function, it includes all kinds of host computer languages. The manual can be obtained from here or contact us.

A. ZAux_OpenEth(): connection

5.png

B. ZAux_Direct_GetTable: get data from table, and import oscillocope data source

6.png

C. ZAux_Direct_GetDpos: get DPOS (demand position)

7.png

D. ZAux_Direct_GetMspeed: get feedback speed

8.png

E. ZAux_Direct_GetVpSpeed: get planning speed

9.png

F. ZAux_Direct_GetMpos: get MPOS (measurement position)

10.png

G. ZAux_Direct_Cam: do eletronic cam motion

11.png


(4) How to Get Real-Time Data

A. creat new vi in front board, and right click the mouse to select "control" to do UI designning, as it is shown in the below, the left is "connection" interface, the right is planning position of oscilloscope.

1711415049230757.png

B. add "while" loop in added frame through mouse, then add "event structure" in "while", and right click to choose "add event branch", the "timeout" event, then get current needed data and import them into oscilloscope.

1711415067775864.png

C. select event structure, and right-click to select "add event branch". In "while" structure, when the handle is blank, it will automatically get current controller IP, then use "Z Aux Open Eth.vi" function to connect to controller.

1711415094743424.png

D. select event structure, and right-click to select "add event branch", the "disconnect" value changing, then use "Z Aux Close.vi" function to disconnect the connection.

1711415113700854.png

E. select event structure, and right-click to select "add event branch", the "trigger" value changing, then use "Z Aux Trigger.vi" function to trigger oscillscope to capture the data.

1711415129808528.png

F. select event structure, and right-click to select "add event branch", the "ON SCOPE " value changing, then use "Z Aux Execute.vi" function to call "SCOPE" command to open data acquisition, and save them into table register.

1711415147212382.png

18.png

G. select event structure, and right-click to select "event", the "XY Graphic:" mouse changing . Then in this event branch, the coordinate position of the mouse within the corresponding range of the XY oscilloscope and the XY2 oscilloscope is read in real time and displayed on the interface.

1711415177917580.png

1711415210163879.png

H. select the condition structure. When the sine motion button is pressed, the two sine motions execute the two electronic cam motion commands in the sequence of tiling. Use the "Z Aux Cam.vi" function to move corresponding electronic cam motions according to data that has been loaded in table register in advance.

1711415228634410.png




2. Debug & Watch

Compile the routine, and connect to ZDevelop at the same time. Then run one "SIN" waveform trajectory through the corresponding single-axis routine. When the motion is running, capture the real-time data through LabVIEW oscillocope and ZDevelop oscilloscope synchronously.

(1) Algorithm Command: generate SIN waveform data

22.png

(2) Waveform Comparison

A. ZDevelop and LabVIEW captures DPOS demand position.

--ZDevelop Oscilloscope Waveform--

1711415380193309.png

--LabVIEW Oscilloscope Waveform--

1711415398806431.png

It can be seen they are consistent.


B. ZDevelop and LabVIEW captures VP_SPEED.

1711415420892888.png

Also, their waveforms are the same.




ABOUT ZMOTION

That's all, thank you for your reading -- EtherCAT Motion Controller LabVIEW Motion Control Development & Real-Time Data Reading. 

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.


2013-2023 版权所有 Zmotion Corp. Copyright Reserved 粤ICP备13037187号-1