Introduction
This HOW-TO describes the integration of a Balluff EtherCAT IO-Link master BNI0077 into ctrlX. It shows possibilities for diagnosis and parameterization of IO-Link Devices. Other Balluff EtherCAT IO-Link masters can also be commissioned in this way.
Requirements
Hardware
- ctrlX CORE
- Balluff EtherCAT IO-Link Master (e.g. BNI0077)
Software
- Rexroth PLC app on ctrlX CORE
- Rexroth EtherCAT Master app on ctrlX CORE
- ctrlX I/O Engineering and PLC Engineering (ctrlX WORKS)
Step-by-Step guide
New Project
- Open ctrlX CORE user interface in browser.
- Add EtherCAT master by clicking [+] in EtherCAT > Configuration.
- Open ctrlX I/O Engineering
- Open New project.
Install device description
- Download ESI (device description) on Balluff website:
e.g. for this example: https://www.balluff.com/de-de/products/BNI0077 - Open Tools > Device Repository
- Install device description
EtherCAT-Device configuration
- Add Device to EtherCAT-Master by right-click in the device tree on ethercatmaster > Add Device:
- Choose the relevant ESI (device description) for your device from device catalog > Add Device:
- The IO-Link Master is now pre-configured with standard I/O on pin 4 for all ports
Port Configuration
The ports of the IO-Link Master are freely configurable for your application and individual needs. For connecting IO-Link devices, an IO-Link communication can be set up on pin 4. If only digital IOs are needed, Pin 2 and 4 can also be configured as simple input or output. The configuration of the pin functions is done by plug device. The configuration of pin 4 has to be done for each port seperatly, pin 2 is combined for each port.- To configure the IO-Link port communication on pin 4, a suitable process data module must be selected: right click on IO-Link channel > Plug Device
- Choose module > Plug Device
-
For the correct process data size, see the manual of the IO-Link device used.
Make sure that enough memory space has been reserved in case one of the modules does not fit exactly.
There are two possible data types for process data, which are indicated by different colors of the IO-Link icon: grey for bits and black for array of bytes. Use plug device to choose one of these representation of process data.
- To configure pin 4 as input or output, use the input or output module, not a IO-Link module
IO_Link_CHx > Plug Device
As with IO-Link, separate process data are now created for each port. - To configure pin 2 as input or output, plug the device into slots for pin 2.
Input_Pin_2 > Plug Device to configure input process data
Output_Pin_2 > Plug Device to configure output process data
It is alwas possible to use pin 2 in both directions. Attention: In contrast to pin 4, a common byte is used for the pin 2 function. The bits from 0 to 7 represent the pin 2 of port 0 to 7.
Diagnosis
- There are four slots for direct and fast diagnosis of the powersupply:
For short circuit modules: each bit of the byte represents one of the eight ports.
The module status shows the power supply of the IO-Link Master - The status of the IO-Link communication is displayed for each channel in a status byte.
The Status can also be seen in the CoE online data:
These are the possible values: - A validation for each Port can be configured: IO-Link_Chx > Startup Parameter
The validation mode is stored in parameter index 0x20n2, subindex 0x02 (n = port number 0...7)
No validation (value 0): validation deactivated, every device will be accepted
Compatibility (value 1): manufacturer ID and device ID are compared to the module data. The IO-Link communication is only started if there is a match.
Identity (value 2): manufacturer ID and device ID and serial number are compared to the module data. The IO-Link communication is only started if there is a match.
The values for validation are stored in index x80n0, subindex 0x04 (Device ID), 0x05 (Vendor ID), 0x08 (Serial Number).
EoE-Communication
- EtherCAT network configuration
Activate the virtual ethernet port and configure the network adress in the tab EoE of the EtherCAT Master:
EtherCAT Master > EoE > virtual Ethernet port (master)
In the tab EoE of the EtherCAT Master is a overview of all slaves that support EoE functionality. Here, it is possible to activate the virtual port of the slaves and assign the network configuration automatically or manually.
It is also possible to activate expert settings to enable EoE on the IO-Link Master. The EoE tab appears. Now you can activate the virtual port of the IO-Link Master and assign the network configuration here .
EtherCAT Slave > General > enable expert settings
EtherCAT Slave > EoE > virtual ethernet port - ctrlX CORE network configuration
It's necessary to enable IP forwarding in the connectivity settings of the EoE port (eoe0) and the engineering port (eth0).
Settings > Connectivity
Settings > Connectivity > eoe0 > enable IP forwarding
Settings > Connectivity > eth0 > enable IP forwarding - Add Routing
For network access set the according route on your host operating system.
Open command line on your host:
Use your network specific configuration for ip adress, mask and gateway.
For mor details use command "route ?"
To test the route, ping an EoE Slave in the EtherCAT topology.
IO-Link Parametrization
- Via Webserver
If you have access to Webserver over EoE, you can configure your IO-Link devices in a web browser.
Open website via IP-Adress > ports
To write parameters, you must log in. Password: BNIECT.
It's also possible to upload an IODD file to set parameters with plane text. - Via Parameter Server:
An IO-Link master according to IO-Link Specification 1.1 can act as a parameter assignment server for the IO-Link device.
IO-Link_Chx > Startup Parameter > Set Parameter Server index 0x20n2, subindex 0x03 (n = port number 0...7)
Switched on: data management functions enabled, parameter data and identification data of the IO-Link devices are residually saved.
Switched off: data management functions disabled, saved data are retained.
Deleted: data management functions disabled, saved data is deleted.
Enable upload: Select whether an upload of parameter data to the data management of the IO-Link master port is to be carried out or not. If the upload is enabled, the master starts a parameter data upload as soon as a device requests an upload (upload flag set) or if there is no data saved in the master port (e.g. after data has been deleted or before the first data upload)
Block upload: If the upload is disabled, no data upload will be started. When there is an upload request from the IO-Link device, a download (if enabled) is started because no upload may be carried out if there are different parameter sets.
Enable download: Select whether a download of parameter data to the IO-Link device is to be carried out or not. As soon as the saved parameter data in the parameter server of the port is differentiated from the connected IO-Link device and no upload request from the IO-Link device is present, a download is carried out.
Block download: If the download is blocked, an upload (if enabled) of the parameter data occurs independent of the upload flag of the IO-Link device.
Block upload and download: If upload and download are blocked, no parameter data exchange occurs. The IO-Link device then communicates anyway with the IO-Link port.
The following values are possible for the settings:
0x8X Switch on
0x0X Switch off
0x40 Delete
0xX1 Switch on upload
0xX2 Switch on download
To enable the upload flag of an IO-Link device, the value 0x05 must be entered in the index 0x02, subindex 0
(e.g. see Parametrization via CoE Online)
- via CoE online
Via object 0x40n0 (IO-Link Service Data Ch. X), IO-Link ISDU parameters can be read or written from the IO-Link device. To do this, the corresponding index and subindex must be entered. In addition, the corresponding length and the data must still be entered when writing. Via the control object, the read or write task is then started. In the Object status, the result is then displayed.
IO-Link_Chx > Startup Parameter > IO-Link Service Data CH .X index 0x40n2 (n = port number 0...7)
Control Values for the Control: