Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important information on the platform change.

Titel-Balluff_CtrlX_BNI.jpg

Set up a Balluff BNI IO-Link Master with ctrlX CORE using EtherCAT

PretschC
Established Member
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.
    ctrlX CORE User InterfacectrlX CORE User Interface
  • Add EtherCAT master by clicking [+] in EtherCAT > Configuration.
    EtherCAT / Configuration / [+]EtherCAT / Configuration / [+]EtherCAT / Configuration / [+] / [OK]EtherCAT / Configuration / [+] / [OK]
  • Open ctrlX I/O Engineering

    ctrlX I/O EngineeringctrlX I/O Engineering

  • Open New project.
    New ProjectNew Project
Install device description
  • Download ESI (device description) on Balluff website:
    Download ESIDownload ESI
    e.g. for this example: https://www.balluff.com/de-de/products/BNI0077

  • Open Tools > Device Repository
    Open Device RepositoryOpen Device Repository

  • Install device description
    Install device descriptionInstall device description

EtherCAT-Device configuration
  • Add Device to EtherCAT-Master by right-click in the device tree on ethercatmaster > Add Device:
    EtherCAT device configurationEtherCAT device configuration

  • Choose the relevant ESI (device description) for your device from device catalog > Add Device:
    Add deviceAdd device

  • The IO-Link Master is now pre-configured with standard I/O on pin 4 for all ports
     PreconfigurationPreconfiguration

Port Configuration
  • Technical data IO-Link portTechnical data IO-Link port

    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
    Plug device selectionPlug device selection

  • Choose  module > Plug Device 
    Plug DevicePlug 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.
    Process data figureProcess data figure

  • To configure pin 4 as input or output, use the input or output module, not a IO-Link module 
    IO_Link_CHx > Plug Device
    Configure  pin 4Configure pin 4

    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
    Configure  pin 2Configure pin 2

    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:
    Diagnostic bytesDiagnostic bytes

    For short circuit modules: each bit of the byte represents one of the eight ports. 
    Short circuit modulesShort circuit modules

    The module status shows the power supply of the IO-Link Master 
    Module statusModule status

  • The status of the IO-Link communication is displayed for each channel in a status byte.
    Communication statusCommunication status

    The Status can also be seen in the CoE online data:
    CoE communication statusCoE communication status

    These are the possible values:
    Possible portsPossible ports

  • A validation for each Port can be configured: IO-Link_Chx > Startup Parameter
    Port validationPort validation

    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)
    EoE settingsEoE settings

    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
    Expert settingsExpert settings

    EtherCAT Slave > EoE > virtual ethernet port
    Virtual ethernet portVirtual 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
    ctrlX CORE connectivity settingsctrlX CORE connectivity settings

    Settings > Connectivity > eoe0 > enable IP forwarding
    ctrlX CORE IP forwarding eoe0ctrlX CORE IP forwarding eoe0

    Settings > Connectivity > eth0 > enable IP forwardingctrlX CORE IP forwarding eth0ctrlX CORE IP forwarding eth0

  • Add Routing
    For network access set the according route on your host operating system. 

    Open command line on your host:
    RouteRoute

    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
    WebserverWebserver


    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)
    Parameter serverParameter server

    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:
    • 0x00: No action
    • 0x02: Write
    • 0x03: Read

    Status Values for the Status:
    • 0x00: No activity
    • 0x01: Active / Busy
    • 0x02: Access
    • 0x04: Error
    • 0xFF: Failure

    example: reading index 0x10 Vendor Name
    1. Set IO-Link index (CoE Subindex 0x03), IO-Link subindex (0x04)
    2. Set contol (0x01) to value 0x03 (read)
    CoE readCoE read
    3. The answer is displayes in Data (0x06), Status (0x02) displays answer 0x02 (access).

    To write parameter, also set lenght (0x05) and data array (0x06).
    Status (0x02) displays answer 0x02 (access).
  • via Startup Parameter
    For startup parameter you have to follow the same steps as for parameters via CoE.
    Make sure that the control command is always the last command for this parameter set. For more than one parameter, start again by setting index, subindex, lenght and Data and end the parameter with the command control .

    Startup parameter selectionStartup parameter selection

    Startup parameter overviewStartup parameter overview

 

Related Links
The Company 

Your partner for success in automation

Balluff is a leading supplier of high-quality sensor, identification and image processing solutions, including network technology and software for all automation requirements. We adhere to our motto “innovating automation” as an agile developer and technological pioneer. And we always act sustainably. We deliver innovative solutions to increase your competitive ability. Our consistent digital orientation drives our joint progress, and our innovative spirit factors directly to your success factor. Family-run for more than 100 years, Balluff today employees around 3600 employees worldwide who are committed to the highest quality standards for your success. As a future-oriented company, we are also dedicated to the development of digitalization and IIoT applications for an increasingly digital and networked world. You can rely on us, our promises, our commitment and Balluff quality – all in the name of a mutually beneficial partnership

PretschC_0-1668436085468.jpeg

2 Comments
cristinafurini
New Poster

Hi,

how many BNI0077 could I use with one ctrlX?

is there an App from Balluff to check sensors?

thank you

Cristina

PretschC
Established Member

Hi Cristina,

thank you for your question.

In principle, there is only the limitation of 65535 EtherCAT slaves for an EtherCAT master and the performance of the controller. There are no special limitations for IO-Link.
In my application I had up to 4 IO-Link masters and two additional EtherCAT slaves without any problems.

What do you mean by an app for testing sensors?

Feel free to write me a private message or contact me at support.de@Balluff.de.

Best regards
Carsten

 

 

 

Must Read
Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist