Force Multiple Coils (Function Code 15) - ProSoft Technology CompactLogix MVI69E-MBS User Manual

Modbus serial enhanced communication module
Table of Contents

Advertisement

MVI69E-MBS ♦ CompactLogix™ Platform
Modbus Serial Enhanced Communication Module

8.2.11 Force Multiple Coils (Function Code 15)

Query
This function forces each coil (Modbus 0x range) in a consecutive block of coils to a
desired ON or OFF state. Any coil that exists within the controller can be forced to either
state (ON or OFF). However, because the controller is actively scanning, unless the coils
are disabled, the controller can also alter the state of the coil. Coils are numbered from
zero (coil 00001 = zero, coil 00002 = one, and so on). The desired status of each coil is
packed in the data field, one bit for each coil (1= ON, 0= OFF). The use of slave address
0 (Broadcast Mode) forces all attached slaves to modify the desired coils.
Note: Functions 5, 6, 15, and 16 are the only messages (other than Loopback Diagnostic Test) that are
recognized as valid for broadcast.
The following example forces 10 coils starting at address 20 (13 HEX). The two data
fields, CD =1100 and 00 = 0000 000, indicate that coils 27, 26, 23, 22, and 20 are to be
forced on.
Note: This is the structure of the message being sent out to the Modbus network. The byte values below are
in hexadecimal display.
Func
Node
Code
Address
0F
0B
Response
The normal response is an echo of the slave address, function code, starting address,
and quantity of coils forced.
Func
Node
Code
Address
0F
0B
Writing to coils with Modbus function 15 is accomplished regardless of whether the
addressed coils are disabled or not.
Coils that are not programmed in the controller logic program are not automatically
cleared upon power up. Thus, if such a coil is set ON by function code 15 and (even
months later) an output is connected to that coil, the output is hot.
ProSoft Technology, Inc.
Coil
Coil
Number of
Address
Address
Coils High
High
Low
00
13
00
Coil
Coil
Number of
Address
Address
Coils High
High
Low
00
13
00
Number of
Byte
Force
Coils Low
Count
Data High
20 to 27
0A
02
CD
Number of
Error Check Field (2 bytes)
Coils Low
0A
CRC
User Manual
Force
Error Check
Data Low
Field (2 bytes)
28 to 29
01
CRC
Page 124 of 159
Reference

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CompactLogix MVI69E-MBS and is the answer not in the manual?

Table of Contents