A SERVICE OF

logo

Define a Datatype component Chapter 3
Rockwell Automation Publication 1756-RM084S-EN-P - March 2015 67
DATATYPE MyBits (FamilyType := NoFamily)
SINT ZZZZZZZZZZMyBits0 (Hidden := 1);
BIT MyBit0 ZZZZZZZZZZMyBits0 : 0 (Radix := Binary);
BIT MyBit1 ZZZZZZZZZZMyBits0 : 1 (Radix := Binary);
END_DATATYPE
Important:
There must be a space between the host member name, colon, and the bit
position because type names can contain a colon (for example, I/O structures). The
space indicates where the type name ends.
This is the datatype syntax for this example in the L5X format.
Observe these guidelines when defining a datatype:
Datatypes must be defined first within the controller body.
Datatypes can be defined out of order. For example, if Type1 depends on
Type2, Type2 can be defined first.
Datatypes can be unverified. For example if Type1 depends on Type2 and
Type2 is never defined, then Type1 will be accessible as an unverified type.
Type2 will be typeless type. Tags of Type1 may be created but not of Type2.
Datatype members can be arrays but only one dimension is allowed.
These datatypes cannot be used in a user-defined datatype:
Datatype guidelines