Class DataType
- Namespace
- L5Sharp.Components
- Assembly
- L5Sharp.dll
A logix DataType
component. Contains the properties that comprise the L5X DataType element.
public class DataType : LogixComponent<DataType>, ILogixSerializable
- Inheritance
-
DataType
- Implements
- Inherited Members
Remarks
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:
• ALARM_ANALOG
• ALARM_DIGITAL
• AXIS types
• COORDINATE_SYSTEM
• MOTION_GROUP
• MESSAGE
• MODULE
• If one user-defined datatype references a second user-defined datatype defined in the file, the second
user-defined datatype appears before the first one in the import/export file.
Constructors
DataType()
Creates a new DataType with default values.
public DataType()
DataType(XElement)
public DataType(XElement element)
Parameters
Exceptions
- ArgumentNullException
element
is null.
Properties
Class
The class of the DataType
component.
public DataTypeClass? Class { get; set; }
Property Value
- DataTypeClass
A DataTypeClass option indicating the class for which the current data type belongs. L5X files will only ever contain User class types.
Family
The family of the DataType
component.
public DataTypeFamily? Family { get; set; }
Property Value
- DataTypeFamily
A DataTypeFamily option indicating the family for which the current data type belongs. This is just string for string types and none for all others.
Members
The collection of DataTypeMember that make up the structure of the DataType
component.
public LogixContainer<DataTypeMember> Members { get; set; }