beautypg.com

KROHNE ALTOSONIC V Modbus EN User Manual

Page 12

background image

ALTOSONIC V

ModBus Manual 0300 rev07 E

7.30855.35.00

Page 12 of 64

5.4

Function 04: READ INPUT REGISTERS

In the UFP-V Modbus protocol, function 3 and 4 perform the same processing and are

interchangeable.

5.5

Function 05: WRITE SINGLE COIL

Description

Function 5 forces a single coil to either ON or OFF (0x reference).

When the address is a broadcast, all slaves will process the request.


Query

The query message specifies the coil reference to be forced. Coils are addressed starting at zero (coil

1 is addressed as zero).

The requested ON/OFF status is specified by a constant in the query data field. A value of FF 00 hex

requests the coil to be ON. A value of 00 00 requests it to be OFF. All other values are illegal and do

not affect the coil and generate an exception.


Example

Here is an example of a request to force coil 173 ON in slave device 17.

Coil Address

Data

Header


--

Slave

Address


11(h)

Function


05(h)

Hi

00(h)

Low

AC(h)

Hi

FF(h)

Low

00(h)

Error

Check


--

Trailer


--

The normal response is an echo of the query, returned after the coils state has been forced.

Coil Address

Data

Header


--

Slave

Address


11(h)

Function


05(h)

Hi

00(h)

Low

AC(h)

Hi

FF(h)

Low

00(h)

Error

Check


--

Trailer


--

If the request is not applicable an exception response will be sent.

See chapter 5.10 for exception responses.

5.6

Function 06: WRITE SINGLE HOLDING REGISTER

Description

Function 6 pre-sets a value into a single holding register (4x reference).

When the address is a broadcast, all slaves will process the request.


Query

The query specifies the register reference to be preset. Registers are starting at address zero.

The requested value (preset) is specified in the query data field, which is a 16-bit value.