Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Devices Monitor  (Reference) provides real-time visibility into Device Node status, communication health, and error diagnostics during runtime operation.

The Device Monitor displays:

  • Node connectivity status
  • Communication errors
  • Activity counters
  • Invalid addresses
  • Error timestamps
  • Protocol-specific diagnostics

Access via Devices → Device Monitor when solution is running.

On this page:

Table of Contents
maxLevel2
minLevel2
indent10px
excludeSteps
stylenone

Monitor Properties

Runtime Node Properties

PropertyDescriptionAccess
ActivityCounterIncrements on any node activity@Device.Node.NodeName.ActivityCounter
DisableNode disabled status@Device.Node.NodeName.Disable
LastErrorCodeError code (0 = success)@Device.Node.NodeName.LastErrorCode
LastErrorDateTimeTimestamp of last error@Device.Node.NodeName.LastErrorDateTime
InvalidAddressesUnresolved device addresses@Device.Node.NodeName.InvalidAddresses

Accessing Properties

In Scripts

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;

In Displays

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}" />

Error Codes

Success

  • 0 - No errors, normal operation

Negative Codes (Connection Issues)

CodeErrorDescription
-1BuildCommandExceptionCommand creation failed
-2ParseCommandUnsolicitedExceptionUnexpected command received
-3ParseReplyExceptionResponse parsing failed
-4BuildReplyUnsolicitedExceptionUnsolicited reply error
-5ChannelExceptionChannel-level error
-6NodeExceptionNode-level error

Network Errors (-100 to -115)

CodeErrorDescription
-100Base Send ErrorGeneric send failure
-101Base SendAndWait ErrorSend/wait operation failed
-102 to -104TCP Create ErrorSocket creation failed
-105TCP Connect CallbackConnection callback error
-106TCP Receive ErrorTCP data receive failed
-107UDP Create ErrorUDP socket creation failed
-108UDP Receive ErrorUDP data receive failed
-109Serial Create ErrorSerial port initialization failed
-110Serial Receive ErrorSerial data receive failed
-111TCP NotConnectedTCP connection lost
-112Start Message TimeoutMessage start not received
-113Receiving Bytes TimeoutData timeout during receive
-114End Message TimeoutMessage end not received
-115Connect TimeoutConnection attempt timeout

Protocol Errors (-200 to -208)

CodeErrorDescription
-200ProtocolErrorGeneric protocol error
-201InvalidProtocolProtocol mismatch
-202InvalidStationStation address invalid
-203InvalidCommandCommand not recognized
-204InvalidMsgSequenceMessage sequence error
-205InvalidCheckSumChecksum validation failed
-206InvalidAddressDevice address invalid
-207InvalidModifiersModifier configuration error
-208ProtocolErrorCloseSocketProtocol error requiring reconnection

Positive Codes

Protocol-specific errors - consult driver documentation


Channel Status Monitoring

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);

Invalid Addresses

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}");
    }
}

Diagnostic Patterns

Connection Health Check

csharp

public bool IsNodeHealthy(string nodeName)
{
    var node = @Device.Node[nodeName];
    
    return node.LastErrorCode == 0 && 
           node.ActivityCounter > 0 &&
           !node.Disable;
}

Error Recovery

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;
    }
}

Best Practices

  1. Monitor Critical Nodes - Set up alarms for errors
  2. Log Error Patterns - Track recurring issues
  3. Handle Timeouts - Implement retry logic
  4. Check Invalid Addresses - Validate during startup
  5. Track Activity - Detect stalled communications
  6. Document Error Codes - Map to troubleshooting steps
  7. Set Up Notifications - Alert on critical failures

Troubleshooting Guide

No Activity

  • Check channel enabled
  • Verify network connectivity
  • Review node configuration
  • Check polling settings

Frequent Errors

  • Analyze error patterns
  • Check network stability
  • Review timeout settings
  • Verify device status

Invalid Addresses

  • Check address format
  • Verify device mapping
  • Review import results
  • Test individual points

Connection Timeouts

  • Increase timeout values
  • Check network latency
  • Verify device response
  • Review firewall settings



In this section...

Page Tree
root@parent
spaces93DRAF

Overview

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
maxLevel3
stylenone

Image Removed

Monitoring Device Nodes Status

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.

Devices Monitor Table Columns

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
titleDevices negative error code

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:

  • 0 Success
  • -1 BuildCommandException
  • -2 ParseCommandUnsolicitedException
  • -3 ParseReplyException
  • -4 BuildReplyUnsolicitedException
  • -5 ChannelException
  • -6 NodeException
  • -100 Base Send Error
  • -101 Base SendAndWait Error
  • -102 TCP Create Error 1
  • -103 TCP Create Error 2
  • -104 TCP Create SocketError
  • -105 TCP Connect Callback Error
  • -106 TCP Receive Error
  • -107 UDP Create Error
  • -108 UDP Receive Error
  • -109 Serial Create Error
  • -110 Serial Receive Error
  • -111 TCP NotConnected
  • -112 Start message timeout
  • -113 Receiving bytes timeout
  • -114 End message timeout
  • -115 Connect timeout
  • -200 ProtocolError
  • -201 InvalidProtocol
  • -202 InvalidStation
  • -203 InvalidCommand
  • -204 InvalidMsgSequence
  • -205 InvalidCheckSum
  • -206 InvalidAddress
  • -207 InvalidModifiers
  • -208 ProtocolErrorCloseSocket

In this section:

Page Tree
rootV10:@parent
spacesV10