EtherCAT-IOLink Gateway
EtherCAT-IOLink Gateway example

Software Requirements

Software Version
Code Composer Studio \doc_ccs
MCU+ SDK for AM243x \doc_sdk_ver
TwinCAT TcXaeShell 15.0.28010.2050 D15.8

Under Windows, make sure that the following environment variable is set (adjust path):

set MCU_PLUS_SDK_AM243X_PATH=C:\ti\mcu_plus_sdk_am243x_08_06_00_22

Import Example Projects in Code Composer Studio

In Code Composer Studio (CCS) the example projects are imported as CCS projects from the directory examples/ in the EtherCAT-IOLink Gateway archive.

  1. In CCS select File > Import...
  2. In the following 'Select' window choose Code Composer Studio > CCS Projects

  3. In the following 'Import' Window select search-directory and browse to the examples directory

  4. Check the boxes for the desired project(s) and click Finish

Run and debug the examples with CCS

  1. In Code Composer Studio import CCS projects ECProvider and ec_iol_gateway from examples/
  2. Click on "View->Target Configuration".
  3. In the new window right click on
    Projects/product_gateway_ec_iol/targetConfigs/AM243x_LAUNCHPAD.ccxml
    and select
    Launch selected configuration
  4. Open a scripting console by clicking on "View->Scripting Console".
  5. In the new window: type and press ENTER
    loadJSFile C:\ti\mcu_plus_sdk_am243x_08_06_00_22\tools\ccs_load\doc_soc_lower\load_dmsc.js
  6. In the window "Debug" left click on "Texas Instruments XDS110 USB Debug Probe/MAIN_Cortex_R5_0_0".
  7. Click in the toolbar on the icon "Connect".
  8. Click in the toolbar on the icon "CPU Reset" and select "CPU Reset".
  9. In the toolbar click on the icon "Load" and click on the button "Browse Project".
  10. Select the "product_gateway_ec_iol->Debug->product_gateway_ec_iol.out" and click on "OK". And again "OK".
  11. Run product_gateway_ec_iol by click in Toolbar on the icon "Resume".
  12. Run the TwinCAT project twincat/Gateway_Example. The LEDs mentioned in the TwinCAT example are currently disabled due the hw access collisions between CPUs.

Run the TwinCAT projects

This demo shows an example application for the Gateway with two IO-Link devices:

  • distance sensor AI406 from Autosen
  • smart light BNI007T from Balluff

The TwinCAT application reads cyclic the measured distance and send back a color command for the smart light:

  • green color - very large distance
  • yellow color - nearby the not allowed distance
  • red color - too small distance

Setup the hardware & firmware

  1. Take the development board AM243x_EVM.
  2. Be sure that the board is not powered. Unplug USB debugger (JTAG) and UART cables from the PC.
  3. Connect the expansion board BOOSTXL-IOLINKM-8 on top of it. Be careful: Bend the supply pin strips (left/right, 3 pins) inwards, as there is a high risk of a short circuit.

  4. Take the not yet powered 24V cable and plug it in the BOOSTXL-IOLINKM-8 board.
  5. Take the Balluff smart light and connect it on the Channel 1.
  6. Take the Autosen distance sensor and connect it on the Channel 2.
  7. The system shall look like on the following photo.

  8. Power on the board AM243x_EVM.
  9. Power on the expansion board BOOSTXL-IOLINKM-8.
  10. Check that the 3.3V and 24VPGODD LEDs on the expansion board BOOSTXL-IOLINKM-8 are on.

  11. Load application described in the chapter Run and debug the examples with CCS