LabVIEW OPC UA Toolkit API Reference

Content Type
Programming Language
Current manual

History Event Read VI

History Event Read VI

Owning Palette: Historical Access VIs

Requires: OPC UA Toolkit

Reads a notifier. A notifier node enables an OPC UA client, which subscribes to the node, to receive event notifications.

Example

OPC UA server refnum in specifies the reference data value of the OPC UA server.
notifier node ID specifies the ID of the notifier. A notifier is an object that you can subscribe to get events from the associated condition nodes. The format of the node ID is ns=<namespace index>;<identifier type>=<identifier>. A node ID contains the following components:
  • namespace index is a base 10 number that indicates the namespace of the node ID.
    If namespace index is 0, the format of the node ID can be <identifier type>=<identifier>. The namespace index for a node that you created with the OPC UA Toolkit is 2.
  • identifier type represents the type of the identifier and has the following values:

    ValueIdentifier Type
    iNumeric
    sString
    gGUID
    bOpaque
  • identifier is a string value that represents the name of the identifier.


The format of the node ID can also be ns=<namespace index>;<identifier type>=<identifier>@<index>:<index>. For example, ns=2;s=Folder.Array@1:2. This format only applies to the array data type and allows you to read a single element or a range of elements of an array. You cannot use @ in a node name.

For backwards compatibility, notifier node ID also accepts node paths as input for OPC UA servers only. You can regard the node path as the string type identifier of the node ID. For example, a node path can be Device.folder.item.
request specifies the start time and the end time for the VI to read the notifier.
start time specifies the timestamp at which this VI reads the first history event.
end time specifies the timestamp at which this VI reads the last history event.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
OPC UA server refnum out returns the reference data value of the OPC UA server.
history events returns the detailed information about the event that this VI reads from the history database. condition type affects the validity of the output data in history event.
  • For the dialog condition type, the validity of the output data is shown in the following table:

    OutputValidity
    condition node IDvalid
    source node ID/input node IDvalid
    event IDvalid
    activevalid
    timevalid
    severityvalid
    qualityvalid
    commentvalid
    limit stateinvalid
    acked stateinvalid
    confirmed stateinvalid
    promptvalid
  • For the off-normal alarm condition type, the validity of the output data is shown in the following table:

    OutputValidity
    condition node IDvalid
    source node ID/input node IDvalid
    event IDvalid
    activevalid
    timevalid
    severityvalid
    qualityvalid
    commentvalid
    limit stateinvalid
    acked statevalid
    confirmed statevalid
    promptinvalid
  • For the limit alarm condition type, the validity of the output data is shown in the following table:

    OutputValidity
    condition node IDvalid
    source node ID/input node IDvalid
    event IDvalid
    activevalid
    timevalid
    severityvalid
    qualityvalid
    commentvalid
    limit statevalid
    acked statevalid
    confirmed statevalid
    promptinvalid
condition node ID returns the ID of the condition node.
condition type returns the type of the condition node.

0Dialog Condition
1Off-Normal Alarm
2Exclusive Level Alarm
3Exclusive Deviation Alarm
4Exclusive Rate of Change Alarm
5Non Exclusive Level Alarm
6Non Exclusive Deviation Alarm
7Non Exclusive Rate of Change Alarm
8Refresh Start Event
9Refresh End Event
source node ID/input node ID returns the ID of the source node or the input node. For nodes of the dialog condition type, source node ID/input node ID returns the ID of the source node. For nodes of the off-normal alarm type and the limit alarm type, source node ID/input node ID returns the ID of the input node. You can use the Add Condition VI to add dialog condition nodes, off-normal alarm nodes, or limit alarm nodes.
event ID returns the event ID.
active returns whether the situation the alarm is representing exists.
time returns the timestamp at which the event occurs.
severity returns a value that indicates the urgency of the event. The value ranges from 1 to 1000, with 1 being the lowest severity and 1000 being the highest severity.
quality returns the status code to display the quality of the values that the condition depends on.
comment returns the string to associate with a certain state of condition.
limit state returns the state of the alarm.
high high state returns whether the condition value exceeds the high high limit.
high state returns whether the condition value exceeds the high limit.
low state returns whether the condition value exceeds the low limit.
low low state returns whether the condition value exceeds the low low limit.
acked state returns whether the condition is acknowledged.
confirmed state returns whether the condition is confirmed.
prompt returns the textual content of a dialog prompt only when the condition type is dialog condition.
status returns the status code.
error out contains error information. This output provides standard error out functionality.

Example

Refer to the OPC UA Demo.lvproj in the labview\examples\Data Communication\OPCUA directory for an example of using the History Event Read VI.

In This Section
Was this information helpful?