How do you query for Array Tags using Proficy Historian 5.5 ihuapi.cs?

601 Views Asked by At

Array Tags were introduced in Proficy Historian 5.5. Additionally, sample code is provided to access the User API (ihuapi.dll). The sample code comes in the form of:

1) a C++ header file (IHUAPI.H) along with some sample programs.
2) a C# Wrapper file (ihuAPI.cs) along with some sample programs.

These files do not contain the same functionality. The header file (IHUAPI.H) contains references for the various data types (ihuDataType) including the new array type ihuArrayValue, but the C# file does not.

If you compile any of the sample applications that use ihuAPI.cs and attempt to query the values for an array tag, you will receive the exception, "Unsupported ValueDataType". This is because there is no provision for the Array Data Type in the ihuapi.cs file.

In addition to getting the exception message, the api code will tell you how many data samples were returned from your query and the timestamps of those samples. You get the exception when you try to read the values of the samples. You also get what appears to be a memory pointer but it is unknown what kind of structure is behind the pointer.

How can the ihuapi.cs file be extended to support querying for Array Tags?

0

There are 0 best solutions below