Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Scripting_function


Panel
titleDescription

Inserts values on the OPC-HDA server, or replaces them if they already exist.

Panel
titleClient 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.

Panel
titleSyntax

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

  • Parameters

String serverName - The name of the defined OPC-HDA server.

String itemId - The item ID on which to perform the operation.

Any value - The value to insert or replace.

Any date - The date to insert or replace.

Integer quality - The quality to insert or replace.

  • Returns

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

  • Scope

Gateway, Vision Client, Perspective Session

Panel
titleCode Examples
Code Block
languagepy
titleCode Snippet
# This example will insert a new date for a specific entry on an OPC HDA server.
# Declare a date to insert
start = system.date.getDate(22022022, 10, 25)

# Call the system function
hda = system.opchda.insertReplace('Matrikon HDA','1',3,start,1)

# Print out various attributes
print hda.isError()
print hda.getCode()
print hda.isBad()
print hda.isGood()
Panel
titleKeywords

system opchda insertReplace, opchda.insertReplace