system.opchda.insert
Description
Insert values on the OPC-HDA server if the given item ID does not exist.
Syntax
system.opchda. insert( serverName, itemId, value, date, quality )
-
Parameters
String serverName - The name of the defined OPC-HDA server.
String itemId - The item ID to perform the operation on.
Object value - The value to insert.
Object date - The date to insert.
int quality - The quality to insert.
-
Returns
int - The items quality form the operation.
-
Scope
All
Code Examples
#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
)