Topic: P263

Pre-defined Structures

Structure data types are specific sets of tags combined together for convenience. Using Structures in instructions can speed up overall programming because multiple tags are created and assigned automatically.


Structures are defaulted OFF for legacy projects. When enabling Structures in a legacy project with tags that have a ' . ' in the tag name (example timer.dn), you will get the Change Tag Names window as seen when enabling Bit of Word.

Note:  If enabling Structures on a project created in an older version of the GUI, any tag previously created tag with '.' in the tag name will need to be converted. You can modify the token to a character of your choice. Example: Motor1.start will be converted to Motor1-start by default.


You can add a Structure to a project by first adding it from the TagDB:


Or directly from ladder:


When placing an instruction into the ladder with Structures enabled, the user is allowed to assign a structure that was either previously created in the tag database or to create a new one:


If an instruction is using a structure data type, the name of the structure will be displayed in the header of the instruction as seen below:


Structures can be viewed in Data View as an entire data type or each element can be specified.


Structures can be used along with Bit of Word in Boolean instructions:


By unchecking the Use Structure field you can then choose which of the individual structure elements to continue using, or change to other tags or constants:


The newly created user tag (userDefPreset_Value) is now used along with the other structure elements. Since the instruction no longer uses all of the structure elements, the instruction header will have the structure name removed.


Note: When assigning a PreDefined Structure (PDS) to any input or output (for example, AMC hardware setup or MRX instruction) although individual elements within the structure may be assigned an initial value, made forceable or made retentive in the Tag Database, care should be used when configuring these options because the inputs and outputs may be overwritten.”


Note: Use caution when implementing time-based instructions (such as TMR, STMR, DRM) within FOR-NEXT loops as they may not function as expected.