云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > 01 Modbus Data Struture

01 Modbus Data Struture

  • 62 次阅读
  • 3 次下载
  • 2025/5/3 9:30:37

Read Input Registers (FC=04)

Request

This command is requesting the content of analog input register # 30009 from the slave device with address 17. 11 04 0008 0001 B298

11: The Slave Address (17 = 11 hex)

04: The Function Code (read Analog Input Registers)

0008: The Data Address of the first register requested. (30009-30001 = 8) 0001: The total number of registers requested. (read 1 register) B298: The CRC (cyclic redundancy check) for error checking. Response

11 04 02 000A F8F4

11: The Slave Address (17 = 11 hex)

04: The Function Code (read Analog Input Registers)

02: The number of data bytes to follow (1 registers x 2 bytes each = 2 bytes) 000A: The contents of register 30009

F8F4: The CRC (cyclic redundancy check).

4 | Page

Force Single Coil (FC=05)

Request

This command is writing the contents of discrete coil # 173 to ON in the slave device with address 17. 11 05 00AC FF00 4E8B

11: The Slave Address (17 = 11 hex)

05: The Function Code (Force Single Coil)

00AC: The Data Address of the coil. (coil# 173 - 1 = 172 = AC hex) FF00: The status to write ( FF00 = ON, 0000 = OFF )

4E8B: The CRC (cyclic redundancy check) for error checking. Response

The normal response is an echo of the query, returned after the coil has been written. 11 05 00AC FF00 4E8B

11: The Slave Address (17 = 11 hex)

05: The Function Code (Force Single Coil)

00AC: The Data Address of the coil. (coil# 173 - 1 = 172 = AC hex) FF00: The status written ( FF00 = ON, 0000 = OFF )

4E8B: The CRC (cyclic redundancy check) for error checking.

5 | Page

Preset Single Register (FC=06)

Request

This command is writing the contents of analog output holding register # 40002 to the slave device with address 17. 11 06 0001 0003 9A9B

11: The Slave Address (17 = 11 hex)

06: The Function Code (Preset Single Register)

0001: The Data Address of the register. (# 40002 - 40001 = 1 ) 0003: The value to write

9A9B: The CRC (cyclic redundancy check) for error checking. Response

The normal response is an echo of the query, returned after the register contents have been written.

11 06 0001 0003 9A9B

11: The Slave Address (17 = 11 hex)

06: The Function Code (Preset Single Register)

0001: The Data Address of the register. (# 40002 - 40001 = 1 ) 0003: The value written

9A9B: The CRC (cyclic redundancy check) for error checking.

6 | Page

Force Multiple Coils (FC=15)

Request

This command is writing the contents of a series of 10 discrete coils from #20 to #29 to the slave device with address 17. 11 0F 0013 000A 02 CD01 BF0B

11: The Slave Address (17 = 11 hex)

0F: The Function Code (Force Multiple Coil, 15 = 0F hex)

0013: The Data Address of the first coil. (coil# 20 - 1 = 19 = 13 hex) 000A: The number of coils to written (10 = 0A hex)

02: The number of data bytes to follow (10 Coils / 8 bits per byte = 2 bytes) CD: Coils 27 - 20 (1100 1101)

01: 6 space holders & Coils 29 - 28 (0000 0001)

BF0B: The CRC (cyclic redundancy check) for error checking.

The more significant bits contain the higher coil variables. This shows that coil 20 is on (1) and 21 is off (0). Due to the number of coils requested, the last data field01 contains the status of only 2 coils. The unused bits in the last data byte are filled in with zeroes. Response

11 0F 0013 000A 2699

11: The Slave Address (17 = 11 hex)

0F: The Function Code (Force Multiple Coil, 15 = 0F hex)

0013: The Data Address of the first coil. (coil# 20 - 1 = 19 = 13 hex) 000A: The number of coils to written (10 = 0A hex)

2699: The CRC (cyclic redundancy check) for error checking.

7 | Page

搜索更多关于: 01 Modbus Data Struture 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

Read Input Registers (FC=04) Request This command is requesting the content of analog input register # 30009 from the slave device with address 17. 11 04 0008 0001 B298 11: The Slave Address (17 = 11 hex) 04: The Function Code (read Analog Input Registers) 0008: The Data Address of the first register requested. (30009-30001 = 8) 0001: The total number

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com