- 20 -
ОМ-310
NOVATEK-ELECTRO
The checksum field size occupies two bytes. The checksum within message is transferred with low byte coming
first.
The checksum is registered under the following algorithm:
1) load CRC register (16 bit) with units (FFFFh);
2) exclusive OR with first 8 bytes of message and CRC register contents;
3) offset the result one bit to the right;
4) if the offset bit =1, the exclusive OR of the register contents with A001h value;
5) if the offset bit=0, repeat step 3;
6) repeat steps 3, 4, 5 until 8 offsets have been completed;
7) exclusive OR with the next 8 bits of the message byte and CRC register contents;
8) repeat steps 3 – 7, until all bytes of the message have been processed;
9) the finite register contents will contain the checksum.
Here is an example of CRC code generation with use of C programming language. The function takes two ar-
guments:
Unsigned char* data <- a pointer to the message buffer
Unsigned char length <- the quantity of bytes in the message buffer
The function returns the CRC value as a type of unsigned integer.
Unsigned int crc_chk(unsigned char* data, unsigned char length)
{int j;
unsigned int reg_crc=0xFFFF;
while(length--)
{
reg_crc ^= *data++;
for(j=0;j<8;j++)
{
if(reg_crc & 0
х
01) reg_crc=(reg_crc>>1) ^ 0xA001; // LSB(b0)=1
else reg_crc=reg_crc>>1;
}
}
return reg_crc;
}
2.4.4.6 Register addresses
The register addresses of the measured and calculated parameters of the
ОМ
-310 device are given in table
1.4. The addresses of the programmable parameters are given in table 1.5.
Additional registers and their functions are shown below in table 2.5.
Table 2.5
Description
Address Application
Comment
OM status register
240
Bit 0 0-no fault
1- fault (fault code in register 241)
Bit 1 0- load relay open
1- load relay closed
Bit 2 0- characterizing relay open
1- characterizing relay closed
Bit 3
0 – restart not activated
1- AR expected
Bit 5-4 Characterizing relay operation mode
00 – alarm relay
01 – time relay
10 – additional load
11 – alarm relay for wattles power excess
Bit 6
0- MMSP mode disabled
1- MMSP mode enabled
Fault register 1
241
bit mapping shown in table 2.8
0-no fault
1-fault
Fault register 2
242
bit mapping shown in table 2.8
Fault log
Fault code 1
243
fault code according to table 2.8
value of parameter 1
244
parameter value according to table 2.8
Fault time 1
245
two upper bytes
246
two lower bytes
Содержание OM-310
Страница 25: ...25 NOVATEK ELECTRO 310 APPENDIX 1 Dependent time delay current based protection types...
Страница 26: ...26 310 NOVATEK ELECTRO...
Страница 27: ...27 NOVATEK ELECTRO 310...
Страница 28: ...28 310 NOVATEK ELECTRO...