In the previous lesson, we introduced the bus configuration and use of EIO24088-V2 and EIO16084 in conjunction with RTSys. For details, please click → Use of 8-axis/4-axis EtherCAT axis modules EIO24088-V2 and EIO16084 (Part 1): RTSys bus configuration and use.
Today, the ZhengSports Assistant will share with you how to configure and use the EIO24088G-V2 and EIO16084G bus using TwinCAT.
•EIO24088G-V2 Expansion Module Hardware Introduction•
The EIO24088G-V2 bus expansion module is an expansion module used by the EtherCAT bus controller. When digital I/O and pulse axis resources are insufficient and need to be expanded, the controller can connect multiple EtherCAT expansion modules via the EtherCAT bus. The controller can directly access the I/O and axis resources of the EIO24088G-V2 through the mapping number.
• Supports expansion to 8 pulse axes;
• Supports expansion to 24 digital inputs and 8 digital outputs, with each pulse axis also having 1 additional digital input and 1 additional digital output available for configuration;
• Pulse output mode is either directional/pulse or dual-pulse output;
• Maximum output pulse frequency per axis: 10MHz;
• The maximum output current of the output port other than the pulse axis is up to 300mA, which can directly drive some solenoid valves.
The application diagram is shown below:
•EIO16084G Expansion Module Hardware Introduction•
The EIO16084G bus expansion module is an expansion module used by the EtherCAT bus controller. When digital I/O and pulse axis resources are insufficient and need to be expanded, the controller can connect multiple EtherCAT expansion modules via the EtherCAT bus. The controller can directly access the I/O and axis resources of the EIO16084G through the mapping number.
• Supports expansion to 4 pulse axes;
• Supports expansion to 16 digital inputs and 8 digital outputs, with each pulse axis also having 2 additional input and 2 additional output I/O channels available for configuration;
• Pulse output mode is either direction/pulse or dual pulse;
• Maximum output pulse frequency per axis: 10MHz;
• The maximum output current of the output port other than the pulse axis is up to 300mA, which can directly drive some solenoid valves.
The application diagram is shown below:
I. Interface Description
1. Wiring of the EtherCAT bus communication interface
The EIO24088G-V2 has two EtherCAT bus interfaces. When wiring, be careful to connect the EtherCAT IN port to the main controller or the upstream module, and the EtherCAT OUT port to the next-level expansion board. The IN and OUT ports cannot be used interchangeably.
2. General Input Port
The EIO24088G-V2 has 24 general purpose input ports. The input ports require configuration of their I/O address numbers using the NODE_IO instruction before they can be operated via the controller. The internal circuit diagram of the general purpose input port IN is shown below, and the input port parameters are listed in the table below.
Input port parameter description:
3. General output port
The EIO24088G-V2 has 8 general-purpose output ports. The output ports require configuration of their I/O address numbers using the NODE_IO instruction before they can be operated via the controller (the NODE_IO instruction only needs to be used once to configure the input and output). The internal circuit diagram of the general-purpose output port OUT is shown below, and the output port parameters are listed in the table below.
Output port parameter description:
4. Shaft interface
The EIO24088G-V2 has eight axis interfaces, using DB26 pins. The axis interfaces include differential pulse input signals and differential encoder input signals, as well as one general-purpose input port and one general-purpose output port (the EIO16084G has two general-purpose input ports and two general-purpose output signals).
Pin definition explanation:
The EIO expansion board can be directly enabled and alarms can be configured through 6013h in the data dictionary. It is not used by default and requires the main controller to operate.
II. Bus Wiring Reference
Wiring rules for EIO24088G-V2 expansion module: EIO24088G-V2 can be connected to any node on the EtherCAT bus.
The EIO24088G-V2 is a device node on the bus that can connect to 8 pulse-type drivers. The drivers are numbered sequentially from AXIS 0 to AXIS 7 and follow the driver numbering rules on the bus. Axis mapping is required.
The enable signal for the driver is a general-purpose output port within the pulse interface. It can be enabled directly through the OP command of the main controller, or automatically enabled by configuring BIT8 in the data dictionary 6013h to 1 using the SDO command. The main controller cannot directly control the corresponding output port to enable it; it is sufficient to set WDOG to 1 and AXIS_ENABLE of the corresponding axis to 1.
Note: The number of axis expansion modules that can be used is not unlimited. Please refer to the maximum number of axes that the controller can expand to.
The wiring diagram for the controller, EIO expansion module, and drivers is shown below. The ZMC432-V2 main unit has 6 pulse axes, which are extended via EtherCAT to four bus axes at nodes 0, 1, 2, and 3, and eight bus-to-pulse axes at node 4. The AXIS0-7 on the extended axes (corresponding to driver numbers 4-11 in the diagram below) are manually mapped to axis numbers 10-17 respectively.
The concepts of bus-related command parameters involved are as follows:
1. Slot number
The slot number refers to the number of the bus interface on the controller, which defaults to 0. When the controller has multiple bus interfaces, send the online command ?*SLOT to view them.
When the motion controller supports a single bus, the slot number is 0.
When dual buses are supported, the EtherCAT bus slot number is 0 and the RTEX bus slot number is 1.
2. Device number (node)
The device number refers to the number of all devices connected to a slot. It starts from 0 and is automatically numbered according to the connection order of the devices on the bus. The total number of devices connected to the bus can be viewed using the NODE_COUNT(slot) command.
3. Drive number
The controller will automatically identify the drivers in the slots, numbering them starting from 0 and according to the connection order of the drivers on the bus.
The drive number is different from the device number. Only the drive device number is assigned to the drive in the slot, and other devices are ignored.
III. Testing Extended Resources via TwinCAT
1. Install TwinCAT (install to C drive), and create a TwinCAT project.
2. Place the EIO24088G-V2 XML file into the TwinCAT path shown in the image below. The corresponding XML file can be provided by Zheng Sports manufacturer.
3. Install the TwinCAT network card driver.
4. Add EtherCAT master station
5. Select the network card with the TwinCAT driver used by EIO24088G-V2.
This is a network adapter connected to the computer via USB, so select Ethernet 2. If you are connecting directly to the computer's network port, select Ethernet.
6. Scan ECAT slave stations
7. Establish communication
8. Test IO: Connect OUT2 and IN8 of EIO24088G-V2, and use TwinCAT to set OUT2 to 1 to see if IN8 is also set to 1.
9. Test the extended pulse axis
(1) Locate the StartUp configuration, set the data dictionary of the axis 6013H that you want to use auto-enable to the value 256, and set the corresponding axis 6013H data dictionary to the value 0 if you want to manually enable it through the corresponding output port. The data dictionary of axis 1 is 6013H+ 1 * 800H.
(2) Reactivate the configuration. At this time, the servo enable is off, and the corresponding enable port of EIO24088G-V2 local IO is set to 1. Find the axis that is set to be automatically enabled, set the enable configuration (note that the value of Override cannot be 0), Ready is automatically checked, the servo is enabled, the corresponding enable port of EIO24088G-V2 local IO is set to 0, the OUT port corresponding to axis 0 is OUT8, and the OUT port corresponding to axis 1 is OUT9.
(3) After enabling, you can see the corresponding axis status word value change, which is converted into the enabled status.
(4) Unchecking the set parameter will disable the axis. After disabling the axis, you can also see the corresponding axis status word value change, which is converted to the disabled state.
This concludes our sharing of the first part: TwinCAT bus configuration and usage of the EtherCAT axis modules EIO24088G-V2 and EIO16084G for 8-axis/4-axis systems from Zheng Motion Technology.
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.