[OPC UA] Array with enum bounds

dFx
2019-10-28
2019-10-29
  • dFx

    dFx - 2019-10-28

    Hi,

    as of somachine 4.3, OPC UA does not correctly shows items which are in an array declared with enum bounds. It shows only first index members.

    Is this ok with later versions of codesys ?

     
  • i-campbell

    i-campbell - 2019-10-28

    Can you provide an example of an array declared with enum bounds?

     
  • dFx

    dFx - 2019-10-29

    Effect seen in opc ua bowser

    application.xml

       <TypeSimple name="T_MODESMARCHE_ENUM" size="1" swapsize="1" typeclass="Enum" iecname="MODESMARCHE_ENUM" />
        <TypeUserDef name="T_CsgModeFct_STRUCT" size="24" nativesize="24" typeclass="Userdef" iecname="CsgModeFct_STRUCT">
          <UserDefElement type="T_REAL" iecname="DebitAir" byteoffset="0" />
          <UserDefElement type="T_REAL" iecname="DebitAirTol" byteoffset="4" />
          <UserDefElement type="T_REAL" iecname="Temp" byteoffset="8" />
          <UserDefElement type="T_REAL" iecname="TempTol" byteoffset="12" />
          <UserDefElement type="T_REAL" iecname="Hygro" byteoffset="16" />
          <UserDefElement type="T_REAL" iecname="HygroTol" byteoffset="20" />
        </TypeUserDef>
        <TypeArray name="T_ARRAY__0__3__OF_CsgModeFct_STRUCT" size="96" nativesize="96" typeclass="Array" iecname="ARRAY [0..3] OF CsgModeFct_STRUCT" basetype="T_CsgModeFct_STRUCT">
          <ArrayDim minrange="0" maxrange="3" />
        </TypeArray>
       <TypeUserDef name="T_Consignes_STRUCT" size="100" nativesize="100" typeclass="Userdef" iecname="Consignes_STRUCT">
          <UserDefElement type="T_ARRAY__0__3__OF_CsgModeFct_STRUCT" iecname="Mode" byteoffset="0" />
          <UserDefElement type="T_TIME" iecname="TempsPoly" byteoffset="96" />
        </TypeUserDef>
       
       <Node name="Consignes" type="T_Consignes_STRUCT" access="Read">
         <Comment> Consignes</Comment>
       </Node>
    

    OpcUASymbolConf.map

    ['IHM.iHygroAmb','r','A;4;4;36516;8'],
    ['IHM.Consignes.Mode[0].DebitAir','r','A;4;4;36520;8'],
    ['IHM.Consignes.Mode[0].DebitAirTol','r','A;4;4;36524;8'],
    ['IHM.Consignes.Mode[0].Temp','r','A;4;4;36528;8'],
    ['IHM.Consignes.Mode[0].TempTol','r','A;4;4;36532;8'],
    ['IHM.Consignes.Mode[0].Hygro','r','A;4;4;36536;8'],
    ['IHM.Consignes.Mode[0].HygroTol','r','A;4;4;36540;8'],
    ['IHM.Eclairages[1]','b','A;1;4;36620;8'],
    

    Declaration in codesys

       {attribute 'symbol' := 'read'}
       Consignes: Consignes_STRUCT;
       
       TYPE Consignes_STRUCT :
    STRUCT
       Mode: ARRAY [ModeFct_ENUM.HorsGel..ModeFct_ENUM.Poly] OF CsgModeFct_STRUCT; 
       TempsPoly: TIME;
    END_STRUCT
    END_TYPE
       
    

    IMG: Bild

     

Log in to post a comment.