{"id":79212,"date":"2023-12-31T11:47:20","date_gmt":"2023-12-31T03:47:20","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=79212"},"modified":"2023-12-31T11:47:20","modified_gmt":"2023-12-31T03:47:20","slug":"srljmjyjsq","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/79212.html","title":{"rendered":"\u6df1\u5165\u4e86\u89e3Modbus CRC\u6821\u9a8c\u8ba1\u7b97\u5668"},"content":{"rendered":"
Modbus CRC\u6821\u9a8c\u8ba1\u7b97\u5668\u662f\u4e00\u79cd\u5e38\u7528\u4e8e\u901a\u4fe1\u534f\u8bae\u4e2d\u7684\u6821\u9a8c\u65b9\u6cd5\uff0c\u901a\u8fc7\u5bf9\u6570\u636e\u8fdb\u884c\u5faa\u73af\u5197\u4f59\u6821\u9a8c\uff0c\u786e\u4fdd\u901a\u4fe1\u6570\u636e\u7684\u51c6\u786e\u6027\u3002\u4eca\u5929\u6211\u4eec\u5c06\u4ecb\u7ecdModbus CRC\u6821\u9a8c\u8ba1\u7b97\u5668\u7684\u539f\u7406\u3001\u5e94\u7528\u573a\u666f\u4ee5\u53ca\u5728\u5de5\u4e1a\u63a7\u5236\u9886\u57df\u4e2d\u7684\u91cd\u8981\u6027\u3002<\/p>\n
Modbus CRC\u6821\u9a8c\u8ba1\u7b97\u5668\u7684\u539f\u7406\u6d89\u53ca\u5230\u5faa\u73af\u5197\u4f59\u6821\u9a8c\uff08Cyclic Redundancy Check\uff0cCRC\uff09\uff0c\u5b83\u901a\u8fc7\u7279\u5b9a\u7684\u7b97\u6cd5\u5bf9\u6570\u636e\u8fdb\u884c\u8ba1\u7b97\uff0c\u751f\u6210\u4e00\u4e2a\u6821\u9a8c\u503c\uff0c\u5c06\u5176\u9644\u52a0\u5230\u6570\u636e\u5e27\u4e2d\uff0c\u63a5\u6536\u65b9\u5728\u63a5\u6536\u5230\u6570\u636e\u540e\u540c\u6837\u8fdb\u884cCRC\u8ba1\u7b97\uff0c\u5e76\u5c06\u8ba1\u7b97\u5f97\u5230\u7684\u6821\u9a8c\u503c\u4e0e\u63a5\u6536\u5230\u7684\u6821\u9a8c\u503c\u8fdb\u884c\u6bd4\u5bf9\uff0c\u4ece\u800c\u5224\u65ad\u6570\u636e\u7684\u51c6\u786e\u6027\u3002<\/p>\n
Modbus\u534f\u8bae\u4e2d\u5e38\u7528\u7684CRC\u6821\u9a8c\u7b97\u6cd5\u4e3aModbus CRC-16\uff0c\u5b83\u91c7\u7528\u591a\u9879\u5f0f0xA001\u8fdb\u884c\u8ba1\u7b97\uff0c\u5bf9\u8f93\u5165\u7684\u6570\u636e\u8fdb\u884c\u4f4d\u64cd\u4f5c\u548c\u5f02\u6216\u8fd0\u7b97\uff0c\u6700\u7ec8\u5f97\u5230\u4e00\u4e2a16\u4f4d\u7684\u6821\u9a8c\u503c\uff0c\u7528\u4e8e\u786e\u8ba4\u6570\u636e\u7684\u5b8c\u6574\u6027\u3002<\/p>\n
CRC\u6821\u9a8c\u8ba1\u7b97\u5668\u7684\u8ba1\u7b97\u65b9\u6cd5\u53ef\u4ee5\u901a\u8fc7\u4e13\u95e8\u8bbe\u8ba1\u7684\u8f6f\u4ef6\u6216\u5728\u7ebf\u5de5\u5177\u8fdb\u884c\uff0c\u7528\u6237\u53ea\u9700\u8f93\u5165\u5f85\u53d1\u9001\u7684\u6570\u636e\uff0c\u8ba1\u7b97\u5668\u5373\u53ef\u81ea\u52a8\u8fdb\u884cCRC\u6821\u9a8c\u503c\u7684\u8ba1\u7b97\uff0c\u5e76\u5c06\u5176\u9644\u52a0\u5230\u6570\u636e\u5e27\u4e2d\u3002<\/p>\n
Modbus CRC\u6821\u9a8c\u8ba1\u7b97\u5668\u5e7f\u6cdb\u5e94\u7528\u4e8e\u5de5\u4e1a\u63a7\u5236\u9886\u57df\u7684\u901a\u4fe1\u8bbe\u5907\u4e2d\uff0c\u4f8b\u5982PLC\uff08Programmable Logic Controller\uff09\u3001\u4f20\u611f\u5668\u3001\u4eea\u8868\u7b49\uff0c\u786e\u4fdd\u6570\u636e\u5728\u901a\u4fe1\u8fc7\u7a0b\u4e2d\u7684\u51c6\u786e\u4f20\u8f93\u3002\u5b83\u4e5f\u5e38\u7528\u4e8e\u4e32\u884c\u901a\u4fe1\u534f\u8bae\uff0c\u5982Modbus RTU<\/a>\u548cModbus ASCII\u3002<\/p>\n \u5728\u5de5\u4e1a\u81ea\u52a8\u5316\u7cfb\u7edf\u4e2d\uff0c\u6570\u636e\u7684\u51c6\u786e\u6027\u81f3\u5173\u91cd\u8981\uff0c\u4efb\u4f55\u9519\u8bef\u7684\u6570\u636e\u4f20\u8f93\u90fd\u53ef\u80fd\u5bfc\u81f4\u4e25\u91cd\u7684\u540e\u679c\uff0c\u56e0\u6b64Modbus CRC<\/a>\u6821\u9a8c\u8ba1\u7b97\u5668\u5728\u4fdd\u969c\u6570\u636e\u901a\u4fe1\u53ef\u9760\u6027\u65b9\u9762\u53d1\u6325\u7740\u4e0d\u53ef\u66ff\u4ee3\u7684\u4f5c\u7528\u3002<\/p>\n \u5728\u5de5\u4e1a\u81ea\u52a8\u5316\u4e2d\u7684\u91cd\u8981\u6027<\/h3>\n
\u901a\u4fe1\u534f\u8bae\u4e2d\u7684\u5e94\u7528<\/h3>\n