opcua-sink-plugin
is an OPC UA interface provider plugin for the MTConnect Agent. The plugin runs an OPC UA server in the agent to serve OPC UA clients according to the MTConnect OPC UA Companion Specification.
Devices = _metaagent_.xml
Port = 7979
Adapters
{
Mazak
{
Host = demo.metalogi.io
Port = 7879
}
}
Sinks
{
OPCUA:OPCUA {
#
# server name display in OPC UA discovery
#
name = MTConnect/OPC UA Gateway Demo
# listen on port #
port = 4840
# OPC UA event severity level for MTConnect Warning and Fault conditions
warningEventSeverity = 500
faultEventSeverity = 1000
#
# Additional optional connection info
# cert = <location of the certificate file. Format: DER>
# key = <location of the key file. Format: PEM>
# user = <user's id>
# password = <user's password>
# certificateCheck = [true, false]
# default is false
# allowSecurityPolicyNone = [true, false]
# default is false
#
#certificateCheck = false
#allowSecurityPolicyNone = false
# licenseKey = <your license key - default is demo mode if not provided>
# override logger config
logger_config {
output = file opcua-sink.log
level = info
}
}
}
name:
Show this name in OPC UA Discovery.port
: The port number that the OPC UA server will serve.user/password
: If not specified, allow anonymous login.warningEventSeverity
: OPC UA event severity level for MTConnect Warning conditions.faultEventSeverity
: OPC UA event severity level for MTConnect Fault conditionskey/cert
: Specify the location of the server certificate and its key file used in establishing the secured connections. If they are valid, it allows secured connections of all security policies.checkCertificate
: Validate the client's certificate during the secured connection.allowSecurityPolicyNone
: If checked, allow an unsecured connection option also.
C:\Program Files\MetaAgent\examples\opcua-sink-plugin>agent run
MTConnect Agent Version 2.2.0.592 - built on Mon Oct 9 22:38:46 2023
[2023-10-28 14:59:29.529383] [0x00001b60] [trace] Found file 'agent.cfg' in path "C:\\Program Files\\MetaAgent\\examples\\opcua-sink-plugin"
[2023-10-28 14:59:29.529383] [0x00001b60] [info] Loading configuration from: "C:\\Program Files\\MetaAgent\\examples\\opcua-sink-plugin\\agent.cfg"
Loading configuration from:"C:\\Program Files\\MetaAgent\\examples\\opcua-sink-plugin\\agent.cfg"
UAExpert
application to verify the connection opc.tcp://localhost:4840
. If the agent is running on a different server, replace localhost
with the server's hostname. The device should be displayed in the Address Space tab: