Changes for page Water Quality Sensors
Last modified by Karry Zhuang on 2025/02/18 15:43
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -141,18 +141,44 @@ 141 141 142 142 === 1.7.4 Query data === 143 143 144 + 145 + 146 +Query the data (EC,temperature) of the sensor (address 11), host → slave 147 + 148 +(% border="1" cellspacing="3" style="background-color:#f2f2f2; width:599.333px" %) 149 +|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address|=(% style="width: 72px; background-color: rgb(79, 129, 189); color: white;" %)Function code|=(% style="width: 64px; background-color: rgb(79, 129, 189); color: white;" %)Starting register address high|=(% style="width: 68px; background-color: rgb(79, 129, 189); color: white;" %)Starting register address low|=(% style="width: 70px; background-color: rgb(79, 129, 189); color: white;" %)Register length high|=(% style="width: 72px; background-color: rgb(79, 129, 189); color: white;" %)Register length low|=(% style="width: 56px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 low|=(% style="width: 56px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 high 150 +|(% style="width:99px" %)0X11|(% style="width:72px" %)0X03|(% style="width:64px" %)0X00|(% style="width:68px" %)0X00|(% style="width:70px" %)0X00|(% style="width:72px" %)0X02|(% style="width:56px" %)0XC6|(% style="width:56px" %)0X9B 151 + 152 +If the sensor receives correctly, the following data will be returned, slave → host 153 + 154 +(% border="1" cellspacing="3" style="background-color:#f2f2f2; width:599.333px" %) 155 +|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address|=(% style="width: 72px; background-color: rgb(79, 129, 189); color: white;" %)Function code|=(% style="width: 68px; background-color: rgb(79, 129, 189); color: white;" %)Data length|=(% style="width: 68px; background-color: rgb(79, 129, 189); color: white;" %)Register 0 Data high|=(% style="width: 70px; background-color: rgb(79, 129, 189); color: white;" %)Register 0 Data low|=(% style="width: 68px; background-color: rgb(79, 129, 189); color: white;" %)Register 1 Data high|=(% style="width: 70px; background-color: rgb(79, 129, 189); color: white;" %)Register 1 Data low|=(% style="width: 56px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 low|=(% style="width: 56px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 high 156 +|(% style="width:99px" %)0X11|(% style="width:72px" %)0X03|(% style="width:68px" %)0X04|(% style="width:70px" %)0X02|(% style="width:72px" %)0XAE|(% style="width:56px" %)0X01|(% style="width:56px" %)0X64|(% style="width:56px" %)0X8B|(% style="width:56px" %)0XD0 157 + 144 144 The address of the EC K10 sensor is 11 145 145 146 146 The query data command is 11 03 00 00 00 02 C6 9B 147 147 148 -For example, the returned data is 11 03 04 (% style="color:red" %)**02 AE**(%%) 01 64 8B D0. 02 AE is converted to decimal 686, K=10, EC: 6860uS/cm 162 +For example, the returned data is 11 03 04 (% style="color:red" %)**02 AE**(%%) 01 64 8B D0. 02 AE is converted to decimal 686, K=10, EC: 6860uS/cm,temperature: 35.6℃ Convert the returned data to decimal and divide by 10. 149 149 150 150 165 +Query the data (EC,temperature) of the sensor (address 11), host → slave 166 + 167 +(% border="1" cellspacing="3" style="background-color:#f2f2f2; width:599.333px" %) 168 +|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address|=(% style="width: 72px; background-color: rgb(79, 129, 189); color: white;" %)Function code|=(% style="width: 64px; background-color: rgb(79, 129, 189); color: white;" %)Starting register address high|=(% style="width: 68px; background-color: rgb(79, 129, 189); color: white;" %)Starting register address low|=(% style="width: 70px; background-color: rgb(79, 129, 189); color: white;" %)Register length high|=(% style="width: 72px; background-color: rgb(79, 129, 189); color: white;" %)Register length low|=(% style="width: 56px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 low|=(% style="width: 56px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 high 169 +|(% style="width:99px" %)0X12|(% style="width:72px" %)0X03|(% style="width:64px" %)0X00|(% style="width:68px" %)0X00|(% style="width:70px" %)0X00|(% style="width:72px" %)0X02|(% style="width:56px" %)0XC6|(% style="width:56px" %)0XA8 170 + 171 +If the sensor receives correctly, the following data will be returned, slave → host 172 + 173 +(% border="1" cellspacing="3" style="background-color:#f2f2f2; width:599.333px" %) 174 +|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address|=(% style="width: 72px; background-color: rgb(79, 129, 189); color: white;" %)Function code|=(% style="width: 68px; background-color: rgb(79, 129, 189); color: white;" %)Data length|=(% style="width: 68px; background-color: rgb(79, 129, 189); color: white;" %)Register 0 Data high|=(% style="width: 70px; background-color: rgb(79, 129, 189); color: white;" %)Register 0 Data low|=(% style="width: 68px; background-color: rgb(79, 129, 189); color: white;" %)Register 1 Data high|=(% style="width: 70px; background-color: rgb(79, 129, 189); color: white;" %)Register 1 Data low|=(% style="width: 56px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 low|=(% style="width: 56px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 high 175 +|(% style="width:99px" %)0X12|(% style="width:72px" %)0X03|(% style="width:68px" %)0X04|(% style="width:70px" %)0X02|(% style="width:72px" %)0XAE|(% style="width:56px" %)0X01|(% style="width:56px" %)0X64|(% style="width:56px" %)0XB8|(% style="width:56px" %)0XD0 176 + 151 151 The address of the EC K1 sensor is 12 152 152 153 153 The query data command is 12 03 00 00 00 02 C6 A8 154 154 155 -For example, the returned data is 12 03 04 (% style="color:red" %)**02 AE**(%%) 01 64 B8 D0. 02 AE is converted to decimal 686, K=1, EC: 686uS/cm 181 +For example, the returned data is 12 03 04 (% style="color:red" %)**02 AE**(%%) 01 64 B8 D0. 02 AE is converted to decimal 686, K=1, EC: 686uS/cm,temperature: 35.6℃ Convert the returned data to decimal and divide by 10. 156 156 157 157 158 158 === 1.7.5 Calibration Method === ... ... @@ -315,7 +315,7 @@ 315 315 0XA5 316 316 ))) 317 317 318 -Change the intercept of the sensor withaddress 1 to 10(default 0),whichis0X000Ain the command.344 +Change the intercept of the sensor at address 10 to 1 (default is 0). You need to pass the intercept 1*100 =100 into the command 0x006. 319 319 320 320 response 321 321 ... ... @@ -340,7 +340,7 @@ 340 340 341 341 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:599.333px" %) 342 342 |=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address|=(% style="width: 72px; background-color: rgb(79, 129, 189); color: white;" %)Function code|=(% style="width: 68px; background-color: rgb(79, 129, 189); color: white;" %)Data length|=(% style="width: 68px; background-color: rgb(79, 129, 189); color: white;" %)Register 0 Data high|=(% style="width: 70px; background-color: rgb(79, 129, 189); color: white;" %)Register 0 Data low|=(% style="width: 56px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 low|=(% style="width: 56px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 high 343 -|(% style="width:99px" %)0X1 4|(% style="width:72px" %)0X03|(% style="width:68px" %)0X02|(% style="width:70px" %)0X02|(% style="width:72px" %)0XAE|(% style="width:56px" %)0XC4|(% style="width:56px" %)0X9B369 +|(% style="width:99px" %)0X10|(% style="width:72px" %)0X03|(% style="width:68px" %)0X02|(% style="width:70px" %)0X02|(% style="width:72px" %)0XAE|(% style="width:56px" %)0XC4|(% style="width:56px" %)0X9B 344 344 345 345 The query data command is 10 03 00 00 00 01 87 4B. After the query, 7 bytes will be returned. 346 346 ... ... @@ -486,7 +486,7 @@ 486 486 send 487 487 488 488 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:676.25px" %) 489 -|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Function code|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address high|=(% style="width:50px;background-color:#4F81BD;color:white" %)Address low|=(% style="width:50px;background-color:#4F81BD;color:white" %)Quantityhigh|=(% style="width:1px; background-color: rgb(79, 129, 189); color: white;" %)Quantitylow|=(% style="width: 50px;background-color:#4F81BD;color:white" %)CRC16 low|=(% style="width: 50px;background-color:#4F81BD;color:white" %)CRC16 high515 +|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Function code|=(% style="width: 67px; background-color: rgb(79, 129, 189); color: white;" %)Starting register address high|=(% style="width: 68px; background-color: rgb(79, 129, 189); color: white;" %)Starting register address low|=(% style="width: 69px; background-color: rgb(79, 129, 189); color: white;" %)Register Length high|=(% style="width: 66px; background-color: rgb(79, 129, 189); color: white;" %)Register Length low|=(% style="width: 50px;background-color:#4F81BD;color:white" %)CRC16 low|=(% style="width: 50px;background-color:#4F81BD;color:white" %)CRC16 high 490 490 |(% style="width:99px" %)0X13|(% style="width:112px" %)0X06|(% style="width:135px" %)0X00|(% style="width:126px" %)0X10|(% style="width:85px" %)0X00|(% style="width:1px" %)0X64|(% style="width:1px" %)0X8A|(% style="width:1px" %)((( 491 491 0X96 492 492 ))) ... ... @@ -505,8 +505,19 @@ 505 505 506 506 === 3.6.4 Query data === 507 507 508 -The address of the ORP sensor is 13 509 509 535 +Query the data (ORP) of the sensor (address 13), host → slave 536 + 537 +(% border="1" cellspacing="3" style="background-color:#f2f2f2; width:599.333px" %) 538 +|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address|=(% style="width: 72px; background-color: rgb(79, 129, 189); color: white;" %)Function code|=(% style="width: 64px; background-color: rgb(79, 129, 189); color: white;" %)Starting register address high|=(% style="width: 68px; background-color: rgb(79, 129, 189); color: white;" %)Starting register address low|=(% style="width: 70px; background-color: rgb(79, 129, 189); color: white;" %)Register length high|=(% style="width: 72px; background-color: rgb(79, 129, 189); color: white;" %)Register length low|=(% style="width: 56px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 low|=(% style="width: 56px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 high 539 +|(% style="width:99px" %)0X13|(% style="width:72px" %)0X03|(% style="width:64px" %)0X00|(% style="width:68px" %)0X00|(% style="width:70px" %)0X00|(% style="width:72px" %)0X01|(% style="width:56px" %)0X87|(% style="width:56px" %)0X78 540 + 541 +If the sensor receives correctly, the following data will be returned, slave → host 542 + 543 +(% border="1" cellspacing="3" style="background-color:#f2f2f2; width:599.333px" %) 544 +|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address|=(% style="width: 72px; background-color: rgb(79, 129, 189); color: white;" %)Function code|=(% style="width: 68px; background-color: rgb(79, 129, 189); color: white;" %)Data length|=(% style="width: 68px; background-color: rgb(79, 129, 189); color: white;" %)Register 0 Data high|=(% style="width: 70px; background-color: rgb(79, 129, 189); color: white;" %)Register 0 Data low|=(% style="width: 56px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 low|=(% style="width: 56px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 high 545 +|(% style="width:99px" %)0X13|(% style="width:72px" %)0X03|(% style="width:68px" %)0X02|(% style="width:70px" %)0X02|(% style="width:72px" %)0XAE|(% style="width:56px" %)0X80|(% style="width:56px" %)0X9B 546 + 510 510 The query data command is 13 03 00 00 00 01 87 78 511 511 512 512 For example, the returned data is 13 03 02 (% style="color:red" %)**02 AE**(%%) 80 9B. ... ... @@ -685,8 +685,12 @@ 685 685 686 686 == 5.6 RS485 Commands == 687 687 688 -=== 4.6.1 Query address === 689 689 726 +RS485 signaldefault address 0x15 727 +Standard Modbus-RTU protocol, baud rate: 9600; check bit: none; data bit: 8; stop bit: 1 728 + 729 +=== 5.6.1 Query address === 730 + 690 690 send 691 691 692 692 (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:599.333px" %) ... ... @@ -702,11 +702,32 @@ 702 702 |=(% style="width: 50px;background-color:#4F81BD;color:white" %)New address|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Function code|=(% style="width: 106px; background-color: rgb(79, 129, 189); color: white;" %)Data length|=(% style="width: 93px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 low|=(% style="width: 104px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 high 703 703 |(% style="width:99px" %)0X01|(% style="width:112px" %)0X03|(% style="width:106px" %)0X00|(% style="width:93px" %)0X20|(% style="width:104px" %)0XF0 704 704 705 -=== 5.6.2 Querydata===746 +=== 5.6.2 Change address === 706 706 748 +For example: Change the address of the sensor with address 1 to 2, master → slave 707 707 708 -The address of the dissolved oxygen sensor is 15 750 +(% border="1" cellspacing="3" style="background-color:#f2f2f2; width:676.25px" %) 751 +|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Original address|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Function code|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address high|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address low|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Quantity high|=(% style="width: 1px; background-color: rgb(79, 129, 189); color: white;" %)Quantity low|=(% style="width: 50px;background-color:#4F81BD;color:white" %)CRC16 low|=(% style="width: 50px;background-color:#4F81BD;color:white" %)CRC16 high 752 +|(% style="width:99px" %)0X01|(% style="width:112px" %)0X06|(% style="width:135px" %)0X00|(% style="width:126px" %)0X50|(% style="width:85px" %)0X00|(% style="width:1px" %)0X02|(% style="width:1px" %)0X08|(% style="width:1px" %)0X1A 709 709 754 +If the sensor receives correctly, the data is returned along the original path. 755 +Note: If you forget the original address of the sensor, you can use the broadcast address 0XFE instead. When using 0XFE, the host can only connect to one slave, and the return address is still the original address, which can be used as a method of address query. 756 + 757 +=== 5.6.3 Query data === 758 + 759 + 760 +Query the data (turbidity) of the sensor (address 15), host → slave 761 + 762 +(% border="1" cellspacing="3" style="background-color:#f2f2f2; width:599.333px" %) 763 +|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address|=(% style="width: 72px; background-color: rgb(79, 129, 189); color: white;" %)Function code|=(% style="width: 64px; background-color: rgb(79, 129, 189); color: white;" %)Starting register address high|=(% style="width: 68px; background-color: rgb(79, 129, 189); color: white;" %)Starting register address low|=(% style="width: 70px; background-color: rgb(79, 129, 189); color: white;" %)Register length high|=(% style="width: 72px; background-color: rgb(79, 129, 189); color: white;" %)Register length low|=(% style="width: 56px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 low|=(% style="width: 56px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 high 764 +|(% style="width:99px" %)0X15|(% style="width:72px" %)0X03|(% style="width:64px" %)0X00|(% style="width:68px" %)0X00|(% style="width:70px" %)0X00|(% style="width:72px" %)0X01|(% style="width:56px" %)0X87|(% style="width:56px" %)0X1E 765 + 766 +If the sensor receives correctly, the following data will be returned, slave → host 767 + 768 +(% border="1" cellspacing="3" style="background-color:#f2f2f2; width:599.333px" %) 769 +|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Address|=(% style="width: 72px; background-color: rgb(79, 129, 189); color: white;" %)Function code|=(% style="width: 68px; background-color: rgb(79, 129, 189); color: white;" %)Data length|=(% style="width: 68px; background-color: rgb(79, 129, 189); color: white;" %)Register 0 Data high|=(% style="width: 70px; background-color: rgb(79, 129, 189); color: white;" %)Register 0 Data low|=(% style="width: 56px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 low|=(% style="width: 56px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 high 770 +|(% style="width:99px" %)0X15|(% style="width:72px" %)0X03|(% style="width:68px" %)0X02|(% style="width:70px" %)0X02|(% style="width:72px" %)0X9A|(% style="width:56px" %)0X09|(% style="width:56px" %)0X4C 771 + 710 710 The query data command is 15 03 00 00 00 01 87 1E 711 711 712 712 For example, the returned data is 15 03 02 (% style="color:red" %)**02 9A**(%%) 09 4C