
Chapter 6 Define a tag component
130 Rockwell Automation Publication 1756-RM084S-EN-P - March 2015
</Data>
In L5X format, the string is padded with zeros (00) to fill its maximum of
82 characters.
L5K initial TAG value
In an .L5K file, place the initial value of the tag in the tag statement.
<tag_name> : <type> [(Attributes)][:= <initial_value>];
If the tag is a string tag, specify a STRING type.
<tag_name> : STRING := [<length>, ‘string_text$00 ... $00’];
The string is padded with zeros ($00) to fill its maximum of 82 characters.
Add-On Instruction tag values
The Logix Designer application optimizes user memory usage by minimizing
unused space in tags whose type is an Add-On Instruction data type.
The values for the Input & Output parameters are represented in the order as they
are listed in the Add-On Instruction definition. This rule applies to all parameter
data types except for BOOL. In order to reduce the data size of a tag of Add-On
Instruction type, BOOL parameters and BOOL local tags are collected and
packed in one or more hidden DINT members. Up to 32 BOOLs are packed into
each hidden DINT member. That is, the first BOOL is at bit 0, the second BOOL
is at bit 1. The hidden DINT members are located at the position where the 1st,
33rd, 65th, (n*32+1) BOOL is located. See the example.
The values for the local tags are represented in the order listed in the Add-On
Instruction definition except as noted here. BOOL local tags are packed with
BOOL parameters. In order to reduce the data size of an Add-On Instruction type
tag, SINT and INT tags may be repositioned.
This is done because all types except SINT and INT must be aligned on a
four-byte boundary. When a SINT precedes a DINT, there are three unused bytes
between the two members. To optimize memory usage, the unused space is filled
with other SINTs and/or INTs when possible. Note that the free space
optimization begins immediately after the last parameter. See the example.