SetOPCData
| Description: | Sets an item value in the VTScada OPC Server. |
| Warning: | For use by advanced programmers only |
| Returns: | Boolean |
Usage: ![]() |
Script Only. |
| Function Groups: | Network |
| Related to: | OPCServer |
Format: ![]() |
SetOPCData(BranchHandle, ItemName, Value, Quality, Timestamp) |
| Parameters: |
| BranchHandle | ||||||||||||||
| Required. A handle returned from an OPCServer call. | ||||||||||||||
| ItemName | ||||||||||||||
| Required. The internal name for the OPC item being set. It does not necessarily correspond to the OPC item ID. It does correspond to what the OPCGetInternalName callback module returns for a given OPC item ID. | ||||||||||||||
| Value | ||||||||||||||
| Required. The new value of the item (numeric or text). | ||||||||||||||
| Quality | ||||||||||||||
Required. The quality of the value. Should be one of the following:
|
| Timestamp |
| Required. The UTC timestamp corresponding to the value. Will default to the current time if Invalid. |
| Comments: | Returns TRUE if the item being updated is currently included in an OPC client group, or FALSE if not. |
Example:
SetOPCData(Handle { Returned from an OPCServer call },
"myitem1",
23.1,
0xC0,
CurrentTime() + TimeZone(0));
This example updates the value of an OPC item with the internal name "myitem1" to be 23.1, with good quality and the current time as the timestamp.
