Client-side Diagnostics and Monitoring
The MTConnect OPC UA server exposes diagnostics information which can be accessed by any OPC UA Client via a specific set of data items.
1. Server State Data Item
The MTConnect-Server's CurrentState data item exposes the current state of the OPC UA Server Thread within the server service. The following list shows all possible state values:
The MTConnect-Server's CurrentState data item exposes the current state of the OPC UA Server Thread within the server service. The following list shows all possible state values:
Value | Description |
---|---|
0 | Server Thread is stopped . |
1 | OPC UA Inititialization started. |
2 | OPC UA Node Manger started. |
3 | Server data items and methods created. |
4 | Agent folder created. |
5 | All agent threads started and server is running in normal operation state. |
6 | No agent threads started (since no agents are configured). |
7 | Server is restarting (due to a restart request from the configuration tool). |
-1 | Server is stopped since OPC UA Node Manger could not be started. |
-2 | Server is stopped due to a failure in the agent start sequence. |
Agent State Data Item
The Agent's ConnectState data item exposes the current connection state of a specific MTConnect agent. The following list shows all possible state values:
Value | Description |
---|---|
0 | Connection to agent not established. Occurs when the agent is not enabled. |
1 | The server has sent a Probe request and has received a proper Probe response. |
-1 | The server has sent a Probe request but the agent does not answered. This error indicates that the agent's URi is invalid or not reachable. |
2 | The server has sent a Current request and has received a proper Current response. |
-2 | The server has sent a Current request but the agent does not replied with a Current response. |
3 | The server has sent a Sample request and cyclically receives Sample responses. This is the expected state for a proper connection to the agent. |
-3 | The received Sample response contains invalid data or has an invalid structure. |
-4 | The server received a bad HTTP status code. |
-5 | An exception occurred when the server tried to send the Sample request*. |
-6 | A HTTP timeout occurred while the server waited for the Sample response. |
-7 | The Sample request has been canceled by the HTTP protocol layer. |
-8 | A Web exception occurred when the server tried to send the Sample request*. |
-9 | An Application exception occurred when the server tried to send the Sample request*. |
-10 | An unspecific exception occurred when the server tried to send the Sample request*. |
* The log file of the OPC UA Server Service contains detailed information about the exception.