2,146 bytes added,
08:08, 20 November 2014 {{ActivityInfoBox
| title = Configure OPC UA Variable
| name = AccessOPCUAVariable
| image = [[File:UI_Activity_AccessOPCUAVariable.png|220px]]
| imagecaption = AccessOPCUAVariable
| purpose = Read or write a single OPC UA variable
| category = UBIK OPC UA Interface
| returns = True if successful
| version = 2.4.1+
}}
The AccessOPCUAVariable reads or writes a single OPC UA Variable that was previously configured within an [[CreateOPCUAConnection (Activity)|OPC Connection]].
==Arguments==
{| class="wikitable sortable" | width = "50%"
|-
! Argument!! Type !! Direction !! Purpose
|- align="left"
| Variable|| OpcUaVariable|| In || The variable to read or write as produced by a [[CreateOPCUAScope (Activity)|Scope activity]].
|- align="left"
| Value|| object|| In || The value to write to the variable. If null, the variable will be read.
|- align="left"
| Connection|| OpcUaServerConnection|| In || If the activity is not embedded with an [[CreateOPCUAScope (Activity)|Scope activity]], a valid connection has to be specified.
|- align="left"
| Quality|| OpcUaQuality|| Out || The quality of the accessed value as delivered by the OPC source
|- align="left"
| Result|| Boolean|| Out || True if successful, false if failed
|}
==Usage==
This activity is used to open a preconfigured [[CreateOPCUAConnection (Activity)|OPC Connection]]. It is a nestable activity, which means it can host any amount of sub-activities that will be processed sequentially. The hosted activities are typically [[AccessOPCUAVariable (Activity)|AccessOPCUAVariable]] activities, either as direct children but also wrapped within looping activities like ForEach or While. When all child activities are processed the OPC connection will be closed again.
==Example==
The CreateOPCUAScope activity, as used in the larger example "Read value from OPC variable":
[[File:UI_Activity_CreateOPCUAConnection_Example.png|x700px]]
==See also==
* [[Workflow Designer]]
* [[CreateOPCUAConnection (Activity)]]
* [[CreateOPCUAScope (Activity)]]
* [[ConfigureOPCUAVariable (Activity)]]
[[Category:Workflows]] [[Category:Activities]] [[Category:Interfacing]] [[Category:OPC]]