Jump to: navigation, search

Difference between revisions of "Activity:AccessOPCUAVariable (Activity)"


(See also)
m (Arguments)
 
(6 intermediate revisions by 2 users not shown)
Line 15: Line 15:
 
===Arguments===
 
===Arguments===
  
{| class="wikitable sortable" | width = "50%"
+
{| class="wikitable sortable" | width = "80%"
 
|-
 
|-
 
! Argument!! Type !! Direction !! Purpose  
 
! Argument!! Type !! Direction !! Purpose  
 
|- align="left"
 
|- align="left"
| Variable|| OpcUaVariable|| In || The variable to read or write as produced by a [[CreateOPCUAScope (Activity)|Scope activity]].
+
| Variable|| OpcUaVariable|| In || The variable to read or write as produced by a [[Activity:CreateOPCUAScope (Activity)|Scope activity]].
 
|- align="left"
 
|- align="left"
 
| Value|| {{Object_MSDN}}|| InOut || The value to write to the variable. If null, the variable will be read.
 
| Value|| {{Object_MSDN}}|| InOut || The value to write to the variable. If null, the variable will be read.
 
|- align="left"
 
|- align="left"
| Connection|| OpcUaServerConnection|| In || If the activity is not embedded with an [[CreateOPCUAScope (Activity)|Scope activity]], a valid connection has to be specified.
+
| Connection|| OpcUaServerConnection|| In || If the activity is not embedded with an [[Activity:CreateOPCUAScope (Activity)|Scope activity]], a valid connection has to be specified.
 
|- align="left"
 
|- align="left"
 
| Quality|| OpcUaQuality|| Out || The quality of the accessed value as delivered by the OPC source
 
| Quality|| OpcUaQuality|| Out || The quality of the accessed value as delivered by the OPC source
 
|- align="left"
 
|- align="left"
 
| Result|| {{Boolean_MSDN}}|| Out || True if successful, false if failed
 
| Result|| {{Boolean_MSDN}}|| Out || True if successful, false if failed
 +
|- align="left"
 +
| SourceTimeStamp|| {{DateTime_MSDN}}|| In || Available since 2.4.3.
 +
Is used to reflect the time-stamp that was applied to a Variable value by the data source.  It should indicate the last change of the value or it's status code.
 +
|- align="left"
 +
| StatusCode|| [https://msdn.microsoft.com/en-us/library/system.uint32(v=vs.110).aspx Unsigned Int]|| In || Available since 2.4.3.
 +
Is used to set the Value of the Status Code. The qualities can be divided into three main groups: Good, Uncertain, and Bad. The quality value is a 32 bit value, where the first byte represents the main quality. For Good quality thefirst byte has a value of zero (0), for uncertain quality the first byte has a value of 64, and for Bad quality the first byte has a value of 128.
 +
You can also use ValueQuality.GOOD, ValueQuality.UNCERTAIN or ValueQuality.BAD
 
|}
 
|}
 +
 +
[[Category:OPC|AccessOPCUAVariable (Activity)]]
  
 
===Usage===
 
===Usage===
This activity is used to read or write a value of a single OPC variable within an [[CreateOPCUAScope (Activity)|OPC Scope]]. if ''Value'' is supplied with null, it will read the value of the variable. If ''Value'' is supplied with something else than null, it will attempt to write it to the variable.
+
This activity is used to read or write a value of a single OPC variable within an [[Activity:CreateOPCUAScope (Activity)|OPC Scope]]. if ''Value'' is supplied with null, it will read the value of the variable. If ''Value'' is supplied with something else than null, it will attempt to write it to the variable.
If it is used outside of a scope activity, it has to be supplied with a valid OPC connection object as produced by an [[CreateOPCUAConnection (Activity)|OPC connection]] somewhere else in the workflow.
+
If it is used outside of a scope activity, it has to be supplied with a valid OPC connection object as produced by an [[Activity:CreateOPCUAConnection (Activity)|OPC connection]] somewhere else in the workflow.
  
 
=Example=
 
=Example=
Line 48: Line 57:
  
 
[[Category:OPC]]
 
[[Category:OPC]]
[[Category:Activities]]
 

Latest revision as of 14:37, 14 June 2016

The AccessOPCUAVariable reads or writes a single OPC UA Variable that was previously configured within an OPC Connection.

[edit]

Description

Configure OPC UA Variable
Name AccessOPCUAVariable
Purpose Read or write a single OPC UA variable
Category UBIK OPC UA Interface
Returns True if successful
Version 2.4.1+

Arguments

Argument Type Direction Purpose
Variable OpcUaVariable In The variable to read or write as produced by a Scope activity.
Value Object InOut The value to write to the variable. If null, the variable will be read.
Connection OpcUaServerConnection In If the activity is not embedded with an Scope activity, a valid connection has to be specified.
Quality OpcUaQuality Out The quality of the accessed value as delivered by the OPC source
Result Boolean Out True if successful, false if failed
SourceTimeStamp DateTime In Available since 2.4.3.

Is used to reflect the time-stamp that was applied to a Variable value by the data source. It should indicate the last change of the value or it's status code.

StatusCode Unsigned Int In Available since 2.4.3.

Is used to set the Value of the Status Code. The qualities can be divided into three main groups: Good, Uncertain, and Bad. The quality value is a 32 bit value, where the first byte represents the main quality. For Good quality thefirst byte has a value of zero (0), for uncertain quality the first byte has a value of 64, and for Bad quality the first byte has a value of 128. You can also use ValueQuality.GOOD, ValueQuality.UNCERTAIN or ValueQuality.BAD

Usage

This activity is used to read or write a value of a single OPC variable within an OPC Scope. if Value is supplied with null, it will read the value of the variable. If Value is supplied with something else than null, it will attempt to write it to the variable. If it is used outside of a scope activity, it has to be supplied with a valid OPC connection object as produced by an OPC connection somewhere else in the workflow.

Example

The CreateOPCUAScope activity, as used in the larger example "Read value from OPC variable":

UI Activity CreateOPCUAConnection Example.png

See also