Skip to main content
Version: 8.1

system.opchda.insert

This function is used in Python Scripting.

Description

Insert values on the OPC-HDA server.

Client Permission Restrictions

Permission Type: OPC Server Management

Client access to this scripting function is blocked to users that do not meet the role/zone requirements for the above permission type. This function is unaffected when run in the Gateway scope.

Syntax

system.opchda.insert(serverName, itemId, value, date, quality)

Parameters

TypeParameterDescription
StringserverNameThe name of the defined OPC-HDA server.
StringitemIdThe item ID to perform the operation on.
AnyvalueThe value to insert.
AnydateThe date to insert.
IntegerqualityThe quality to insert.

Returns

QualityCode - The result of the insert. See Scripting Object Reference.

Scope

Gateway, Vision Client, Perspective Session

Code Examples

Example #1
# This will insert the value for May 28th, 2014 at 5:42:33.

date = system.date.getDate(2014, 4, 28)
datetime = system.date.setTime(date, 5, 42, 33)
system.opchda.insert("MyHistoryServer", "MyItemId", 42.5, datetime, 192)

Keywords

system opchda insert, opchda.insert