Modbus Protocol Specification


(0F Hex) Force Multiple Coils



tải về 0.61 Mb.
Chế độ xem pdf
trang14/35
Chuyển đổi dữ liệu14.05.2023
Kích0.61 Mb.
#54683
1   ...   10   11   12   13   14   15   16   17   ...   35
modbus protocol

2.2.10 15 (0F Hex) Force Multiple Coils
Forces each coil (0x reference) in a sequence of coils to either ON or OFF. When broadcast, the
function forces the same coil references in all attached slaves. The maximum parameters
supported by various controller models are listed on page .
Note: The function will override the controller's memory protect state and a coil's disable state.
The forced state will remain valid until the controller's logic next solves each coil. Coils will
remain forced if they are not programmed in the controller's logic.
Query
The query message specifies the coil references to be forced. Coils are addressed starting at
zero-coil 1 is addressed as 0.
The reguested ON / OFF states are specified by contents of the query data field. A logical 1 in a
bit position of the field requests the corresponding coil to be ON. A logical 0 requests it to be
OFF.
http://www.modicon.com/techpubs/dcon7.html (17 of 36) [1/11/2000 10:41:04 PM]


The following page shows an example of a request to force a series of ten coils starting at coil
20 (addressed as 19, or 13 hex) in slave device 17.
The query data contents are two bytes: CD 01 hex (1100 1101 0000 0001 binary). The binary
bits correspond to the coils in the following way:
Bit: 1 1 0 0 1 1 0 1 0 0 0 0 0 0 0 1
Coil: 27 26 25 24 23 22 21 20 - - - - - - 29 28
The first byte transmitted (CD hex) addresses coils 27 ... 20, with the least significant bit
addressing the lowest coil (20) in this set.
The next byte transmitted (01 hex) addresses coils 29 and 28, with the least significant bit
addressing the lowest coil (28) in this set. Unused bits in the last data byte should be zero-filled.
Response
The normal response returns the slave address, function code, starting address, and quantity of
coils forced. Here is an example of a response to the query shown above:

tải về 0.61 Mb.

Chia sẻ với bạn bè của bạn:
1   ...   10   11   12   13   14   15   16   17   ...   35




Cơ sở dữ liệu được bảo vệ bởi bản quyền ©hocday.com 2024
được sử dụng cho việc quản lý

    Quê hương