Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

signal naming

maxp
2020-08-20
2020-08-24
  • maxp - 2020-08-20

    Hi,
    I am a bit confused because I have seen so many different variable name conventions. How should I construct my variable names if it should be as OPC UA compliant as possible?

     
  • MadsKaizer

    MadsKaizer - 2020-08-21

    There isn't really an idea in naming your variables to suit up with the OPC-UA driver, as it uses the runtime name as a large part of the total string.

    I replaced all of our tagname conventions with a single * to short it down, but we use CCS code for tagnames as its a much more wholesome naming strategy than just using TT, PT, etc. It is the IEC 81346-2:2019 standard and you can check out the latest CCS(2014) standard as its called CCI(2020) now here, its in Danish, but can give you an idea in the examples: https://anvisninger.molio.dk/aftale_og_kommunikation/eksempelsamling_installationer_cci_2020/eksempelsamling_installationer_a650/l1%20automationssystem

    We use it in a way like this L01 for automation in building 1, LC01 for automationsystem 1 in, BTA001 for temperature transmitter 1, so that component is called L01.LC01.BTA001 and the beautiful thing is, that a temperature transmitter in a cooling plant in building 6 is called H06.HC01.BTA001 so components are always using the same codes and there is codes for many different systems. No more remembering which plant TT50143 or TT50144 was used in :)

    Here is a example from one of my projects
    ns=4;s=|var|CODESYS Control for Raspberry Pi MC SL..oCMD_CONTROL.xCMD_MAN
    ns=4;s=|var|CODESYS Control for Raspberry Pi MC SL.
    .oMANUAL.bDECIMALS
    ns=4;s=|var|CODESYS Control for Raspberry Pi MC SL..oMANUAL.iVALUE_TYPE
    ns=4;s=|var|CODESYS Control for Raspberry Pi MC SL.
    .oMANUAL.rVALUE

    As you can see, the string has this long runtime name, that you can not change, in front of it all, but good practise is to use pre-fixes for datatypes as seen above.

     

    Last edit: MadsKaizer 2020-08-21
  • maxp - 2020-08-24

    Thank you both, thatΒ΄s helpful!

     

Log in to post a comment.