{"id":56398,"date":"2023-10-17T15:33:11","date_gmt":"2023-10-17T07:33:11","guid":{"rendered":"https:\/\/www.techphant.cn\/blog\/56398.html"},"modified":"2023-10-17T15:33:11","modified_gmt":"2023-10-17T07:33:11","slug":"bzdmycm","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/56398.html","title":{"rendered":"\u6807\u51c6\u7684Modbus\u6709CRC\u5417\uff1f"},"content":{"rendered":"

  Modbus\u662f\u4e00\u79cd\u4e32\u884c\u901a\u4fe1\u534f\u8bae\uff0c\u5b83\u7528\u4e8e\u5728\u5de5\u4e1a\u81ea\u52a8\u5316\u73af\u5883\u4e2d\u7684\u63a7\u5236\u5668\u548c\u8bbe\u5907\u4e4b\u95f4\u4f20\u8f93\u6570\u636e\u3002\u5b83\u662f\u4e00\u79cd\u53ef\u9760\u7684\u3001\u7b80\u5355\u7684\u3001\u5bb9\u6613\u5b9e\u65bd\u7684\u534f\u8bae\uff0c\u5b83\u53ef\u4ee5\u63d0\u4f9b\u9ad8\u6548\u7684\u6570\u636e\u4f20\u8f93\u3002\u4f46\u662f\uff0cModbus\u534f\u8bae\u662f\u5426\u5305\u542bCRC\uff08\u5faa\u73af\u5197\u4f59\u6821\u9a8c\uff09\uff1f<\/p>\n

\u4ec0\u4e48\u662fCRC\uff1f<\/h2>\n

  CRC\u662fCyclic Redundancy Check\u7684\u7f29\u5199\uff0c\u4e5f\u79f0\u4e3a\u5faa\u73af\u5197\u4f59\u68c0\u67e5\uff0c\u662f\u4e00\u79cd\u6570\u636e\u6821\u9a8c\u6280\u672f\uff0c\u5b83\u53ef\u4ee5\u68c0\u6d4b\u6570\u636e\u4f20\u8f93\u4e2d\u7684\u6f5c\u5728\u9519\u8bef\u3002\u5b83\u901a\u8fc7\u8ba1\u7b97\u7279\u5b9a\u7b97\u6cd5\u8ba1\u7b97\u51fa\u4e00\u4e2a\u7279\u5b9a\u7684\u6570\u5b57\uff0c\u8fd9\u4e2a\u6570\u5b57\u88ab\u79f0\u4e3aCRC\u503c\uff0c\u5b83\u53ef\u4ee5\u7528\u6765\u8868\u793a\u6570\u636e\u7684\u5b8c\u6574\u6027\u3002\u5982\u679c\u5728\u6570\u636e\u4f20\u8f93\u8fc7\u7a0b\u4e2d\u53d1\u751f\u4e86\u9519\u8bef\uff0cCRC\u503c\u4e5f\u4f1a\u53d1\u751f\u53d8\u5316\uff0c\u4ece\u800c\u68c0\u6d4b\u51fa\u9519\u8bef\u3002<\/p>\n

\u6807\u51c6\u7684Modbus\u534f\u8bae\u662f\u5426\u5305\u542bCRC\uff1f<\/h2>\n

  \u6807\u51c6Modbus\u534f\u8bae\u662f\u4e0d\u5305\u542bCRC\u7684\u3002\u5b83\u53ea\u5305\u542b\u4e00\u4e2a\u57fa\u672c\u7684CRC\u6821\u9a8c\uff0c\u4f46\u662f\u8fd9\u4e2a\u6821\u9a8c\u4e0d\u591f\u5f3a\u5927\uff0c\u65e0\u6cd5\u6709\u6548\u68c0\u6d4b\u51fa\u6570\u636e\u4f20\u8f93\u4e2d\u7684\u6f5c\u5728\u9519\u8bef\u3002<\/p>\n

  Modbus\u534f\u8bae\u7684\u5c40\u9650\u6027<\/h3>\n

  \u7531\u4e8eModbus\u534f\u8bae\u6ca1\u6709\u5f3a\u5927\u7684CRC\u6821\u9a8c\uff0c\u6240\u4ee5\u5b83\u5728\u6570\u636e\u4f20\u8f93\u4e2d\u5b58\u5728\u4e00\u5b9a\u7684\u5c40\u9650\u6027\u3002\u9996\u5148\uff0c\u5b83\u53ef\u80fd\u4f1a\u51fa\u73b0\u6570\u636e\u4e22\u5931\u7684\u60c5\u51b5\uff0c\u8fd9\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6570\u636e\u4f20\u8f93\u51fa\u73b0\u9519\u8bef\u3002\u5176\u6b21\uff0c\u7531\u4e8eModbus\u534f\u8bae\u7684\u6570\u636e\u5e27\u957f\u5ea6\u6709\u9650\uff0c\u6240\u4ee5\u5b83\u4e0d\u80fd\u6709\u6548\u5730\u5904\u7406\u5927\u91cf\u7684\u6570\u636e\u3002\u6b64\u5916\uff0c\u5b83\u4e5f\u4e0d\u80fd\u6709\u6548\u5730\u5904\u7406\u590d\u6742\u7684\u6570\u636e\u7ed3\u6784\u3002<\/p>\n

  \u4f7f\u7528Modbus\u534f\u8bae\u65f6\u5e94\u8be5\u6ce8\u610f\u4ec0\u4e48\uff1f<\/h3>\n

  \u5728\u4f7f\u7528Modbus\u534f\u8bae\u65f6\uff0c\u5e94\u8be5\u6ce8\u610f\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n