WOLFRAM SYSTEM MODELER
varserverA OPC UA server that can serve a custom list of OPCUA.Types.UAReal.Double valued variable nodes |
The OPCUA Library comes with a OPC UA server that can be used to serve a custom list of OPCUA.Types.UAReal.Double
valued variable nodes. The nodes are created in a flat structure in the local server namespace (corresponding to namespace index 1) and have string based id's. They are both readable and writable. The server executable varserver
is located in a platform specific subfolder of the Resource/Library folder:
The server could for example be used to communicate between two System Modeler simulations, on possibly different computers. One simulation would write data to the varserver
and the other simulation reads it.
Another use case, is to combine it with the OPCClassic library and have one simulation, on the OPC Classic server computer, relaying data to the varserver
, there by tunneling the OPC Classic traffic through OPC UA and avoid all of the potential problems with configuring remote access to OPC Classic servers.
varserver [-p PORT] nodeId1 nodeId2 ... nodeIdN
OPCUA.Blocks.SamplerReal
blocks to read or write data from one of the nodes the following needs to be specified in the Node Identifier
group:
nodeIDType
: OPCUA.Types.UANodeIdType.StringId
(nodes have string based id's).nodeID
: the node id specified on the command line within double quotes, e.g. "temperature"
.nodeNamespace
: 1
(nodes are created in the local server namespace corresponding to namespace index 1
).uaRealType
to OPCUA.Types.UAReal.Double
in the Parameters group.
varserver pumpSpeed temperature
This will start the varserver
on the default port serving the variable nodes pumpSpeed
and temperature
. The server will output log messages to the standard output about the startup procedure, the server is ready to be used when the message TCP network layer listening on ...
is shown.
[04/01/2022 13:43:16.169] info/server Adding variable pumpSpeed
[04/01/2022 13:43:16.169] info/server Adding variable temperature
[04/01/2022 13:43:16.169] info/network TCP network layer listening on opc.tcp://computername.local:16664
SystemModel["OPCUA.Documentation.varserver"]