WOLFRAM SYSTEM MODELER
MultipleItemsExample that demonstrates how multiple items can be read using the same component |
SystemModel["OPCClassic.Examples.MultipleItems"]
In this example, components that can read from multiple items at once are demonstrated.
The writeItems component is given two input signals which it writes to two items on a MatrikonOPC Server (opcServer). The readItems in turn reads those same items from the server and provides the signal to the output, y.
Plot of the height of the two inputs fed to the write component and the two outputs from the read component
itemName |
Value: {"Bucket Brigade.Real4", "Bucket Brigade.Real8"} Type: String[:] Description: The OPC items that data should be written to or read from |
---|
y |
Type: RealOutput[size(readItems.y, 1)] Description: 'output Real' as connector |
---|
readItems |
Type: MultipleRead Description: A block for reading data from multiple items on an OPC server at intervals determined by parameter samplePeriod |
|
---|---|---|
opcServer |
Type: OPCServer Description: A model used for setting up server parameters (name of host and server) |
|
writeItems |
Type: MultipleWrite Description: A block for writing data to multiple items on an OPC server at intervals determined by parameter samplePeriod |
|
pulse1 |
Type: Pulse Description: Generate pulse signal of type Real |
|
sine1 |
Type: Sine Description: Generate sine signal |