Returns the error code for the last MODBUS device access for the Tag instance as a string
Types of errors reported: (see Remarks below)
VB
Imports MBLink
Dim MBDevice As New Controller("192.168.1.45")
Dim MyTag As New Tag("40001")
MBDevice.ReadTag(MyTag)
If MyTag.ErrorCode = ResultCode.E_SUCCESS Then
Console.WriteLine(MyTag.Value.ToString())
Else
Console.WriteLine(MyTag.ErrorString)
End If
C#
using MBLink;
Controller MBDevice = new Controller("192.168.1.45");
Tag MyTag = new Tag("40001");
MBDevice.ReadTag(MyTag);
if (MyTag.ErrorCode != ResultCode.E_SUCCESS)
Console.WriteLine(MyTag.ErrorString);
else
Console.WriteLine(MyTag.Value.ToString());
Tag Class | MBLink Namespace | ErrorCode | QualityCode | QualityString