Hitachi EH-150 Series Applications Manual page 86

Table of Contents

Advertisement

Chapter 6 Communication Mode
 Function code 0x05 (Force Single Coil)
The function code 05 is a query to change state of coil of the slave to ON/OFF (only 1 point.). In broadcasting, the
state of the same coils of all slaves is changed.
(1) Sending data area format
Sending data area requires 4 words. Please set 6 bytes for head word.
1) Device No.: Set the slave number by hexadecimal number. (H01 to HFF. H00 is for broadcast.)
2) Function code: Set the function code to H05.
3) Address of coil : Set the address of coil to change by hexadecimal number. (H0000 to HFFFF)
4) State of the coil: Set the state of coil to change. (For changing to ON: HFF00; for changing to OFF: H0000)
Ex.) Turn on the 253rd coil of slave No.44:
The head address of Sending data area WR100  WR100 = H0006
(2) The state of receiving data area
1) Completed properly
When performance is properly, completion flag (t+1) will be ON, and nothing is stored in receiving data area. A
properly execution code is stored in a return code (s+0).
2) Receiving exception response
When an exception response is received, error flag (t+2) turns on, and the receiving data area is as follows.
Figure 6.42 Receiving data area format (Function code 0x05 / Exception response)
3) Other errors (except for exception response)
When there is no response from a slave or an abnormal factor is detected in the response, error flag (t+2) turns on,
an error code is stored in the return code area of the s parameter, and the number of receiving data is cleared to
H0000. (Data other than the number of receive data bytes maintains previous values.)
Please refer to section "6.3.5 Error detection in modbus master mode" for more information on error codes.
H 0 0 0 6
Device No.
0
5
Address of coil
State of coil
1 word
Figure 6.41 Sending data area format (Function code 0x05)
Number of receive data (H0002)
H 8 5
6 - 44
05: Function code
Address of coil to change
HFF00 : Coil ON
H0000 : Coil OFF
WR101 = H2C05
WR102 = H00FC
WR103 = HFF00
Exception code

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ehv seriesHx series

Table of Contents