WOLFRAM SYSTEM MODELER

Read

A block for reading data from an item on an OPC server at intervals determined by parameter samplePeriod

Wolfram Language

In[1]:=
SystemModel["OPCUA.Blocks.SamplerBoolean.Read"]
Out[1]:=

Information

This block reads data of scalar type Boolean from the OPC UA server it is connected to. It inherits the properties of the partial model Sampler, which contains parameters such as samplePeriod, nodeID, nodeNamespace, and nodeIDType that determine how often and from which OPC node the data should be read; Only scalar nodes can be read; i.e. no array or matrix nodes are supported.

At every sampling instant, external function readExternalBoolean 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
  • nodeID: which OPC UA node to read data from (ID value should always be inside quotes)
  • nodeNamespace: which namespace the node is located in
  • nodeIDType: which ID type to use, numeric or string

Interfaces

  • y: a Boolean output, which is the sampled signal
  • serverID: the connector that connects the block to the OPC server component

 

Parameters (6)

samplePeriod

Value:

Type: Time (s)

Description: Sample period of component

startTime

Value: 0

Type: Time (s)

Description: First sample time instant

nodeIDType

Value:

Type: UANodeIdType

Description: The node identifier type

nodeID

Value:

Type: String

Description: The node identifier

nodeNamespace

Value:

Type: Integer

Description: The node namespace

y_start

Value:

Type: Boolean

Description: Initial value of output signal

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

y

Type: BooleanOutput

Description: The data read from the item on the OPC server

Used in Examples (2)

ReadAndWrite

OPCUA.Examples

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

RPiInteraction

OPCUA.Examples

Example that demonstrates the interaction of an OPC UA server with a Raspberry Pi