INGEAR.NET.GELink

 

Tag.DataType Property

Gets / Sets data type for PLC register values

[Visual Basic]
Public Property DataType As ATOMIC
[C#]
public Tag.ATOMIC DataType {get; set;}

Property Value

One of the Tag.ATOMIC enumerations

Remarks

Setting this property will also set the NetType property as follows:

 
System.Boolean = ATOMIC.BOOL
System.SByte = ATOMIC.BYTE
System.Byte = ATOMIC.UBYTE
System.Int16 = ATOMIC.INT
System.UInt16 = ATOMIC.WORD
System.Int32 = ATOMIC.DINT
System.UInt32 = ATOMIC.DWORD
System.Single = ATOMIC.REAL
System.Double = ATOMIC.LREAL
System.String = ATOMIC.STRING

Exceptions

Exception Type Condition
ArgumentException Thrown if invalid DataType

Example

VB
Dim MyTag As New GELink.Tag("%R1")
' * set default type to DINT
MyTag.DataType = Tag.ATOMIC.DINT


C# GELink.Tag MyTag = new GELink.Tag("%R1"); MyTag.DataType = Tag.ATOMIC.DINT;

See Also

Tag Class | GELink Namespace