<
From version < 33.2 >
edited by Karry Zhuang
on 2024/07/19 16:12
To version < 34.3 >
edited by Karry Zhuang
on 2024/07/19 16:40
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -309,9 +309,9 @@
309 309  
310 310  send
311 311  
312 -(% border="1" cellspacing="3" style="background-color:#f2f2f2; width:676.25px" %)
313 -|=(% 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" %)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
314 -|(% style="width:99px" %)0X10|(% 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" %)(((
312 +(% border="1" cellspacing="3" style="background-color:#f2f2f2; width:570.333px" %)
313 +|=(% style="width: 71px; background-color: rgb(79, 129, 189); color: white;" %)Address|=(% style="width: 74px; background-color: rgb(79, 129, 189); 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: 57px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 low|=(% style="width: 57px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 high
314 +|(% style="width:71px" %)0X10|(% style="width:74px" %)0X06|(% style="width:67px" %)0X00|(% style="width:68px" %)0X10|(% style="width:69px" %)0X00|(% style="width:66px" %)0X64|(% style="width:57px" %)0X8A|(% style="width:57px" %)(((
315 315  0XA5
316 316  )))
317 317  
... ... @@ -330,8 +330,18 @@
330 330  === 2.6.4 Query data ===
331 331  
332 332  
333 -The address of the pH  sensor is 10
333 +Query the data (PH) of the sensor (address 10), host → slave
334 334  
335 +(% border="1" cellspacing="3" style="background-color:#f2f2f2; width:599.333px" %)
336 +|=(% 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
337 +|(% style="width:99px" %)0X10|(% 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" %)0X4B
338 +
339 +If the sensor receives correctly, the following data will be returned, slave → host
340 +
341 +(% border="1" cellspacing="3" style="background-color:#f2f2f2; width:599.333px" %)
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" %)0X14|(% 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 +
335 335  The query data command is 10 03 00 00 00 01 87 4B. After the query, 7 bytes will be returned.
336 336  
337 337  For example, the returned data is 10 03 02 (% style="color:red" %)**02 AE**(%%) C4 9B.
... ... @@ -566,43 +566,80 @@
566 566  
567 567  == 4.6 RS485 Commands ==
568 568  
579 +RS485 signaldefault address 0x14
580 +Standard Modbus-RTU protocol, baud rate: 9600; check bit: none; data bit: 8; stop bit: 1
581 +
569 569  === 4.6.1 Query address ===
570 570  
571 571  send
572 572  
573 573  (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:599.333px" %)
574 -|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Original 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;" %)Address high|=(% style="width: 68px; background-color: rgb(79, 129, 189); color: white;" %)Address low|=(% style="width: 70px; background-color: rgb(79, 129, 189); color: white;" %)Quantity high|=(% style="width: 72px; background-color: rgb(79, 129, 189); color: white;" %)Quantity 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
575 -|(% style="width:99px" %)0XFE |(% style="width:72px" %)0X03|(% style="width:64px" %)0X00|(% style="width:68px" %)0X50|(% style="width:70px" %)0X00|(% style="width:72px" %)0X00|(% style="width:56px" %)0X51|(% style="width:56px" %)0XD4
587 +|=(% style="width: 50px;background-color:#4F81BD;color:white" %)Original 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;" %)Register address high|=(% style="width: 68px; background-color: rgb(79, 129, 189); color: white;" %)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
588 +|(% style="width:99px" %)0XFF|(% style="width:72px" %)0X03|(% style="width:64px" %)0X00|(% style="width:68px" %)0X0A|(% style="width:70px" %)0X00|(% style="width:72px" %)0X02|(% style="width:56px" %)0XF1|(% style="width:56px" %)0XD7
576 576  
577 -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, which can be used as a method of address query.
590 +If you forget the original address of the sensor, you can use the broadcast address 0XFF instead. When using 0XFE, the host can only connect to one slave, which can be used as a method of address query.
578 578  
579 579  
580 580  response
581 581  
582 -(% border="1" cellspacing="3" style="background-color:#f2f2f2; width:561.333px" %)
583 -|=(% 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
584 -|(% style="width:99px" %)0X01|(% style="width:112px" %)0X03|(% style="width:106px" %)0X00|(% style="width:93px" %)0X20|(% style="width:104px" %)0XF0
595 +Register 0 data high and register 0 data low indicate the actual address of the sensor: 1
596 +Register 1 data high and register 1 data low indicate the sensor version
585 585  
598 +(% border="1" cellspacing="3" style="background-color:#f2f2f2; width:599.333px" %)
599 +|=(% 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;" %)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: 70px; background-color: rgb(79, 129, 189); color: white;" %)Register 1 Data high|=(% style="width: 72px; 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
600 +|(% style="width:99px" %)0XFF|(% style="width:72px" %)0X03|(% style="width:64px" %)0X04|(% style="width:68px" %)0X00|(% style="width:70px" %)0X01|(% style="width:72px" %)0X00|(% style="width:56px" %)0X00|(% style="width:56px" %)0XB4|(% style="width:56px" %)0X3C
601 +
586 586  === 4.6.2 Change address ===
587 587  
588 -For example: Change the address of the sensor with address 1 to 2, master → slave
604 +For example: Change the address of the sensor with address 1 to 2(address range: 1-119), master → slave
589 589  
590 590  (% border="1" cellspacing="3" style="background-color:#f2f2f2; width:907.333px" %)
591 591  |=(% style="width: 67px; background-color: rgb(79, 129, 189); color: white;" %)Original address|=(% style="width: 71px; background-color: rgb(79, 129, 189); color: white;" %)Function code|=(% style="width: 65px; background-color: rgb(79, 129, 189); color: white;" %)Starting register address high|=(% style="width: 65px; 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: 53px; background-color: rgb(79, 129, 189); color: white;" %)Data length|=(% style="width: 53px; background-color: rgb(79, 129, 189); color: white;" %)Start address high|=(% style="width: 53px; background-color: rgb(79, 129, 189); color: white;" %)Start address low|=(% style="width: 53px; background-color: rgb(79, 129, 189); color: white;" %)Sensor version|=(% style="width: 53px; background-color: rgb(79, 129, 189); color: white;" %)Sensor version|=(% style="width: 56px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 high|=(% style="width: 68px; background-color: rgb(79, 129, 189); color: white;" %)CRC16 low
592 592  |(% style="width:67px" %)0X01|(% style="width:71px" %)0X10|(% style="width:65px" %)0X00|(% style="width:65px" %)0X0A|(% style="width:70px" %)0X00|(% style="width:72px" %)0X02|(% style="width:53px" %)0X04|(% style="width:53px" %)0X00|(% style="width:72px" %)0X02|(% style="width:53px" %)0X00|(% style="width:53px" %)0X00|(% style="width:56px" %)0XD2|(% style="width:53px" %)0X10
593 593  
594 -=== 4.6.2 Query data ===
610 +response
595 595  
612 +(% border="1" cellspacing="3" style="background-color:#f2f2f2; width:599.333px" %)
613 +|=(% 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
614 +|(% style="width:99px" %)0X01|(% style="width:72px" %)0X10|(% style="width:64px" %)0X00|(% style="width:68px" %)0X0A|(% style="width:70px" %)0X00|(% style="width:72px" %)0X02|(% style="width:56px" %)0X61|(% style="width:56px" %)0XCA
596 596  
597 -The address of the dissolved oxygen sensor is 14
616 +=== 4.6.3 Query data ===
598 598  
599 -The query data command is 14 03 00 14 00 01 C6 CB
600 600  
619 +Query the data (dissolved oxygen) of the sensor (address 14), host → slave
620 +
621 +(% border="1" cellspacing="3" style="background-color:#f2f2f2; width:599.333px" %)
622 +|=(% 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
623 +|(% style="width:99px" %)0X14|(% style="width:72px" %)0X03|(% style="width:64px" %)0X00|(% style="width:68px" %)0X14|(% style="width:70px" %)0X00|(% style="width:72px" %)0X01|(% style="width:56px" %)0XC6|(% style="width:56px" %)0XCB
624 +
625 +If the sensor receives correctly, the following data will be returned, slave → host
626 +
627 +(% border="1" cellspacing="3" style="background-color:#f2f2f2; width:599.333px" %)
628 +|=(% 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
629 +|(% style="width:99px" %)0X14|(% style="width:72px" %)0X03|(% style="width:68px" %)0X02|(% style="width:70px" %)0X03|(% style="width:72px" %)0X78|(% style="width:56px" %)0XB5|(% style="width:56px" %)0X55
630 +
601 601  After the query, 7 bytes will be returned. For example, the returned data is 14 03 02 (% style="color:red" %)**03 78**(%%) B5 55. 03 78 is the value of dissolved oxygen.
602 602  
603 603  Converted to decimal, it is 888. Add two decimal places to get the actual value. 03 78 means the current dissolved oxygen is 8.88mg/L
604 604  
605 605  
636 +Query the data (temperature) of the sensor (address 14), host → slave
637 +
638 +(% border="1" cellspacing="3" style="background-color:#f2f2f2; width:599.333px" %)
639 +|=(% 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
640 +|(% style="width:99px" %)0X14|(% style="width:72px" %)0X03|(% style="width:64px" %)0X00|(% style="width:68px" %)0X11|(% style="width:70px" %)0X00|(% style="width:72px" %)0X01|(% style="width:56px" %)0XD6|(% style="width:56px" %)0XCA
641 +
642 +If the sensor receives correctly, the following data will be returned, slave → host
643 +
644 +(% border="1" cellspacing="3" style="background-color:#f2f2f2; width:599.333px" %)
645 +|=(% 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
646 +|(% style="width:99px" %)0X14|(% style="width:72px" %)0X03|(% style="width:68px" %)0X02|(% style="width:70px" %)0X09|(% style="width:72px" %)0XA4|(% style="width:56px" %)0XB2|(% style="width:56px" %)0X6C
647 +
648 +After the query, 7 bytes will be returned. For example, the returned data is 14 03 02 (% style="color:red" %)**09 A4**(%%) B2 6C. 03 78 is the value of dissolved oxygen temperature.
649 +
650 +Converted to decimal, it is 2468. Add two decimal places to get the actual value. 09 A4 means the current dissolved oxygen temperature is 24.68℃
651 +
652 +
606 606  = 5. DR-TS1 Water Turbidity Sensor =
607 607  
608 608  
Copyright ©2010-2024 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0