INGEAR.NET.MBLINK

 

Tag.QualityString Property

Returns the quality state of the last MODBUS device access operation for the Tag instance

[Visual Basic]
NotOverridable Public ReadOnly Property QualityString As String _
    Implements ITag.QualityString
[C#]
public string QualityString {get;}

Property Value

QUAL_STRING_GOOD - Value read/written to programmable logic controller is valid.

QUAL_STRING_BAD - Value read/written to MODBUS device is invalid.

QUAL_STRING_UNCERTAIN - Value read/write to MODBUS device is in an unknown state.

Implements

ITag.QualityString

Remarks

 

Example

VB
Imports MBLink
Dim MBDevice As New Controller("192.168.1.45")
Dim MyTag As New Tag("40001")
MBDevice.ReadTag(MyTag)
If MyTag.QualityCode = ResultCode.QUAL_GOOD Then
  Console.WriteLine(MyTag.Value.ToString)
Else
  Console.WriteLine(MyTag.QualityString)
End If
C#
using MBLink;
Controller MBDevice = new Controller("192.168.1.45");
Tag MyTag = new Tag("40001");
MBDevice.ReadTag(MyTag);
if (MyTag.QualityCode != ResultCode.QUAL_GOOD)
  Console.WriteLine(MyTag.QualityString);
else
  Console.WriteLine(MyTag.Value.ToString());

See Also

Tag Class | MBLink Namespace | QualityCode | ErrorCode | ErrorString