Modbus Human Infrared Sensor Communication Protocol

freeFree Technical Resource

This content is free to read, suitable for basic learning and search traffic.

Modbus Human Infrared Sensor Communication Protocol缩略图

(1) Data format:

1.

有线 RS485 通讯模式:波特率 9600,8 个数据位,1 个起始位,一个停止位,无校验位共 10 个 bit。

(二)、通讯协议

1、红外感应发出控制指令

DATA0: 0X01

ID

DATA1: 0X06

命令代码

DATA2: 0x00 寄存器地址高

DATA3: 0x02 寄存器地址低

DATA4: 0X00

感应有人数据高

DATA5: 0X01

感应有人数据低(01 有人;00 无人)

DATA6: CRCL

DATA7: CRCH

校验算法:MODBUS/CRC-16 x16+x15+x2+1

备注:数据发送采用主动发送,发送次数为 3 次如果在 100MS 内主机会将感应器发生的数据返回给感应器,则感器器将停止送数据 。

2 红外接收 ID 设置

DATA0: B4 帧头

DATA1: C4 帧头

DATA2: 数据个数 05

DATA3: 设置红外 ID 高

DATA4: 设置红外 ID 低

DATA5: 设置红外 ID 高

DATA6: 设置红外 ID 低

DATA7: 0X55

3 光照度信息包上传

DATA0: 0X01

ID

DATA1: 0X06

命令代码

DATA2: 0x00 寄存器地址高

DATA3: 0x03 寄存器地址低

DATA4: 0X00

照度数据(HBH)

DATA5: 0X01

照度数据(HBL)

DATA6: 0X00

照度数据(BH)

DATA7: 0X01

照度数据(BL)

DATA8: CRCL

DATA9: CRCH

校验算法:MODBUS/CRC-16 x16+x15+x2+1

1照度计算方法 HEX 将四个字节依照(HBH,HBL,BH,BL)顺序组合成一个 32 位的数位此时光感测试到的照

度值,例如 HEX(00002222)=8738 lux;最大值为 65535 LUX。

2、照度每隔 1 分钟上传一次,3 秒钟内变化量大于 10LUX 立即上传 3 次,每次时间间隔 100MS 如果在 100MS

内主机会将感应器发生的数据返回给感应器光感会停止发送数据。

4 光感接收 ID 设置数据格式

DATA0: B4 帧头

DATA1: C4 帧头

DATA2: 数据个数 05

DATA3: 设置红外 ID 高

DATA4: 设置红外 ID 低

DATA5: 设置红外 ID 高

DATA6: 设置红外 ID 低

DATA7: 0X55

5 雷达+红外双鉴感应信息上传数据

DATA0: 0X01

ID

DATA1: 0X06

命令代码

DATA2: 0x00 寄存器地址高

DATA3: 0x04 寄存器地址低

DATA4: 0X00

红外感应有人数据低(0xaa 有人;0x55 无人)

DATA5: 0X01

雷达感应有人数据低(0xaa 有人;0x55 无人)

DATA6: CRCL

DATA7: CRCH

校验算法:MODBUS/CRC-16 x16+x15+x2+1

6 雷达+红外双鉴感应 ID 设置信息

DATA0: B4 帧头

DATA1: C4 帧头

DATA2: 数据个数 05

DATA3: 设置红外 ID 高

DATA4: 设置红外 ID 低

DATA5: 设置红外 ID 高

DATA6: 设置红外 ID 低

DATA7: 0X55

Put this resource to use in a real project?

Go to the Tool Center for message parsing, CRC verification and device debugging, or submit your requirements for selection and integration advice.

Engineer Membership

Turn this article into actionable debugging resources

After activation, you can use advanced message parsing, resource pack downloads, code examples, engineering cases and priority technical support, suitable for real project delivery.

Unlimited Advanced Tools
Resource & Code Packs
Complete Engineering Case Library
Priority Technical Support

Leave a Reply

Your email address will not be published. Required fields are marked *.