Ethercat Dynamic Config : FMMU, SyncManager?

audi0615
2020-05-15
2020-05-19
  • audi0615 - 2020-05-15

    Hi.

    This is with reference to Dynamic Configuration of Ethercat slaves in SP16
    (https://help.codesys.com/webapp/RMyqti2qMZZtTODOaHlN71rMvfI%2Ffld-DynamicConfig;product=EtherCATStack;version=3.5.16.0)

    I'm trying to understand the example but i have a several questions about it.

    Following code snippet is extracted from the example.

    CASE readeeprom.dwVendorID OF
      2: // Beckhoff
          CASE readeeprom.dwProductID OF
              72100946: // EK1100 -> nothing to add
                  xKnown := TRUE;
              131608658: // EL2008                  
                  pSlave^.AddSyncManager(16#0F00, 1,16#44, TRUE, 1);
                  pSlave^.AddFMMU(0, 1, 0, 7, 16#0F00, 0, 2, 1);
                  xKnown := TRUE;
              66072658: // EL1008;
                  pSlave^.AddSyncManager(16#1000, 1,16#0, TRUE, 1);
                  pSlave^.AddFMMU(0, 1, 0, 7, 16#1000, 0, 1, 1);
                  xKnown := TRUE;
              270807122: // EL4132
                  pSlave^.AddSyncManager(16#1800, 246,16#26, TRUE, 3);
                  pSlave^.AddSyncManager(16#18F6, 246,16#22, TRUE, 2);
                  pSlave^.AddSyncManager(16#1000, 4,16#24, TRUE, 1);
                  pSlave^.AddSyncManager(16#1100, 0,16#20, TRUE, 0);
                  pSlave^.AddFMMU(0, 4, 0, 7, 16#1000, 0, 2, 1);
                  pSlave^.AddFMMU(0, 1, 0, 0, 16#80D, 0, 1, 1);
                  xKnown := TRUE;
              205926482: // EL3142
                  IF readeeprom.byMailboxProtocol > 0 THEN
                  // mailbox from eeprom
                      pSlave^.AddSyncManager(readeeprom.wRcvMbxOffset, readeeprom.wRcvMbxSize,16#26, TRUE, 3);
                      pSlave^.AddSyncManager(readeeprom.wSndMbxOffset, readeeprom.wSndMbxSize,16#22, TRUE, 2);
                  END_IF
                  pSlave^.AddSyncManager(16#1100, 0,16#4, TRUE, 1);
                  pSlave^.AddSyncManager(16#1180, 6,16#20, TRUE, 0);
                  pSlave^.AddFMMU(0, 6, 0, 7, 16#1180, 0, 1, 1);
                  pSlave^.AddFMMU(0, 1, 0, 0, 16#80D, 0, 1, 1);
    

    1) AddSyncManager Method

    wStartAddress (i.e.16#1800) => is this user-defined or device specific value?

    usiMode : (i.e. 16#20) => is there any pre-defined value depending on type of the device?

    2) For analog input/output devices(EL4132, EL3142), AddSyncManager are used four times and AddFMMU are used twice, why?

    3) For analog Input device (EL3142) , why a conditional statement is used for AddSyncManager as follows?

    IF readeeprom.byMailboxProtocol > 0 THEN
          // mailbox from eeprom
              pSlave^.AddSyncManager(readeeprom.wRcvMbxOffset, readeeprom.wRcvMbxSize,16#26, TRUE, 3);
              pSlave^.AddSyncManager(readeeprom.wSndMbxOffset, readeeprom.wSndMbxSize,16#22, TRUE, 2);
     END_IF
    

    a detailed documentation on the Dynamic Config feature would be much appreciated.

     

    Last edit: audi0615 2020-05-15
  • eschwellinger

    eschwellinger - 2020-05-19

    1)*AddSyncManager Method

    wStartAddress (i.e.16#1800) => is this user-defined or device specific value?

    usiMode : (i.e. 16#20) => is there any pre-defined value depending on type of the device? *

    All data is device specific. Each manufacturer of the slave has defined the data. It is all inside the ESI file
    2) For analog input/output devices(EL4132, EL3142), AddSyncManager are used four times and AddFMMU are used twice, why?
    This is device specific. The EL4132/E3142 are using CoE as a Mailbox protocol, therefore a sync manager is required for the mailbox communication

    3) For analog Input device (EL3142) , why a conditional statement is used for AddSyncManager as follows?
    IF readeeprom.byMailboxProtocol > 0 THEN
    // mailbox from eeprom
    pSlave^.AddSyncManager(readeeprom.wRcvMbxOffset, readeeprom.wRcvMbxSize,16#26, TRUE, 3);
    pSlave^.AddSyncManager(readeeprom.wSndMbxOffset, readeeprom.wSndMbxSize,16#22, TRUE, 2);
    ENDIF

    It is only an example how to get the information from the EEprom, if a device supports the mailbox

     
  • audi0615 - 2020-05-19

    Thank you for your reply Mr. Edwin
    I have requested the relevant information to Beckhoff and Crevis.
    Thanks again.

     

Log in to post a comment.