Save Dynamic Text with 256 characters in a file
For Dynamic Texts there are no File Service Functions. However, to save Dynamic Texts in a file, the texts are converted into TEXT vectors and saved as vector of TEXTs. When reading, the TEXT vector is converted into a Dynamic Text.
Following, the procedure is explained as an example.
1. Create a text resource with 256 characters
- Select Mask Designer
- Select „Resources“
- Right click -> New
- Write text
2. The resource text is loaded in a Dynamic Text.
- FB “Text” from “HMI Parameter Blocks”
- Select Text-ID “Testtest”
- FB “Load Text Resource” from “Dynamic Texts”
- FB “Converter” from “Dynamic Texts”
3. The TEXT vector is saved with File Service Function in a file.
- FB „Vector/Matrix – Save“ from „File Service Functions”
- Right click on “FName” input -> “Assign Global Parameter” -> type in TestText
4. The Dynamic Text is converted into a TEXT vector with 16 elements.
- FB „Vector-Create“ from “Vector/Matric basic operations” (Data type TEXT)
- Create new macro
- FB „Input“ Data type TEXT from „Standard (Macro elements)“
- FB „Vector Split“ Data type TEXT, Number of elements: 16, from “Converter”
- FB “Converter” Data type input TEXT; Data type output DYNTEXT from “Dynamic Texts”
- FB “Append” from “Dynamic Texts”
The function block “Append” joins all vector elements to a Dynamic Text again.
- FB “Output” Data type DYNTEXT from “Standard (Macro elements)”
5. The TEXT vector is read over a File Service Function again
- FB „Vector/Matrix – Load“ from „File Service Functions”
- Right click on “FName” input -> “Assign Global Parameter” -> type in TestText
- Implement macro
- FB “Text” from “HMI Masks and Objects”