Skip to main content
Version: Streamsheets 3.0

OPCUA.WRITE

Premium

Sends a write request of a value to an OPC UA Server. The Server will respond, if the write was successful or not. Click here for a more detailed tutorial on opcua functions.

Syntax

=OPCUA.WRITE(Connection, Node, ValueJSON, Target)

Arguments

NameTypeDescription
ConnectionConnectionConnection to use for reading.
NodeStringPath of the node to write to or node id.
ValueJSONJSONJSON with a "value" and a "dataType" field containing the value to write and the data type of the value.
TargetTargetINBOX(), OUTBOX("MsgID") or a cell range where the result will be placed. Make sure the cell range is big enough or not everything is displayed.

Return

The function OPCUA.WRITE always returns a unique random request ID, which can be used with requestinfo to check the state of the request, if no error.

Examples

AB
1value13
2dataTypeUInt32
FormulaResultComment
=OPCUA.WRITE(|OPCUAProducer,”ns=1;s=S1GXQxFYZP.rkN-uZ8aI.example.param1”, JSON(A1:B2), INBOX())
TRUEWrites 13 as data type UInt32 into the given node id.