Honeywell CD3000M User Manual page 39

Thyristor unit from 125a to 700a
Table of Contents

Advertisement

Honeywell
9.2.3 C Language CRC 16 Example
static short CRC16 (unsigned char *p_first,unsigned char *p_last)
{
unsigned int crc=0xffff;
short j;
for (;p_first<=p_last;p_first++)
{
crc ^= *p_first;
for(j=8;j>0;j--)
{
if(crc & 0x0001)
else
}
}
return (crc);
}
9.2.4 Read Holding Registers (Read n Words) – Function 03
The message sent to the Controller to obtain the value of one or more registers comprises the
following eight bytes:
Addr. unit
Func.
3
3Hex
The normal reply will echo the first two characters of the message received followed by a single-
byte data byte count (which will not include itself or the CRC).
For this message, the count value equals the number of parameter values read multiplied by two.
Following the byte count, the specified number of parameter values are transmitted, followed by the
CRC16 bytes:
Addr. unit
Func.
3
3Hex
www.honeywell.com/imc
CD3000M-1PH from 125A to 700A
{
crc = crc >> 1;
crc ^= 0xA001;
}
{
crc = crc >> 1;
}
Address
1° word
HI
LO
Cont.
1° Value
HI
N° of Word
HI
LO
Last Value
LO
HI
38
User's Manual
CRC 16
HI
LO
CRC 16
LO
HI
LO

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cd3000m-1ph

Table of Contents