検索機能を使用して 500 を上回る Kepware の知識ベース記事の中から閲覧します。結果を絞り込むか、クエリーを下部の検索フィールドに入力します。

解決策が見つからなかった場合には、当社の PTC eSupport Portal で追加資料を確認することもできます。eSupport Portal へのログインを要求された場合、My Kepware の認証情報を使用できます。My Kepware アカウントが必要ですか? こちらで作成

各種検索方法:
View All Solutions

Kepware Knowledge Base: Solution


ClientAce Application Is Getting Multiple DataChanged Events For Each Item


Last Update: 2018/11/12
Problem:
A client application is designed to connect to a server once an hour get data changes before disconnecting. On the first connection, the application gets one DataChanged Event for all of the monitored items. On the next connection, the application gets two DataChanged Events for the monitored items. Each successive connection increases the number of DataChanged Events received for the monitored items. Even though the ClientAce application is creating a new unique connection on every cycle, the application is also creating a new event handler on every cycle. Because that event handler is not part of the server object, it is not destroyed when the application disconnects from the server. This means that the previous event handler still exists on each new connection.

Solution:
Only initialize the event handlers once on application start-up.
Related Products
ClientAce