INGEAR.NET.MBLINK

 

Tag.NetType Property

Gets / Sets the .NET Type of the MODBUS device value

[Visual Basic]
NotOverridable Public Property NetType As Type _
    Implements ITag.NetType
[C#]
public System.Type NetType {get; set;}

Property Value

Default

Registers: 3xxxx and 4xxxx - System.Int16

Registers: 0xxxx and 1xxxx - System.Boolean

Implements

ITag.NetType

Remarks

Setting this property will set the DataType property as follows:

Exceptions

Exception Type Condition
ArgumentException Thrown if invalid Type is set.

Example

VB
Imports MBLink
Dim MyTag As New Tag("40001")
MyTag.NativeType = GetType(System.Int16)
MyTag.NativeType = GetType(System.Int32)
MyTag.NativeType = GetType(System.Single)
C#
using MBLink
Tag MyTag = new Tag("40001);
MyTag.NativeType = typeof(System.Int16);
MyTag.NativeType = typeof(System.Int32);
MyTag.NativeType = typeof(System.Single);

See Also

Tag Class | MBLink Namespace | DataType | Tag.ATOMIC