Use the search feature to view Kepware's repository of more than 500 Knowledge Base articles. Narrow your results or type your query into the search field below.

Alternatively, if you are unable to find a solution, we have an additional resource - our PTC eSupport Portal . If you are prompted to log into the eSupport Portal, you can use your My Kepware credentials. Need a My Kepware account? Create one here .

Search Solution Results By:
View All Solutions

Kepware Knowledge Base: Solution


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


Last Update: 11/7/2018

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.