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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
Message should be something like:
text <LATCH1> more text.
See:
https://content.helpme-codesys.com/en/CODESYS%20Visualization/_visu_extending_alarm_messages_with_latch_variables.html
Last edit: TimvH 2023-02-20
Yep, that works well.
Thanks for posting!