Examples; Read Coil Status (01 Hex); Force/Write Single Coil (05 Hex) - Danfoss VLT Compressor Drive CDS 803 Design Manual

Hide thumbs Also See for VLT Compressor Drive CDS 803:
Table of Contents

Advertisement

RS485 Installation and Set-...
7.9.5 Conversion Factor
A parameter value can only be transferred as a whole
number. To transfer decimals, use a conversion factor.
7.9.6 Parameter Values
Standard data types
Standard data types are int 16, int 32, uint 8, uint 16, and
uint 32. They are stored as 4x registers (40001–4FFFF). The
parameters are read using function 03 hex read holding
registers. Parameters are written using the function 6 hex
preset single register for 1 register (16 bits), and the
function 10 hex preset multiple registers for 2 registers (32
bits). Readable sizes range from 1 register (16 bits) up to
10 registers (20 characters).
Non-standard data types
7
7
Non-standard data types are text strings and are stored as
4x registers (40001–4FFFF). The parameters are read using
function 03 hex read holding registers and written using
function 10 hex preset multiple registers. Readable sizes
range from 1 register (2 characters) up to 10 registers (20
characters).

7.10 Examples

The following examples show various Modbus RTU
commands.

7.10.1 Read Coil Status (01 hex)

Description
This function reads the ON/OFF status of discrete outputs
(coils) in the frequency converter. Broadcast is never
supported for reads.
Query
The query telegram specifies the starting coil and quantity
of coils to be read. Coil addresses start at 0, that is, coil 33
is addressed as 32.
Example of a request to read coils 33–48 (status word)
from slave device 01.
Field name
Slave address
Function
Starting address HI
Starting address LO
Number of points HI
Number of points LO
Error check (CRC)
Table 7.22 Query
62
®
VLT
Compressor Drive CDS 803
Example (hex)
01 (frequency converter address)
01 (read coils)
00
20 (32 decimals) coil 33
00
10 (16 decimals)
Danfoss A/S © 12/2015 All rights reserved.
Response
The coil status in the response telegram is packed as 1 coil
per bit of the data field. Status is indicated as: 1=ON;
0=OFF. The lsb of the first data byte contains the coil
addressed in the query. The other coils follow toward the
high-order end of this byte, and from low order to high
order in subsequent bytes.
If the returned coil quantity is not a multiple of 8, the
remaining bits in the final data byte are padded with 0s
(toward the high-order end of the byte). The byte count
field specifies the number of complete bytes of data.
Field name
Example (hex)
Slave address
01 (frequency converter address)
Function
01 (read coils)
Byte count
02 (2 bytes of data)
Data (coils 40–33)
07
Data (coils 48–41)
06 (STW=0607hex)
Error check (CRC)
Table 7.23 Response
NOTICE
Coils and registers are addressed explicitly with an off-
set of -1 in Modbus.
For example, coil 33 is addressed as coil 32.

7.10.2 Force/Write Single Coil (05 hex)

Description
This function forces the coil to either ON or OFF. When
broadcast, the function forces the same coil references in
all attached slaves.
Query
The query telegram specifies the coil 65 (parameter write
control) to be forced. Coil addresses start at 0, that is, coil
65 is addressed as 64. Force data = 00 00 hex (OFF) or FF
00 hex (ON).
Field name
Example (hex)
Slave address
01 (Frequency converter address)
Function
05 (write single coil)
Coil address HI
00
Coil address LO
40 (64 decimal) Coil 65
Force data HI
FF
Force data LO
00 (FF 00 = ON)
Error check (CRC)
Table 7.24 Query
MG18N202

Advertisement

Table of Contents
loading

Table of Contents