WOLFRAM SYSTEM MODELER

MultipleItems

Example that demonstrates how multiple items can be read using the same component

Diagram

Wolfram Language

In[1]:=
SystemModel["OPCClassic.Examples.MultipleItems"]
Out[1]:=

Information

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.

This is a model where two items are read and written to using the same component

Plot of the height of the two inputs fed to the write component and the two outputs from the read component

 

Parameters (1)

itemName

Value: {"Bucket Brigade.Real4", "Bucket Brigade.Real8"}

Type: String[:]

Description: The OPC items that data should be written to or read from

Connectors (1)

y

Type: RealOutput[size(readItems.y, 1)]

Description: 'output Real' as connector

Components (5)

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