Devices Monitor (Reference) provides real-time visibility into Device Node status, communication health, and error diagnostics during runtime operation.
The Device Monitor displays:
Access via Devices → Device Monitor when solution is running.
Table of Contents maxLevel 2 minLevel 2 indent 10px exclude Steps style none
Property | Description | Access |
---|---|---|
ActivityCounter | Increments on any node activity | @Device.Node.NodeName.ActivityCounter |
Disable | Node disabled status | @Device.Node.NodeName.Disable |
LastErrorCode | Error code (0 = success) | @Device.Node.NodeName.LastErrorCode |
LastErrorDateTime | Timestamp of last error | @Device.Node.NodeName.LastErrorDateTime |
InvalidAddresses | Unresolved device addresses | @Device.Node.NodeName.InvalidAddresses |
csharp
// Check node status
int errorCode = @Device.Node.PLC1.LastErrorCode;
if (errorCode != 0)
{
DateTime errorTime = @Device.Node.PLC1.LastErrorDateTime;
@Info.Trace($"Node error {errorCode} at {errorTime}");
}
// Monitor activity
int activity = @Device.Node.PLC1.ActivityCounter;
bool isActive = activity > 0;
xml
<!-- Show node status -->
<TextBlock Text="{Device.Node.PLC1.LastErrorCode}" />
<TextBlock Text="{Device.Node.PLC1.LastErrorDateTime}" />
<!-- Activity indicator -->
<Ellipse Fill="{Binding Device.Node.PLC1.ActivityCounter,
Converter=ActivityToColorConverter}" />
Code | Error | Description |
---|---|---|
-1 | BuildCommandException | Command creation failed |
-2 | ParseCommandUnsolicitedException | Unexpected command received |
-3 | ParseReplyException | Response parsing failed |
-4 | BuildReplyUnsolicitedException | Unsolicited reply error |
-5 | ChannelException | Channel-level error |
-6 | NodeException | Node-level error |
Code | Error | Description |
---|---|---|
-100 | Base Send Error | Generic send failure |
-101 | Base SendAndWait Error | Send/wait operation failed |
-102 to -104 | TCP Create Error | Socket creation failed |
-105 | TCP Connect Callback | Connection callback error |
-106 | TCP Receive Error | TCP data receive failed |
-107 | UDP Create Error | UDP socket creation failed |
-108 | UDP Receive Error | UDP data receive failed |
-109 | Serial Create Error | Serial port initialization failed |
-110 | Serial Receive Error | Serial data receive failed |
-111 | TCP NotConnected | TCP connection lost |
-112 | Start Message Timeout | Message start not received |
-113 | Receiving Bytes Timeout | Data timeout during receive |
-114 | End Message Timeout | Message end not received |
-115 | Connect Timeout | Connection attempt timeout |
Code | Error | Description |
---|---|---|
-200 | ProtocolError | Generic protocol error |
-201 | InvalidProtocol | Protocol mismatch |
-202 | InvalidStation | Station address invalid |
-203 | InvalidCommand | Command not recognized |
-204 | InvalidMsgSequence | Message sequence error |
-205 | InvalidCheckSum | Checksum validation failed |
-206 | InvalidAddress | Device address invalid |
-207 | InvalidModifiers | Modifier configuration error |
-208 | ProtocolErrorCloseSocket | Protocol error requiring reconnection |
Protocol-specific errors - consult driver documentation
Access channel status for additional diagnostics:
csharp
// Channel status
int channelStatus = @Device.Channel.ChannelName.Status;
// Interpret status using error code table
string statusMessage = GetStatusMessage(channelStatus);
Monitor and handle unresolved addresses:
csharp
// Get invalid addresses
string[] invalid = @Device.Node.PLC1.InvalidAddresses;
if (invalid.Length > 0)
{
foreach(string address in invalid)
{
@Info.Trace($"Invalid address: {address}");
}
}
csharp
public bool IsNodeHealthy(string nodeName)
{
var node = @Device.Node[nodeName];
return node.LastErrorCode == 0 &&
node.ActivityCounter > 0 &&
!node.Disable;
}
csharp
public void HandleNodeError(string nodeName)
{
var node = @Device.Node[nodeName];
int error = node.LastErrorCode;
switch(error)
{
case -111: // Not connected
RestartChannel();
break;
case -115: // Timeout
IncreaseTimeout();
break;
default:
LogError(error);
break;
}
}
Page Tree | ||||
---|---|---|---|---|
|
When the solution is running, and the Designer is connected with the runtime, the Devices Monitor page will show the basic status of its communication Nodes.
On this page:
Table of Contents maxLevel 3 style none
You can access the monitor by navigating to Devices → Devices Monitor.
When the solution is running, the monitor will display a table of properties with real-time information about the Device Module Nodes.
The information in this table is constructed from the runtime properties of the object: Device.Node.<NodeName>.
Additionally of showing in the monitor table, the properties can be accessed on Displays or Scripts, using the following syntax
Code Block |
---|
@Device.Node.<NodeName>.<PropertyName> |
Devices Nodes Monitor Table | |
---|---|
Property | Description |
ActivityCounter | Counter up on any activity on the node. |
Disable | Status of the node Disable Property |
LastErrorCode | 0 means no errors. Code for Last Error. Negative numbers means no connective, positive numbers are protocol specific errors. |
LastErrorDateTime | Timestamp of the error on previous column |
InvalidAddresses | In the case the node and addresses not resolved by the Device, they are available in the property. |
Info | ||
---|---|---|
| ||
For Module Information and Property Watch, there are negative error codes that represents specific messages that can help to find the root cause of the error. In the Module Information, refer to the LastErrorCode column. On Property Watch, refer to @Device.Channel.ChannelName.Status. See below the list of negative error codes:
|
In this section:
Page Tree | ||||
---|---|---|---|---|
|