Modbus Protocol Specification



tải về 0.61 Mb.
Chế độ xem pdf
trang10/35
Chuyển đổi dữ liệu14.05.2023
Kích0.61 Mb.
#54683
1   ...   6   7   8   9   10   11   12   13   ...   35
modbus protocol

2.2.5 05 Force Single Coil
Forces a single coil (0x reference) to either ON or OFF. When broadcast, the function forces the
same coil reference 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 the coil's disable
state. The forced state will remain valid until the controller's logic next solves the coil. The coil
will remain forced if it is not programmed in the controller's logic.
Query
The query message specifies the coil reference to be forced. Coils are addressed starting at
zero-coil 1 is addressed as 0.
The reguested ON / OFF state is specified by a constant in the query data field. A value of FF
00 hex requests the coil to be ON. A value of 00 00 requests it to be OFF. All other values are
illegal and will not affect the coil.
Here is an example of a request to force coil 173 ON in slave device 17:
http://www.modicon.com/techpubs/dcon7.html (10 of 36) [1/11/2000 10:41:04 PM]


Response
The normal response is an echo of the query, returned after the coil state has been forced.
Here is an example of a response to the query:
2.2.6 06 Preset Single Register
Presets a value into a single holding register (4x reference). When broadcast, the function
presets the same register reference 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. The preset value will
remain valid in the register until the controller's logic next solves the register contents. The
register's value will remain if it is not programmed in the controller's logic.
Query
The query message specifies the register reference to be preset. Registers are addressed starting
at zero-register 1 is addressed as 0.
The reguested preset value is specified in the query data field. M84 and 484 controllers use a
10-bit binary value, with the six high order bits set to zeros. All other controllers use 16-bit
values.
Here is an example of a request to preset register 40002 to 00 03 hex in slave device 17:
http://www.modicon.com/techpubs/dcon7.html (11 of 36) [1/11/2000 10:41:04 PM]


Response
The normal response is an echo of the query, returned after the register contents have been
preset.
Here is an example of a response to the query:

tải về 0.61 Mb.

Chia sẻ với bạn bè của bạn:
1   ...   6   7   8   9   10   11   12   13   ...   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