PI AF SDK による エラー解消方法について

お世話になっております。質問させてください。

 

PI AF SDK(v4.0.30319) を利用してPI DAのデータを取得しています。

 

以下の要件を満たそうと実行したところ,エラーが発生しました。

 

Tag数:3000点

データ周期:1秒周期

期間:半年

 

エラー解消方法についてアプローチ方法についてご教示お願い致します。

 

仮説として,何かのタイムアウトもしくはサイズ制限かなと推測しております。

仮にPIDA側で上記設定が行われていた場合,PI AF SDKから変更可能でしょうか。

 

--- 以下,参考ソース,メッセージとスタックトレースです ---

<pre>

private List<AFValues> GetSpecifiedPITagData(List<string> tags, AFTimeRange timeRange, AFTimeSpan interval)

{

 

    PIPointList piPointList = new PIPointList(PIPoint.FindPIPoints(_PIServer, tags));

 

    PIPagingConfiguration config = new PIPagingConfiguration(PIPageType.TagCount, 100);

 

    List<AFValues> afValuesList = piPointList.InterpolatedValues(timeRange, interval, null, false, config).ToList();

 

    return afValuesList;

 

}

 

message: 操作は取り消されました。

stack trace:

   場所 System.Collections.Concurrent.BlockingCollection`1.TryTakeWithNoTimeValidation(T& item, Int32 millisecondsTimeout, CancellationToken cancellationToken, CancellationTokenSource combinedTokenSource)

   場所 System.Collections.Concurrent.BlockingCollection`1.<GetConsumingEnumerable>d__68.MoveNext()

   場所 OSIsoft.AF.PI.PIPageProcessor`2.PageDisposer`1.MoveNext()

   場所 System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)

   場所 System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)

   場所 xxxxxxxxxxx.Common.PIAccess.GetSpecifiedPITagData(List`1 tags, AFTimeRange timeRange, AFTimeSpan interval)

   場所 xxxxxxxxxxx.Common.PIAccess.GetPITagDataForTimeRange(List`1 tags, DateTime startTime, DateTime endTime, String interval)

   場所 xxxxxxxxxxx.xxxxxxxxx.ExportPiData(String filePath)

</ pre>

Parents
  • お問い合わせいただきありがとうございます。

     

    PI Data ArchiveにはTuning Parameterというものがあり、各種の設定を行うことができます。

    そのTuning Parameterのうち、以下の設定値の影響を受けている可能性がございます。

     

    ・ArcMaxCollect: 1つのクエリで取得できる履歴データの最大数(デフォルトは1,500,000(PI Data Archive 3.4.380以降))

    ・Archive_MaxQueryExecutionSec: 1つのクエリがタイムアウトするまでの時間(デフォルトは260秒(PI Data Archive 3.4.390以降))

     

    Tuning ParameterはAF SDKからは変更できません。管理ツールであるPI System Management ToolsのOperation > Tuning Parameters > Archiveタブ からか、コマンドラインツールのpiconfigによる変更が必要です。

    また、ArcMaxCollectの変更を適用するには、PI Data Archiveサーバー上のPI Archive Subsystemを再起動する必要があります。

     

    以下の記事には、ArcMaxCollectを変更する際の注意点が記載されています。変更の際はご一読ください。

    KB00367 - Changing the ArcMaxCollect parameter: What are the ramifications or possible issues

  • Watanabeさん

     

    情報のご提供ありがとうございます。

     

    まずはTuning Parameterを意識して原因の特定を行いたいと思います。

    また「Tuning ParameterはAF SDKからは変更できません。」ということで承知しました。

    Tuning Parameter設定の範囲内で仕様調整ができないか検討致します。

  • PIPointListのInterpolatedValuesの関数にpagingのような機能がないので、

    pagingのような機能が開発してみたユーザーが少なくないです。

    例えば下記の二つポストがあります。

     

    GetLargeRecordedValues - working around ArcMaxCollect

    Extracting large event counts from the PI Data Archive

     

     

  • Jeromeさん

     

     

    情報のご提供ありがとうございます。

    Watanabeさんの情報と合わせて参考とさせて頂きます。

     

     

    >

     

     

    こちらのGitHubのソースが404でした。

    やろうとしていることが似ているため,参考になったはずですので残念です。。

  • We have removed many of the GitHub offerings but you may still be granted email access to the code.  Please send an email to technologyenablement@osisoft.com requesting access to GetLargeRecordedValues source code.

Reply Children
No Data