Gets / Sets the .NET Type of the MODBUS device value
Default
Registers: 3xxxx and 4xxxx - System.Int16
Registers: 0xxxx and 1xxxx - System.Boolean
Setting this property will set the DataType property as follows:
| Exception Type | Condition |
|---|---|
| ArgumentException | Thrown if invalid Type is set. |
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);
Tag Class | MBLink Namespace | DataType | Tag.ATOMIC