Eiki A-2 manual Page 5
Table 2. RS-232 codes
RS-232 codes can be used by third-party equipment to control a relay box.
RS-232 codes are sent as 1200 baud, 8 data, 1 stop, no parity. Data is expressed
as hexadecimal, NOT ASCII.
The format is as follows:
<Product ID (2 bytes)> <Command type> <Key number> <checksum>
An A-2 relay box will reply to a successfully received command with “FEh 64h”,
however, you can’t use the A-2’s TxD connection where more than one A-2 is
connected as all units will respond and the ports will clash.
Address RS232 code (HEX) Operation RS232 code (HEX)
0 FE 64 02 00 64 Relay 1 - ON FE 64 02 10 74
1 FE 64 02 01 65 Relay 2 - ON FE 64 02 11 75
2 FE 64 02 02 66 Relay 3 - ON FE 64 02 12 76
3 FE 64 02 03 67 Relay 4 - ON FE 64 02 13 77
4 FE 64 02 04 68 Relay 1 - OFF FE 64 02 14 78
5 FE 64 02 05 69 Relay 2 - OFF FE 64 02 15 79
6 FE 64 02 06 6A Relay 3 - OFF FE 64 02 16 7A
7 FE 64 02 07 6B Relay 4 - OFF FE 64 02 17 7B
8 FE 64 02 08 6C Relay 1 - Momentary FE 64 02 18 7C
9 FE 64 02 09 6D Relay 2 - Momentary FE 64 02 19 7D
10 FE 64 02 0A 6E Relay 3 - Momentary FE 64 02 1A 7E
11 FE 64 02 0B 6F Relay 4 - Momentary FE 64 02 1B 7F
12 FE 64 02 0C 70 Relay 1 - Toggle FE 64 02 1C 00
13 FE 64 02 0D 71 Relay 2 - Toggle FE 64 02 1D 01
14 FE 64 02 0E 72 Relay 3 - Toggle FE 64 02 1E 02
15 FE 64 02 0F 73 Relay 4 - Toggle FE 64 02 1F 03
Example: For relay module 5, toggle relay 3:
Code: FE 64 02 05 69 FE 64 02 1E 02
ON and OFF operations set the appropriate relay to On or Off.
Momentary sets the relay to its On state for 0.5 seconds and returns it to the
Off state. You could send repeated commands to keep a relay on but for this to
work the commands must be sent with a delay of around 300mS to 400mS
between them. It is generally more reliable to use the ON and OFF commands if
extended momentary operation is needed.
Toggle will reverse the relay’s current state. For example, if the relay is currently
On then a Toggle command will switch it Off.
Tip: If you need to send a sequence of relay commands for the same module, it
is sufficient to send the address code once only, at the start of the sequence.