EtherCAT-IOLink Gateway
 
Loading...
Searching...
No Matches
EtherCAT-IOLink Gateway Extended Example

Software Requirements

Software Version
Code Composer Studio 12.7
IND COMMS SDK for AM243x 09.02.00.09
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\ind_comms_sdk_09_02_00_09\mcu_plus_sdk

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
Project Select Window
  1. In the following 'Import' Window select search-directory and browse to the examples directory
Import CCS Project for AM243x-LP
  1. Check the boxes for the desired project and click Finish

Run and debug the examples with CCS

  1. In Code Composer Studio import CCS project ethercat_iolink_gateway_demo_am243x-lp_r5fss0-0_freertos_ti-arm-clang from \examples\industrial_comms\ethercat_iolink_gateway_demo\am243x-lp
  2. Click on View->Target Configuration.
  3. In the new window right click on Projects/ethercat_iolink_gateway_demo_am243x-lp_r5fss0-0_freertos_ti-arm-clang/targetConfigs/AM2434_ALX.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\ind_comms_sdk_09_02_00_09\mcu_plus_sdk\tools\ccs_load\am243x\load_dmsc_hsfs.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 ethercat_iolink_gateway_demo_am243x-lp_r5fss0-0_freertos_ti-arm-clang -> Debug -> ethercat_iolink_gateway_demo.release.out and click on "OK". And again "OK".
  11. Run ethercat_iolink_gateway_demo_am243x-lp_r5fss0-0_freertos_ti-arm-clang by click in Toolbar on the icon "Resume".
  12. Run the TwinCAT and scan for the devices.

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_LP.
  2. Be sure that the board is not powered. Unplug USB debugger (JTAG) - UART cable 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.
AM243x-LP_HSFS with BOOSTXL-IOLINKM
  1. Take the Balluff smart light and connect it to the Channel 1 on the BOOSTXL-IOLINKM-8 board.
  2. Take the Autosen distance sensor and connect it on the Channel 2 on the BOOSTXL-IOLINKM-8 board.
  3. The system shall look like on the following photo.
EtherCAT IO-Link Gateway Setup
  1. Take the not yet powered 24V cable and plug it in the BOOSTXL-IOLINKM-8 board.
  2. Power on the board AM243x_LP.
  3. Power on the IO-Link expansion board BOOSTXL-IOLINKM-8.
  4. Check that the 3.3V and 24VPGODD LEDs on the expansion board BOOSTXL-IOLINKM-8 are on.
Power LEDs - BOOSTXL-IOLINK-8
  1. Load application described in the chapter Run and debug the examples with CCS