Crc error check, Session access registers, Template registers – Basler Electric BE1-851 Modbus Protocol User Manual

Page 17

Advertising
background image

9289900992 Rev F

BE1-851 Modbus

Protocol

1-9

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-851 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
example, a user cannot make changes from COM 0 at the same time a remote user is making changes
via Modbus

™ from COM 2.

Changing the settings through the Modbus

™ port requires that the operator write to the ACCESS

REQUEST register to obtain programming access. This must follow writing the ACCESS PASSWORD
register(s) with a password to obtain access to change settings associated with the password. Different
passwords give the ability or access to perform different operations. The relay will deny access if an
invalid password is entered or if another user has already been granted programming access through
another serial port or at the front panel. Only one user can have access at any one time.

If no password protection is used, it is still necessary to obtain access in order to protect against
accidental changes. If password protection is disabled, then writing the ACCESS REQUEST register will
be accepted in place of a password. The relay will transmit a valid response message if the access query
was received and executed. The relay will respond with an error message if the access query could not
be executed.

Changing settings through a Modbus

™ communication port consists of the following sequence:

1. Preset Multiple Registers query to ACCESS PASSWORD register(s) to specify password.
2. Preset Multiple Registers query to ACCESS REQUEST register to access write privileges.
3. Preset Multiple Registers queries to change the current settings.
4. Preset Multiple Registers query to EXIT register to clear access and save.

Changes are not made to the working settings but to a scratch-pad copy of the settings. After the
change(s) are made, the new data will be copied to the working settings and saved to non-volatile
memory when the EXIT register is written with a ‘Y.’ It is important to make all changes to relay
parameters before writing the EXIT register. This prevents a partial or incomplete protection scheme from
being implemented.

Template Registers

The BE1-851 uses three templates. A template is a block of holding registers to which the user assigns
one of a number of similar groups of parameters. Templates are used for settings groups, fault
summaries, and report generation. Modbus

™ Template Registers 40036 (Settings Group Selection),

40038 (Fault Number Selection), 40039 (Report Selection), and 40040 (Report Focus) DO NOT
REQUIRE any Write Password Access level before they can be written to.

Advertising
This manual is related to the following products: