Reading CALC signals using openHistorian Python API

The openhistorian python API is unable to read CALC signals although it is reading all other signal types. Is there any fix for this? Also is there a way to get the source code for the Power Calculations and how the corresponding PPA point IDs are getting updated in realtime.

As long as the point ID is correct, the API will be able to read value, equally as any other. Perhaps a metadata query related to “CALC” signal type is not working properly? Can you sahre code on “how” you are looking up point ID?

The PowerCalculations code can be found here.

If you specifically want the the code for calculating electric power, e.g., MW, then here.

Applications hosting power calculations, e.g., openHistorian / openPDC, will simply depend on the database to auto-increment a new point ID from the database, see Measurement table PointID column, when adding a new record to this table.

The PointID value here will match the point ID needed to query openHistorian.

Hi Ritchie,
Thanks for the reply. One more thing is there a faster way to extract data for last 24 hours using pythonopenhistorian api for a particular signal every 20 milliseconds. As of now the traditional way that it reads data in taking long time to read the data. Is there an option to read the data only using key point IDs rather than checking a pointidlist for that particular signal type

You should only need to query the point ID array for a given signal type once and then use this array over and over.

Generally the array will only ever need to be refreshed if there is a change in configuration.

Otherwise, if you can share code, I will try to provide suggestions.