7.27 UA_HistoryUpdate

FB-NameUA_HistoryUpdate
This Function Block is used to insert or replace or update data in the historical database.
VAR_INPUT
BExecuteBOOLFB performs its task on rising edge on this input.
BConnectionHdlDWORDConnection handle.
BNodeHdlDWORDNode handle.
BPerformInsertBOOL

Perform
Insert
Perform
Replace
Description
TRUEFALSEThe passed value will only be written to the history if no value exists at the specified timestamp.
FALSETRUEThe passed value will only be written to the history if a value exists at the specified timestamp. The existing value will be replaced.
TRUETRUEThe passed value will be inserted if no value exists for the timestamp but will also replace an existing value at the given timestamp.

BPerformReplaceBOOL
BDataValueCountUNITNumber of values to be inserted, replaced or updates
BDataValuesARRAY of UAHADataValue

Array of UAHADataValue

See UAHADataValue

BTimeoutTIMETime to response.
VAR_OUTPUT
BDoneBOOLFB has completed its task.
BBusyBOOLThe FB is not finished and new output values are to be expected
BErrorBOOLSignals that an error has occurred within the Function Block.
BErrorIDDWORDError code. (StatusCode)
BValueErrorIDsARRAY OF
DWORD
Contains an error code for each valid element.
Notes: The idea of this scenario is to have an OPC UA server with HA (Historical Access) functionality available, either local on the same system or remotely in the network. In traditional way the OPC UA Server is responsible to collect data on his own from the underlying process. This FB UA_HistoryUpdate allows the OPC UA-HA Server to stay inactive and wait that an OPC UA client is actively pushing data into OPC UA-HA-Server making use of the Server's HistoryUpdate interface.
UA_HistoryUpdate
BOOLExecuteDoneBOOL
DWORDConnectionHdlBusyBOOL
DWORDNodeHdlErrorBOOL
BOOLPerformInsertErrorIDDWORD
BOOLPerformReplaceValueErrorIDsARRAY OF DWORD
UINTDataValueCount
ARRAY OF UAHADataValueDataValues
TIMETimeout