WOLFRAM SYSTEM MODELER

MultipleWrite

A block for writing data to multiple items on an OPC server at intervals determined by parameter samplePeriod

Wolfram Language

In[1]:=
SystemModel["OPCClassic.Blocks.SamplerReal.MultipleWrite"]
Out[1]:=

Information

This block writes data from multiple items of type of type Real from the OPC server it is connected to. It inherits the properties of the partial model Sampler, which contains parameters such as samplePeriod and itemName that determine how often and to which OPC items the data should be written.

At every sampling instant, external function writeExternalReal is called from within the block.

Relevant Parameters

  • samplePeriod: determines how often to sample data from the OPC items
  • startTime: when the block should start to write data
  • itemName: which OPC items to write data to
  • uMax: if useUMax is true, then uMax is the upper limit for the written data
  • uMin: if useUMin is true, then uMin is the lower limit for the written data
  • useUMax: if true, respect upper limit uMax
  • useUMin: if true, respect lower limit uMin

Interfaces

  • u: a Real array input of the same size as itemName, which is the signal to be sampled and written to the OPC server
  • serverID: the connector that connects the block to the OPC server component

Parameters (7)

samplePeriod

Value:

Type: Time (s)

Description: Sample period of component (readItem.samplePeriod)

startTime

Value: 0

Type: Time (s)

Description: First sample time instant (readItem.startTime)

itemName

Value: {""}

Type: String[:]

Description: The OPC item that data should be written to or read from (readItem.itemName)

useUMax

Value: false

Type: Boolean

Description: If true, use upper limit for written signal (writeItem.useUMax)

uMax

Value: 1.0

Type: Real

Description: Upper limit of written signal (writeItem.uMax)

useUMin

Value: false

Type: Boolean

Description: If true, use lower limit for written signal (writeItem.useUMin)

uMin

Value: 0

Type: Real

Description: Lower limit of written signal (writeItem.uMin)

Connectors (2)

serverID

Type: BlockConnector

Description: The unique ID of the server the block is connected to

u

Type: RealInput[size(itemName, 1)]

Description: Input signal to be sampled

Components (1)

writeItem

Type: Write[size(itemName, 1)]

Description: A block for writing data to an item on an OPC server at intervals determined by parameter samplePeriod

Used in Examples (1)

MultipleItems

OPCClassic.Examples

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