產(chǎn)品展示
聯(lián)系我們
聯(lián)系人:麥女士
手機(jī):+86 15270269218
電話:
Q Q:3136378118
郵箱:stodcdcs@gmail.com
地址:江西省九江市瑞昌市東益路23號(hào)賽湖農(nóng)商城401號(hào)
MVI46-103M
雖然上述信息可以處理大多數(shù)設(shè)備,但有些設(shè)備
制造商以不同的方式顯示其Modbus地址。
常見的兩種方案是六位數(shù)尋址(400101、301000、,
一些設(shè)備已將其地址顯示為偏移地址(如
Modbus通信線路上實(shí)際輸出的地址)。這是一個(gè)
實(shí)例
實(shí)際值(輸入寄存器)地址:0200到0E1F
狀態(tài)0200開關(guān)輸入狀態(tài)
0201 LED狀態(tài)標(biāo)志
0202 LED屬性標(biāo)志
0203輸出繼電器狀態(tài)標(biāo)志
如果您的設(shè)備制造商給您這樣的地址,“輸入寄存器”,那么
您將使用功能代碼4,然后在
DevAddress字段。此外,大多數(shù)顯示這種尋址方式的制造商將
以十六進(jìn)制列出地址,如上所示的設(shè)備就是這樣。所以對(duì)于這個(gè)
示例設(shè)備,使用Func=4(輸入寄存器),DevAddress為512
十進(jìn)制(200h)讀取“開關(guān)輸入狀態(tài)”值。
為什么我的奴隸顯示400001或301345這樣的地址?
對(duì)于6位尋址,使用與相同的功能代碼和配置
如上所述,只更改了起始地址。
下面是一個(gè)有助于您的DevAddress配置的定義:
功能代碼1、5或15 DevAddress=設(shè)備中的Modbus地址-0001
示例:Modbus地址0001=DevaAddress 0
Modbus地址1378=DevaAddress 1377
功能代碼2 DevaAddress=設(shè)備中的Modbus地址-100001
示例:Modbus地址100001=DevaAddress 0
Modbus地址100345=DevaAddress 344
功能代碼3、6或16 DevAddress=設(shè)備中的Modbus地址-400001
示例:Modbus地址400001=DevaAddress 0
Modbus地址400591=DevaAddress 590
功能代碼4 DevaAddress=設(shè)備中的Modbus地址-300001
示例:Modbus地址300001=DevaAddress 0
Modbus地址304290=DevaAddress 4289
例如,上面列出的設(shè)備可以如下所示顯示其地址。
要讀取相同的參數(shù)“Switch\u Input\u Status”,您仍然需要發(fā)出
函數(shù)代碼4,并使用512十進(jìn)制的DevAddress。



While the above information will handle most devices, some device manufacturers show their Modbus addressing differently. The two most common schemes are six-digit addressing (400101, 301000, etc…) and some devices show their addressing already as an offset address (the address that actually goes out on the Modbus communication line). This is an example. Actual Values (Input Registers) Addresses: 0200 to 0E1F STATUS 0200 Switch Input Status 0201 LED Status Flags 0202 LED Attribute Flags 0203 Output Relay Status Flags If your device manufacturer gives you addressing like this, "Input Registers" then you will use Function Code 4, and then place the address shown in the DevAddress field. Also, most manufacturers that show this type of addressing will list the address in hex, as is the case with the device shown above. So for this example device, use Func = 4 (Input Registers) with a DevAddress of 512 decimal (200h) to read the "Switch Input Status" value. Why does my Slave show addressing such as 400,001 or 301,345? For the 6 digit addressing, use the same function codes and configuration as configured above, just the starting address has changed. Below is a definition that will help with your DevAddress configuration: Function Codes 1, 5, or 15 DevAddress = Modbus address in device - 0001 Example: Modbus address 0001 = DevAddress 0 Modbus address 1378 = DevAddress 1377 Function Code 2 DevAddress = Modbus address in device - 100001 Example: Modbus address 100001 = DevAddress 0 Modbus address 100345 = DevAddress 344 Function Codes 3, 6, or 16 DevAddress = Modbus address in device - 400001 Example: Modbus address 400001 = DevAddress 0 Modbus address 400591 = DevAddress 590 Function Code 4 DevAddress = Modbus address in device - 300001 Example: Modbus address 300001 = DevAddress 0 Modbus address 304290 = DevAddress 4289 For example, our device listed above could show their addressing as follows. To read the same parameter "Switch_Input_Status", you would still issue a Function Code 4, and use a DevAddress of 512 decimal.
相關(guān)產(chǎn)品