問題タブ [wonderware]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
python - SQLAlchemy session management in long-running process
Scenario:
- A .NET-based application server (Wonderware IAS/System Platform) hosts automation objects that communicate with various equipment on the factory floor.
- CPython is hosted inside this application server (using Python for .NET).
- The automation objects have scripting functionality built-in (using a custom, .NET-based language). These scripts call Python functions.
The Python functions are part of a system to track Work-In-Progress on the factory floor. The purpose of the system is to track the produced widgets along the process, ensure that the widgets go through the process in the correct order, and check that certain conditions are met along the process. The widget production history and widget state is stored in a relational database, this is where SQLAlchemy plays its part.
For example, when a widget passes a scanner, the automation software triggers the following script (written in the application server's custom scripting language):
The script calls the WidgetScanned
python function:
My question is: How do I best manage SQLAlchemy sessions in this scenario? The application server is a long-running process, typically running months between restarts. The application server is single-threaded.
Currently, I do it the following way:
I apply a decorator to the functions I make avaliable to the application server:
Question: Is the decorator above suitable for handling sessions in a long-running process? Should I call session.remove()
?
The SQLAlchemy session object is a scoped session:
I want to keep the session management out of the basic functions. For two reasons:
- There is another family of functions, sequence functions. The sequence functions call several of the basic functions. One sequence function should equal one database transaction.
- I need to be able to use the library from other environments. a) From a TurboGears web application. In that case, session management is done by TurboGears. b) From an IPython shell. In that case, commit/rollback will be explicit.
(I am truly sorry for the long question. But I felt I needed to explain the scenario. Perhaps not necessary?)
user-interface - WonderwareでのFileReadFieldsの使用
私がここで見たワンダーウェアの質問が少ないことを考えると、これはロングショットだと思いますが、とにかく...
WonderwareのFileReadFields関数は、CSVファイルをメモリタグに解析することになっています。Wonderwareで機能しない場合はデバッグメッセージが表示されないため(HMIソフトウェアを選択したわけではありませんが、確かにそうです)、なぜこれが機能しないのかわかりません。
すべてが正しくケースに入れられ、ファイルは使用されていません。それを機能させる方法がわかりません。
historian - 現在利用できる歴史家データベースは何ですか?
歴史家データベースに関する質問があります。これが私たちの要件です。平均して1000アップデート/秒の速度で機器からデータを収集できる歴史家データベースが必要です。また、歴史家データベースごとに1つの機器があります。この要件を考えると、私の要件に最も適した歴史家データベースはどれですか?私は、OSISoftのPI System、Wonderwareの歴史家、カナリア研究所のカナリアロガー、GEの習熟度、Iconicの超歴史家など、多くのオプションを見てきました。このリンクは私を助けました: 歴史家の比較
しかし、私が抱えている最大の問題は、これらの歴史家が非常にスケーラブルなデータベースであるということです。つまり、工場全体のデータを収集できるということです。したがって、たとえば500のデータポイントを持つ1つの機器にこれを使用すると、やり過ぎで費用がかかる可能性があります。
皆さんが私のニーズに合う歴史家データベースのリストを手伝ってくれるかどうか疑問に思っています。
sql - SQLは、他の列の状態によって定義された範囲内の列の最大値を見つけます
以下のデータでは、Event1 は製造サイクルの終わりを表します。イベント 2 は、サイクルのパーセンテージで発生します。サイクル時間の終わり (Event1 が 0 に戻るとき) と、そのサイクル中に Event2 の最大値 (0 または 1) を引き出せるかどうか疑問に思っていました。どちらの値もバイナリです。
私は WonderWare ヒストリアン データベースを使用しているため、クエリには独自のオプションがいくつかあります。以下は、サイクルタイムの終了を見つけるために使用するものです。
このクエリの結果を使用して、追加のクエリの DateTime 制限を生成する方法はありますか?
javascript - Controlling ActiveX Control via Javascript
I am trying to use some software from WonderWare via ActiveX. I have gotten the object to appear, but I am want to pass some parameters to it and eliminate having to setup the object everytime. There are two versions of the control ActiveX and .NET. I haven't gotten the .NET control to work at all, but I can get the ActiveX one / just not the parameters.
Here is what the manual says about it:
The aaHistClientTrend control allows you to run the Wonderware Historian Client Trend program (or a functional subset) from within the Wonderware InTouch HMI software or a .NET container like Visual Basic .NET or Internet Explorer.
The HTML code that I have:
I try to pass the parameter via:
And it crashes internet explorer.
EDIT : Any ideas?
c# - Wonderware Application Server でインポートされた .NET クラスに null 許容型を割り当てる
Wonderware ArchestrA IDE (2012 R2) で null 許容型に値を代入する際に問題が発生しています。
インポートした .NET クラスは次のようになります。
次に、[インポート] -> [スクリプト関数ライブラリ] を使用して、これを Galaxy にインポートします。
私の ArchestrA スクリプトは、文字どおり次の内容で構成されます。
スクリプトは検証されますが、に割り当てるMyNullableInt
と、スクリプト エラーが管理コンソールに記録されます。
ProdCapability_001.GetMESWOData: {0896E675-F7D7-4F77-9FD2-20477058E072}: JIT コンパイラで内部制限が発生しました。
.NET 4.5 がサーバーにインストールされています。Wonderware Application Server にインポートされた .NET クラスは Nullable 型を使用できませんか? それとも私は何かを逃しましたか?
c# - ArchestrA Object Toolkit : configtime からエディターへのデータの受け渡し
私は c# でのプログラミングがまったく初めてで、Wonderware から ArchestrA IDE のアプリケーション オブジェクトを作成しています。
configtime のオブジェクトのリストに基づいて作成されたチェックボックスのリストを含むタブページを作成したいのですが、このリストを configtime からエディターに渡す方法がわかりません。
コードの抜粋を次に示します。
Configtime のコード:
エディタ内のコード:
誰かが私を助けてくれることを願っています。前もって感謝します!
distributed - Wonderware archestra 分散アプリケーション
System Platform を使用して InTouch アプリケーションを展開しています。また、分散アプリケーションを作成しようとしています。InTouch アプリを備えたサーバーと、InTouch アプリを表示する必要があるコンピューター ワークステーションがあります。System Platform で分散アプリケーションを構成するにはどうすればよいですか?
sql-server - 単純な SQL - openquery 内でのフォーマットの使用
Wonderware (Industrial HMI) Historian アプリケーションで MS SQL Server を使用して、次のクエリを実行します。「ww」で始まるキーワードは Wonderware 固有のもので、wwResolution は 24 時間ごとに結果を取得しています。
QUOTED_IDENTIFIER をオフに設定
クエリをフォーマットして試してみたいので、次のようにします。
format([BarRoom_GASMETER.ACC],'###,###,###,###,###.##') as 'Bar Room'
しかし、「エラーが発生しました」と表示されます。この場合、フォーマットをどのように使用すべきかについての提案はありますか? 回答ありがとうございます。スナップショットを追加しました。読み取るには、ローカルに保存する必要があります。
「引用された識別子」の処理方法に関係があると思います。