Long time no see.
For Zmotion EtherCAT motion edge controller ZMC432H, we had learnt its hardware information and API function encapsulation principle, and today's part talks about how to develop, debug and diagnose ZMC432H. The answer is our old friend, but not the same one. RTSys, which is updated from ZDevelop programming software.
EtherCAT motion control edge controller ZMC432H supports self-researched and self-controlled software and hardware. And this EtherCAT edge controller is an independent motion controller that is compatible with EtherCAT bus and pulse.
32 axes motion control can be achieved. At the same time, Zmotion remote HMI function is valid, which means network configuration display is provided to watch and adjust parameters in real-time.
ZMC432H has rich hardware interfaces and control functional modules, then effective and stable motion control and real-time data acquisition can be achieved to meet application requirements of both industrial control and industrial internet.
What's more, Linux system is built in ZMC432H. That is, it can be connected through local LOCAL interface, then, instruction interaction speed can be faster. The one interaction time of one single instruction and multiple instructions is about 40us.
1. RTSys Introduction
RTSys is a programming software that derives from ZDevelop. It integrates motion control and machine vision functions, specifically, it supports secondary development of RTBasic, RTPlc, RTHmi, and RTVision, including hybrid programming, real-time simulation, online track, diagnosis, and debug. Then, it can rapidly achieve intellectual equipment's vision positioning, measurement, identification, detection, and motion control system development. Please see below image, RTSys development interface.
PC and controller can be connected through serial port or net port, and the program edited by RTSys can be downloaded into Zmotion controller to run directly, or simulate in PC.
3 programming methods in RTSys: Basic, PLC, HMI.
In RTSys, it is recommended to develop through Basic language, because it supports multiple Basic tasks . For PLC, only one task is valid. For HMI, only two tasks can run at the same time. In addition, among Basic task, PLC task, and HMI task, they can run synchronously.
Even though it is updated based on ZDevelop, some are retained, like, simulation. It is also with ZMC Simulator and HMI program simulation tool xplc screen.
But please note RTSys can't be compatible down, that is, it is better not to open project created by RTSys in ZDevelop. And it needs controller firmware support, before using, please check it.
(1) System Requirements
(2) How To Install RTSys
Get RTSys installment package from Zmotion official website or contact us, then put into target path (users can choose freely). When compressed it, .exe application program will appear, like below image.
Note: the version No. in below image is not fixed, that is, the software version No. changes with software updating, the latest one can be downloaded from official website, or contact us.
Double click mouse to open .exe application program, then click "next".
Click "Browse" to select where the software is. Then click "OK", and "next".
Click "Install", it starts to be installed.
Here, installed, click "OK".
(3) How To Update RTSys Online
RTSys supports online upgrading. And there are two methods to check whether it needs to update.
--method 1: when there is one new version, one "update" indication window will pop up automatically when RTSys software opens, then you can choose to update now:
click "update immediately" directly.
click "next", is starts to update. when updated, install window will appear, and install it according to above steps.
--method 2: through "about RTSys", version update and related information can be checked here. Click upper right "?", below window will be shown, then click "check update..."
2. ZMC432H Development & Diagnosis in RTSys
(1) Connection of ZMC432H and RTSys
"controller" -- "connect" -- "controller", and it can be seen serial port, ethernet or PCI/Local are OK.
serial port parameters: serial port No., Baud rate, parity, serial port ID (fill in 0)
IP: controller IP address, controller factory IP is 192.168.0.11, users can modify it freely
PCI/Local: PCI card No. / connect to MotionRT7
(2) Common Operations for Controller in RTSys
--modify IP address--
RTSys supports modifying controller IP address, in "menu" -- "modify IP address", or using online command "IP_ADDRESS".
Before that, please remember to connect to controller in RTSys.
a. when connected to controller, click "controller" -- "modify IP address", and below window will appear, now, current controller IP is shown, then enter new IP address directly. After modified, controller and RTSys will disconnect, it only needs to select correct IP again.
b. after connected to controller, in "output" window, enter "IP_ADDRESS = dot.dot.dot.dot, that is, the IP address to be modified. Then, click "send", disconnect also, and connect again.
--update firmware--
When current firmware version can't meet program running requirements, or some functions it can't support, firmware updating is necessary.
Also, there are two methods, using the firmware upgrade function in RTSys or using zfirmdown tool software to download zfm firmware package.
Actually, these two ways are similar, here, the first one will be shown mainly, "upgrade firmware in RTSys directly".
Download required firmware and save the file into any path under PC.
Open RTSys software, connect to controller, then click "Controller"--"Update Firmware", a new window will pop up, current used firmware version can be seen, if it belongs to old version, please see next, if it is the latest one, no need to update.
Click "Browse" to find the firmware you saved just now.
Click "Update". There is one indication, restart to ZBIOS, that is, connect to controller again. Click "OK", select suitable connection method.
Please note the new firmware version must be consistent with controller hardware model, otherwise it will report the error.
When controller is connected again, the "Update Firmware" interface will appear again. Now, system has already entered ZBIOS status, click "Update".
Then, the file will be downloaded, please don't close the window during downloading. When the downloading is done, "output" window will show corresponding information, like, Filename: D:\...\...\...
After that, please power-off 5s and above, connect again, and check the firmware version No.
--lock / unlock controller--
If you want to protect controller's program, set the password to lock it. Then, upper computer program can't be downloaded into controller, but generated ZAR file still can be downloaded.
Input correct password to unlock it.
When wiring is wrong, please note:
a. when controller is in LOCK state, debugging is not allowed.
b. the password can be set to numbers, letters and special symbols, and the length should not exceed 16 characters.
c. the password is encrypted by an irreversible algorithm. Once forgotten, it will not be known.
d. operation path: controller -- Lock / Unlock controller.
3. RTSys Program Development & Diagnosis
(1) Build new project
At first, create one new folder to save project that is to be built.
a. open RTSys, click "File" -- "New Project".
b. a window appears, select created folder and input file name, the suffix should be ".zpj".
c. click "File" -- "New File", and select needed corresponding file type.
d. set autorun No., double click right position, input 0 for task No.
e. edit the program, and remember to save it, new created Basic file will be saved into project "zpj" automatically.
f. connect to controller or simulator.
g.download the program. Click "download to RAM" or "download to ROM", and there is message indicating success or failure. And at the same time, program is downloaded into controller to run automatically.
RAM: not to save after power-off
ROM: save the program after power-off, program will run according to task No. in next connection.
Notes:
when only the bas file is opened, it is invalid to download the program into controller, please open the whole .zpj file. And when there is only bas file, namely, no project, also no way to download into controller.
for some models of ZMC0 series, it can only download into RAM.
auto run No. 0 means task No., there is no priority. When no task No., system will show "WARN: no program set autorun" when downloading to controller.
(2) Program debugging
When connection is done, click "Debug" -- "Start / Stop Debug", and select one from these four.
Then, in "watch" and "task" windows, each task's running situation can be viewed.
Please ensure PC program file and controller program file are consistent. And debugging is only valid in UNLOCK state.
Here, there is one breakpoint debug, it can check exact running situation, mainly for finding logic errors. The corresponding breakpoint shortcut is F9, or "Debug" -- "Breakpoint" -- "Add & Delete Breakpoint", multiple breakpoints can be added. When added, program will stop at the breakpoint, and relative command has not been executed. Also, in "task" window, situation can be watched.
For more details, please refer to corresponding manual, or contact us directly.
(3) Oscilloscope usage
Oscilloscope is extremely important of program debugging and running. It is used to transfer signals that can’t be seen by naked eyes into graphics, then it is convenient to analyze change processes of all kinds of signals.
Oscilloscope shows controller internal data in graph, it can display different signals, like, axis parameter, axis status, etc. In “View” – “Scope”, then oscilloscope window can be opened, or click the shortcut button.
The oscilloscope must be powered on before triggering to successfully sample. Open the oscilloscope and set the relevant parameters, and then click “Start Scope” to trigger sampling manually, or add the "TRIGGER" command to the program to automatically trigger oscilloscope sampling.
4. Controller Watching & Setting in RTSys
(1) Axis parameter window
Axis parameter window is used to watch motion control parameters, including real-time changes of parameters.
More details, please refer to ZBasic Programming Manual.
(2) Manual
Operate motor manually.
(3) IN & OUT
Detect controller IN states and watch controller OUT states, please refer to former article.
(4) Register
View controller register values, please refer to corresponding Zmotion technical support.
(5) AD/DA
View analog input and analog output situation.
(6) Troubleshooting
Check controller state and trouble information rapidly.
5. Summary -- Video
ABOUT ZMOTION
That's all, thank you for your reading -- EtherCAT Edge Programmable Industrial Motion Controller (3): RTSys Development & Diagnosis
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.