This project has moved. For the latest updates, please go here.

Synchronized TimeSeries Data

Jan 15, 2010 at 4:58 PM

Hello OpenPdc Masters,

In my application I have a polar chart (updated every second) showing phasor data.

I'm using the ReadSelectCurrentTimeSeriesDataAsJson function to get the information.

The problem is that this function returns the last received frame of each time serie and not the last synchronized set. The dates are not the same :)

I thought about calling the  ReadRangeHistoricTimeSeriesDataAsJson function with *-1s, but then I have to ask for the whole second (60 frames * number of time series - in my case) and figure out which cycle is the newest one with all data.

Is it possible or do you have plans to have a webservice that could bring the last synchronized set of frames?

Best regards,

André Carlucci

 

Coordinator
Jan 19, 2010 at 1:04 PM

I believe you can specify an exact timestamp span that should retrieve all values for a single frame of time. In the case of a single frame of data at 60 samples per second something like http://localhost:6152/historian/timeseriesdata/read/historic/12-15/09-20-09 23:00:01.000/09-20-09 23:00:01.015/json should work to retrieve points 12 through 15 for the frame index = 0, http://localhost:6152/historian/timeseriesdata/read/historic/12-15/09-20-09 23:00:01.016/09-20-09 23:00:01.032/json would get frame at index = 1, etc.

That may not be what you are needing / asking, in which case we can add something that can make this more useful.

Let me know if this was not what you were needing and we'll add a task to handle what you need.

Thanks!

Ritchie

Jan 19, 2010 at 5:00 PM

Hi Ritchie,

Thanks for your answer.

Unfortunately that doesn't work for me because this kind of call uses the client's machine date and time and not the server's one.

Since the user computer and the server don't have synchronized date and time (maybe minutes away), it would be very hard to get the last synchronized data from the server.

I know that you guys are very busy, but since you gave me the opportunity to ask, I believe that another web service doing that would be a really nice feature for the openpdc (and also help me a lot :)

Many thanks in advance,

André Carlucci

Coordinator
Jan 19, 2010 at 6:38 PM

We can certainly add a task for this request and you and your colleagues can vote it up for importance. Let me be sure I understand what you are asking for however: as I understand it you want a table of data for a given set of points and time-range that will be timealigned on a specific frame rate interval (e.g., 60 frames per second) over a given time period (e.g., *-1s).

So the data might look like:

<TimeSeriesDataFrames xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <TimeSeriesDataFrame Time="2010-01-19 18:58:26.000">
    <TimeSeriesDataPoint>
      <HistorianID>12</HistorianID> 
      <Value>46.97198</Value> 
      <Quality>Good</Quality> 
    </TimeSeriesDataPoint>
    <TimeSeriesDataPoint>
      <HistorianID>13</HistorianID> 
      <Value>209.238083</Value> 
      <Quality>Good</Quality> 
    </TimeSeriesDataPoint>
  </TimeSeriesDataFrame>
  <TimeSeriesDataFrame Time="2010-01-19 18:58:26.016">
    <TimeSeriesDataPoint>
      <HistorianID>12</HistorianID> 
      <Value>46.5971336</Value> 
      <Quality>Good</Quality> 
    </TimeSeriesDataPoint>
    <TimeSeriesDataPoint>
      <HistorianID>13</HistorianID> 
      <Value>211.081619</Value> 
      <Quality>Good</Quality> 
    </TimeSeriesDataPoint>
  </TimeSeriesDataFrame>
</TimeSeriesDataFrames>
Jan 29, 2010 at 4:37 PM

Hi Ritchie,

Well, not exactly. We don't need time range, just one cycle. It's what's happening right now. 1s of data is too much to query every second (for several time series).

Imagine that we are showing data from N timeseries every second. Since we apply some calculation to the data, they have to be time aligned so the result makes sense.

We need something like the ReadSelectCurrentTimeSeriesData, but instead of bringing the last available data of each time serie separately, it would return the last available synchronized set of all selected time series.

For example, suppose the table below as the current state of data coming from the PMUs:

DateTime  Ts1 Ts2 Ts3
1:00:00/1 1.456 1.123 1.456
1:00:00/2 1.567 1.456 1.567
1:00:00/3 1.123 1.567 1.123
1:00:00/4 1.123 1.678  
1:00:00/5 1.123 1.456  
1:00:00/6 1.123    

Let's suppose the openpdc is waiting 2 cycles (I know that this time is much much bigger, but it doesn't matter right now) to synchronize data before retransmitting to other instances at real time.

The ReadSelectCurrentTimeSeriesData webservice would return:

Ts1: Time=1:00:00/6 Value = 1.123

Ts2: Time=1:00:00/5 Value = 1.456

Ts3: Time=1:00:00/3 Value = 1.123

But we need:

Ts1: Time=1:00:00/4 Value = 1.123

Ts2: Time=1:00:00/4 Value = 1.678

Ts3: Time=1:00:00/4 Value = Missing (due timeout)

For me it would be even better if you keep the same XML structure.

Cheers,

André Carlucci