'Text' / 'Text When Down' / 'Text list' Dynamics
'Text' dynamic
The 'Text' dynamic displays the value of the variable assigned to the linked HMI tag or the evaluation result of the defined expression ('false' or 'true') in a text object. If the dynamic is configured, the static 'Text' specified on the standard tab in the properties window is ignored.
In case of a numeric variable, the number of digits after the decimal point of the variable value can be set with the 'Format' property.
With the following configuration, the text 'true' is displayed for the HMI object at runtime if the variable 'MyBoolVar' has the value TRUE.
'Text when down' dynamic
The 'Text When Down' dynamic displays the value of the variable assigned to the linked HMI tag or the evaluation result of the defined expression in a button object when the button is pressed. If the dynamic is configured, the static 'Text When Down' setting on the standard tab in the properties window is ignored.
In case of a numeric variable, the number of digits after the decimal point of the variable value can be set with the 'Format' property.
With the following configuration, the value of the real variable 'myrealvar' with an accuracy of 2 digits after the decimal point is displayed for the button object at runtime when the button is pressed.
'Text list' dynamic
The 'Text list' dynamic allows to make text list entries dynamic. Dynamic means, the displayed text of an HMI object at runtime can be selected by changing the HMI tag or variable (floating point variable) connected to the 'Text list' dynamic. For example, you can use a 'Text list' dynamic for an HMI text object to display the texts "COLD" and "WARM" instead of the numeric variable value if the variable value has a specific value or is within a specific range.
To configure a 'Text list' dynamic for an object, proceed as follows:
- Connect a numeric variable to the dynamic. To do so, click the input field right of the 'Variable' field and select a variable. The value of this variable determines which text is displayed in the HMI object when executing the HMI application. Depending on the value of the configured variable, the text entry from the associated text list is displayed at runtime.When binding a variable of type REAL/LREAL to the 'Text list' dynamic, the 'Integer converter strategy' field is additionally shown. Here you can set whether the variable value is truncated or rounded before it is used as source value.
- Connect the text list to the dynamic. To do so, click the input field right of the 'Text list' field and select the text list from which a text entry is displayed (the field provides all text lists for selection you have created in you project).
With the following configuration, the text "Cold", as defined in the connected text list 'Sample list', is displayed for the HMI text object at runtime if the value of the integer variable 'temperature' lies in the range between 0 and 5. If the variable value is between 6 and 15, the text "Warm" is displayed. If the variable value is not within the range of 0 to 15, the default text "Unknown" is shown.
For details on managing and editing text lists and also how to make a text list dynamic using the 'Text list' dynamic, refer to the topic "Working with Text Lists".