[SI]Modbus 通訊協定 資料位址 五位數 和 六位數 問題(About Modbus protocol 5 digit addressing vs 6 digit addressing)
在使用modbus通訊的時候,大多的通訊位址包含了function code為五位數(40003,40123..之類的),而卻也有些設備是六位數,在此說明一下兩者有什麼差異。 在kepware的網站上面有類似的說明,意思是~~~兩者其實沒有差異,在通訊的解析上,41,401,4001,40001這些其實都是一樣的位址,也就是4x1的意思。 所以直接破解了五位數位址和六位數位址的迷思,其實modbus的通訊位址最大可以到65535,也就是465535(4xFFFF)。 給有迷思的朋友參考。 下列為kepware網址說明的原文及頁面連結。 from kepware Modbus: 5 Digit Addressing vs. 6 Digit Addressing Problem: Although addresses are specified in the device's manual as 0xxxx, 1xxxx, 3xxxx, or 4xxxx, the address is padded with an extra zero once it is applied to the Address field of a Modbus tag. For example, "40001" becomes "400001". Solution: There is no difference between the two addresses. In a Modbus device, the same item can be represented by the following addresses: "41", "401", "4001", "40001", and "400001". Modbus drivers support the data items' full range, and will pad any address to six digits in the User Interface. This will not affect the actual add...