This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM64X: EtherCAT Subdevice: Synchronization error in Config mode

Part Number: PROCESSOR-SDK-AM64X
Other Parts Discussed in Thread: AM2434

Hi there,

I have problems with DC-Sync on AM64x EVM board with ethercat_slave_simple_demo_am64x-evm_r5fss0-0_freertos_ti-arm-clang example. SDK version Industrial Communications SDK 09.00.00.03

Following setup:
- running application on R50-1 core
- cable connected to EtherCAT IN/Port0
- created a PLC-Task in Twincat with 1000 us cycle time
- linked PLC-Task variable to TX-Process data
- activated Sync0 with 1000 us cycle time

- running TwinCAT in Config mode

After a few minutes (or sometimes even just seconds) I get the AL Status Code '0x001a - Synchronization error'. The Subdevice then switches into SAFEOP mode and sometimes cannot recover back to OP.


What I found out is, that this error only seems to occur if the FreeRun Cycle set under EtherCAT Master -> Adapter -> FreeRun Cycle (ms) does not match the set SYNC0 frequency. This behavior is not what I know from other EtherCAT devices, there the DC-SYNC mode works also in Config mode without adjusting FreeRun Cylce time. For higher DC-SYNC frequencies this is also not possible as the lowest I can get with FreeRun Cylce time is 1ms.

Is this by design that DC-Sync is not properly supported in config mode or is there a problem with the Stack?

I can reproduce this with two different Windows-PC running as TwinCAT master.

PS: the same error occured on a custom AM2434 board, I just reproduced with AM64x EVM

  • Hi Dominic, I will double check with the experts if there is any known issue or SYNC0 frequency restriction. In the meantime, can you please double check to confirm you followed all the instructions from <ind_comms_sdk_am243x_09_00_00_03>/docs/am243x/ethercat_slave/simple_demo_in_twincat3.html ? --> Testing DC Synchronization mode

    Also, below thread talks about how to reproduce AM243x EtherCAT DC benchmark. "To attain 50us cycle time, we use Beckhoff PLC (C6015-0020) with TwinCAT 3". So, for lower than 1ms using a PLC might be a better option as it has been tested.

    (+) LP-AM243: Reproducing the interrupt processing time benchmark in EtherCAT Slave Datasheet - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

    thank you,

    Paula

  • Hi Paula,

    Yes in general I followed these steps, but I didn't set the base time to 50 us, instead 250 us and 500 us were used. I also used a isolated core for the realtime task. Therfore I think these base times and a cycle time of 1ms should be manageable? I also used this for other EtherCAT-Subdevices.

    Can you reproduce on a normal computer?

  • Dominc, I will check with our experts and come back to you.

    Thank you,

    Paula 

  • DC requires PLC/master to maintain real time requirements and not doing so will lead to synchronization errors (especially if master is not able to send process data without significant jitter)

    From Beckhoff documentation - the differences between Run mode and Config mode in TwinCAT 3:

    1. Run Mode:

      • Purpose: Run mode is used when you want to execute your TwinCAT program on the target system (such as a PLC or industrial PC).
      • Functionality:
        • In Run mode, your TwinCAT program runs in real-time, controlling the connected hardware.
        • Inputs and outputs are actively processed, and the system behaves as intended.
        • You can monitor variables, I/O states, and program execution.
      • Use Cases:
        • Use Run mode during normal operation or production.
        • Debugging and troubleshooting are limited in Run mode.
        • Changes to the program are not allowed while in Run mode.
      • Command to Activate Run Mode: Use the command doas TcSysExe.exe --run in the console.
    2. Config Mode:

      • Purpose: Config mode is for configuring and modifying your TwinCAT project.
      • Functionality:
        • In Config mode, you can create, edit, and organize your project components (such as tasks, programs, function blocks, etc.).
        • You can add or modify variables, logic, and configurations.
        • Debugging tools are fully available in Config mode.
      • Use Cases:
        • Use Config mode during development, testing, and commissioning.
        • Make changes to your program, add new components, or adjust settings.
        • You cannot execute the program in Config mode.
      • Command to Activate Config Mode: Use the command doas TcSysExe.exe --config in the console.

    Remember to switch between these modes based on your specific requirements. Config mode is for development and setup, while Run mode is for actual execution

  • Another slave device is able to do this does not mean that its complying to the spec, simple dig IO slaves (EtherCAT directly controlling outputs/inputs without stack) does not do DC error checks for synchronization error.

  • I completely agree that for normal operation you must use RUN mode.

    I just thought that it would be strange for a customer buying a product utilizing the TI-stack and then seeing all those errors when testing the device in config mode. But hopefully this will not be an issue in future, let's close this ticket.