PointMetadataPointMetadata — queries a point for its metadata structure.
PointMetadata (point)
pointThe fully-qualified symbolic point name of a DataHub point.
This function queries a point for its metadata structure, which is a DH_Item containing the following fields:
item.canonical_typeA number representing the canonical type of the point. See the possible values of VARTYPE in Windows:
DH_ITEM_READABLE | 0x0001 | /* Matches OpcReadable.
*/ |
DH_ITEM_WRITABLE | 0x0002 | /* Matches OpcWritable.
*/ |
DH_ITEM_LOCKED | 0x0004 | |
DH_ITEM_PROPERTY | 0x0008 | |
DH_ITEM_SUBASSEMBLY | 0x0010 | |
DH_ITEM_ASSEMBLY | 0x0020 | |
DH_ITEM_ATTRIBUTE | 0x0040 | |
DH_ITEM_TYPE | 0x0080 | |
DH_ITEM_ACTIVE | 0x0100 | |
DH_ITEM_PRIVATE_ATTRIBUTE | 0x0200 | |
DH_ITEM_PROCESSED | 0x0400 | |
DH_ITEM_HIDDEN | 0x0800 | |
DH_ITEM_AUTO_ID | 0x1000 | |
DH_ITEM_UNINITIALIZED | 0x200000 | /* The item has been created but never
assigned a value. */ |
DH_ITEM_FIRST_VALUE | 0x400000 | /* This is the first value that has been
assigned to the point. */ |
item.opcaccessrightsAny bitwise combination of 1 for
READABLE and 2 for
WRITABLE. The same as the first two bits of
item.flags.
item.qualityThe OPC quality value. You can get the name associated with the
value by using the GetQualityName function in
the Quality.g file. Put the statement:
require ("Quality");at the beginning of your script to gain access to this function.
item.scan_maxMaximum scan rate on this point. Not in use.
item.securityThe security level on this point.
item.timeoffsetOffset in seconds from local clock time for the originator of this point value. Not in use.
item.timestampThe Windows time stamp of this point.
![]() | |
The point metadata is likely to change in the future, though the actual fields available will remain the same. It would be good practice to wrap access to the metadata within wrapper functions. |