<

Bring Values and Sucesses To Our Customers

Home / Support and services / Technical Support

Technical support

Technical Support

Economical EtherCAT Motion Controller (2) -- ZBasic Achieves Multi-axis Linear Interpolation Motion

XPLC006E Function Introduction


XPLC006E
is a kind of multi-axis economical EtherCAT bus motion controller developed by ZMotion Technology, and XPLC series motion controllers can be applied in all kinds of occasions that need offline or online operation.


image XPLC006E.png

XPLC006E has 6 motor axes itself, and motion control of 12 axes at most can be achieved (including virtual axes). Also, it supports 12-axis linear interpolation, electronic cam, electronic gear, synchronous follow, virtual axis setting, etc.

In addition, XPLC006E cost-effective controller supports multi-task run synchronously. At the same time, it can do simulation on PC directly. There are several valid programming methods, such as, Basic / PLC ladder diagram / HMI configuration in ZDevelop software and commonly used upper computer software.

For PC upper computer API programming, following interfaces are supported: C#, C++, LabVIEW, VB, matlab, Qt, Linux, .Net, iMAC, Python, ROS, etc.

image 1.png

→Actually, according to different axis numbers, there are XPLC004E, XPLC006E and XPLC008E

There is one note: XPLC006E belongs to bus motion controller, which means it only supports EtherCAT bus axes, pulse axes and encoder axes are invalid. Then, it uses EtherCAT bus and drive to communication with refresh cycle of 1ms.




XPLC864E2 Function Introduction

Let's see XPLC864E2, it is upgraded on the basis of XPLC006E, which means, it supports all functions of XPLC006E mentioned above, and usages are basically the same. However, some resource spaces are better than XPLC006E. What's more, XPLC864E2 supports 32 inputs, 32 outputs, 2 ADs and 2 DAs in hardware level, pulse axis and bus axis can be hybrid used. The number of real axes is 8 totally. Except EtherCAT interface, in hardware of output, signal output of 8 axes in pulse direction can be configured, and be with 2 encoder inputs set by input configuration.

Same, XPLC864E2 supports PLC, Basic and HMI configuration programming methods. For PC upper computer API programming, following interfaces are supported: C#, C++, LabVIEW, VB, matlab, Qt, Linux, .Net, iMAC, Python, ROS, etc.

XPLC864E2.png


image 2.png


01

Preparatio ns

Firstly, download the latest edition ZMotion program software "ZDevelop V3.10.09" in "ZMotion Technology" -- "Download" or you could just contact me (Aileen -- E: zlm@zmotion.com.cm, T & Wechat & Whatsapp: +86 19925228195)

Then, prepare one XPLC series economy EtherCAT bus motion controller, and do wiring according to above XPLC006E reference wiring.

[ Note: if there is no controller, ZBasic development also can be done -- download the program into simulator. And the simulator is built in ZDevelop software installation package ]

image 5.png


02
Download Basic Program into Controller

(1) New build project item, and download program files into controller for motion. Please refer to below process showing.

image 6.png

Open ".zpj" file -- connect to controller -- download the program -- program can run.

(2) Details of Operation Description

New build project: "File" -- "New Project"

image7.jpg

click "New Project", then "Save as.. (另存为) " interface will appear, select one folder to open, enter file name and save the project, the suffix should be ".zpj".

image 8.png


New build file: "File" -- "New File"

image 9.jpg

After clicking "New File", below window will pop up. Select the file type as Basic and click "OK". (hybrid program among Basic / Plc /Hmi is valid)

image 10.png


Set file automatic operation: double-click "AutoRun", and enter task No. as 0.

image 11.png


Edit program: when program is edited, click "save all" file, then, edited codes won't lose, and new built Basic file will be automatically saved into file under project ".zpj" .

image 12.png


Connect to controller: edit program well, click "Controller" -- "Connect", when there is no controller, select "connect to simulator".

image 13.jpg

"Connect to controller" window will pop up after clicking "connect", and can connect through serial port or net port, then select matched serial port parameter or net port IP address, click "connect". Below image shows net port connection, controller IP is 192.168.0.36.

image 14.png


Download the program: click "Download RAM" or "Download ROM", if it is downloaded, there is an indication from command and output window. At the same time, program will be downloaded into controller and automatically run.

image 15.jpg

image 16.png


If it is successful:

image 17.png

If select "Download RAM", then the program will not be saved when power off, for ROM, it supports power failure storage. And the program downloaded into ROM will automatically run according to task No. when connect to controller again.

[ Note: when there is alarm information "error" in print window, program can't run normally, see below image, instruction reports error ]

image 18.png





03

Check Program Running Situation

Start to debug: "Debug" -- "Start / Stop Debug" to call task adn watch window.

image 19.jpg

Task window is used to check multi-task running status and task line No., and watch window is used to watch axis parameters, customized variables, input and output status, etc.


Axis parameters checking: this window is an important tool, it can help users know current data and observe whether program runs normally. Please refer to ZDevelop Manual for details.

image 20.png

Oscilloscope acquisition: open oscilloscope window through "View" -- "scope", or shortcut button.

image 21.jpg

image 22.png

image 23.png

Open "Config" to select Channel Num, Depth, Space and other parameters , then click "OK". Here, we collect 3 channels, DPOS of axis 0, axis 1 and axis 2. When all is configured, click "Start scope" button.

In program, edit "TRIGGER" instruction to trigger oscilloscope acquisition (or manual trigger button), when executing program motion, capture following waveform data.

--there are 3 kinds of modes--

A. XT mode: the curve shows changing of each data source's value with time.

B. XY mode (2D mode): synthetic interpolation trajectories of two axes.

C. XYZ mode (3D mode): synthetic interpolation trajectories of three axes in space.

--interpolation functions description--

XPLC006E economy motion controller has 6 axes, and supports 2-6 axes joint interpolation, then relatively set axis parameters of 2-6 axes. Before motion, select axis No., and send interpolation command, in this way, interpolation command won't be sent to wrong axis.

--6 axes linear interpolation--

BASE(0,1,2,3,4,5)                             'select axis No.

MOVE(200,200,100,80,75,100)    'send linear interpolation command

Do 3-axis linear interpolation motion & Watch trajectories of multiple running modes in oscilloscope

--Edit the program "3-axis linear interpolation"--

'emergency stop, clear motion buffer, wait until axis 0 is idle

RAPIDSTOP(2)

WAIT IDLE(0)

GLOBAL CONST AxesNum=3    'define the number of all axes.

AxesInit                                    'axis parameter initialization

Motion1_job                             'move program

END                                         'main program ends

GLOBAL SUB AxesInit()              'initialization subfunction of axis parameter

   FOR i=0 TO AxesNum-1        'initialize axis parameters in bulk

       BASE(i)

       DPOS(i)=0

       ATYPE(i)=1

       UNITS(i)=500  

       SPEED(i)=100

       ACCEL(i)=1000

       DECEL(i)=1000

       SRAMP(i)=100

   NEXT  

END SUB

GLOBAL SUB Motion1_job()

   TRIGGER                        'trigger oscilloscope capture

   BASE(0,1,2)

   MOVE(200,200,100)   '3-axis linear interpolation

END SUB

--motion trajectory under oscilloscope XT mode--

image 24.png

--motion trajectory under oscilloscope XY mode--

image 25.png

--motion trajectory under oscilloscope XYZ mode--

image 26.png




That's all, thank you for your reading -- Economical EtherCAT Motion Controller (2) -- ZBasic Achieves Multi-axis Linear Interpolation Motion

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

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

Contact Us-Youtube