Udt Operational Notes - GE PACSystems RX7i Cpu Programmer's Reference Manual

Hide thumbs Also See for PACSystems RX7i:
Table of Contents

Advertisement

3.10.5

UDT Operational Notes

By default, a UDT variable resides in symbolic memory. You can convert the symbolic variable to
an I/O variable.
All UDT elements are public and, therefore, readable and writeable.
Properties of elements of UDT variables:
The Input Transfer List and Output Transfer List properties are read-only and set to False.
The Retentive property is editable only for BOOLs and only if the UDT Memory Type is discrete. For
UDTs whose Memory Type is non-discrete, a BOOL variable has its Retentive property set to True
during validation.
UDT variables are supported in LD, FBD, and ST blocks, as well as in Diagnostic Logic Blocks.
For additional operational notes, refer to the programmer Help.
Example
You want to set up six COMMREQ commands to send values to a series of six identical intelligent
modules that require individualized data of the same data types in the same format, specified by the
manual for the intelligent module. This data contains header information and several words of data.
You could proceed as follows:
Add a UDT named COMMREQ6 and edit it to contain the data in the required data types and
1.
sequence.
Create an array of length 6, named ABC, of the COMMREQ6 data type.
2.
The array resides in symbolic memory. You can convert the symbolic variable to an I/O variable.
3.
Populate the variable. If the value of an element needs to be the same for all six COMMREQ6
4.
elements, you can set up an ST for loop that uses a variable index to populate each element with
the same data, for example:
for i = 1 to 6 do
ABC[i].WaitFlag := 0;
end_for;
Just before issuing one or more COMMREQs, use the Move to Flat instruction to flatten the
5.
COMMREQ6 array or one or more of its top-level elements from a structure to a flat series of
contiguous registers in an area of % memory supported by COMMREQ.
Issue the COMMREQs based on the % memory registers that you just populated with the Move to
6.
Flat instruction.
Although you can populate the memory registers directly without a UDT and Move to Flat, there are
advantages when working with UDT variables:
UDT variables reside in symbolic or I/O variable memory, which protects them from memory
overlaps and offers more protection against overwriting, whereas reference memory areas offer
no such protection. It is best to use reference memory just before issuing a COMMREQ.
You can work with meaningful structure variable names and structure element names.
You can set up loops with variable indexes to populate some of the values.
GFK-2950C
February 2018
Chapter 3. Program Data
57

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pacsystems rx3iPacsystems rsti-ep

Table of Contents