WOLFRAM SYSTEM MODELER
MultipleServersExample that demonstrates a possible use of multiple OPC UA servers |
SystemModel["OPCUA.Examples.MultipleServers"]
This example demonstrates that using the OPCUA Library, it is possible to connect to multiple servers from one model.
This example requiers two OPC UA example servers running on localhost. Read about how to start the example servers here.
The readReal component reads data from a real-valued node "51031" on "opc.tcp://localhost:16664". The data is then passed through a Butterworth lowpass filter with a cutoff frequency of 0.2 Hz. Finally, the component writeReal writes the filtered data to node "51031" on "opc.tcp://localhost:16665".
There are several possible applications of being able to connect to more than one server from one model, such as processing data read from one server and writing the modified data to another server.
If you have the possibility to set up a remote OPC UA server, what you need to do get this example to use the remote is to:
Plot of the values on node 51031 read from component opcServer.
Plot of the filtered signal and the sampled data written to node 51031 on opcServer1.
opcServer |
Type: OPCUAServer Description: A model used for setting up server parameters |
|
---|---|---|
filter |
Type: Filter Description: Continuous low pass, high pass, band pass or band stop IIR-filter of type CriticalDamping, Bessel, Butterworth or ChebyshevI |
|
readReal |
Type: Read Description: A block for reading data from items on an OPC server at intervals determined by parameter samplePeriod |
|
writeReal |
Type: Write Description: A block for writing data to an item on an OPC server at intervals determined by parameter samplePeriod |
|
opcServer1 |
Type: OPCUAServer Description: A model used for setting up server parameters |
|
combiTimeTable |
Type: CombiTimeTable Description: Table look-up with respect to time and linear/periodic extrapolation methods (data from matrix/file) |
|
writeRealTable |
Type: Write Description: A block for writing data to an item on an OPC server at intervals determined by parameter samplePeriod |