OPC write interface to the DeltaV Continuous Historian

CreateTags method (C++)

To create new history tags, use the following syntax in a C++ program:

HRESULT (
        [in] DWORD dwNumItems,
        [in, size_is(dwNumItems)] LPWSTR *pszTag,
        [in, size_is(dwNumItems)] int *pTagType,
        [out, size_is(,dwNumItems)] HRESULT **ppErrors);
Parameter Description
dwNumItems The number of history tags to be written to the DeltaV Continuous Historian database.
pszTag An array of pointers to strings containing the path/tag names to be written to the DeltaV Continuous Historian database.
pTagType An array of integers that define the history tag data types as either a float (2) or a string (3).
Note

To represent history tags of a different data type – such as Boolean or Named Set enumeration, for example – the client application that calls the CreateTags method must map them to either a float or string type.

ppErrors An array of pointers to HRESULTs for each history tag creation operation.
Important

After creating a history tag using the CreateTags method, it cannot be deleted.

Rules and operation

The CreateTags method performs a security check to verify with the DeltaV runtime services that the user has the HISTORICAL_DATA_ENTRY key in DeltaV in order to create history tags. For applications running locally to the OPC HDA server, the user will be the interactive Windows user. For applications running remotely, a DCOM query is used to determine the user that made the call.(1)

After user security is verified, the CreateTags method attempts to validate all .HDE tags passed according to the following rules:

(1) For more information about OPC Remote and DCOM setup, refer to the Using OPC and DCOM Setup topics in the Integration section of DeltaV Books Online.
(2) On a Japanese DeltaV system, Unicode characters with the following hex code values are also treated as alphabetic characters: 0x3005, 0x309B, 0x309C, 0x309D, 0x309E, 0x30FC, 0x30FD, 0x30FE, 0xFF70, 0xFF9E, and 0xFF9F.