Menu

openCONFIGURATOR: 2.0.0: incorrect PDO padding

Help
2016-01-27
2016-02-04
  • Romain Naour

    Romain Naour - 2016-01-27

    Hello,

    It seems there is a problem with the PDO padding with OC 2.0.0.

    Here is the mapping with OC 1.4.1:

    unsigned CN1_M00_X20PS9400a_NetworkStatus:8;
    unsigned CN1_M00_X20PS9400a_StatusInput01:1;
    unsigned CN1_M00_X20PS9400a_Bit_Unused_01:1;
    unsigned CN1_M00_X20PS9400a_StatusInput02:1;
    unsigned CN1_M00_X20PS9400a_Bit_Unused_02:5;
    unsigned CN1_M01_X20SM1436_NetworkStatus:8;
    unsigned PADDING_VAR_1:8;
    unsigned CN1_M01_X20SM1436_AbsPos01ActVal:32;
    unsigned CN1_M01_X20SM1436_MpGenStatus01:16;
    

    Then the same with OC 2.0.0:

    unsigned CN01_DOM01_VAR00_Index2100_Sub1E_NetworkStatus:8;
    unsigned CN01_DOM01_VAR01_Index2100_Sub1E_StatusInput01:1;
    unsigned CN01_DOM01_VAR02_Index2100_Sub1E_Bit_Unused_01:1;
    unsigned CN01_DOM01_VAR03_Index2100_Sub1E_StatusInput02:1;
    unsigned CN01_DOM01_VAR04_Index2100_Sub1E_Bit_Unused_02:5;
    unsigned CN01_DOM02_VAR00_Index2101_Sub1E_NetworkStatus:8;
    unsigned CN01_DOM02_VAR01_Index2101_Sub1E_AbsPos01ActVal:32;
    unsigned CN01_DOM02_VAR02_Index2101_Sub1E_MpGenStatus01:16;
    

    AbsPos01ActVal should be 32bits alligned.

    Best regards,
    Romain

     
  • Romain Naour

    Romain Naour - 2016-01-27

    Here is an archive cantaining the FiedBus and OC project.

    Best regards,
    Romain

     
  • Romain Naour

    Romain Naour - 2016-01-27

    Hello,

    By looking at xap.xml files generated with each OC version, you can see that the PDO objects naming has changed:

    With OC 1.4.1:

    <ApplicationProcess>
      <ProcessImage type="output" size="46">
        <Channel Name="CN1.M00.X20PS9400a.NetworkStatus" dataType="USINT" dataSize="8" PIOffset="0x0000"/>
        <Channel Name="CN1.M00.X20PS9400a.StatusInput01" dataType="BITSTRING" dataSize="1" PIOffset="0x0001" BitOffset="0x00"/>
        <Channel Name="CN1.M00.X20PS9400a.Bit_Unused_01" dataType="BITSTRING" dataSize="1" PIOffset="0x0001" BitOffset="0x01"/>
        <Channel Name="CN1.M00.X20PS9400a.StatusInput02" dataType="BITSTRING" dataSize="1" PIOffset="0x0001" BitOffset="0x02"/>
    

    For example : CN1.M00.X20PS9400a.StatusInput01
    <CNx>.<Mxx>.<ObjectName>.<subIndexName>

    With OC 2.0.0:

    <ApplicationProcess>
      <ProcessImage type="output" size="37">
        <Channel Name="CN01_DOM01_VAR00_Index2100_Sub1E_NetworkStatus" dataType="Unsigned8" dataSize="8" PIOffset="0x0000"/>
        <Channel Name="CN01_DOM01_VAR01_Index2100_Sub1E_StatusInput01" dataType="BITSTRING" dataSize="1" PIOffset="0x0001" BitOffset="0x00"/>
        <Channel Name="CN01_DOM01_VAR02_Index2100_Sub1E_Bit_Unused_01" dataType="BITSTRING" dataSize="1" PIOffset="0x0001" BitOffset="0x01"/>
        <Channel Name="CN01_DOM01_VAR03_Index2100_Sub1E_StatusInput02" dataType="BITSTRING" dataSize="1" PIOffset="0x0001" BitOffset="0x02"/>
        <Channel Name="CN01_DOM01_VAR04_Index2100_Sub1E_Bit_Unused_02" dataType="BITSTRING" dataSize="5" PIOffset="0x0001" BitOffset="0x03"/>
        <Channel Name="CN01_DOM02_VAR00_Index2101_Sub1E_NetworkStatus" dataType="Unsigned8" dataSize="8" PIOffset="0x0002"/>
    

    For example: CN01_DOM01_VAR01_Index2100_Sub1E_StatusInput01
    <CNxx><DOMxx><VARXX><StructName><varDeclarationName>

    We import the xap.xml in a third parties tool to name each PDO objets with an intelligible name.
    With this new naming convention we lose this information.

    Can we keep at least <ObjectName> and <subIndexName> ?

    Best regards,
    Romain

     
  • Christoph Ruecker

    Hello Romain,

    Thx for the bug report. I have fixed the padding issue and pushed it to my dev branch. The fix will be included in the 2.0.1 bug fix release which will be released soon.

    Best regards,
    Christoph

     
  • Romain Naour

    Romain Naour - 2016-02-03

    Hello Chrisoph,

    Thanks for the fix.
    I'm able now to test the OC plugin, so I backported [1] on v2.0.0 release.

    It fixes the padding issue in xap.h file but not in xap.xml
    From xap.h:

    unsigned CN01_DOM01_VAR00_Index2100_Sub1E_NetworkStatus:8;
    unsigned CN01_DOM01_VAR01_Index2100_Sub1E_StatusInput01:1;
    unsigned CN01_DOM01_VAR02_Index2100_Sub1E_Bit_Unused_01:1;
    unsigned CN01_DOM01_VAR03_Index2100_Sub1E_StatusInput02:1;
    unsigned CN01_DOM01_VAR04_Index2100_Sub1E_Bit_Unused_02:5;
    unsigned CN01_DOM02_VAR00_Index2101_Sub1E_NetworkStatus:8;
    unsigned PADDING_VAR_1:8;
    unsigned CN01_DOM02_VAR01_Index2101_Sub1E_AbsPos01ActVal:32;
    

    From xap.xml:

        <Channel Name="CN01_DOM01_VAR00_Index2100_Sub1E_NetworkStatus" dataType="Unsigned8" dataSize="8" PIOffset="0x0000"/>
        <Channel Name="CN01_DOM01_VAR01_Index2100_Sub1E_StatusInput01" dataType="BITSTRING" dataSize="1" PIOffset="0x0001" BitOffset="0x00"/>
        <Channel Name="CN01_DOM01_VAR02_Index2100_Sub1E_Bit_Unused_01" dataType="BITSTRING" dataSize="1" PIOffset="0x0001" BitOffset="0x01"/>
        <Channel Name="CN01_DOM01_VAR03_Index2100_Sub1E_StatusInput02" dataType="BITSTRING" dataSize="1" PIOffset="0x0001" BitOffset="0x02"/>
        <Channel Name="CN01_DOM01_VAR04_Index2100_Sub1E_Bit_Unused_02" dataType="BITSTRING" dataSize="5" PIOffset="0x0001" BitOffset="0x03"/>
        <Channel Name="CN01_DOM02_VAR00_Index2101_Sub1E_NetworkStatus" dataType="Unsigned8" dataSize="8" PIOffset="0x0002"/>
        <Channel Name="CN01_DOM02_VAR01_Index2101_Sub1E_AbsPos01ActVal" dataType="Integer32" dataSize="32" PIOffset="0x0003"/>
        <Channel Name="CN01_DOM02_VAR02_Index2101_Sub1E_MpGenStatus01" dataType="Unsigned16" dataSize="16" PIOffset="0x0007"/>
    

    The PIOffset of CN01_DOM02_VAR01_Index2101_Sub1E_AbsPos01ActVal should be 0x0004.

    Best regards,
    Romain

    [1] https://github.com/brrueckerc/openconfigurator-core/commit/c13a5c3d545c9bced4803b11b0f79ea7bd8f7be9

     
  • Romain Naour

    Romain Naour - 2016-02-04

    Hi Christoph,

    Thanks, I checked that the xap.xml and xap.h mapping is fine :)

    Best regards,
    Romain

     

Log in to post a comment.