OPC UA Constants and Variables
Previous Topic  Next Topic 


Overview


OPC UA variables are used to hold data retrieved from an OPC UA server.  Variables must exist in DataXchange and then be mapped to OPC UA items.


OPCUA Source Variables


DataXchange includes the following variables predefined:



Variable Name

Notes

Alarm Code

[OPCUA.alarm_code]

Returns the value mapped as the alarm code

Alarm Detail

[OPCUA.alarm_detail]

Returns the value mapped to the alarm description

Alarm Status

[OPCUA.alarm_status]

Returns the value mapped to the alarm status

Cycle Status

[OPCUA.cycle_status]

Returns the value mapped to the cycle status

E Stop

[OPCUA.estop]

Returns the value mapped to the e stop

Part Count

[OPCUA.part_count]

Returns the value mapped to the part count

Program Number

[OPCUA.program_number]

Returns the value mapped to the program number

Connected Time

[OPCUA.connected_time]

Returns the amount of time in seconds since a successful connection to the Source.


The following variables hold the value for the previous poll from the device.



Variable Name

Syntax

Alarm Code (Previous)

[OPCUA.prev_alarm_code]

Alarm Detail (Previous)

[OPCUA.prev_alarm_detail]

Alarm Status

[OPCUA.prev.alarm_status]

Connected Time (Previous)

[OPCUA.prev_connected_time]

Cycle Status (Previous)

[OPCUA.prev_cycle_status]

E Stop (Previous)

[OPCUA.prev_estop]

Part Count (Previous)

[OPCUA.prev_part_count]

Program Number (Previous)

[OPCUA.prev_program_number]



OPC UA Custom Variables 


In addition to using the predefined variables, DataXchange has the ability to create custom variables for the OPC UA source.  OPC UA variables can be added or modified by selecting the Variable drop down and then the OPC UA menu item on the DataXchange tab.


Custom variables will then show in the expression builder when defining expressions.  For example, the following will show after an custom variable named stack_light was created for OPC UA.



Variable Name

Notes

Custom Variable

[OPCUA.stack_light]

Returns the data from the custom mapping variable


The following variables hold the value for the previous poll from the device.



Variable Name

Syntax

Custom Variable (Previous)

[OPCUA.prev_stack_light]


Once the variables have been defined they need to be mapped to OPC UA data items.  The mapping is done at an individual equipment level since this may vary from equipment to equipment.