This project has moved and is read-only. For the latest updates, please go here.

Active PMUs

Nov 28, 2013 at 11:45 AM
Hi,
I have developed an application to retrieve historical data directly from historian, as described in https://openpdc.codeplex.com/wikipage?title=Getting%20Started&referringTitle=Documentation#time_series_web_service

The problem I am facing is that the historian is presenting me a set of measurements that contains only null values. I think that somehow during the PDC configuration, a PMU was created and a set of historian IDs were attributed (in my case from PPA:459 to PPA:467). This PMU was then deleted and created again, so a new set of measurements was created (from PPA:471 to PPA:478).

My application retrieves all measurements metadata and constructs a list of PMUs where the PMU names are the "System Name" property and the associated measurements are the "Name" property from the historian. But since I have a deleted / null PMU on my historian, my list has a duplicated PMU.

I have looked into the measurement metadata and I couldn't find any field that could inform if the measurement is active or not.

So here comes my question: How can I check if a PMU is active or not? Can I get it from the historian? Can I get it from the OpenPDC? How?

Best,
Renan
Dec 3, 2013 at 2:14 PM
Edited Dec 3, 2013 at 2:15 PM
Try issuing the following command to the openPDC console:
INVOKE PPA RefreshMetadata
This will force the metadata in the historian to be rewritten. This generally happens automatically.

A restart of the service will do the same thing.

If this doesn't fix the issue - check the database to see if the other device is still actually there.

Also, with the openPDC service not running you can safely delete the "ppa_dbase.dat" files where your archive files are stored. When the openPDC restarts it will create a new one.

Thanks,
Ritchie
Dec 17, 2013 at 5:42 PM
Hi,
After doing
INVOKE PPA RefreshMetadata
A restart of the service
The only thing that effectively did the job was
delete the "ppa_dbase.dat" 
Now my historian has 2 types of HistorianIDs: Blank IDs and the real IDs. When I call the webservice, there are hundreds of blank HistorianIDs like this:
{"HistorianID":1218,"DataType":0,"Name":"","Synonym1":"","Synonym2":"","Synonym3":"","Description":"","HardwareInfo":"","Remarks":"","PlantCode":"","UnitNumber":0,"SystemName":"","SourceID":0,"Enabled":false,"ScanRate":0,"CompressionMinTime":0,"CompressionMaxTime":0,"EngineeringUnits":"","LowWarning":0,"HighWarning":0,"LowAlarm":0,"HighAlarm":0,"LowRange":0,"HighRange":0,"CompressionLimit":0,"ExceptionLimit":0,"DisplayDigits":0,"SetDescription":"","ClearDescription":"","AlarmState":0,"ChangeSecurity":0,"AccessSecurity":0,"StepCheck":false,"AlarmEnabled":false,"AlarmFlags":0,"AlarmDelay":0,"AlarmToFile":false,"AlarmByEmail":false,"AlarmByPager":false,"AlarmByPhone":false,"AlarmEmails":"","AlarmPagers":"","AlarmPhones":""},
Is it possible to erase them from the Historian?

Renan
Dec 17, 2013 at 6:45 PM
I think we can add a parameter to the web service to get rid of those.

Are you using 1.5 or 2.0?

If you are using 2.0, I would prefer to just add it that code branch...

Thanks,
Ritchie
Dec 19, 2013 at 6:46 PM
Ritchie,
I installed openPDC 2.0.85.0. Configured all my input streams. Everything worked fine. OpenPDC was up and running in less than 10 minutes.
When I accessed the webservice (http://192.168.254.13:6151/historian/metadata/read/json), the first 120 HistorianIDs are blank:
{"HistorianID":1,"DataType":0,"Name":"","Synonym1":"","Synonym2":"","Synonym3":"","Description":"","HardwareInfo":"","Remarks":"","PlantCode":"","UnitNumber":0,"SystemName":"","SourceID":0,"Enabled":false,"ScanRate":0,"CompressionMinTime":0,"CompressionMaxTime":0,"EngineeringUnits":"","LowWarning":0,"HighWarning":0,"LowAlarm":0,"HighAlarm":0,"LowRange":0,"HighRange":0,"CompressionLimit":0,"ExceptionLimit":0,"DisplayDigits":0,"SetDescription":"","ClearDescription":"","AlarmState":0,"ChangeSecurity":0,"AccessSecurity":0,"StepCheck":false,"AlarmEnabled":false,"AlarmFlags":0,"AlarmDelay":0,"AlarmToFile":false,"AlarmByEmail":false,"AlarmByPager":false,"AlarmByPhone":false,"AlarmEmails":"","AlarmPagers":"","AlarmPhones":""}
Isn't this strange?

Renan
Dec 19, 2013 at 8:35 PM
This just means these points no longer exist in your local configuration (i.e., database). We can add a parameter, if useful, to hide the blanks from the meta-data service.

These are directly tied to the auto-incrementing ID's in your Measurement table in your database - since no measurements are defined for these points in the database they show as blanks in the meta-data service.

Thanks,
Ritchie