String Configuration Parameters

<< Click to Display Table of Contents >>

 

String Configuration Parameters

This tab is useful only if users must declare Strings or WStrings with a defined maximum length.

S7 Strings tab

S7 Strings tab

The available options on the S7 Strings tab are described on the next table.

Available options 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.09 or earlier. If the project uses Strings after performing a version update, String-type Tags return reading errors from the PLC. 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

 

List of Strings' Maximum Lengths

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 PLC memory in the following ways:

Without specifying a maximum length on declaration. Example:

STRING var;

 

The String is allocated automatically with PLC's standard maximum length.

 

By specifying a maximum length on declaration. 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 new declared String, users must fill in all fields correctly, as described on the next table.

Available options to configure Strings' maximum length

Field

Description

Device

PLC address. Fill it in with the same value of Tag's N1/B1 parameter. For more information, please check topic Configuration by Numerical Parameters (N/B)

DB Number

Type the value of the DB number where the String is located

Offset

Type the value of the DB offset where the String is located

Length

Type the maximum length value of the String, as declared in the PLC programming

 

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 Symbolic Addressing parameters, there is no need to fill in this list with String declarations. Their length can be specified on the symbol parameter available in the Tag.

Was this page useful?