|
Send relay channels parameters (function 103)
Send 8,
16 byte structures.
N.B. Only the first two structures are used by the M850
Format-
[node number][67h][register start(2 bytes)][number of registers(2
bytes)][number of bytes]
[<-8, 16 byte structures + 1 relay actions + 1 padding byte (130
(82h) bytes of data)->][crc(2 bytes)]
One of the
8, 16 byte structures to send to the M850 is defined below.
|
Byte
#
|
Name
|
Usage
Type |
|
0
|
N/A
(send NULL) |
unsigned
char |
|
1
|
N/A
(send NULL) |
unsigned
char |
|
2
|
Energy
Relay (send 254) |
char |
|
3
|
N/A
(send NULL) |
char |
|
4
|
N/A
(send NULL) |
char |
|
5
|
N/A
(send NULL) |
char |
|
6
|
N/A
(send NULL) |
unsigned
int |
|
8
|
N/A
(send NULL) |
unsigned
int |
|
10
|
N/A
(send NULL) |
char |
|
11
|
ID
value (15 = W.h, 16 = VAr.h) |
char |
|
12
|
N/A
(send NULL) |
char |
|
13
|
Relay
Number (1 or 2) |
char |
|
14
|
Relay
Divisor (0 = /1, 1 = /10, 2 = /100, 3 = /1000) |
char |
|
15
|
Relay
Pulse Width (0 = OFF, 2 to 10 = 20ms to 200ms) |
char |
In
addition to sending the 8 structures, two bytes must be appended
to the packet.
1st byte:
A
one-byte bit pattern, where each bit is mapped to one physical relay,
(bit 0 = Relay 1, bit 1 = Relay 2 etc.)
If a bit is reset (0), the corresponding relays function is
to operate at pulse time.
If set (1) it will release.
2nd Byte:
This is a NULL byte for padding and is ignored.
Function
103 Sample Coding
Retrieve relay channels parameters (code 104)
Requests 8, 16 byte structures representing the parameters for the
energy relay(s).
Only the first two structures are valid.
Format-
[node address][68h][register start(2 bytes)][number of registers(2
bytes)][crc(2 bytes)]
One of the 8, 16 byte structures read from the M850 is defined below.
|
Byte
#
|
Name
|
Usage
Type |
|
0
|
N/A |
unsigned
char |
|
1
|
N/A |
unsigned
char |
|
2
|
Energy
Relay (254) |
char |
|
3
|
N/A |
char |
|
4
|
N/A |
char |
|
5
|
N/A |
char |
|
6
|
N/A |
unsigned
int |
|
8
|
N/A |
unsigned
int |
|
10
|
N/A |
char |
|
11
|
ID
value (15 = W.h, 16 = VAr.h) |
char |
|
12
|
N/A |
char |
|
13
|
Physical
Relay Number of attached relay |
char |
|
14
|
Relay
Divisor (0 = /1, 1 = /10, 2 = /100, 3 = /1000) |
char |
|
15
|
Relay
Pulse Width (0 = OFF, 2 to 10 = 20ms to 200ms) |
char |
In addition
to receiving the 8 structures, two bytes will be appended to the
packet.
1st Byte:
A
one-byte bit pattern, where each bit is mapped to one physical relay.
If a bit is reset (0), the corresponding relays function is
to operate on exceptions. If set (1) it will release.
2nd Byte:
A NULL byte for padding.
Function
104 Sample Coding
|