Examples; Read Coil Status (01 Hex); Force/Write Single Coil (05 Hex) - Danfoss VLT FC51 Design Manual

Micro drive
Table of Contents

Advertisement

RS-485 Installation and Set...
Non-standard data types
Non-standard data types are text strings and are stored as
4x registers (40001–4FFFF). The parameters are read using
function 03hex "Read Holding Registers" and written using
function 10hex "Preset Multiple Registers." Readable sizes
range from 1 register (2 characters) up to 10 registers (20
characters).

8.10 Examples

The following examples illustrate various Modbus RTU
commands. If an error occurs, refer to
chapter 8.8.11 Modbus Exception Codes.

8.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 message specifies the starting coil and quantity
of coils to be read. Coil addresses start at zero, that is, coil
33 is addressed as 32.
Example of a request to read coils 33-48 (status word) from
follower device 01.
Field Name
Example (hex)
Follower Address
01 (frequency converter address)
Function
01 (read coils)
Starting Address HI
00
Starting Address LO
20 (32 decimals) Coil 33
No. of Points HI
00
No. of Points LO
10 (16 decimals)
Error Check (CRC)
-
Table 8.21 Query
Response
The coil status in the response message is packed as one
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 is padded with zeros
(toward the high order end of the byte). The byte count
field specifies the number of complete bytes of data.
®
VLT
Micro Drive FC 51 Design Guide
Field Name
Follower Address
Function
Byte Count
Data (Coils 40-33)
Data (Coils 48-41)
Error Check (CRC)
Table 8.22 Response
NOTICE
Coils and registers are addressed explicitly with an off-
set of -1 in Modbus.
I.e. Coil 33 is addressed as Coil 32.

8.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 followers.
Query
The query message specifies the coil 65 (parameter write
control) to be forced. Coil addresses start at zero, that is,
coil 65 is addressed as 64. Force Data=00 00hex (OFF) or
FF 00hex (ON).
Field Name
Follower Address
Function
Coil Address HI
Coil Address LO
Force Data HI
Force Data LO
Error Check (CRC)
Table 8.23 Query
Response
The normal response is an echo of the query, returned
after the coil state has been forced.
Field Name
Follower Address
Function
Force Data HI
Force Data LO
Quantity of Coils HI
Quantity of Coils LO
Error Check (CRC)
Table 8.24 Response
MG02K302 - Rev. 2013-12-03
Example (hex)
01 (frequency converter address)
01 (read coils)
02 (2 bytes of data)
07
06 (STW=0607hex)
-
Example (hex)
01 (Frequency converter address)
05 (write single coil)
00
40 (64 decimal) Coil 65
FF
00 (FF 00=ON)
-
Example (hex)
01
05
FF
00
00
01
-
8
8
77

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents