Preset multiple registers – Basler Electric DECS-400 User Manual

Page 219

Advertising
background image

9369700990 Rev R

207

Response

The response message contains the data queried. The data block contains the block length in bytes
followed by the data for each requested register. For each requested register, there is one Data Hi and
one Data Lo. Attempting to read an unused register or a register which does not support a read returns a
zero (0). If the query is a broadcast (device address = 0), no response message is returned.

Maximum response message length obtained for query of 125 registers is 5 + (125 x 2) =255 bytes.

Device

Address

Function

Code = 03

Byte

Count

Data

High

Data

Low

For each

requested

register

Data

High

Data

Low

CRC

Low

CRC

High

250

max.

First

queried
register

High

First

queried
register

Low

Data High

and data

Low

Last

queried
register

High

Last

queried
register

Low

Preset Multiple Registers

A preset, multiple-registers query could address multiple registers in one slave or multiple slaves. If the
query is broadcast (device address = 0), no response is required.

Note

Variables changed by this function will not be directly saved to non-
volatile memory (EEPROM). If specific categories (one or more) of
data have to be saved to EEPROM, then Holding Register 48161
(Data Id=13001, variable “SaveCommand”) has to be preset after a
category has been changed. The exceptions to this rule are only those
Holding Registers dealing with communication port RS-485. They will
be changed and immediately saved to EEPROM with the function
FC16.

Query

A Preset Multiple Registers query message requests a register or block of registers to be written. The
data block contains the starting address and the quantity of registers to be written, followed by the Data
Block byte count and data. The DECS-400 performs the write when the device address matches the
DECS-400 remote address or when the device address is 0. A device address is 0 for a broadcast query.

A register address of N will write Holding Register N+1.

All Modbus Generic Data Formats can be loaded by this function (see Data Formats).

No data will be written if any of the following exceptions occur:

Queries to write to Read Only or unsupported registers result in an error response with an
exception code of Illegal Data Address.

Queries attempting to write more than 100 registers cause an error response with an exception
code of Illegal Function.

An incorrect Byte Count results in an error response with an exception code of “Illegal Function”.

A query to write an illegal value (out of range) to a register results in an error response with an
exception code of Illegal Data Value.

Query Starting Register address is mapped to DECS-400 Modbus address space, but is not
referenced to the lower order 16 bits of the assigned application data. (See explanation in Data
Formats
.)

The number of query registers is too small to hold entire value of all data (variables) assigned to
those registers. (See explanation in Data Formats.)

DECS-400

Modbus™ Communication

Advertising