WOLFRAM SYSTEM MODELER
MultipleServersExample that demonstrates a possible use of multiple servers |
SystemModel["OPCClassic.Examples.MultipleServers"]
This example demonstrates that using the OPC Classic Library, it is possible to connect to multiple servers from one model. The ready-to-use example uses the same server twice (due to limited availability of accessible OPC servers for testing), so in order to fully explore using multiple servers, you need to:
The readReal component reads data from item "Saw-toothed Waves.Real8" on "Matrikon.OPC.Simulation.1". The data is then passed through a Butterworth lowpass filter with a cut-off frequency of 2.0 Hz. Finally, the component writeReal writes the filtered data to item "Bucket Brigade.Real8" on "Matrikon.OPC.Simulation.1".
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.
Plot of the saw-toothed signal read from component opcServer.
Plot of the filtered signal and the sampled data written to component opcServer1.
opcServer |
Type: OPCServer Description: A model used for setting up server parameters (name of host and server) |
|
---|---|---|
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: OPCServer Description: A model used for setting up server parameters (name of host and server) |