如何从一个Historian的查询的原始数据? [英] How do I query raw data from a Proficy Historian?

查看:387
本文介绍了如何从一个Historian的查询的原始数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何从一个Historian的/ iHistorian的检索原始时间序列数据?

How can I retrieve raw time-series data from a Proficy Historian/iHistorian?

在理想情况下,我会要求数据两个日期之间的特定标记。

Ideally, I would ask for data for a particular tag between two dates.

推荐答案

有几种不同的采样模式,你可以体验。

There are several different sampling modes you can experiment with.



  • 插值

  • 实验室

  • 趋势

  • 计算

  • Raw
  • Interpolated
  • Lab
  • Trend
  • Calculated

这些模式都可以使用以下所有的API。

These modes are available using all of the following APIs.


  • 用户API(ihuapi.dll)

  • SDK(ihsdk.dll)

  • OLEDB(iholedb .DLL)

  • 客户接取API(Proficy.Historian.ClientAccess.API)

  • User API (ihuapi.dll)
  • SDK (ihsdk.dll)
  • OLEDB (iholedb.dll)
  • Client Acess API (Proficy.Historian.ClientAccess.API)

中这些趋势采样模式可能是你想要的东西,因为它是专门为制图/设计趋势。虽然,实验室和内插可以是有用的,以及

Of these the trend sampling mode is probably what you want since it is specifically designed for charting/trending. Though, lab and interpolated may be useful as well.

阅读电子书为每个采样模式的更多信息。在我的机器就被存储为 C:\Program Files\GE Fanuc\Proficy Historian\Docs\iHistorian.chm ,我有3.5版安装。 。特别要注意以下几个部分。

Read the electronic book for more information on each sampling mode. On my machine it is stored as C:\Program Files\GE Fanuc\Proficy Historian\Docs\iHistorian.chm and I have version 3.5 installed. Pay particular attention to the following sections.


  • 使用史记OLE DB提供程序

  • 高级主题|检索

下面是你如何构建一个OLEDB做趋势采样。

Here is how you can construct an OLEDB to do trend sampling.

set 
    SamplingMode = 'Trend',
    StartTime = '2010-07-01 00:00:00',
    EndTime = '2010-07-02 00:00:00',
    IntervalMilliseconds = 1h
select 
    timestamp, 
    value, 
    quality 
from 
    ihRawData 
where 
    tagname = 'YOUR_TAG'

显示使用用户API的等效方法而且因为它们需要大量的管道中的代码来获取安装的SDK是复杂的(更使用户API)。客户端访问API是新的,并使用WCF幕后。

Showing the equivalent methods using the User API and the SDK are complex (more so with the User API) since they require a lot of plumbing in the code to get setup. The Client Access API is newer and uses WCF behind the scenes.

顺便说一句,有与OLEDB方法有一些限制,但。

By the way, there are a few limitations with the OLEDB method though.


  • 尽管什么文件说我的从不的能够得到本地查询参数工作。这是一个搅局者,如果你想与SQL Server报表服务使用它的例子。

  • 您不能写入样品到存档或以任何方式修改史记配置,包括添加/更改标签,写邮件,等等。

  • 它可以在某些情况下,有些慢。

  • 它有crosstabbing多个标记名入列中没有规定然后弘扬样品,使存在于每一个时间戳和标签组合的价值。趋势采样模式让你中途有,但仍然不交叉,不实际加载的原始样本。然后再在用户API和SDK不能做到这一点无论是。

  • Despite what the documentation says I have never been able to get native query parameters to work. That is a showstopper if you want to use it with SQL Server Reporting Services for example.
  • You cannot write samples into the archive or in any way make changes to the Historian configuration including adding/changing tags, writing messages, etc.
  • It can be a little slow in some cases.
  • It has no provision for crosstabbing multiple tagnames into the columns and then carrying forward samples so that a value exists for each timestamp and tag combination. The trend sampling mode gets you halfway there, but still does not crosstab and does not actually load raw samples. Then again the User API and SDK cannot do this either.

这篇关于如何从一个Historian的查询的原始数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆