Today, ZhengMotion Assistant will share ZDevelop software, a development and debugging aid for EtherCAT motion control cards. This article uses the zero-return example to demonstrate how to use ZDevelop software in conjunction with host computer development software such as LabVIEW for development and debugging.
I. ECI2828 Hardware Introduction
The ECI2828 series motion control card supports up to 16-axis linear interpolation, arbitrary circular interpolation, spatial circular interpolation, helical interpolation, electronic cams, electronic gears, synchronous following, virtual axes, and robot commands; it uses an optimized network communication protocol to achieve real-time motion control.
The ECI2828 series motion control card supports Ethernet and a RS-232 communication interface to connect to a computer, receive commands from the computer, and can connect to various expansion modules via EtherCAT and CAN buses to expand the number of input/output points or motion axes.
Applications for the ECI2828 series motion control card can be developed using software such as VC, VB, VS, C++, and C#. The program requires the dynamic library zmotion.dll to run. During debugging, the ZDevelop software can be connected to the controller simultaneously for easier debugging and observation.
Typical connection configuration diagram of ECI2828 series
II. Motion Control Development using LabVIEW
1. Download the LabVIEW Vi function library "zauxdll" folder from the "CD-ROM data" to your computer, and then copy it to the LabVIEW/user.lib folder under the LabVIEW installation path.
Zauxdll function library path
Paste the path to the Zauxdll function library.
2. Review the PC function manual and familiarize yourself with the relevant function interfaces.
(1) The PC function manual is also included in the CD-ROM materials. The specific path is as follows: "CD-ROM materials\8.PC functions\Function library 2.1\ZMotion function library programming manual V2.1.pdf"
(2) PC programming typically involves connecting the controller and industrial PC via the network port. The network port connection function interface is ZAux_OpenEth(); if the connection is successful, this interface will return a connection handle. By manipulating this connection handle, control of the controller can be achieved.
ZAux_OpenEth() Interface Description:
(3) Use the axis parameter setting related instructions to operate the link handle "g_handle" to set the axis parameters of the controller. The axis parameter setting related instructions are as follows.
(4) The origin signal mapping interface and the return-to-zero interface are described below.
Origin signal mapping interface:
Return-to-zero reset interface:
The specific development process of LabViEW's zero-return example is not described in detail here; the example can be downloaded from Baidu Cloud.
Link: https://pan.baidu.com/s/1PkjqVmoeiQ9KcEYeULx21w
Extraction code: cj7z
III. Introduction to ZDevelop Software, an Auxiliary Debugging Tool
1. Connect the ZDevelop software and the controller via the network port.
In the top menu bar, click "Controller" -- "Connect". The following window will pop up. Enter the controller's IP address (factory default: 192.168.0.11), and then click the "Connect" button to establish communication with the controller.
2. Viewing basic axis parameter information.
After successfully connecting to the controller, there is an axis parameter window on the right side of the software. You can monitor whether the host computer axis parameters have been set successfully by viewing the data in this window.
Another very important piece of information can be found here. When an axis malfunctions and cannot move, we can analyze the situation by checking the AxisStatus parameter here.
As shown in the image below, axis O is experiencing an alarm and cannot run. We noticed that the axis 0 parameter has turned into a red 200h. Checking the "AxisStatus" section in the basic help documentation reveals that 200h indicates the axis has exceeded the positive soft limit, hence the alarm.
3. Manual motion adjustment window.
In the top menu bar, click "View" -- "Manual Motion" to open this window. You can use this window to perform jog control on the axes to verify whether the hardware wiring of each axis is correct, etc.
4. Input/output port monitoring window.
In the top menu bar, click "View" -- "Input/Output" to open these two windows. You can monitor the controller's input and output port information through these two windows.
5. Oscilloscope function.
Zdevelop software, like any other oscilloscope, can capture waveforms of parameters changing over time. This includes capturing waveforms of parameters such as axis position (Dpos), axis speed (Mspeed), input/output ports (IN/OP), and analog input/output ports (AIN/AOUT) as they change over time.
In the top menu bar, click "View" -- "Oscilloscope" to open the oscilloscope window.
Clicking the "Settings" button allows you to configure the number of channels the oscilloscope can capture data from and the time interval between data captures.
Next, following the settings of the oscilloscope shown in the diagram above, we captured the position and velocity waveforms during the X-axis homing process of the LabVIEW single-axis homing routine. The results are as follows:
6. Analog input/output monitoring window.
In the top menu bar, click "View" -- "AD/DA" to open this window and monitor analog input and output information.
7. Extended information query function for remote I/O.
In the top menu bar, click "Controller" -- "Controller Status" to open this window and query the status of the controller and information about the extended devices.
ZCAN node information:
EtherCAT bus node information:
8. Quickly diagnose and debug EtherCAT servos.
Entering "?*ethercat" in "Commands and Outputs" will display the status of each EtherCAT server.
The status of the EtherCAT servo is explained as follows:
Slot: 0 contains 1 node.
Lostcount: 0-0.: The current packet loss count is 0.
Node:0: Node 0
status: 1: Equivalent to NODE_STATUS, 1 indicates that the node exists.
manid:66fh: Manufacturer ID, hinting at an ETG organization ID for Panasonic servos.
productid:525100a1h: Product ID, 525100a1h
axises:1: This node contains 1 axis.
Node_profile:0: Node message content
Node_profile: Configured to 0
BindAxis:0: Node 0 is bound to axis 0
Drive_profile:0: Driver PDO message selection mode 0
Controlword: 0h: CiA402 control word, 0x6040, fh indicates enable state.
drive_status: 1237h: CiA402 status word, 0x6041, 1237h indicates that it is enabled.
Drive_mode:8h: CiA402 control mode, 0x6060, 8h indicates CSP mode.
target:0h: CiA402TargetPosition,0x607A, indicates the target position value.
encode:0: ActualPosition,0x6064, represents the actual position value.
Secondly, you can use the bus diagnostic tool on the ZDevelop software to connect to the controller and check the current connection status, as shown in the figure:
9. ZDevelop software debugging video.
This concludes the fourth installment of our series on building intelligent equipment using EtherCAT motion control cards and LabVIEW.
For more exciting content, please follow the "Zheng Motion Assistant" WeChat official account. For related development environment and example code, please contact Zheng Motion's technical sales engineer: 400-089-8936.
This article is original content from Zheng Motion Technology. We welcome everyone to reprint it for mutual learning and to jointly improve China's intelligent manufacturing level. Copyright belongs to Zheng Motion Technology. Please indicate the source if you reprint this article.