"# Modbus \u591a\u5bc4\u5b58\u5668\u6570\u636e\u89e3\u6790\u7ec8\u6781\u6307\u5357\uff1a\u5b57\u8282\u5e8f\uff08Endianness\uff09\u7684\u5b8c\u6574\u89e3\u51b3\u65b9\u6848\n\n> 2026-07-01 | 2026-07-01\n> https:\/\/www.modbus.cn\/en\/45427.html\n\n**Modbus\u6280\u672f\u6587\u6863**\n\n---\n\n## \u8fd9\u4e2a\u95ee\u9898\u6bd4\u4f60\u60f3\u8c61\u7684\u66f4\u666e\u904d\n\n\u7528 Modbus Poll \u8bfb\u5230\u4e00\u4e2a\u7535\u80fd\u8868\u7684\u6b63\u5411\u6709\u529f\u603b\u7535\u91cf\uff0c\u5bc4\u5b58\u5668 40001\uff5e40002\uff0c\u8fd4\u56de `42 C8 00 00`\u3002\u4f60\u4fe1\u5fc3\u6ee1\u6ee1\u5730\u6309 IEEE 754 float32 \u4e00\u62fc\u2014\u2014100.0 kWh\uff0c\u5408\u7406\u3002\u540c\u4e00\u4e2a\u7a0b\u5e8f\uff0c\u6362\u5230\u53e6\u4e00\u5bb6\u56fd\u4ea7\u7535\u529b\u4eea\u8868\uff0c\u8bfb\u53d6\u540c\u6837\u7684\u4e24\u4e2a\u5bc4\u5b58\u5668\uff0c\u8fd4\u56de `00 00 42 C8`\uff0c\u62fc\u51fa\u6765 0.0\uff0cPLC \u7684\u89e6\u6478\u5c4f\u4e0a\u76f4\u63a5\u7ed9\u4f60\u753b\u4e86\u6761\u76f4\u7ebf\u3002\u4f60\u6ca1\u5199\u9519\u5bc4\u5b58\u5668\uff0c\u4e5f\u6ca1\u7b97\u9519 CRC\uff0c\u7eaf\u7cb9\u662f\u5b57\u8282\u5e8f\u53cd\u4e86\u3002\n\n\u8fd9\u5c31\u662f Modbus \u591a\u5bc4\u5b58\u5668\u6570\u636e\u89e3\u6790\u7684\u6838\u5fc3\u75db\u70b9\u3002Modbus \u534f\u8bae\u89c4\u8303 V1.1b \u7b2c 4.2 \u8282\"Data Encoding\"\u8bf4\u5f97\u975e\u5e38\u5766\u8bda\uff1a**\"Modbus uses a 'big-endian' representation for addresses and data items. This means that when a numerical quantity larger than a single byte is transmitted, the most significant byte is sent first.\"** \u7ffb\u8bd1\u6210\u4eba\u8bdd\uff1aModbus \u5728\u4f20\u8f93\u5355\u4e2a\u5bc4\u5b58\u5668\u5185\u7684 16 \u4f4d\u6570\u636e\u65f6\u7528\u5927\u7aef\u5e8f\u2014\u2014\u9ad8\u5b57\u8282\u5728\u524d\u3002\u4f46\u89c4\u8303\u6ca1\u8bf4 32 \u4f4d\u6216 64 \u4f4d\u8de8\u591a\u4e2a\u5bc4\u5b58\u5668\u65f6\u600e\u4e48\u6392\u3002\u4e24\u4e2a\u8fde\u7eed\u5bc4\u5b58\u5668\u7684\u5148\u540e\u6b21\u5e8f\u3001\u6bcf\u4e2a\u5bc4\u5b58\u5668\u5185\u90e8\u4e24\u4e2a\u5b57\u8282\u7684\u6b21\u5e8f\uff0c\u5168\u7559\u7ed9\u8bbe\u5907\u5382\u5546\u81ea\u5df1\u51b3\u5b9a\u3002\n\n\u8fd9\u8bdd\u542c\u8d77\u6765\u50cf\u7529\u9505\uff0c\u4f46 1979 \u5e74\u7684 Modicon \u5de5\u7a0b\u5e08\u786e\u5b9e\u6ca1\u5fc5\u8981\u64cd\u5fc3 32 \u4f4d\u6d6e\u70b9\u6570\u2014\u2014\u5f53\u5e74 PLC \u8fde 16 \u4f4d\u6574\u6570\u90fd\u5acc\u5962\u4f88\u3002\u56db\u5341\u5e74\u540e\uff0c\u6211\u4eec\u5f97\u81ea\u5df1\u625b\u3002\n\n## \u56db\u79cd\u5b57\u8282\u5e8f\uff0c\u56db\u5f20\u56fe\u8bf4\u6e05\u695a\n\n\u5047\u8bbe\u4f60\u8bfb\u53d6\u4fdd\u6301\u5bc4\u5b58\u5668\u4ece\u5730\u5740 0\uff08Modbus \u5730\u5740 40001\uff09\u5f00\u59cb\uff0c\u8bf7\u6c42 2 \u4e2a\u5bc4\u5b58\u5668\u3002\u4ece\u7ad9\u8fd4\u56de\u7684\u62a5\u6587\u91cc\u7684\u6570\u636e\u533a\u662f\uff1a\n\n```\n`41 DB 85 1F`\n```\n\n\u8fd9\u662f\u4e00\u4e2a IEEE 754 \u5355\u7cbe\u5ea6\u6d6e\u70b9\u6570\u7684\u539f\u59cb\u5b57\u8282\u5e8f\u5217\u3002\u771f\u5b9e\u503c\u662f 27.440271...\uff08\u7ea6 27.44\uff09\u3002\u73b0\u5728\u770b\u56db\u79cd\u5b57\u8282\u5e8f\u5206\u522b\u600e\u4e48\u62fc\uff1a\n\n### ABCD\uff08\u5927\u7aef\u5e8f\uff0cModbus \u6807\u51c6\u6392\u5217\uff09\n\n\u5bc4\u5b58\u5668 40001 \u7684\u503c\u662f `0x41DB`\uff0c\u5bc4\u5b58\u5668 40002 \u7684\u503c\u662f `0x851F`\u3002\u6309\u987a\u5e8f\u62fc\u6210 32 \u4f4d\uff1a\n\n```\n\u5bc4\u5b58\u5668 40001\uff08\u9ad816\u4f4d\uff09    \u5bc4\u5b58\u5668 40002\uff08\u4f4e16\u4f4d\uff09\n+--------+--------+      +--------+--------+\n|  0x41  |  0xDB  |      |  0x85  |  0x1F  |\n+--------+--------+      +--------+--------+\n  A        B               C        D\n```\n\n\u5185\u5b58\u89c6\u89d2\uff08\u4f4e\u5730\u5740\u5230\u9ad8\u5730\u5740\uff09\uff1a`41 DB 85 1F`\n\n\u2192 float32 = **27.44**\n\n\u8fd9\u662f\u65bd\u8010\u5fb7 Modicon \u7cfb\u5217 PLC\uff08M340\u3001M580\u3001M241 \u7b49\uff09\u7684\u9ed8\u8ba4\u884c\u4e3a\u3002\u65bd\u8010\u5fb7\u4f5c\u4e3a Modbus \u534f\u8bae\u7684\u4eb2\u7239\uff0c\u4e00\u76f4\u9075\u5faa\u8fd9\u4e2a\u6807\u51c6\u6392\u5217\u2014\u2014\u5bc4\u5b58\u5668\u5730\u5740\u5c0f\u7684\u5b58\u9ad8 16 \u4f4d\uff0c\u5bc4\u5b58\u5668\u5730\u5740\u5927\u7684\u5b58\u4f4e 16 \u4f4d\u3002\u4f60\u7528 READ_VAR \u8bfb\u56de\u6765\u4e24\u4e2a WORD\uff0c\u76f4\u63a5\u62fc\u5c31\u662f\u5bf9\u7684\u3002\n\n### DCBA\uff08\u5c0f\u7aef\u5e8f\uff0c\u5b8c\u5168\u53cd\u8f6c\uff09\n\n```\n\u5bc4\u5b58\u5668 40001\uff08\u4f46\u5185\u5bb9\u53cd\u8f6c\u4e86\uff09  \u5bc4\u5b58\u5668 40002\n+--------+--------+      +--------+--------+\n|  0x1F  |  0x85  |      |  0xDB  |  0x41  |\n+--------+--------+      +--------+--------+\n```\n\n\u5185\u5b58\u89c6\u89d2\uff1a`1F 85 DB 41`\n\n\u2192 float32 = **1.5468 \u00d7 10\u207b\u00b2\u2078** \u2014\u2014\u4e00\u4e2a\u63a5\u8fd1\u96f6\u7684\u6781\u7aef\u503c\uff0c\u5c4f\u663e\u57fa\u672c\u5c31\u662f 0.0 \u6216\u6ea2\u51fa\u62a5\u9519\u3002\n\n\u90e8\u5206\u56fd\u4ea7 Modbus \u6a21\u5757\uff08\u5c24\u5176\u662f\u4e00\u4e9b\u57fa\u4e8e 51 \u5355\u7247\u673a\u6216\u65e9\u671f ARM \u88f8\u8dd1\u7684\u4eea\u8868\uff09\u7528\u8fd9\u79cd\u65b9\u5f0f\u3002\u56e0\u4e3a\u5b83\u4eec\u5185\u90e8 CPU \u662f\u5c0f\u7aef\u5e8f\uff0c\u76f4\u63a5 memcpy \u4e86\u4e8b\uff0c\u672c\u8d28\u4e0a\u5c31\u662f\u300c\u61d2\u5f97\u8f6c\u6362\u300d\u3002\u5317\u4eac\u67d0\u54c1\u724c\u7684\u667a\u80fd\u7535\u529b\u4eea\u8868\u5c31\u662f\u5178\u578b\u6848\u4f8b\uff0c\u4f60\u8bfb\u56de\u6765\u5fc5\u987b\u624b\u5de5\u505a\u5b57\u8282\u9006\u8f6c\u3002\n\n### CDAB\uff08\u5b57\u4ea4\u6362\uff0c\u5bc4\u5b58\u5668\u524d\u540e\u4e92\u6362\uff09\n\n```\n\u5bc4\u5b58\u5668 40002 \u7684\u5185\u5bb9\u653e\u524d\u9762  \u5bc4\u5b58\u5668 40001 \u7684\u5185\u5bb9\u653e\u540e\u9762\n+--------+--------+      +--------+--------+\n|  0x85  |  0x1F  |      |  0x41  |  0xDB  |\n+--------+--------+      +--------+--------+\n```\n\n\u5185\u5b58\u89c6\u89d2\uff1a`85 1F 41 DB`\n\n\u2192 float32 = **-1.096 \u00d7 10\u207b\u00b3\u00b3**\n\n\u8fd9\u662f\u897f\u95e8\u5b50 S7-1200\/S7-1500 \u505a Modbus TCP Server \u65f6\u7684\u5b9e\u9645\u884c\u4e3a\u3002\u897f\u95e8\u5b50 PLC \u5185\u90e8 REAL \u578b\u53d8\u91cf\u5360\u7528 4 \u4e2a\u5b57\u8282\uff0c\u5b58\u5230 DB \u5757\u91cc\u662f\u6807\u51c6 IEEE 754 \u683c\u5f0f\uff0c\u4f46 MB_SERVER \u6307\u4ee4\u5757\u5728\u628a\u4fdd\u6301\u5bc4\u5b58\u5668\u66b4\u9732\u7ed9 Modbus \u5ba2\u6237\u7aef\u65f6\uff0c**\u5148\u53d1\u4f4e\u5730\u5740\u5bc4\u5b58\u5668\u7684\u4f4e\u5b57\u8282\u3001\u518d\u53d1\u9ad8\u5b57\u8282\uff0c\u7136\u540e\u662f\u9ad8\u5730\u5740\u5bc4\u5b58\u5668\u7684\u4f4e\u5b57\u8282\u3001\u518d\u9ad8\u5b57\u8282**\u3002\u8fd9\u76f8\u5f53\u4e8e\u628a\u65bd\u8010\u5fb7 ABCD \u7684\u4e24\u4e2a WORD \u524d\u540e\u4e92\u6362\u3002\u4f60\u7528 Modbus Poll \u8bfb\u897f\u95e8\u5b50 PLC \u7684\u6d6e\u70b9\u6570\uff0c\u5982\u679c\u4e0d\u628a Display \u8bbe\u7f6e\u91cc\u7684 Float \u5207\u6362\u5230 \"CDAB\" \u6a21\u5f0f\uff0c\u8bfb\u51fa\u6765\u4e00\u5b9a\u662f\u5929\u6587\u6570\u5b57\u3002\n\nlibmodbus \u4e13\u95e8\u4e3a\u8fd9\u56db\u79cd\u5e8f\u63d0\u4f9b\u4e86\u56db\u7ec4\u51fd\u6570\uff1a`modbus_get_float_abcd()`\u3001`modbus_get_float_dcba()`\u3001`modbus_get_float_badc()`\u3001`modbus_get_float_cdab()`\u3002\n\n### BADC\uff08\u5b57\u8282\u4ea4\u6362\uff0c\u6bcf\u4e2a WORD \u5185\u90e8\u53cd\u8f6c\uff09\n\n```\n\u5bc4\u5b58\u5668 40001\uff08\u5185\u90e8\u5b57\u8282\u4ea4\u6362\uff09  \u5bc4\u5b58\u5668 40002\uff08\u5185\u90e8\u5b57\u8282\u4ea4\u6362\uff09\n+--------+--------+      +--------+--------+\n|  0xDB  |  0x41  |      |  0x1F  |  0x85  |\n+--------+--------+      +--------+--------+\n```\n\n\u5185\u5b58\u89c6\u89d2\uff1a`DB 41 1F 85`\n\n\u2192 float32 = **-1.457 \u00d7 10\u00b9\u2077**\n\n\u53f0\u8fbe DVP \u7cfb\u5217\u3001\u4e09\u83f1 FX3U\/FX5U \u4ee5\u53ca\u6c47\u5ddd\u90e8\u5206\u7cfb\u5217\uff08H3u\u3001H5u\uff09\u5728\u901a\u8fc7 Modbus RTU \u4f20\u8f93 32 \u4f4d\u6570\u636e\u65f6\uff0c\u5b9e\u9645\u8d70\u7684\u5c31\u662f BADC \u6392\u5217\u3002\u4e3a\u4ec0\u4e48\uff1f\u56e0\u4e3a\u8fd9\u4e9b\u65e5\u7cfb\/\u53f0\u7cfb PLC \u7684\u5185\u90e8\u6570\u636e\u5b58\u50a8\u672c\u8eab\u5c31\u662f\u300c\u5b57\u5185\u5c0f\u7aef\u300d\u2014\u2014\u5355\u4e2a 16 \u4f4d WORD \u5185\u90e8\u4f4e\u5b57\u8282\u5728\u524d\u3002\u5230\u4e86 Modbus \u4f20\u8f93\u5c42\uff0c\u5148\u53d1 WORD \u7684\u9ad8\u5b57\u8282\uff08Modbus \u8981\u6c42\uff09\uff0c\u4e8e\u662f WORD \u5185\u90e8\u53cd\u4e86\u4e00\u6b21\u3002\u4e24\u4e2a WORD \u4e4b\u95f4\u6709\u4fdd\u6301\u4e86 Modbus \u7684\u5927\u7aef\u6b21\u5e8f\u3002\u6240\u4ee5\u7ed3\u679c\u5c31\u662f BADC\uff1a\u6bcf\u4e2a WORD \u5185\u90e8\u5b57\u8282\u9006\u8f6c\uff0cWORD \u4e4b\u95f4\u4fdd\u6301 ABCD \u7684\u987a\u5e8f\u3002\n\n\u6253\u4e2a\u4e0d\u90a3\u4e48\u4e25\u8c28\u7684\u6bd4\u65b9\uff1a\u65bd\u8010\u5fb7\u662f\u4e00\u6574\u76d2\u62fc\u56fe\u6309\u987a\u5e8f\u7ed9\u4f60\uff08ABCD\uff09\uff0c\u897f\u95e8\u5b50\u662f\u5de6\u53f3\u4e24\u534a\u5148\u6362\u4f4d\u518d\u7ed9\u4f60\uff08CDAB\uff09\uff0c\u53f0\u8fbe\/\u4e09\u83f1\/\u6c47\u5ddd\u662f\u628a\u6bcf\u534a\u7684\u5185\u90e8\u5148\u7ffb\u4e2a\u9762\u518d\u6309\u987a\u5e8f\u7ed9\u4f60\uff08BADC\uff09\u3002\u81f3\u4e8e DCBA\uff0c\u90a3\u662f\u8fde\u76d2\u5b50\u5e26\u5185\u5bb9\u5168\u53cd\u4e86\u3002\n\n## \u6570\u636e\u7c7b\u578b\u8fdc\u6bd4\u5b57\u8282\u5e8f\u66f4\u9690\u853d\n\n\u540c\u4e00\u4e2a 4 \u5b57\u8282\u5e8f\u5217 `41 DB 85 1F`\uff0c\u6309\u4e0d\u540c\u6570\u636e\u7c7b\u578b\u89e3\u6790\uff1a\n\n\u89e3\u6790\u65b9\u5f0f\u7ed3\u679cfloat32\uff08IEEE 754\uff0927.44uint321,104,626,975int321,104,626,975\u4e24\u4e2a uint16 \u62fc\u63a5[16859, 34079]\n\n\u770b\u8fd9\u5dee\u5f02\uff0cfloat32 \u7684 27.44 \u548c uint32 \u7684 11 \u4ebf\uff0c\u5dee\u516b\u4e2a\u6570\u91cf\u7ea7\u3002\u5982\u679c\u4f60\u5728 SCADA \u4e0a\u770b\u5230\u4e00\u4e2a\u6e29\u5ea6\u6d4b\u70b9\u663e\u793a 1104626975.0\u2103\uff0c\u522b\u6025\u7740\u6362\u4f20\u611f\u5668\u2014\u2014\u5148\u67e5\u67e5\u662f\u4e0d\u662f\u7528 uint32 \u89e3\u6790\u4e86 float32\u3002\n\n\u8fd9\u5728\u5b9e\u9645\u5de5\u7a0b\u4e2d\u6bd4\u5b57\u8282\u5e8f\u95ee\u9898\u66f4\u9690\u853d\uff0c\u56e0\u4e3a**\u4f60\u62ff\u5230\u7684\u662f\u5bf9\u7684\u6570\uff0c\u4f46\u89e3\u91ca\u65b9\u5f0f\u662f\u9519\u7684**\u3002\u5b57\u8282\u5e8f\u4e0d\u5bf9\uff0c\u81f3\u5c11\u6570\u5b57\u662f\u4e71\u7684\uff0c\u4f60\u80fd\u4e00\u773c\u770b\u51fa\u6765\uff1b\u7c7b\u578b\u4e0d\u5bf9\uff0c\u6709\u65f6\u5019\u771f\u5c31\u8499\u6df7\u8fc7\u53bb\u4e86\u3002\n\n\u4e3e\u4e2a\u73b0\u573a\u7684\u4f8b\u5b50\u3002\u67d0\u4e2a\u5149\u4f0f\u7535\u7ad9\u7684\u9006\u53d8\u5668\u901a\u8fc7 Modbus TCP \u4e0a\u9001\u5f53\u65e5\u53d1\u7535\u91cf\uff0c\u5bc4\u5b58\u5668\u6620\u5c04\u6587\u6863\u5199\u7684\u662f\u300c40001-40002: \u5f53\u65e5\u53d1\u7535\u91cf\uff0c32 \u4f4d\u300d\u3002\u5de5\u7a0b\u5e08\u7528 int32 \u89e3\u6790\uff0c\u8bfb\u56de\u6765\u4e00\u4e2a\u6b63\u6570\uff0c\u6570\u503c\u770b\u8d77\u6765\u633a\u5408\u7406\uff0c\u4e0a\u4e86\u80fd\u8017\u5e73\u53f0\u8dd1\u4e86\u4e00\u4e2a\u6708\u3002\u76f4\u5230\u8d22\u52a1\u5bf9\u8d26\u53d1\u73b0\u5dee\u4e86 30%\uff0c\u4e00\u67e5\u624d\u77e5\u9053\u2014\u2014\u5382\u5bb6\u5b9e\u9645\u5b58\u7684\u662f **uint32**\uff0c\u6309 int32 \u89e3\u6790\u65f6\u9ad8\u4f4d\u88ab\u5f53\u6210\u7b26\u53f7\u4f4d\u5904\u7406\u4e86\uff0c\u53ea\u8981\u53d1\u7535\u91cf\u8d85\u8fc7 2,147,483,647 Wh\uff082.15 GWh\uff09\uff0c\u89e3\u6790\u503c\u5c31\u53d8\u6210\u8d1f\u6570\u3002\n\n\u6240\u4ee5\u9762\u5bf9\u4e00\u4e2a\u591a\u5bc4\u5b58\u5668\u6570\u636e\u70b9\uff0c\u4f60\u9700\u8981\u786e\u8ba4\u7684\u4e0d\u662f\u4e00\u4e2a\u53d8\u91cf\uff0c\u662f\u4e09\u4e2a\uff1a\n\n1. \u6570\u636e\u7c7b\u578b\u662f\u4ec0\u4e48\uff08float32 \/ int32 \/ uint32 \/ int64 \/ uint64 \/ double64 \/ string\uff09\uff1f\n2. \u5b57\u8282\u5e8f\u662f\u4ec0\u4e48\uff08\u56db\u79cd\u4e4b\u4e00\uff09\uff1f\n3. \u6709\u6ca1\u6709\u7f29\u653e\u56e0\u5b50\uff1f\u6bd4\u5982\u4eea\u8868\u5b58\u7684\u662f\u539f\u59cb\u503c \u00d7 10 \u8fd8\u662f \u00d7 100\uff1f\n\n\u7b2c\u4e09\u70b9\u7ecf\u5e38\u88ab\u5ffd\u7565\u3002\u5f88\u591a Modbus \u4eea\u8868\u4e3a\u4e86\u7701\u5bc4\u5b58\u5668\u3001\u907f\u514d\u6d6e\u70b9\u4f20\u8f93\uff0c\u4f1a\u628a\u6d6e\u70b9\u503c\u4e58\u4ee5 10 \u6216 100 \u540e\u8f6c\u6210 int32 \u5b58\u8fdb\u53bb\u3002\u6bd4\u5982\u8bfb\u56de\u6765 int32 = 2744\uff0c\u5b9e\u9645\u6e29\u5ea6\u662f 27.44\u2103\uff08\u00f7100\uff09\uff0c\u538b\u529b\u662f 274.4kPa\uff08\u00f710\uff09\u3002\u8fd9\u4e2a\u7f29\u653e\u56e0\u5b50\u53ea\u5728\u8bbe\u5907\u624b\u518c\u91cc\u5199\uff0c\u534f\u8bae\u62a5\u6587\u4e0a\u5b8c\u5168\u770b\u4e0d\u51fa\u6765\u3002\n\n## \u5404\u4e3b\u6d41\u5382\u5546\u7684\u5b9e\u9645\u884c\u4e3a\n\n\u8fd9\u4e00\u8282\u662f\u8fd9\u7bc7\u6587\u7ae0\u6700\u6709\u5b9e\u7528\u4ef7\u503c\u7684\u90e8\u5206\u3002\u4ee5\u4e0b\u6570\u636e\u6765\u81ea\u5b9e\u9645\u8c03\u8bd5\u8bb0\u5f55\u548c\u793e\u533a\u9a8c\u8bc1\uff0c\u4e0d\u662f\u4ea7\u54c1\u624b\u518c\u4e0a\u6284\u6765\u7684\u3002\n\n### \u65bd\u8010\u5fb7 Modicon M340\/M580\/M241\n\nModbus \u534f\u8bae\u7684\u53d1\u660e\u8005\uff0c\u884c\u4e3a\u6700\u300c\u6807\u51c6\u300d\u3002QUANTUM\u3001M340\u3001M580\u3001M241 \u5168\u7ebf\u4ea7\u54c1\u7684 Modbus TCP\/RTU \u901a\u4fe1\uff0c32 \u4f4d\u6570\u636e\uff08REAL\u3001DINT\uff09\u9ed8\u8ba4\u90fd\u662f **ABCD** \u6392\u5217\u3002\u7528 READ_VAR \u8bfb\u56de\u6765\u7684 `%MW` \u5bc4\u5b58\u5668\uff0c\u4f4e\u4f4d\u5730\u5740\u5b58\u9ad8 16 \u4f4d\uff0c\u9ad8\u4f4d\u5730\u5740\u5b58\u4f4e 16 \u4f4d\u3002\n\n\u7279\u522b\u6ce8\u610f\uff1a\u65bd\u8010\u5fb7\u7684 Unity Pro \/ EcoStruxure Control Expert \u91cc\uff0c`%MD`\uff08\u53cc\u5b57\uff09\u548c `%MF`\uff08\u6d6e\u70b9\u53cc\u5b57\uff09\u7684\u5185\u90e8\u5b58\u50a8\u4e0e Modbus \u5bc4\u5b58\u5668\u6620\u5c04\u6709\u4e00\u5c42\u8f6c\u6362\u3002`%MD0` \u5bf9\u5e94 `%MW0` \u548c `%MW1`\uff0c\u5176\u4e2d `%MW0` \u662f\u9ad8\u4f4d\uff0c`%MW1` \u662f\u4f4e\u4f4d\u2014\u2014\u6070\u597d\u662f ABCD\u3002\n\n\u7ed3\u8bba\uff1a\u65bd\u8010\u5fb7 PLC \u505a Modbus \u4ece\u7ad9\u65f6\uff0c\u4e0a\u6e38\u76f4\u63a5\u6309 ABCD \u89e3\u6790\u5373\u53ef\u3002\n\n### \u897f\u95e8\u5b50 S7-1200\/S7-1500\uff08MB_SERVER\uff09\n\n\u8fd9\u662f\u5751\u6700\u591a\u7684\u4e00\u4e2a\u3002\u897f\u95e8\u5b50\u5728 TIA Portal \u4e2d\u8c03\u7528 `MB_SERVER` \u6307\u4ee4\u5757\u505a Modbus TCP \u670d\u52a1\u5668\uff0cREAL \u578b\u53d8\u91cf\uff084 \u5b57\u8282\uff09\u5728\u4e24\u4e2a\u4fdd\u6301\u5bc4\u5b58\u5668\u91cc\u7684\u6392\u5217\u662f **CDAB**\u3002\n\n\u5177\u4f53\u539f\u7406\uff1a\u897f\u95e8\u5b50 S7-1200\/1500 \u7684 DB \u5757\u9ed8\u8ba4\u662f\u300c\u4f18\u5316\u7684\u5757\u8bbf\u95ee\u300d\uff0c\u5185\u90e8\u5b57\u8282\u6392\u5217\u4e0d\u900f\u660e\u3002\u5373\u4f7f\u4f60\u53d6\u6d88\u4e86\u4f18\u5316\uff08\u8bbe\u7f6e\u4e3a\u6807\u51c6\u8bbf\u95ee\uff09\uff0cREAL \u578b\u53d8\u91cf\u5728 DB \u4e2d\u7684\u5b57\u8282\u987a\u5e8f\u4e5f\u662f\u5c0f\u7aef\uff08Intel x86 \u5904\u7406\u5668\u51b3\u5b9a\u7684\uff09\u3002\u5f53 `MB_SERVER` \u628a\u8fd9\u4e2a REAL \u7684 4 \u4e2a\u5b57\u8282\u6620\u5c04\u5230 Modbus \u4fdd\u6301\u5bc4\u5b58\u5668\u65f6\uff0c\u5b83\u6309\u5b57\u8282\u987a\u5e8f\u4f9d\u6b21\u586b\u5145\uff1a\u5730\u5740\u5c0f\u7684\u5bc4\u5b58\u5668\u5b58\u5b57\u8282 0 \u548c 1\uff08\u8fd9\u662f REAL \u7684\u4f4e\u4f4d\u90e8\u5206\uff09\uff0c\u5730\u5740\u5927\u7684\u5bc4\u5b58\u5668\u5b58\u5b57\u8282 2 \u548c 3\uff08\u9ad8\u4f4d\u90e8\u5206\uff09\u3002\n\n\u5b9e\u9645\u6548\u679c\u5c31\u662f CDAB\u3002Modbus Poll \u7684 Display \u8bbe\u7f6e\u91cc\u5fc5\u987b\u5207\u5230 \"CDAB\" \u624d\u80fd\u770b\u5230\u6b63\u786e\u7684\u6d6e\u70b9\u6570\u3002\n\n\u5982\u679c\u4f60\u7528\u897f\u95e8\u5b50 PLC \u505a Modbus \u5ba2\u6237\u7aef\uff08`MB_CLIENT`\uff09\u53bb\u8bfb\u7b2c\u4e09\u65b9\u7684 Modbus \u4ece\u7ad9\uff0c\u540c\u6837\u9700\u8981\u6ce8\u610f\u2014\u2014\u4f60\u8bfb\u56de\u6765\u7684\u4e24\u4e2a WORD \u7684\u6392\u5217\u53d6\u51b3\u4e8e\u4ece\u7ad9\u7684\u5b57\u8282\u5e8f\uff0c\u548c\u4f60\u897f\u95e8\u5b50\u5185\u90e8\u7684 REAL \u5b58\u50a8\u662f\u4e24\u7801\u4e8b\u3002\u8fd9\u65f6\u5019\u7528\u535a\u9014 V16 \u53ca\u4ee5\u4e0a\u7248\u672c\u63d0\u4f9b\u7684 `READ_BIG` \/ `READ_LITTLE` \/ `WRITE_BIG` \/ `WRITE_LITTLE` \u6307\u4ee4\u6765\u505a\u5b57\u8282\u5e8f\u8f6c\u6362\uff0c\u6bd4\u624b\u52a8 SWAP \u52a0\u79fb\u4f4d\u8981\u53ef\u9760\u5f97\u591a\u3002\n\n### \u53f0\u8fbe DVP \u7cfb\u5217\n\n\u53f0\u8fbe DVP-ES2\/EX2\/SV2 \u7b49\u7cfb\u5217\u505a Modbus RTU \u4ece\u7ad9\u65f6\uff0c32 \u4f4d\u6d6e\u70b9\u6570\uff08F \u5bc4\u5b58\u5668\uff09\u6620\u5c04\u5230 Modbus \u4fdd\u6301\u5bc4\u5b58\u5668\u7684\u6392\u5217\u662f **BADC**\u3002\n\n\u8fd9\u8ddf\u53f0\u8fbe\u5185\u90e8\u6d6e\u70b9\u6570\u7684\u5b58\u50a8\u65b9\u5f0f\u6709\u5173\u2014\u2014\u53f0\u8fbe PLC \u7684 32 \u4f4d\u6570\u636e\u9075\u5faa\u300c\u4f4e\u4f4d\u5b58\u4f4e\u5730\u5740\u300d\u7684\u89c4\u5219\uff08\u5c0f\u7aef\uff09\uff0c\u800c Modbus RTU \u5e27\u8981\u6c42\u6bcf\u4e2a WORD \u4ee5\u5927\u7aef\u53d1\u9001\u3002\u4e8e\u662f WORD \u5185\u90e8\u5b57\u8282\u53cd\u8f6c\u4e86\u4e00\u6b21\uff0c\u4f46\u4e24\u4e2a WORD \u4e4b\u95f4\u4fdd\u6301\u4e86 PLC \u5185\u90e8\u987a\u5e8f\uff0c\u6700\u7ec8\u53d8\u6210 BADC\u3002\n\n\u5982\u679c\u4f60\u7684 WPLSoft \u91cc\u663e\u793a D0 = F100.0\uff08\u6d6e\u70b9\u6570\uff09\uff0c\u5728 Modbus Poll \u91cc\u8bfb 40001\uff5e40002\uff0cDisplay \u9009 \"BADC\"\uff0c\u770b\u5230\u7684\u5c31\u662f 100.0\u3002\u9009\u5176\u4ed6\u4e09\u79cd\u5e8f\u90fd\u662f\u4e71\u7801\u3002\n\n### \u4e09\u83f1 FX3U\/FX5U\uff08\u901a\u8fc7 Modbus \u901a\u4fe1\u6a21\u5757\uff09\n\n\u4e09\u83f1 FX3U \u52a0\u88c5 FX3U-485ADP-MB \u901a\u4fe1\u6a21\u5757\u505a Modbus RTU \u4e3b\u7ad9\u6216\u4ece\u7ad9\u65f6\uff0c32 \u4f4d\u6570\u636e\u7684\u6392\u5217\u4e5f\u662f **BADC**\u3002\u8ddf\u53f0\u8fbe\u7684\u903b\u8f91\u4e00\u6837\u2014\u2014\u65e5\u7cfb PLC \u7684\u5185\u90e8\u67b6\u6784\u5747\u4e3a\u5c0f\u7aef\u3002\n\nFX5U \u672c\u4f53\u81ea\u5e26 Modbus RTU \u529f\u80fd\uff08\u901a\u8fc7 RS-485 \u7aef\u5b50\uff09\uff0c\u7528 ADPRW \u6307\u4ee4\u505a\u901a\u4fe1\u65f6\uff0c\u8bfb\u56de\u6765\u7684 32 \u4f4d\u6570\u636e\u9700\u8981\u4f60\u7528 MOV \u6307\u4ee4\u624b\u52a8\u62fc\u3002\u4ece MODBUS \u8bfb\u56de\u4e24\u4e2a\u5bc4\u5b58\u5668 D100\u3001D101\uff0c\u5b58\u7684\u662f BADC \u6392\u5217\u7684\u539f\u59cb\u6570\u636e\uff0c\u8981\u5148\u7528 SWAP \u6307\u4ee4\u4ea4\u6362\u6bcf\u4e2a\u5bc4\u5b58\u5668\u7684\u5b57\u8282\uff0c\u518d\u7528\u9ad8\u4f4e\u4f4d\u62fc\u63a5\u6307\u4ee4\u7ec4\u5408\u6210\u6700\u7ec8\u7684 32 \u4f4d\u503c\u3002\n\n\u6211\u89c1\u8fc7\u4e0d\u6b62\u4e00\u4e2a\u9879\u76ee\u2014\u2014\u4e09\u83f1 PLC \u8bfb\u65bd\u8010\u5fb7\u53d8\u9891\u5668\u7684\u9891\u7387\uff0c\u8bfb\u56de\u6765\u53cd\u4e86\u53c8\u6ca1\u505a SWAP\uff0c\u8c03\u8bd5\u4e24\u5929\u6700\u540e\u53d1\u73b0\u5c31\u662f\u5b57\u8282\u5e8f\u7684\u9505\u3002\n\n### \u6b27\u59c6\u9f99 CP1H\/CP1L\n\n\u6b27\u59c6\u9f99 CP1 \u7cfb\u5217\u901a\u8fc7 CP1W-CIF11\uff08RS-485 \u9009\u4ef6\u677f\uff09\u505a Modbus RTU \u4ece\u7ad9\u65f6\uff0c\u4fdd\u6301\u5bc4\u5b58\u5668\u4f7f\u7528 DM \u533a\u6620\u5c04\u300232 \u4f4d\u6570\u636e\u5728\u4e24\u4e2a DM \u5b57\u4e2d\u7684\u6392\u5217\u53d6\u51b3\u4e8e\u4f60\u5982\u4f55\u7f16\u7a0b\u3002\n\nCP1 \u7cfb\u5217\u672c\u8eab\u662f\u5b57\u5bfb\u5740\u67b6\u6784\uff0c\u6ca1\u6709\u539f\u751f\u7684\u53cc\u5b57\u6570\u636e\u7c7b\u578b\u3002\u6d6e\u70b9\u6570\u8981\u7528\u4e24\u4e2a DM \u5b57\u62fc\uff0c\u6392\u5217\u987a\u5e8f\u5b8c\u5168\u7531\u4f60\u7684\u68af\u5f62\u56fe\u51b3\u5b9a\u3002\u4f46\u5927\u591a\u6570\u6807\u51c6\u5b9e\u73b0\u9075\u5faa **ABCD** \u6392\u5217\u2014\u2014\u8fd9\u548c CP1 \u7cfb\u5217\u8131\u80ce\u4e8e\u65e9\u671f\u7684 SYSMAC \u67b6\u6784\u6709\u5173\u3002\u5b9e\u9645\u8c03\u8bd5\u65f6\u5efa\u8bae\u5148\u7528\u5df2\u77e5\u503c\uff08\u6bd4\u5982\u5199\u6d6e\u70b9 1.0 = `3F80 0000` \u5230\u4e24\u4e2a DM \u5b57\uff09\u6d4b\u4e00\u6b21\u3002\n\n### \u56fd\u4ea7 PLC\uff08\u6c47\u5ddd\u3001\u6b65\u79d1\uff09\n\n\u6c47\u5ddd H3u\/H5u \u7cfb\u5217\u505a Modbus RTU \u4ece\u7ad9\uff0c32 \u4f4d\u6570\u636e\u9ed8\u8ba4 **BADC** \u6392\u5217\uff0c\u8ddf\u53f0\u8fbe\u4e00\u81f4\u3002\u4f46\u6c47\u5ddd\u7684 AM600 \u7cfb\u5217\uff08\u57fa\u4e8e CODESYS \u5e73\u53f0\uff09\u5c31\u4e0d\u4e00\u6837\u4e86\u2014\u2014CODESYS \u5185\u90e8\u5b9e\u6570\u5b58\u50a8\u662f\u6807\u51c6 IEEE 754 \u5927\u7aef\u7ed3\u6784\uff0cModbus TCP Server \u66b4\u9732\u7684\u5bc4\u5b58\u5668\u6392\u5217\u9ed8\u8ba4\u662f **ABCD**\u3002\n\n\u6c47\u5ddd Easy \u7cfb\u5217\u5c5e\u4e8e H5u \u7684\u7b80\u5316\u7248\uff0c\u7528\u4e8e\u5c0f\u578b\u8bbe\u5907\u63a7\u5236\uff0cModbus RTU \u4ece\u7ad9\u7684\u6d6e\u70b9\u6570\u6392\u5217\u540c\u6837\u662f **BADC**\u3002\n\n\u6b65\u79d1\uff08Kinco\uff09\u6709\u90e8\u5206\u578b\u53f7\u8d70 **CDAB**\uff0c\u6bd4\u5982 K2 \u7cfb\u5217\u3002\u8fd9\u70b9\u548c\u897f\u95e8\u5b50\u7c7b\u4f3c\uff0c\u56e0\u4e3a\u6b65\u79d1 K2\/K5 \u7cfb\u5217\u5728\u8f6f\u4ef6\u5c42\u9762\u501f\u9274\u4e86\u897f\u95e8\u5b50\u7684\u89e6\u5c4f\u7f16\u7a0b\u903b\u8f91\u3002\n\n\u603b\u7ed3\u4e00\u4e2a\u901f\u67e5\u8868\uff1a\n\n\u5382\u5546\/\u8bbe\u5907Modbus 32\u4f4d\u6392\u5217\u5907\u6ce8\u65bd\u8010\u5fb7 M340\/M580\/M241ABCDModbus \u539f\u5382\u6807\u51c6\u897f\u95e8\u5b50 S7-1200\/1500CDABMB_SERVER \u6307\u4ee4\u5757\u884c\u4e3a\u53f0\u8fbe DVP \u7cfb\u5217BADC\u5b57\u5185\u5b57\u8282\u4ea4\u6362\u4e09\u83f1 FX3U\/FX5UBADC\u9700 SWAP \u540e\u62fc\u63a5\u6b27\u59c6\u9f99 CP1H\/CP1LABCD\uff08\u591a\u6570\u5b9e\u73b0\uff09\u53d6\u51b3\u4e8e\u68af\u5f62\u56fe\u6c47\u5ddd H3u\/H5uBADC\u4e0e\u53f0\u8fbe\u4e00\u81f4\u6c47\u5ddd AM600 (CODESYS)ABCDCODESYS \u5e73\u53f0\u6b65\u79d1 K2 \u7cfb\u5217CDAB\u90e8\u5206\u578b\u53f7\u5178\u578b\u56fd\u4ea7\u7535\u529b\u4eea\u8868DCBA \u6216 ABCD\u9700\u9010\u4e2a\u6d4b\u8bd5\n\n\u6ce8\u610f\uff1a\u8fd9\u4e2a\u8868\u662f\u5b9e\u6d4b\u53c2\u8003\uff0c\u4e0d\u662f\u5b98\u65b9\u627f\u8bfa\u3002\u540c\u4e00\u5382\u5546\u7684\u4e0d\u540c\u578b\u53f7\u3001\u4e0d\u540c\u56fa\u4ef6\u7248\u672c\uff0c\u5b57\u8282\u5e8f\u884c\u4e3a\u53ef\u80fd\u4e0d\u540c\u3002\u4e0a\u751f\u4ea7\u73af\u5883\u4e4b\u524d\u4e00\u5b9a\u8981\u6d4b\u8bd5\u9a8c\u8bc1\u3002\n\n## Modbus Poll \u7684\u5b57\u8282\u5e8f\u5207\u6362\n\nModbus Poll \u5728 Display \u8bbe\u7f6e\u91cc\u63d0\u4f9b\u4e86\u6570\u636e\u683c\u5f0f\u5207\u6362\u529f\u80fd\u3002\u9009\u4e2d\u6570\u636e\u663e\u793a\u533a\u57df\u540e\u53f3\u952e \u2192 Format\uff0c\u53ef\u4ee5\u770b\u5230\uff1a\n\n```\nSigned       - \u6709\u7b26\u53f7 16 \u4f4d\u6574\u6570\nUnsigned     - \u65e0\u7b26\u53f7 16 \u4f4d\u6574\u6570\nHex          - \u5341\u516d\u8fdb\u5236\nBinary       - \u4e8c\u8fdb\u5236\n32-bit Signed    - 32 \u4f4d\u6709\u7b26\u53f7\u6574\u6570\n32-bit Unsigned  - 32 \u4f4d\u65e0\u7b26\u53f7\u6574\u6570\n32-bit Float     - 32 \u4f4d\u6d6e\u70b9\u6570\n64-bit Float     - 64 \u4f4d\u53cc\u7cbe\u5ea6\u6d6e\u70b9\u6570\n```\n\n\u9009\u4e86 32-bit Float \u540e\uff0c\u53f3\u4fa7\u4f1a\u5f39\u51fa\u5b57\u8282\u5e8f\u9009\u9879\uff1a\n\n```\nFloat Big-endian (ABCD)         - \u5927\u7aef\nFloat Little-endian (DCBA)      - \u5c0f\u7aef\nFloat Big-endian byte swap (BADC)   - \u5927\u7aef\u5b57\u8282\u4ea4\u6362\nFloat Little-endian byte swap (CDAB) - \u5c0f\u7aef\u5b57\u8282\u4ea4\u6362\n```\n\n\u4f60\u4e0d\u9700\u8981\u8bb0\u4f4f\u54ea\u4e2a\u5382\u5546\u7528\u54ea\u79cd\u5e8f\u3002\u8c03\u8bd5\u7684\u65f6\u5019\u56db\u79cd\u5e8f\u90fd\u5207\u4e00\u904d\uff0c\u770b\u54ea\u4e2a\u503c\u5408\u7406\u5c31\u662f\u54ea\u4e2a\u3002\u8bfb\u4e00\u4e2a\u4f60\u786e\u5b9a\u91cf\u7a0b\u8303\u56f4\u7684\u5df2\u77e5\u6d4b\u70b9\uff08\u6bd4\u5982\u73af\u5883\u6e29\u5ea6\u5728 20\uff5e30\u2103 \u4e4b\u95f4\uff09\uff0c\u56db\u79cd\u5e8f\u91cc\u53ea\u6709\u4e00\u79cd\u4f1a\u843d\u5728\u5408\u7406\u8303\u56f4\u3002\n\n## 64 \u4f4d\u6570\u636e\u7684\u5904\u7406\n\n\u7535\u91cf\u7d2f\u8ba1\u503c\u3001\u603b\u8fd0\u884c\u65f6\u95f4\u3001\u5927\u5bb9\u91cf\u6d41\u91cf\u7d2f\u79ef\u2014\u2014\u8fd9\u4e9b\u52a8\u8f84\u9700\u8981\u7528 4 \u4e2a\u5bc4\u5b58\u5668\uff088 \u5b57\u8282\uff09\u6765\u8868\u793a\u7684\u573a\u666f\uff0c\u5b57\u8282\u5e8f\u95ee\u9898\u66f4\u590d\u6742\u3002\u56e0\u4e3a\u4f60\u8981\u5904\u7406\u4e24\u5c42\u5d4c\u5957\u7684\u6392\u5217\uff1a\n\n\u7b2c\u4e00\u5c42\uff1a\u6bcf\u4e2a 32 \u4f4d DWORD \u5185\u90e8\u7684\u5b57\u8282\u5e8f\uff08\u8ddf\u524d\u9762 32 \u4f4d\u573a\u666f\u4e00\u6837\uff0c\u56db\u79cd\u53ef\u80fd\uff09\n\u7b2c\u4e8c\u5c42\uff1a\u4e24\u4e2a 32 \u4f4d DWORD \u4e4b\u95f4\u7684\u5148\u540e\u6b21\u5e8f\uff08\u5bc4\u5b58\u5668 1-2 \u662f\u9ad8\u4f4d 32 \u4f4d\u8fd8\u662f\u4f4e\u4f4d 32 \u4f4d\uff1f\uff09\n\n\u5047\u8bbe\u4f60\u8bfb 4 \u4e2a\u5bc4\u5b58\u5668\uff0c\u8fd4\u56de\u539f\u59cb\u5b57\u8282\u5e8f\u5217\uff1a\n\n```\n`41 DB 85 1F 42 C8 00 00`\n```\n\n\u5982\u679c\u6309\u7167\u300c\u5148\u9ad8 32 \u4f4d\u540e\u4f4e 32 \u4f4d\u3001\u6bcf\u4e2a 32 \u4f4d\u6309 ABCD\u300d\u2014\u2014\u8fd9\u662f\u6700\u89c4\u77e9\u7684\u6392\u5217\uff1a\n\n```\n\u9ad832\u4f4d (ABCD): 41 DB 85 1F \u2192 float32 = 27.44\n\u4f4e32\u4f4d (ABCD): 42 C8 00 00 \u2192 float32 = 100.0\n```\n\n\u6ce8\u610f\uff1a\u8fd9\u662f\u4e00\u4e2a totalizer\uff08\u7d2f\u52a0\u5668\uff09\u7684\u5178\u578b\u6784\u5efa\u65b9\u5f0f\u3002\u9ad8 32 \u4f4d\u5b58\u5927\u6570\u90e8\u5206\uff0c\u4f4e 32 \u4f4d\u5b58\u5c0f\u6570\u90e8\u5206\uff0c\u6216\u8005\u9ad8 32 \u4f4d\u5b58\u6574\u6570\u90e8\u5206\u3001\u4f4e 32 \u4f4d\u5b58\u5c0f\u6570\u90e8\u5206\u3002\u5177\u4f53\u600e\u4e48\u7ec4\u5408\u8981\u770b\u8bbe\u5907\u624b\u518c\u3002\n\n\u66f4\u5e38\u89c1\u7684\u573a\u666f\u662f uint64 \u7d2f\u8ba1\u503c\u30024 \u4e2a\u5bc4\u5b58\u5668\u6309 ABCD \u6392\u5217\uff0c\u4ece\u5bc4\u5b58\u5668\u5730\u5740\u4f4e\u5230\u9ad8\u4f9d\u6b21\u662f\uff1a\n\n```\n\u5bc4\u5b58\u56681 (MSW-High): A B  \u2192 \u5b57\u82820-1\n\u5bc4\u5b58\u56682 (MSW-Low):  C D  \u2192 \u5b57\u82822-3   } \u7ec4\u6210\u9ad832\u4f4d\n\u5bc4\u5b58\u56683 (LSW-High): E F  \u2192 \u5b57\u82824-5\n\u5bc4\u5b58\u56684 (LSW-Low):  G H  \u2192 \u5b57\u82826-7   } \u7ec4\u6210\u4f4e32\u4f4d\n```\n\n\u62fc\u6210 uint64\uff1a`(uint64_t)(reg1&lt;&lt;48 | reg2&lt;&lt;32 | reg3&lt;&lt;16 | reg4)`\uff0c\u4f46\u8fd9\u4e2a\u516c\u5f0f\u53ea\u5728 CPU \u672c\u8eab\u662f\u5927\u7aef\u5e8f\u65f6\u6210\u7acb\u3002\u4f60\u5728 x86\uff08\u5c0f\u7aef\uff09\u4e0a\u5199 C \u4ee3\u7801\uff0c\u5f97\u5012\u8fc7\u6765\u3002\n\n\u5b9e\u6d4b\u7ecf\u9a8c\uff1a\u5904\u7406 64 \u4f4d\u6570\u636e\u65f6\uff0c\u5148\u522b\u7ea0\u7ed3\u5b57\u8282\u5e8f\uff0c\u5148\u7528\u5341\u516d\u8fdb\u5236\u8bfb\u51fa 4 \u4e2a\u5bc4\u5b58\u5668\u7684\u539f\u59cb\u503c\uff0c\u6e05\u695a\u7d2f\u52a0\u5668\u662f\u5426\u5728\u589e\u957f\uff0c\u89c2\u5bdf\u589e\u957f\u7684\u65b9\u5411\u2014\u2014\u5982\u679c\u7d2f\u52a0\u5668\u6bcf\u6b21\u9012\u589e\uff0c\u770b\u53d8\u5316\u662f\u4ece\u4f4e\u5730\u5740\u5bc4\u5b58\u5668\u5f00\u59cb\u8fd8\u662f\u9ad8\u5730\u5740\u5bc4\u5b58\u5668\u5f00\u59cb\uff0c\u5c31\u77e5\u9053\u9ad8\u4f4e\u4f4d\u6392\u5217\u4e86\u3002\n\nlibmodbus \u6ca1\u6709\u76f4\u63a5\u63d0\u4f9b 64 \u4f4d\u7684\u8f6c\u6362\u51fd\u6570\uff0c\u4f60\u9700\u8981\u81ea\u5df1\u62fc\uff1a\n\n```\nuint16_t regs[4];\nmodbus_read_registers(ctx, addr, 4, regs);\n\/\/ \u5047\u8bbe ABCD \u6392\u5217\nuint64_t value = ((uint64_t)regs[0] &lt;&lt; 48) |\n                 ((uint64_t)regs[1] &lt;&lt; 32) |\n                 ((uint64_t)regs[2] &lt;&lt; 16) |\n                 ((uint64_t)regs[3]);\n```\n\n\u4f46\u8fd9\u53ea\u662f\u56db\u79cd\u5e8f\u4e2d\u7684\u4e00\u79cd\u3002\u5982\u679c\u4f60\u7684\u8bbe\u5907\u662f BADC \u6392\u5217\uff0c\u5f97\u5148\u4ea4\u6362\u6bcf\u4e2a\u5bc4\u5b58\u5668\u7684\u5b57\u8282\uff1b\u5982\u679c\u662f CDAB\uff0c\u5f97\u5148\u4ea4\u6362\u5bc4\u5b58\u5668\u5bf9\u7684\u4f4d\u7f6e\u3002\n\n## \u5b57\u7b26\u4e32\u7684\u5b58\u50a8\n\n\u8bbe\u5907\u5e8f\u5217\u53f7\u3001\u56fa\u4ef6\u7248\u672c\u53f7\u8fd9\u4e9b ASCII \u5b57\u7b26\u4e32\u5728 Modbus \u5bc4\u5b58\u5668\u91cc\u7684\u5b58\u50a8\uff0c\u6709\u4e24\u79cd\u4e3b\u6d41\u6a21\u5f0f\uff1a\n\n**\u6a21\u5f0f\u4e00\uff1a\u6bcf\u5bc4\u5b58\u5668\u5b58 2 \u4e2a\u5b57\u7b26\uff08\u6807\u51c6\u505a\u6cd5\uff09**\n\n\u6bcf\u4e2a 16 \u4f4d\u5bc4\u5b58\u5668\u5b58\u4e24\u4e2a\u5b57\u8282\uff0c\u6bcf\u5b57\u8282\u4e00\u4e2a ASCII \u5b57\u7b26\u3002\u6bd4\u5982\u5e8f\u5217\u53f7 \"SN20240001\"\uff0810 \u4e2a\u5b57\u7b26\uff09\uff0c\u9700\u8981 5 \u4e2a\u5bc4\u5b58\u5668\uff1a\n\n```\n\u5bc4\u5b58\u56681: 0x53 0x4E \u2192 &apos;S&apos; &apos;N&apos;\n\u5bc4\u5b58\u56682: 0x32 0x30 \u2192 &apos;2&apos; &apos;0&apos;\n\u5bc4\u5b58\u56683: 0x32 0x34 \u2192 &apos;2&apos; &apos;4&apos;\n\u5bc4\u5b58\u56684: 0x30 0x30 \u2192 &apos;0&apos; &apos;0&apos;\n\u5bc4\u5b58\u56685: 0x30 0x31 \u2192 &apos;0&apos; &apos;1&apos;\n```\n\n\u8bfb\u56de\u6765\u76f4\u63a5\u6309\u5b57\u8282\u53d6 ASCII \u503c\u8f6c\u5b57\u7b26\u5c31\u884c\uff0c\u4e0d\u9700\u8981\u5173\u5fc3\u5b57\u8282\u5e8f\u2014\u2014ASCII \u5b57\u7b26 `A` \u5c31\u662f `0x41`\uff0c\u65e0\u8bba\u5927\u7aef\u5c0f\u7aef\u3002\n\n**\u6a21\u5f0f\u4e8c\uff1a\u6bcf\u5bc4\u5b58\u5668\u4ec5\u4f4e\u5b57\u8282\u6709\u6548**\n\n\u67d0\u4e9b\u4eea\u8868\u5382\u5546\u5077\u61d2\uff0c\u6bcf\u4e2a\u5bc4\u5b58\u5668\u53ea\u7528\u4e86\u4f4e 8 \u4f4d\u5b58\u4e00\u4e2a\u5b57\u7b26\uff0c\u9ad8 8 \u4f4d\u662f 0x00\u3002\u540c\u6837\u7684 \"SN20240001\" \u9700\u8981 10 \u4e2a\u5bc4\u5b58\u5668\uff1a\n\n```\n\u5bc4\u5b58\u56681: 0x00 0x53 \u2192 \u7a7a &apos;S&apos;\n\u5bc4\u5b58\u56682: 0x00 0x4E \u2192 \u7a7a &apos;N&apos;\n...\n```\n\n\u8fd9\u79cd\u65b9\u5f0f\u6d6a\u8d39\u4e86\u4e00\u534a\u7684\u5bc4\u5b58\u5668\u7a7a\u95f4\uff0c\u4f46\u89e3\u6790\u7b80\u5355\u2014\u2014\u53d6\u6bcf\u4e2a\u5bc4\u5b58\u5668\u7684\u4f4e\u5b57\u8282\u5c31\u884c\u3002\n\n\u8e29\u5751\u63d0\u9192\uff1a\u5b57\u7b26\u4e32\u7684\u5b57\u8282\u5e8f\u95ee\u9898\u7edd\u5927\u591a\u6570\u65f6\u5019\u4e0d\u5b58\u5728\uff0c\u56e0\u4e3a ASCII \u662f\u5355\u5b57\u8282\u7f16\u7801\u3002\u771f\u6b63\u4f1a\u51fa\u95ee\u9898\u7684\u662f\u4f60\u7528 UTF-16 \u6216\u8005\u5176\u4ed6\u591a\u5b57\u8282\u7f16\u7801\u7684\u573a\u5408\u2014\u2014\u4f46\u90a3\u5df2\u7ecf\u4e0d\u662f Modbus \u534f\u8bae\u7684\u8303\u7574\u4e86\uff0c\u7eaf\u7cb9\u662f\u5e94\u7528\u5c42\u7684\u7f16\u7801\u9009\u62e9\u3002\n\n## \u8c03\u8bd5\u65b9\u6cd5\u8bba\n\n\u522b\u731c\uff0c\u7528\u6570\u636e\u8bf4\u8bdd\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u6807\u51c6\u7684\u5b57\u8282\u5e8f\u6392\u9519\u6d41\u7a0b\uff1a\n\n**\u7b2c\u4e00\u6b65\uff1a\u8bfb\u539f\u59cb\u5341\u516d\u8fdb\u5236**\n\n\u7528 Modbus Poll \u628a Display \u683c\u5f0f\u5207\u6210 Hex\uff0c\u5148\u8bb0\u4e0b\u539f\u59cb\u5bc4\u5b58\u5668\u503c\u3002\u4e0d\u7ba1\u5b57\u8282\u5e8f\uff0c\u5148\u770b\u88f8\u6570\u636e\u3002\n\n```\n`\u8bfb 40001-40002 \u8fd4\u56de: 41 DB 85 1F`\n```\n\n**\u7b2c\u4e8c\u6b65\uff1a\u7528\u5df2\u77e5\u503c\u53cd\u63a8**\n\n\u627e\u4e00\u4e2a\u4f60\u77e5\u9053\u771f\u5b9e\u503c\u7684\u6d4b\u70b9\u3002\u6bd4\u5982\u5f53\u524d\u6e29\u5ea6 27.44\u00b0C\u3002\u5982\u679c\u8fd9\u4e2a\u503c\u662f\u4f60\u4ece\u8bbe\u5907\u81ea\u5e26\u663e\u793a\u5c4f\u4e0a\u8bfb\u51fa\u6765\u7684\uff0c\u8bb0\u4e0b\u6765\u3002\u7136\u540e\u770b\u56db\u79cd\u5e8f\u54ea\u4e2a\u62fc\u51fa\u6765\u662f 27.44\uff0c\u90a3\u4e2a\u5c31\u662f\u6b63\u786e\u7b54\u6848\u3002\n\n\u66f4\u597d\u7684\u529e\u6cd5\u2014\u2014\u4e3b\u52a8\u5199\u4e00\u4e2a\u5df2\u77e5\u503c\u3002\u7528\u529f\u80fd\u7801 16\uff08\u5199\u591a\u4e2a\u5bc4\u5b58\u5668\uff09\u5199\u5165 `0x3F80 0000`\uff08\u8fd9\u662f float32 = 1.0 \u7684\u6807\u51c6 IEEE 754 \u8868\u793a\uff09\u5230\u5bc4\u5b58\u5668\u5bf9\uff0c\u7136\u540e\u8bfb\u56de\u6765\u3002\u770b\u539f\u59cb\u5341\u516d\u8fdb\u5236\uff1a\n\n- \u5982\u679c\u8bfb\u56de\u6765\u662f `3F 80 00 00` \u2192 ABCD\n- \u5982\u679c\u8bfb\u56de\u6765\u662f `00 00 3F 80` \u2192 DCBA\n- \u5982\u679c\u8bfb\u56de\u6765\u662f `80 3F 00 00` \u2192 BADC\n- \u5982\u679c\u8bfb\u56de\u6765\u662f `00 00 80 3F` \u2192 CDAB\n\n**\u7b2c\u4e09\u6b65\uff1a\u7528 Wireshark \u6293\u5305**\n\nModbus TCP \u7684\u7aef\u53e3\u662f 502\u3002\u5728 Wireshark \u91cc\u8fc7\u6ee4 `tcp.port == 502`\uff0c\u53f3\u952e \u2192 Decode As \u2192 Modbus\/TCP\u3002\u4f60\u770b\u5230\u7684\u54cd\u5e94\u62a5\u6587\u91cc\uff0c\u6570\u636e\u533a\u5c31\u662f\u539f\u59cb\u5b57\u8282\u5e8f\u5217\u3002\u62ff\u8fd9\u4e2a\u5e8f\u5217\u8ddf\u4f60\u7684\u89e3\u6790\u7ed3\u679c\u5bf9\u6bd4\uff1a\n\n```\nWireshark \u62a5\u6587:\n    Modbus\/TCP\n        Transaction Identifier: 1\n        Protocol Identifier: 0\n        Length: 7\n        Unit Identifier: 1\n        Function Code: 3 (Read Holding Registers)\n        Byte Count: 4\n        Register 0 (40001): 0x41db\n        Register 1 (40002): 0x851f\n```\n\nWireshark \u5c55\u793a\u7684\u5bc4\u5b58\u5668\u503c\u662f\u5b83\u6309\u5927\u7aef\u89e3\u6790\u7684\u7ed3\u679c\u3002\u5982\u679c\u4f60\u7684 PLC \u5185\u90e8\u662f BADC\uff0c\u90a3 Wireshark \u5c55\u793a\u7684 `0x41db` \u548c `0x851f` \u5df2\u7ecf\u4e0d\u662f\u539f\u59cb\u5b57\u8282\u5e8f\u5217\u4e86\u2014\u2014\u539f\u59cb\u5b57\u8282\u5e8f\u5217\u5e94\u8be5\u662f `DB 41 1F 85`\u3002\n\n\u8fd9\u5c31\u662f\u4e3a\u4ec0\u4e48\u8c03\u8bd5\u5b57\u8282\u5e8f\u95ee\u9898\u7684\u65f6\u5019\uff0c\u66f4\u5e94\u8be5\u770b **Wireshark \u7684\u5341\u516d\u8fdb\u5236 dump** \u800c\u4e0d\u662f\u5b83\u5e2e\u4f60\u89e3\u6790\u597d\u7684\u5bc4\u5b58\u5668\u503c\u3002\u5728\u62a5\u6587\u8be6\u60c5\u91cc\u5c55\u5f00 \"Data\" \u5b57\u6bb5\uff0c\u770b\u539f\u59cb\u5b57\u8282\u3002\n\n**\u7b2c\u56db\u6b65\uff1a\u5728\u7ebf\u5b57\u8282\u5e8f\u8ba1\u7b97\u5668**\n\n\u6982\u5ff5\u5f88\u7b80\u5355\u2014\u2014\u4f60\u8f93\u5165 4 \u4e2a\u5341\u516d\u8fdb\u5236\u5b57\u8282\uff0c\u5b83\u7ed9\u4f60\u7b97\u51fa\u56db\u79cd\u5e8f\u5bf9\u5e94\u7684 float32\u3001int32\u3001uint32 \u503c\uff0c\u4e00\u773c\u770b\u51fa\u54ea\u4e2a\u662f\u6b63\u786e\u7b54\u6848\u3002\n\n\u5982\u679c\u6ca1\u6709\u73b0\u6210\u7684\uff0c\u81ea\u5df1\u5199\u4e00\u4e2a\u4e5f\u4e0d\u590d\u6742\uff1a\n\n```\n#include &lt;stdio.h&gt;\n#include &lt;stdint.h&gt;\n#include &lt;string.h&gt;\n\nvoid print_float(uint8_t *bytes) {\n    float f;\n    memcpy(&amp;f, bytes, 4);\n    printf(&quot;float32: %fn&quot;, f);\n}\n\nint main() {\n    uint8_t data[4] = {0x41, 0xDB, 0x85, 0x1F};\n\n    uint8_t abcd[4] = {data[0], data[1], data[2], data[3]};\n    uint8_t dcba[4] = {data[3], data[2], data[1], data[0]};\n    uint8_t badc[4] = {data[1], data[0], data[3], data[2]};\n    uint8_t cdab[4] = {data[2], data[3], data[0], data[1]};\n\n    printf(&quot;ABCD: &quot;); print_float(abcd);\n    printf(&quot;DCBA: &quot;); print_float(dcba);\n    printf(&quot;BADC: &quot;); print_float(badc);\n    printf(&quot;CDAB: &quot;); print_float(cdab);\n\n    return 0;\n}\n```\n\n## \u9644\u5f55\uff1aModbus CRC-16 \u67e5\u8868\u6cd5 C \u8bed\u8a00\u5b9e\u73b0\n\n\u5b57\u8282\u5e8f\u95ee\u9898\u7ecf\u5e38\u548c CRC \u6821\u9a8c\u7684\u5b57\u8282\u5e8f\u6df7\u5728\u4e00\u8d77\u2014\u2014\u4e0d\u662f\u8bf4\u7b97\u6cd5\u6709\u95ee\u9898\uff0c\u800c\u662f **CRC \u8ba1\u7b97\u7ed3\u679c\u7684\u4e24\u4e2a\u5b57\u8282\u5728\u62a5\u6587\u91cc\u8c01\u5148\u53d1\u8c01\u540e\u53d1**\uff0c\u4e0d\u540c\u6587\u6863\u5199\u7684\u4e0d\u4e00\u6837\u3002\n\nModbus \u89c4\u8303\u660e\u786e\uff1aCRC-16 \u7684**\u4f4e\u5b57\u8282\u5148\u53d1**\u3002\u4e5f\u5c31\u662f\u8bf4 CRC \u8ba1\u7b97\u7ed3\u679c\u662f `0x1234`\uff0c\u90a3\u4e48\u62a5\u6587\u91cc\u6700\u540e\u4e24\u4e2a\u5b57\u8282\u662f `34 12`\uff0c\u4e0d\u662f `12 34`\u3002\n\n\u4e0b\u9762\u7684\u67e5\u8868\u6cd5\u5b9e\u73b0\u76f4\u63a5\u8fd4\u56de\u7b26\u5408 Modbus \u89c4\u8303\u7684\u7ed3\u679c\u2014\u2014\u4f4e\u5b57\u8282\u5728\u524d\uff0c\u53ef\u4ee5\u76f4\u63a5\u8ffd\u52a0\u5230\u62a5\u6587\u672b\u5c3e\u3002\n\n```\n#include &lt;stdint.h&gt;\n\n\/* CRC-16 Modbus \u67e5\u627e\u8868 *\/\nstatic const uint16_t crc16_table[256] = {\n    0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241,\n    0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440,\n    0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40,\n    0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841,\n    0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, 0x1A40,\n    0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41,\n    0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641,\n    0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040,\n    0xF001, 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240,\n    0x3600, 0xF6C1, 0xF781, 0x3740, 0xF501, 0x35C0, 0x3480, 0xF441,\n    0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41,\n    0xFA01, 0x3AC0, 0x3B80, 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840,\n    0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41,\n    0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, 0x2C40,\n    0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, 0xE7C1, 0xE681, 0x2640,\n    0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041,\n    0xA001, 0x60C0, 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240,\n    0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, 0xA441,\n    0x6C00, 0xACC1, 0xAD81, 0x6D40, 0xAF01, 0x6FC0, 0x6E80, 0xAE41,\n    0xAA01, 0x6AC0, 0x6B80, 0xAB41, 0x6900, 0xA9C1, 0xA881, 0x6840,\n    0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41,\n    0xBE01, 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40,\n    0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, 0xB681, 0x7640,\n    0x7200, 0xB2C1, 0xB381, 0x7340, 0xB101, 0x71C0, 0x7080, 0xB041,\n    0x5000, 0x90C1, 0x9181, 0x5140, 0x9301, 0x53C0, 0x5280, 0x9241,\n    0x9601, 0x56C0, 0x5780, 0x9741, 0x5500, 0x95C1, 0x9481, 0x5440,\n    0x9C01, 0x5CC0, 0x5D80, 0x9D41, 0x5F00, 0x9FC1, 0x9E81, 0x5E40,\n    0x5A00, 0x9AC1, 0x9B81, 0x5B40, 0x9901, 0x59C0, 0x5880, 0x9841,\n    0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40,\n    0x4E00, 0x8EC1, 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41,\n    0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, 0x8641,\n    0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040\n};\n\n\/*\n * \u8ba1\u7b97 Modbus CRC-16\uff0c\u8fd4\u56de\u7b26\u5408 Modbus \u5e27\u683c\u5f0f\u7684\u7ed3\u679c\n * \u4f4e\u5b57\u8282\u5728\u524d\uff08\u4f4e\u5730\u5740\uff09\uff0c\u53ef\u76f4\u63a5\u8ffd\u52a0\u5230\u62a5\u6587\u672b\u5c3e\n *\/\nuint16_t crc16_modbus(const uint8_t *data, uint16_t len)\n{\n    uint8_t crc_hi = 0xFF;\n    uint8_t crc_lo = 0xFF;\n    uint8_t idx;\n\n    while (len--) {\n        idx = crc_hi ^ *data++;\n        crc_hi = crc_lo ^ (uint8_t)(crc16_table[idx] &gt;&gt; 8);\n        crc_lo = (uint8_t)(crc16_table[idx] &amp; 0xFF);\n    }\n\n    \/*\n     * \u8fd4\u56de 16 \u4f4d CRC \u503c\n     * \u4f7f\u7528\u65f6\u8ffd\u52a0\u5230 Modbus RTU \u5e27\u672b\u5c3e\uff1a\n     *   frame[len]   = crc &amp; 0xFF;        \/\/ \u4f4e\u5b57\u8282\u5728\u524d\n     *   frame[len+1] = (crc &gt;&gt; 8) &amp; 0xFF; \/\/ \u9ad8\u5b57\u8282\u5728\u540e\n     *\/\n    return ((uint16_t)crc_lo &lt;&lt; 8) | crc_hi;\n}\n```\n\n\u8fd9\u91cc\u6709\u4e2a\u7ec6\u8282\u503c\u5f97\u6ce8\u610f\uff1a\u5982\u679c\u4f60\u770b\u5176\u4ed6\u4e00\u4e9b CRC-16 \u7684\u5b9e\u73b0\uff0c\u6709\u7684\u8fd4\u56de\u7ed3\u679c\u662f\u9ad8\u5b57\u8282\u5728\u524d\u3001\u6709\u7684\u4f4e\u5b57\u8282\u5728\u524d\u3002\u533a\u522b\u5728\u4e8e `return` \u8bed\u53e5\u2014\u2014`(crc_lo &lt;&lt; 8) | crc_hi` \u548c `(crc_hi &lt;&lt; 8) | crc_lo` \u662f\u53cd\u7684\u3002Modbus \u89c4\u8303\u8bf4 CRC \u57df\u662f\u300c\u4f4e\u5b57\u8282\u5728\u524d\u300d\uff0c\u6240\u4ee5\u4e0a\u9762\u8fd9\u4e2a\u5b9e\u73b0\u8fd4\u56de\u4e00\u4e2a uint16_t\uff0c\u4f46\u4f60\u77e5\u9053\u4f4e 8 \u4f4d\u662f CRC \u7684\u4f4e\u5b57\u8282\uff0c\u9ad8 8 \u4f4d\u662f CRC \u7684\u9ad8\u5b57\u8282\u3002\u8ffd\u52a0\u5230\u62a5\u6587\u65f6\uff0c\u5148\u5199 `(crc &amp; 0xFF)`\uff0c\u518d\u5199 `((crc &gt;&gt; 8) &amp; 0xFF)`\u3002\n\n\u5982\u679c\u4f60\u7528 `return (crc_hi &lt;&lt; 8) | crc_lo`\uff0c\u90a3\u8ffd\u52a0\u987a\u5e8f\u5c31\u5f97\u53cd\u8fc7\u6765\u2014\u2014\u8fd9\u4e5f\u662f\u5f88\u591a\u8c03\u8bd5\u65f6\u53d1\u73b0\u300cCRC \u6821\u9a8c\u603b\u662f\u9519\u300d\u7684\u539f\u56e0\u4e4b\u4e00\u3002\n\n\u6709\u95ee\u9898\u518d\u804a\u3002\u4e0b\u6b21\u9047\u5230\u5b57\u8282\u5e8f\u4e0d\u5bf9\u7684\u60c5\u51b5\uff0c\u76f4\u63a5\u62ff\u8fd9\u56db\u4e2a\u5b57\u8282\u8dd1\u4e00\u5708 ABCD\/DCBA\/BADC\/CDAB\uff0c\u6bd4\u4f60\u7ffb\u5382\u5bb6\u624b\u518c\u5feb\u3002\n\n---\n*modbus.cn*\n"