WOLFRAM SYSTEM MODELER
ReadAndWriteDemonstrates how to write to and read from nodes on an OPC UA server |
![]() |
SystemModel["OPCUA.Examples.ReadAndWrite"]
This example shows the principles of how to use the OPCUA Library to connect to an OPC UA server for data acquisition.
This example requires an OPC UA example server running on localhost
. Read about how to start the example server here.
Components writeReal
, writeInteger
and writeBoolean
write data of their respective types to nodes on an OPC UA server. The input to a component is the signal that is to be sampled and written to the server, in this case a cosine wave, a integer table source and a Boolean pulse signal.
Components readReal
, readInteger
and readBoolean
read data of their respective types from the server. The data is stored on nodes on the server, which is accessed by specifying the nodeID
, nodeIDType
and nodeNamespace
.
errorHandling |
Value: Types.ErrorHandling.ErrorWhenUncertain Type: ErrorHandling Description: How to handle request and data value errors |
---|
![]() |
client |
Type: Client Description: Client for connecting to an OPC UA server |
---|---|---|
![]() |
readReal |
Type: Read Description: Adds reading of a Real scalar node to a ReadNodeList |
![]() |
readInteger |
Type: Read Description: Adds reading of an Integer scalar node to a ReadNodeList |
![]() |
readBoolean |
Type: Read Description: Adds reading of a Boolean scalar node to a ReadNodeList |
![]() |
writeBoolean |
Type: Write Description: Adds writing of a Boolean scalar node to a WriteNodeList |
![]() |
writeInteger |
Type: Write Description: Adds writing of an Integer scalar node to a WriteNodeList |
![]() |
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 |
![]() |
shift |
Type: ShiftSample Description: Shift the input clock by a fraction of the last interval and provide it as output clock |
![]() |
cosine |
Type: Cosine Description: Generate cosine signal |
![]() |
integerTable |
Type: IntegerTable Description: Generate an Integer output signal based on a table matrix with [time, yi] values |
![]() |
booleanPulse1 |
Type: BooleanPulse Description: Generate pulse signal of type Boolean |