OPC Studio User's Guide and Reference
ReadWriteValue Method



OpcLabs.ServerOpcUA Assembly > OpcLabs.EasyOpc.UA.NodeSpace Namespace > UADataVariableExtension Class : ReadWriteValue Method
Modifies the data variable to behave as read-write register, with specified initial value.

This method makes the data variable both readable and writable. The data written to the data variable will become the data subsequently read from the data variable.

This method keeps the settings of UADataVariable.WritableStatusCode and UADataVariable.WritableSourceTimestamp. This means that by default, the status code and source timestamp of the data variable will not writable. i.e. OPC UA clients will not be able to modify them. If you need a different behavior, call the Writable(UADataVariable,Boolean,Boolean,Boolean) method subsequently, with desired parameters, or modify the UADataVariable.WritableStatusCode and/or UADataVariable.WritableSourceTimestamp accordingly (set one or both to true).

In order to make a read-write register of certain type, but without having to specify initial data, consider simply using one of the ValueType(UADataVariable,Type) overloads.

Overload List
OverloadDescription
Makes the data variable into a read-write register, specifying value type and initial value.  
Makes the data variable into a read-write register, specifying value type code and initial value.  
Makes the data variable into a read-write register, specifying the data type Id, array rank, and initial value.  
Makes the data variable into a read-write register, specifying the data type Id, array dimension list, and initial value.  
Makes the data variable into a read-write register, specifying the data type Id and initial value. Use an empty array dimension list.  
Makes the data variable into a read-write register, specifying the typed initial value.  
Makes the data variable into a read-write register, specifying the typed initial value, and array dimensions.  
Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also