SPRADH0 August   2024 AM625 , AM6442 , AM69 , TDA4VM

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
    1. 1.1 What is EtherCAT?
    2. 1.2 What is a PLC?
    3. 1.3 What is CODESYS?
  5. 2Evaluation Platform and Methods
    1. 2.1 Hardware
    2. 2.2 Software
    3. 2.3 Test Topology
  6. 3Performance Metrics
    1. 3.1 Cyclictest Performance Metrics
    2. 3.2 EtherCAT Performance Metrics
  7. 4Optimizations
    1. 4.1 Implemented Optimizations
    2. 4.2 Future Considerations
      1. 4.2.1 Set Maximum CPU Frequency
      2. 4.2.2 Isolate Cores
      3. 4.2.3 Set CPU Affinity
      4. 4.2.4 Isolate Cores and Set CPU Affinity
      5. 4.2.5 Ksoftirqs to FIFO
      6. 4.2.6 Increase the Real-Time Scheduling Time
      7. 4.2.7 Disable irqbalance
      8. 4.2.8 Use Separate Network Interface Card (NIC)
      9. 4.2.9 Disable Unnecessary Drivers
  8. 5Summary
  9. 6References
  10. 7Appendix A: How to Setup TI Embedded Processors as EtherCAT Controller Using the CODESYS Stack
    1. 7.1 Hardware Requirements
    2. 7.2 Software Requirements
    3. 7.3 Hardware Setup
    4. 7.4 Software Setup
      1. 7.4.1 Windows PC Setup
      2. 7.4.2 EtherCAT Controller Setup
      3. 7.4.3 CODESYS Development System Project
      4. 7.4.4 Execution
    5. 7.5 How to View Performance Measurements
      1. 7.5.1 Appendix A Resources
  11. 8Appendix B: How to Enable Unlimited Runtime on CODESYS Stack
    1. 8.1 CODESYS Licensing Background
    2. 8.2 Obtaining a CODESYS License
    3. 8.3 Activating CODESYS License
      1. 8.3.1 Background
      2. 8.3.2 Recommended Steps
    4. 8.4 Verifying CODESYS License Applied
      1. 8.4.1 Known Issues With Verifying CODESYS License Applied

EtherCAT Controller Setup

  1. Flash an SD card with the default RT Linux SDK image for the EtherCAT controller using a tool such as BalenaEtcher
    1. For AM62x/AM64x devices
      1. If the device is a GP device, the GP version of tiboot3.bin must be renamed to tiboot3.bin, replacing the original tiboot3.bin
      2. If the device is a HS-FS device, the tiboot3.bin can be left as the default version
    2. For AM69x devices
      1. The default tiboot3.bin must be replaced with the HS-FS version of tiboot3.bin
      2. For example:
        1. $ cd <path-to-boot-partition>
        2. $ mv tiboot3-j784s4-hsfs-evm.bin tiboot3.bin
  2. After the required files from the CODESYS Control for Linux ARM SL package has been copied into the root directory of the device to be set up as an EtherCAT controller and the device has been booting up with the SD card, install the packages required to setup the device as EtherCAT controller with the copied over files. Run the following commands on the target device

    1. $ opkg -V2 install <path-to-file>/codemeter-lite_<version>_arm64.deb
      1. For AM62x devices, if there is a "does not have a compatible architecture" error, run the following command instead
        1. opkg -V2 install --nodeps --offline-root / --add-arch arm64:13 <path-to-file>/codemeter-lite_<version>_arm64.deb
    2. $ opkg -V2 install <path-to-file>/codesyscontrol_linuxarm64_<version>_arm64.ipk
  3. Start the CODESYS application on the EtherCAT controller with one of the following commands
    1. $ /opt/codesys/bin/codesyscontrol.bin /etc/CODESYSControl.cfg
    2. $ systemctl start codesyscontrol.service
    3. $ /etc/init.d/codesyscontrol start
  4. Verify that the CODESYS application is running before attempting to connect the EtherCAT controller to the CODESYS Development System on your Windows PC

  5. Verify that the CodeMeter application (on your EtherCAT controller device) is running with an activated CODESYS license on the EtherCAT controller. See Section 8 on how to activate a CODESYS license. Once a CODESYS license has been activated, use the following command to start the licensing application:
    1. $ systemctl start codemeter.service