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.

TMS320F28388D: TMS320F28388D EtherCAT Min PD Cycle Time with DC

Part Number: TMS320F28388D

Tool/software:

Hello,

I am using TMS320F28388D as subordinate devices in an EtherCAT network that I intend to run at 4 kHz (250 us cycle time). I was originally intending to run the system with DC (Distributed Clock) enabled, but I found that the device seems to only support a minimum SYNC0 cycle time of 500 us. This is interpreting from the block below from ecat_def.h:

/**
MIN_PD_CYCLE_TIME: Minimum cycle time in ns the slave is supporting (entry 0x1C3x:05).<br>
In case that the value is set to 0 the value of 0x1C3x:5 is calculated if 0x1C3x.8 is 1 */
#ifndef MIN_PD_CYCLE_TIME
#define MIN_PD_CYCLE_TIME                         0x7A120
#endif
The file ecat_def.h is generated by the Beckhoff SSC tool, and the value of this variable seems to be read from the ESI file F2838x CM EtherCAT Slave.xml. 
When I try running at a 250 us cycle time with DC enabled I get an error with ALSTATUSCODE_DCSYNC0CYCLETIME (defined in ecatslv.h). If I instead run at 500 us with DC enabled or 250 us with DC disabled it runs fine. 
My questions are:
1. Is it correct for me to conclude that this device does not support running with a 250 us DC cycle time? Can this be bypassed, or are there other C2000 devices that would support a 250 us cycle time with DC?
2. Is there a minimum supported cycle time when running without DC? The AL status code ALSTATUSCODE_CYCLETIMETOOSMALL does not seem to be used in my generated slave code so I'm not sure what PD cycle time limit would apply without DC.
Thank you,
Blake
  • Blake,

    1. Is it correct for me to conclude that this device does not support running with a 250 us DC cycle time? Can this be bypassed, or are there other C2000 devices that would support a 250 us cycle time with DC?

    You can absolutely use a 250 us cycle time with DC. I have always configured this through the MainDevice, for example using TwinCAT. Since this value will be stored in the ESC registers, it is modifiable by either the C28X CPU or the MainDevice.

    2. Is there a minimum supported cycle time when running without DC? The AL status code ALSTATUSCODE_CYCLETIMETOOSMALL does not seem to be used in my generated slave code so I'm not sure what PD cycle time limit would apply without DC.

    I think the minimum cycle time is 1 us. Honestly the easiest way to check this would be to play with the settings in TwinCAT if you are able to use TwinCAT as your MainDevice.

    Best Regards,

    Ben Collier

  • Ben,

    Thank you for your response. Question 2 is resolved and I was able to find the limit experimentally by playing with the settings as you suggested. With DC disabled I started seeing overrun errors below 40 microseconds with my network topology and application.

    However, for question 1 I still have some confusion. You say that I can use a 250 us cycle time with DC, but as I said in the original message I already tried to use TwinCAT to set the task cycle time to 250 us and also set the SYNC0 cycle time to 250 us. When I do this and run on the TMS320F28388D subordinate devices I get the AL status code ALSTATUSCODE_DCSYNC0CYCLETIME and the subordinates do not progress past the Pre-op state. The value of the macro definition MIN_PD_CYCLE_TIME seems to suggest the minimum allowed SYNC0 cycle time is 500 us.

    In order to bypass this error, in TwinCAT would I need to configure the SYNC0 cycle time to be an allowed value, like 500 us, while the task cycle time is 250 us? Otherwise, how do you recommend I configure the TwinCAT project to achieve the 250 us task cycle time with DC enabled?

    Thank you,

    Blake

  • Ben,

    Thank you for your response. Question 2 is resolved and I was able to find the limit experimentally by playing with the settings as you suggested. With DC disabled I started seeing overrun errors below 40 microseconds with my network topology and application.

    However, for question 1 I still have some confusion. You say that I can use a 250 us cycle time with DC, but as I said in the original message I already tried to use TwinCAT to set the task cycle time to 250 us and also set the SYNC0 cycle time to 250 us. When I do this and run on the TMS320F28388D subordinate devices I get the AL status code ALSTATUSCODE_DCSYNC0CYCLETIME and the subordinates do not progress past the Pre-op state. The value of the macro definition MIN_PD_CYCLE_TIME seems to suggest the minimum allowed SYNC0 cycle time is 500 us.

    In order to bypass this error, in TwinCAT would I need to configure the SYNC0 cycle time to be an allowed value, like 500 us, while the task cycle time is 250 us? Otherwise, how do you recommend I configure the TwinCAT project to achieve the 250 us task cycle time with DC enabled?

    Thank you,

    Blake

  • Blake,

    To clarify, I think that a task cycle time of 250us should be possible, but I am not sure about the SYNC0 cycle time. 

    In order to bypass this error, in TwinCAT would I need to configure the SYNC0 cycle time to be an allowed value, like 500 us, while the task cycle time is 250 us?

    I think this is a good idea. Please check if your communication works with a higher SYNC0 cycle time while keeping the task cycle time at 250 us.

    Best Regards,

    Ben Collier