Using latch variables in translated alarmGroup messages

joanm
2023-02-16
2023-03-03
  • joanm - 2023-02-16

    Hello all,

    Mistakenly I thought the integer value was working while it is not. corrected the question...

    Codesys 3.5 sp15 patch 1 (64 bits) here.

    Let's say I have an alarm A with:
    DIGITAL observation type
    DETAILS: "arr[3].arrfb[1,1].bFault = TRUE"
    MESSAGE: "text %s more text."
    LATCH VAR: myString

    And an alarm B With:
    DIGITAL observation type
    DETAILS: "arr[12].bFault = TRUE"
    MESSAGE: "text %d more text."
    LATCH VAR: myInteger

    In the alarm table I get the right alarms.
    The B type alarm show "text %d more text." even the myInteger value is 123.
    The A type alarm show "text %s more text." even the myString value is "abc".

    Is Codesys capable to work with string variables in latch variables?
    Am I doing something wrong?
    Which is the right syntax for the placeholders here?

    As always thank you in advance.

     

    Last edit: joanm 2023-02-17
  • joanm - 2023-03-03

    Yep, that works well.

    Thanks for posting!

     

Log in to post a comment.