viz
register 1 = start address 0
register 2 = start address 2
register 3 = start address 4
register 4 = start address 6
This also applies to the number of registers requested. If 2 registers
are requested the number of WORDS in the packet's [Number of
registers] slot should equal 4. (See examples in the following sections.
CRC Calculations
To calculate the Cyclic Redundancy Check value.
Load a word register with 0xFFFF (CRCREG)
Repeat the following for each character in the Modbus packet
{
XOR the low byte of the word register with the next (or first)
character in the buffer
Repeat the following for the whole character
{
Get the state of the lsb of CRCREG Low byte
Shift the CRCREG right by one bit shifting in a
zero in the msb
If the bit shifted out is a logical 1, XOR
CRCREG with 0xA001
}
}
CRCREG contains the CRC of the buffer
51
Need help?
Do you have a question about the MultiLed M812-LD Series and is the answer not in the manual?