Resources说明
这是北京京创鑫业科技有限company AirTS 系列高大空间Air Conditioner机组的 Modbus RTU 通讯Protocol,触屏控制system终端做slave,上位机做主机。Protocol只有 15 个effectiveregister,但有几个地方容易踩坑:temperature要除 10、启停控制要用不同值写同一Registers、写Operation只支持 0x06 单register、以及写目标temperature/角度/强度时范围比读出来的范围窄。
物理层和对parameter
RS-485 两线制,A 接 A、B 接 B。Serial port parameters(注意:PDF 里写的是 9600,实际使用前先Confirm你device上设的Baud rate,别上来就用默认):
| parameter | Value |
|---|---|
| Interface | RS-485(不支持其他方式) |
| Baud rate | 9600 bps(默认) |
| start位 | 1 |
| data bit | 8 |
| check | 无 |
| stop bit | 1 |
| slave address | 0x01 ~ 0xFF(1 No.~255 device no.),看触屏上显示equipment编No. |
终端内部会把Air Conditioner的本地data转发给上位机,所以你对Air Conditioner发任何Command,对象都是这个触屏控制终端。
Protocol硬Rules
- 只支持 Modbus RTU,不支持 ASCII 或 TCP。
- function code:0x03 Read the hold register(可连续读多个),0x06 write single register(不支持 0x10 写多个)。
- data format:high byte在前,低byte在后。
- CRC:16 位,低byte在前,high byte在后。
- 写范围受限:目标temperature写范围 0~32℃、出风角度写范围 0~64、出风强度写范围 0~64;但读出来显示的是 0~50℃、0~100 度、0~100%。写的时候别超上限,否则device可能不认。
- 不支持多device打包Command,每条Command只针对一个slave address。
register点表(complete版)
| decimaladdress | hexadecimaladdress | function code | 读写 | Name | 说明 |
|---|---|---|---|---|---|
| 1 | 0x0001 | 0x03 | 只读 | 风机status | 0000=过热,0001=正常 |
| 2 | 0x0002 | 0x03 | 只读 | 备用 | 保留 |
| 3 | 0x0003 | 0x03 | 只读 | 备用 | 保留 |
| 4 | 0x0004 | 0x03 | 只读 | 备用 | 保留 |
| 5 | 0x0005 | 0x03 | 只读 | 回风temperature | 返回值÷10,带 1 位小数(例 0x012D=301→30.1℃) |
| 6 | 0x0006 | 0x03 | 只读 | 出风temperature | 返回值÷10,带 1 位小数 |
| 7 | 0x0007 | 0x03 | 只读 | 工作区temperature | 返回值÷10,带 1 位小数 |
| 8 | 0x0008 | 0x03 | 只读 | 启停status | 0000=停运,0001=Open |
| 8 | 0x0008 | 0x06 | 写 | deviceOpen | 写 0001 |
| 8 | 0x0008 | 0x06 | 写 | device停运 | 写 0004 |
| 9 | 0x0009 | 0x03/0x06 | 读写 | No.一温控时段目标temperature | 读 0~50℃,写 0~32℃ |
| 10 | 0x000A | 0x03/0x06 | 读写 | No.二温控时段目标temperature | 读 0~50℃,写 0~32℃ |
| 11 | 0x000B | 0x03/0x06 | 读写 | No.三温控时段目标temperature | 读 0~50℃,写 0~32℃ |
| 12 | 0x000C | 0x03/0x06 | 读写 | No.四温控时段目标temperature | 读 0~50℃,写 0~32℃ |
| 13 | 0x000D | 0x03/0x06 | 读写 | 出风角度 | 读 0~100 度,写 0~64 |
| 14 | 0x000E | 0x03/0x06 | 读写 | 出风强度 | 读 0~100(显示加 %),写 0~64 |
| 15 | 0x000F | 0x03 | 只读 | 控制权限 | 0000=就地,0001=remote,0002=两者均可 |
常用messageexample(以 2 device no.为例,已逐条 CRC verification)
下面这些帧都跟 PDF 原厂example一致(或按ProtocolRules推算并验证 CRC)。如果你不是 2 device no.,把No.一个byte换成你的address,重新算 CRC 即可。
| 动作 | 下发帧 | 说明 |
|---|---|---|
| 读风机status | 02 03 00 01 00 01 D5 F9 |
应答 00 01=正常 |
| 读启停status | 02 03 00 08 00 01 05 FB |
应答 00 01=Open |
| deviceOpen | 02 06 00 08 00 01 C9 FB |
写register 8 为 0001 |
| device停运 | 02 06 00 08 00 04 09 F8 |
写register 8 为 0004 |
| 读所有register 1~14 | 02 03 00 01 00 0E 95 FD |
一次读回 14 个statusregister |
| 读控制权限 | 02 03 00 0F 00 01 B4 3A |
读register 15 |
| 设置目标temperature 25℃ | 02 06 00 09 00 19 98 31 |
写register 9 为 25(写范围 0~32) |
| 设置出风角度 90° | 02 06 00 0D 00 5A 98 01 |
写register 13 为 90(写范围 0~64) |
| 设置出风强度 80% | 02 06 00 0E 00 50 E8 06 |
写register 14 为 80(写范围 0~64) |
读所有register 1~14 的返回帧拆解
下发 02 03 00 01 00 0E 95 FD 后,收to 33 byte应答(data area 28 bytes):
02 03 1C 00 01 00 01 01 2D 01 29 01 05 01 28 01 0E 00 01 00 12 00 11 00 10 00 0F 00 5A 00 50 FE 96
按真实byte order拆解(address 1 toaddress 14,每Registers 2 bytes):
| Address | hexadecimal | decimal | 含义 |
|---|---|---|---|
| 1 风机status | 00 01 | 1 | 正常 |
| 2 备用 | 00 01 | 1 | 备用 |
| 3 备用 | 01 2D | 301 | 备用 |
| 4 备用 | 01 29 | 297 | 备用 |
| 5 回风temperature | 01 2D | 301 | 30.1℃ |
| 6 出风temperature | 01 29 | 297 | 29.7℃ |
| 7 工作区temperature | 01 05 | 261 | 26.1℃ |
| 8 启停status | 00 01 | 1 | Open |
| 9 No.一目标temperature | 00 12 | 18 | 18℃ |
| 10 No.二目标temperature | 00 11 | 17 | 17℃ |
| 11 No.三目标temperature | 00 10 | 16 | 16℃ |
| 12 No.四目标temperature | 00 0F | 15 | 15℃ |
| 13 出风角度 | 00 5A | 90 | 90 度 |
| 14 出风强度 | 00 50 | 80 | 80% |
注意:这个返回帧读的是address 1~14 共 14 Registers,不包含address 15(控制权限)。原厂 PDF 在列举「byte位置→register」对照时,把address 3、4 列成了回风/出风temperature,和真实byte order对不上——那个对照表本身有错位,上面这版是按实际hexadecimalbyte order重新对齐的,你可以照着数:No. 5~6 byte才是回风temperature 0x012D。
如果要读控制权限,单独发 02 03 00 0F 00 01 B4 3A。
temperatureParse
address 5、6、7 都是temperature,numerical value放大了 10 倍:
比如返回 01 2D = 301(decimal),真实temperature = 301 ÷ 10 = 30.1℃。
目标temperature(register 9~12)没做缩放,register value就是temperature值,比如 00 19 = 25℃,就是 25℃(但写的时候只能写to 32℃)。
启停控制
同一个register address 8,写不同值实现不同动作:
| Value | 动作 |
|---|---|
| 0x0001 | Open |
| 0x0004 | 停运 |
不要写 0x0000 去关,PDF 里没定义这个值,写 0x0004 才是停运。
debug注意
- 下发开机、关机、角度、强度这类控制Command后,要留足执行time:Chapter 6应答后、或间隔greater than 1 秒再发下一条,避免Command没执行完。
- 如果所有data都读不通,先用serial port软件连 USB 转 485 直接监听下发指令,看是不是 CRC 算错或address不对。
- 写Operation只支持 0x06 单register,别用 0x10。
- 控制权限register 15 显示current是就地还是Remote control,如果是就地,remote写Command可能不生效。
- 写目标temperature/角度/强度时范围比读出来窄(temperature 0~32、角度/强度 0~64),别超上限。
More厂商Protocol手册
- 贝克斯消防控制板 Modbus RTU 通讯Protocol V1.0.10
- 炬邦冷库手操器 Modbus RTU 通讯Protocol V1.6(通用型冷库机组)
- Gree多联机 Modbus RTU 通讯Protocol V1.2
- Daikin DTA116A621 remote监控组件 Modbus RTU 程序员Command手册
- R3-C51 智能重合闸 Modbus RTU complete标准化ProtocolDocument
- IRACC AC Gateway Modbus RTU 程序员Command手册 V3.01
- 柯力 D2008 称重仪表 Modbus RTU complete标准化ProtocolDocument
点位表 / register表
按address、function code、data type和倍率整理,适合debug、归档和项目交付。