[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 address that is transmitted to the device.

Note: In Modbus addressing, the first digit of the address specifies the primary table. The remaining digits represent the device's data item. The maximum value is a two byte unsigned integer (65,535). Six digits are required to represent the entire address table and item.

Primary TableDescription
0Output Coils
1Input Coils
3Internal Registers
4Holding Registers

Note: The difference between the number of digits in the device documentation is caused by the evolution in Modbus devices. Early devices generally only supported a maximum of 9999 data items for each address type, whereas newer devices can support a maximum of 65535 data items. For example, "400001" to "465535".


參考網址:
https://my.kepware.com/kep_kb/?solution=/_ui/selfservice/pkb/PublicKnowledgeSolution/d?&id=50140000000HaqH

留言

這個網誌中的熱門文章

[Excel]將圖片放置於儲存格中

[電腦軟體]偵測遠端電腦的網路 Port是否開啟

[軟體]AUTOCAD關於開啟圖面時,字型找不到,而要手動指定成 chineset.shx 字型檔問題