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

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

各種検索方法:
View All Solutions

Kepware Knowledge Base: Solution


Sending an On Followed by an Off when Receiving Data from Device


Last Update: 2018/11/07

This action is ideally done with a client application for a write. The following example code displays a read transaction in which "on" and "off" are sent to a device as a result of a value that was read from it.

Step, Command, Value/Format, Description
1, Write Character, 2 0x02 STX, Start Byte
2, Write Device ID, 8 Bit Intel Hi, Device ID
3, Write Character, 42 0x2A *, Request Data command
4, Write Character, 3 0x03 ETX, End Byte
5, Transmit
6, Read Response, Wait For Character, 3 0x03 ETX
7, Test Character, 9 0x09 HT, Test Response Data Source, Read Buffer, , 4 True Action, GoTo, Toggle False Action, End,
8, Toggle, N/A, Action for "True" test result
9, Write Character, 2 0x02 STX, Start Byte
10, Write Device ID, 8 Bit Intel Hi, Device ID
11, Write Character, 42 0x2C ,, Toggle Trigger
12, Write Character, 1 0x01 SOH, Write On
13, Write Character, 3 0x03 ETX, End Byte
14, Transmit
15, Pause, 30msec, Wait 30msec for device before sending next data (optional)
16, Write Character, 2 0x02 STX, Start Byte
17, Write Device ID, 8 Bit Intel Hi, Device ID
18, Write Character, 42 0x2C ,, Toggle Trigger
19, Write Character, 0 0x00 Null, Write Off
20, Write Character, 3 0x03 ETX, End Byte
21, Transmit
22, End, N/A


Note:
The optional Pause Transaction command allows the device to rest in between writes.