M880 Relay Assignments - Modbus Function 103/104



N.B. The easiest way to read or write relay settings is to use the MultiView program

Send relay channel’s parameters (function 103)


For M880 meters, the write functions require the General Pass Code to be valid if enabled.

Send 8, 16 byte structures.

Format-
[node number][67h][register start(2 bytes)][number of registers(2 bytes)][number of bytes]
[<-8, 16 byte structures + 1 relay actions + 1 backlight colour (130 (82h) bytes of data)->][crc(2 bytes)]

One of the 8, 16 byte structures to send to the M880 is defined below.

Byte #
Name
Usage Type
0
SetPoint Percentage of range value unsigned char ?
1
Differential Percentage of range value unsigned char ?
2
Energy Relay (send 254 to set relay to Energy) unsigned char  
3
Under/Over 0 = Over 1 = Under 2 = window unsigned char ?
4
Channel Control N/A (send NULL) unsigned char  
5
Number In Group N/A (send NULL) unsigned char  
6
Timer N/A (send NULL) unsigned int  
8
Delay Time 1 = 40ms, 2 = 80ms etc. unsigned int ?
10
Logic Of Group Any 1, 2, or 3, Sum or Average unsigned char ?
11
ID V/I/Hz value etc unsigned char ?
12
Channel Status send 0=not enabled, 254=enabled unsigned char ?
13
Physical Relay Number of attached relay unsigned char ?
14
Energy Relay Divisor (0 = /1, 1 = /10, 2 = /100, 3 = /1000) unsigned char  
15
Energy Relay Pulse Width (0 = OFF, 2 to 10 = 20ms to 200ms) unsigned 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 relay’s function is to operate at pulse time.
If set (1) it will release.

2nd Byte:
M880 Relay Alarm Colour
This byte should contain a value from 0 (off) to 7 to enable the backlight to display a colour each time the relay is activated.

Function 103 Sample Coding



Retrieve relay channel’s parameters (code 104)


Requests 8, 16 byte structures representing the parameters for the relay channels.

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 M880 is defined below.

Byte #
Name
Usage Type
0
SetPoint Percentage of range value unsigned char  
1
Differential Percentage of range value unsigned char  
2
Energy Relay (reads 254 if relay is Energy) unsigned char  
3
Under/Over 0 = Over 1 = Under 2 = window unsigned char  
4
Channel Control 0 = no exception, 1 = exception unsigned char  
5
Number In Group 1, 2 or 3 unsigned char  
6
Timer N/A unsigned int  
8
Delay Time 1 = 40ms, 2 = 80ms etc. unsigned int  
10
Logic Of Group 1, 2, 3, 128(Sum) or 129(Avg) unsigned char  
11
ID V/I/Hz value etc unsigned char  
12
Channel Status 0=not enabled, 254=enabled unsigned char  
13
Physical Relay Number of attached relay unsigned char  
14
Energy Relay Divisor (0 = /1, 1 = /10, 2 = /100, 3 = /1000) unsigned char  
15
Energy Relay Pulse Width (0 = OFF, 2 to 10 = 20ms to 200ms) unsigned 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 relay’s function is to operate on exceptions. If set (1) it will release.

2nd Byte:
M880 Relay Alarm Colour
This byte contains a value from 0 (off) to 7 denoting the backlight colour displayed each time the relay is activated.

Function 104 Sample Coding