使用說明
繼續(xù)軟件描述“04(0x04)讀取輸入寄存器”請(qǐng)求有效寄存器起始地址0有效寄存器數(shù)量1響應(yīng)字節(jié)計(jì)數(shù)2值寄存器輸入狀態(tài)位0..3“03(0x03)讀取保持寄存器”請(qǐng)求無效寄存器起始地址0..1或66有效寄存器數(shù)量2或1響應(yīng)功能碼、字節(jié)計(jì)數(shù)、,寄存器值寄存器0:值寄存器1:值寄存器66通信監(jiān)控的時(shí)間常數(shù)。寄存器值=0(0x0000)沒有通信監(jiān)視,所有其他值用于通信監(jiān)控,解決方案為10 ms。0x0000至0xFFFF=>0至655.35秒=10.9分鐘位信息0 0=狀態(tài)繼電器1關(guān)閉1=狀態(tài)繼電器2關(guān)閉1=通過總線1切換的狀態(tài)繼電器2 0=通過手動(dòng)控制切換的繼電器1 0=通過總線2切換的繼電器2位信息0 0=重置后的初始狀態(tài)或通信控制繼電器1關(guān)閉1=重置后初始狀態(tài)或通訊控制繼電器1 1 0=重置或通訊控制中繼2關(guān)閉1=復(fù)位后初始狀態(tài),或通信控制中繼2在繼續(xù)軟件描述“06(0x06)寫入單寄存器”請(qǐng)求寄存器地址0或1或66寄存器值位0–1根據(jù)表或以上請(qǐng)求“16(0x10)寫入多個(gè)寄存器”請(qǐng)求有效寄存器起始地址0或1有效寄存器數(shù)量1.2字節(jié)計(jì)數(shù)2 x寄存器數(shù)量寄存器值數(shù)量x 2字節(jié)位0–3根據(jù)表響應(yīng)功能代碼、寄存器起始地址
寄存器數(shù)量9.2使用Modbus命令奇偶校驗(yàn)和比特率設(shè)置的比特率與通過地址開關(guān)設(shè)置時(shí)的值相同。如果奇偶校驗(yàn)或位的值為0,則不進(jìn)行設(shè)置或存儲(chǔ)。寄存器內(nèi)容存儲(chǔ)在EEPROM中?!?6(0x06)寫入單個(gè)寄存器”請(qǐng)求有效寄存器地址0x41(65)有效寄存器值2字節(jié)位15-8:幻數(shù)0x53=83,以防意外寫入。僅使用此編號(hào)對(duì)命令進(jìn)行進(jìn)一步分析。幀請(qǐng)求示例的響應(yīng)回聲:從地址0x12旋轉(zhuǎn)開關(guān)的設(shè)置(18)功能0x06寫入單寄存器地址Hi 0x00寄存器地址Lo 0x41比特率和奇偶校驗(yàn)(65)寄存器內(nèi)容Hi 0x53幻數(shù)寄存器內(nèi)容Lo 0x15奇偶校驗(yàn)偶校驗(yàn),19200波特所有設(shè)備都可以與廣播命令(從地址0x00)同時(shí)切換,建議不要這樣做,因?yàn)檫@可能會(huì)導(dǎo)致問題:-其他制造商的設(shè)備可能在此地址下有一個(gè)用于不同目的的寄存器,然后會(huì)以錯(cuò)誤的方式操作。-沒有來自各個(gè)設(shè)備的反饋。因此,控制不能立即識(shí)別命令是否被正確接收。
instructions
Continue the software description "04 (0x04) Read input register" Request valid register start address 0 Number of valid registers 1 Response byte count 2 Value register input status bit 0.. 3 "03 (0x03) Read holding register" Request invalid register start address 0.. 1 or 66 Number of valid registers 2 or 1 Response function code, byte count, register value register 0: value register 1: value register 66 Time constant for communication monitoring. The register value=0 (0x0000) has no communication monitoring. All other values are used for communication monitoring. The solution is 10 ms. 0x0000 to 0xFFFF=>0 to 655.35 seconds=10.9 minutes bit information 0 0=state relay 1 closed 1=state relay 2 closed 1=state relay 2 switched through bus 1 0=relay 1 switched through manual control 0=relay 2 bit information switched through bus 2 0=initial state after reset or communication control relay 1 closed 1=initial state after reset or communication control relay 1 1 0=reset or communication control relay 2 closed 1=initial state after reset, Or the communication control relay 2 requests the register address 0 or 1 or 66 register value bits 0 – 1 according to the table or the above request "16 (0x10) writing multiple registers" to request the valid register starting address 0 or 1. The number of valid registers is 1.2 bytes count 2 x the number of register values x 2 bytes bits 0 – 3 according to the table to respond to the function code, register starting address
Number of registers 9.2 The bit rate set using the Modbus command parity sum bit rate is the same as the value set through the address switch. If the value of parity or bit is 0, it is not set or stored. The register contents are stored in EEPROM. "06 (0x06) Write to Single Register" requests valid register address 0x41 (65) valid register value 2 byte bits 15-8: magic number 0x53=83 to prevent accidental writing. Use this number only for further analysis of the command. Echo response of frame request example: write single register address Hi 0x00 register address Lo 0x41 bit rate and parity (65) register content Hi 0x53 magic number register content Lo 0x15 parity check from the setting (18) function 0x06 of rotary switch at address 0x12, Because this may cause problems: - Other manufacturers' devices may have a register under this address for different purposes, and then operate in the wrong way- No feedback from each device. Therefore, the control cannot immediately identify whether the command was received correctly.