Reading Data from openHistorian Help

I’m trying to create a program that will pull the last 10 seconds of data from openHistorian and run some calculations on them every 10 seconds.

I found the example code to read data but I can’t find the libraries it depends upon. Specifically, it uses GSF.Snap, openHistorian.Net, and openHistorian.Snap. I also wondered if I misunderstood the example and this was already a file somewhere that I could call GetHistorianData from. I’m just not sure how to implement it.

Is this the best way to get real-time data from openHistorian and if so how would I get the missing libraries?


Looks like the assemblies you need are GSF.Core.dll, GSF.SortedTreeStore.dll, and openHistorian.Core.dll. Also, the code appears to be missing a using statement: using System.Linq;.

EDIT: As for whether this is the best way, I would say yes. This is the recommended way of programmatically accessing data contained in the openHistorian unless you need to simulate a real-time data stream.

1 Like