MCUXpresso SDK Documentation

Hardware requirements

Hardware requirements#

  • MIMXRT1180-EVK RevC

  • RJ45 Network cable

  • Mini/micro USB cable

  • Personal Computer on which the TwinCat3 has been installed(Windows 10 is recommended)

Board settings#

No special settings are required.

Prepare the Demo#

  1. Generate the SSC source code

    • Download Slave Stack Code Tool(SSC Tool V5.13) from BECKHOFF official website and install it

    • Open Slave Stack Code Tool

    • Click ‘File’ -> ‘New’ -> ‘Import’ to import the Congfig file Select eoe.xml under path ‘.\boards\evkmimxrt1180\ecat_examples\eoe<core>\SSC’.

    • Click ‘Custom’ -> ‘NXP ECAT…’ -> ‘OK’ to select the subdevice description file

    • Click ‘Tool’ -> ‘Application’ -> ‘Import’ to import Application information Select eoe_freertos.xlsx under path ‘.\boards\evkmimxrt1180\ecat_examples\eoe<core>\SSC’.

    • Click ‘Project’ -> ‘Create new Slave Files’ ‘Source Folder’(default): ‘.\boards\evkmimxrt1180\ecat_examples\eoe<core>\SSC\Src’. Click ‘Start’.

    • Remove eoe_freertos.c under Src folder

  2. Connect EtherCAT Port0 with TwinCAT3

    • RJ45 interface labeled as J28 is the EtherCAT Port0 and RJ45 interface labeled as J32 is the EtherCAT Port1.

  3. Connect a USB cable between the host PC and the OpenSDA USB port on the target board

  4. Open a serial terminal with the following settings

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  5. Download the program to the target board

  6. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo

  7. Update ESI file to EEPROM

    • Copy ESI file ‘ECAT-EOE.xml’ generated by SSC TOOL to <TwinCAT_installation_folder>/<twincat_version>/Config/io/EtherCAT/

    • Restart TwinCAT3 IDE

    • Scan Device and Update EEPROM

  8. Scan and load this device.

    The PLC Main code is as follows:

     PROGRAM MAIN
     VAR 
     	Delay : TON;
     	LedIn AT %I* : BOOL; 
     	LedOut AT %Q* : BOOL;
     END_VAR
     
     Delay(IN := TRUE, PT := T#1S);
     IF Delay.Q THEN
     	LedOut := NOT LedIn;
     	Delay(IN := FALSE);
     END_IF;
    
  9. EoE configuration setting

    • Set the address of the network card used to connect to the demo board on PC side

      ip address: 192.168.1.102

      subnet mask: 255.255.255.0

      gateway: 192.168.1.0

    • Set the address of the demo board on TwinCAT EoE configuration page

      ip address: 192.168.1.66

      subnet mask: 255.255.255.0

      gateway: 192.168.1.102

  10. Activate configuration

    • Click ‘TwinCAT’ -> ‘Restart TwinCAT(Config Mode)’ to activate configuration

  11. Test ping and http server

    • Open cmd.exe and execute “ping 192.168.1.66”

    • Make sure browser proxy disabled

    • Open browser and access “http://192.168.1.66”