|
<< Click to Display Table of Contents >>
String Configuration |
This tab is useful only if users must declare Strings or WStrings with a defined maximum length.

S7 Strings tab
The available option on the S7 Strings tab is described on the next table.
Available option on the S7 Strings tab
Option |
Description |
Keep support for legacy strings (MProt v2.09 or lower) |
Keeps support for old Strings, prior to version 2.10. By selecting this option, the old String format implemented on prior versions is kept, avoiding problems when updating this Driver's version. It is advisable to select this option only when migrating a project whose Driver's version is 2.9 or earlier. If a project uses Strings after performing a version update, String-type Tags return reading errors from a device. The legacy String format contains a 32-byte reserved space starting from the configured offset. When working with a new project, leave this option deselected |
This tab also displays a selectable list with declared Strings with pre-determined lengths. This list appears empty if there are no configured Strings. These Strings can be declared in the memory of a device in the following ways:
•Without specifying a maximum length on declaration, according to the next example.
STRING var;
The String is allocated automatically with the maximum default length of a device.
•By specifying a maximum length on declaration, according to the next example.
STRING var[50];
On the previous example, the String is allocated with a maximum length of "50". Due to that second form, this list of String lengths is so important.
To determine the length of a declared String, users must fill in all fields correctly, as described on the next table.
Available options to configure the maximum length of Strings
Option |
Description |
|---|---|
Device |
Address of a device. Fill it in with the same value of the N1 or B1 parameter of a Tag. For more information, please check topic Configuration by Numerical Parameters [N/B] |
DB Number |
Inform the value of the DB number where the String is located |
Offset |
Inform the value of the DB offset where the String is located |
Length |
Inform the maximum length value of the String, as declared in the programming of a device |
If there is already a String declared on the list with the same value for Device, DB Number, and Offset, that one is automatically selected on the table and its values are loaded to all edit fields. The following options help users when editing String data on the list:
•Add: Adds new parameters
•Update: Changes parameters already listed
•Remove: Completely removes a row of parameters
Click OK to confirm all configurations listed and close this window. Click Remove All to remove all data from this list.
NOTE |
When declaring Tags with syntactic parameters, there is no need to fill in this list with String declarations. Their length can be specified on the syntactic parameter available in a Tag. |