WOLFRAM SYSTEM MODELER

Multirate

Demonstrates how to read node values using different sample rates

Diagram

Wolfram Language

In[1]:=
SystemModel["OPCUA.Examples.Multirate"]
Out[1]:=

Information

This example shows how to read data with multiple rates from an OPC UA server.

This example requires an OPC UA example server running on localhost. Read about how to start the example server here.

The convenience client OPCUA.Client can only read data with one sample rate and write data with one (possibly different) sample rate. In some situations it is necessary to read (or write) with multiple sample rates. For that, the OPCUA.Components.Core.Client must be used. That client cannot be connected directly to read/write components; instead it is connected to one or more WriteNodeList/ReadNodeList. Each list can use its own clock.

In this example, two ReadNodeLists are used to read, for ease of comparison, the same node but with two different sample rates.

Parameters (1)

errorHandling

Value: Types.ErrorHandling.ErrorWhenUncertain

Type: ErrorHandling

Description: How to handle request and data value errors

Components (13)

readReal1x

Type: Read

Description: Adds reading of a Real scalar node to a ReadNodeList

writeReal

Type: Write

Description: Adds writing of a Real scalar node to a WriteNodeList

writeClock

Type: PeriodicExactClock

Description: Generate a periodic clock signal with a period defined by an Integer number with resolution

shift1x

Type: ShiftSample

Description: Shift the input clock by a fraction of the last interval and provide it as output clock

client

Type: Client

Description: Client for connecting to an OPC UA server

writeNodeList

Type: WriteNodeList

Description: Write the values of a list of nodes in a single OPC UA request

readNodeList1x

Type: ReadNodeList

Description: Read the values of a list of nodes in a single OPC UA request

readReal2x

Type: Read

Description: Adds reading of a Real scalar node to a ReadNodeList

readNodeList2x

Type: ReadNodeList

Description: Read the values of a list of nodes in a single OPC UA request

readBaseClock1x

Type: PeriodicExactClock

Description: Generate a periodic clock signal with a period defined by an Integer number with resolution

shift2x

Type: ShiftSample

Description: Shift the input clock by a fraction of the last interval and provide it as output clock

readBaseClock2x

Type: PeriodicExactClock

Description: Generate a periodic clock signal with a period defined by an Integer number with resolution

sine

Type: Sine

Description: Generate sine signal