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 AM64x 09.02.00.49
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_AM64X_PATH = C:\ti\ind_comms_sdk_09_02_00_49\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 AM64x-EVM
  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_am64x-evm_r5fss0-0_freertos_ti-arm-clang from \examples\industrial_comms\ethercat_iolink_gateway_demo\am64x-evm
  2. Click on View->Target Configuration.
  3. In the new window right click on Projects/ethercat_iolink_gateway_demo_am64x-evm_r5fss0-0_freertos_ti-arm-clang/targetConfigs/AM64x.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_49\mcu_plus_sdk\tools\ccs_load\am64x\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_am64x-evm_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_am64x-evm_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 AM64x_EVM.
  2. Be sure that the board is not powered. Unplug USB debugger (JTAG) and UART cables from the PC.
  3. Connect the IO-Link breakout board (TMDS64DC01EVM) to the AM64x_EVM.
TMDS64DC01EVM with AM64x_EVM
  1. Take the Balluff smart light and connect it to the Channel 1 on the TMDS64DC01EVM IO-Link breakout board.
  2. Take the Autosen distance sensor and connect it to the Channel 2 on the TMDS64DC01EVM IO-Link breakout 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 TMDS64DC01EVM IO-Link breakout board.
  2. Power on the board AM64x_EVM.
  3. Power on the TMDS64DC01EVM IO-Link breakout board.
  4. Load application described in the chapter Run and debug the examples with CCS