Bit mapped data format (bm(x)), Crc error check, Session access registers – Basler Electric BE1-700 Modbus Protocol User Manual
Page 25: Bit mapped data format (bm(x)) -15, Crc error check -15, Session access registers -15
9376700991 Rev D
BE1-700 Modbus™ Protocol
1-15
Holding Register
K
(Hi Byte)
'P'
Value
K
(Lo Byte)
'A'
K+1 (Hi Byte)
'S'
K+1 (Lo Byte)
'S'
K+2 (Hi Byte)
'W'
K+2 (Lo Byte)
'O'
K+3 (Hi Byte)
'R'
K+3 (Lo Byte)
'D'
Example: If the above string is changed to "P", the new string will read as follows:
Holding Register
K
(Hi Byte)
'P'
Value
K
(Lo Byte)
hex 00
K+1 (Hi Byte)
hex 00
K+1 (Lo Byte)
hex 00
K+2 (Hi Byte)
hex 00
K+2 (Lo Byte)
hex 00
K+3 (Hi Byte)
hex 00
K+3 (Lo Byte)
hex 00
The same byte alignments are required to write.
Bit Mapped Data Format (BM(x))
The bit mapped data format uses two or more holding registers to represent a sequence of bit values. The
Modbus Bit Map data format can represent an 8 bit, 16 bit, 32 bit or 64 bit value.
Example: The Bit Map value of the hexadecimal number 0x123456789ABCDEF0 using a BM64 format
will read as follows:
Holding Register
K
(Hi Byte)
0x12
Value
K
(Lo Byte)
0x34
K+1 (Hi Byte)
0x56
K+1 (Lo Byte)
0x78
K+2 (Hi Byte)
0x9A
K+2 (Lo Byte)
0xBC
K+3 (Hi Byte)
0xDE
K+3 (Lo Byte)
0xF0
CRC Error Check
This field contains a two-byte CRC value for transmission error detection. The master first calculates the
CRC and appends it to the query message. The BE1-700 recalculates the CRC value for the received
query and performs a comparison to the query CRC value to determine if a transmission error has
occurred. If so, no response message is generated. If no transmission error has occurred, the slave
calculates a new CRC value for the response message and appends it to the message for transmission.
The CRC calculation is performed using all bytes of the device address, function code and data block
fields. A 16-bit CRC-register is initialized to all 1's. Then each eight-bit byte of the message is used in the
following algorithm:
First, exclusive-OR the message byte with the low-order byte of the CRC-register. The result, stored in
the CRC-register, will then be right-shifted eight times. The CRC-register MSB is zero-filled with each
shift. After each shift, the CRC-register LSB is examined. If the LSB IS a 1, the CRC-register is then
exclusive-ORed with the fixed polynomial value A001 (hex) prior to the next shift. Once all bytes of the
message have undergone the above algorithm, the CRC-register will contain the message CRC value to
be placed in the error check field.
Session Access Registers
The ACCESS REQUEST and the EXIT registers are used to access and release write privileges while
changing relay settings, resetting report registers, or using control commands through the Modbus port.
This feature is important because it prevents changes from being made concurrently from two areas. For