Using dynamic text within comment fields
logi.CAD 3 evaluates a dynamic text depending on the element to which the →comment field has been attached. Hence, let logi.CAD 3 evaluate certain information.
The following dynamic texts are supported:
Dynamic text |
Meaning |
||||||||
{comment} |
if the comment field is attached to a value field containing a variable: comment of the variable |
||||||||
{dataType} |
→data type of the →variable or the →function block type |
||||||||
{instanceData("element", "parameter/text")} |
instance data for →function block instance The following data is required within the dynamic text:
|
Observe:
If the information is not available for an element, no corresponding text is displayed within the comment field.
The characters { and } are reserved for dynamic texts. If you want to display these characters within a comment field, prefix them with the character \.
Example for inputCOLOR = \{blue, yellow, red\}
Examples of evaluating instance data
It is possible to enter a plain text outside and/or inside the dynamic text for the instance data. Use the method best suited for you.
Input within the comment field |
Example of evaluation |
Plain text outside the dynamic text
Group: {instanceData ("ActiveGroup")} |
Group: MX2040 |
Plain text inside the dynamic text
{instanceData ("ActiveGroup", "Group '%n' with value '%v'")} or Plain text outside the dynamic text
Group '{instanceData ("ActiveGroup", "%n")}' with value '{instanceData ("ActiveGroup", "%v")}' |
Group 'MX2040' with value 'Passive' |
Plain text inside the dynamic text
{instanceData("simplefield", "Instance data: Name: '%n', Value: '%v', Type: '%t'")} or Plain text outside the dynamic text
Instance data: Name: '{instanceData("simplefield", "%n")}', Value: '{instanceData("simplefield", "%v")}', Type: '{instanceData("simplefield", "%t")}' |
Instance data: Name: 'simplefield', Value: '1234', Type: 'INT' |