WOLFRAM SYSTEM MODELER

Write

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

Wolfram Language

In[1]:=
SystemModel["OPCClassic.Blocks.SamplerBoolean.Write"]
Out[1]:=

Information

This block writes data of type Boolean 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 item the data should be written.

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

Relevant Parameters

  • samplePeriod: determines how often to sample data from the OPC item
  • startTime: when the block should start to read data
  • itemName: which OPC item to read data from

Interfaces

  • u: a Boolean input, 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 (3)

samplePeriod

Value:

Type: Time (s)

Description: Sample period of component

startTime

Value: 0

Type: Time (s)

Description: First sample time instant

itemName

Value:

Type: String

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

Outputs (2)

sampleTrigger

Type: Boolean

Description: True, if sample time instant

firstTrigger

Type: Boolean

Description: Rising edge signals first sample instant

Connectors (2)

serverID

Type: BlockConnector

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

u

Type: BooleanInput

Description: Input signal to be sampled

Used in Examples (1)

ReadAndWrite

OPCClassic.Examples

Basic example that demonstrates how to write to and read from items on an OPC server

Used in Components (1)

MultipleWrite

OPCClassic.Blocks.SamplerBoolean

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