This site is a summating demo of a live monitoring application that uses SCOME

Developed by Drew Salem
You are here:  ReadMe > Blog
  |  Login
 
By Drew Salem on Tuesday, January 04, 2011
It's possible to access PHD data via a simple SQL query within SQL Server (I say simple as at the time of writing, joins cannot be done, discussed here). In essence if you are retrieving live well data, say every 5 seconds, then you can query that live data using SQL either from within SQL Server or from an application using a stored procedure or inline code etc.

To do this you need to install the Honeywell Uniformance PHD software client tools/desktop components (which comes on the same disk as the server software). Once you have done this, a new data provider will be listed when extracting data from capable applications. It should read like "Uniformace PHD OLE/DB Provider".   Create a new SQL Server Linked Server (more info here), and with the Other data source radio button selected, select "Uniformace PHD OLE/DB Provider" as the provider. The Product...
By Drew Salem on Tuesday, January 04, 2011
There are a few show-stopping limitations and/or bugs to the PHD OLEDB provider (at the time of writing). The tables provided by the provider are:

PHD_DATA PHD_LINK_LIST PHD_PARENT_TAG PHD_RDI_LIST PHD_REDUCTIONS PHD_TAG PHD_TAG_BROWSE PHD_WRITE_DATA  

Anomaly One: Standard SQL cannot be used on all tables consistently

Some tables such as PHD_TAG can be queried successfully using a standard SELECT query against a linked server such as:

SELECT * FROM   your_linkedserver_name.standardapi.phd.phd_tag

This will return all your tags with relevant attributes such as their interpolation method, whether they have been manually inputted and their description.

However if you run a similar query against PHD_DATA (which holds the tag data such as the value, confidence, timestamps etc):

SELECT * FROM   your_linkedserver_name.standardapi.phd.phd_dataÂ

You get nothing.

If you specify a tag number and timestamp:

SELECT * FROM   your_linkedserver_name.standardapi.phd.phd_data...
By Drew Salem on Tuesday, January 04, 2011

It's a little odd, but at the time or writing there is no SnapShot retrieval type available for selection when creating a PHDTOREL query in the PHD Configuration tool (confirmed by Honeywell).

The values available are

Average
Maximum
Minimum
Delta
Raw
Standard Deviation
Regression Constant
Regression Slope
Regression Deviation
First
Last
Value

The description for Value is the same as Raw; "Requests the raw value", however what is actually does is return the first Raw value for that retrieval period.

Despite SnapShot being available for other APIs such as the .Net Wrapper and the PHD OLEDB providor, it is not available in PHDTOREL. Bit of a pain.

The closest to it is Average.



 

Search Blog