发表于:2005-05-27 15:40:00
1楼
; ---------------------------------------------------------
; Modbus Function Code description
; ---------------------------------------------------------
; CODE DESCRIPTION In Slave Max Length(number of bytes)
; ------------------------------------------------------
; 01 : Read Coil Status 0xxxx MB0[x-y] 2000
; 02 : Read Input Status 1xxxx MB1[x-y] 2000
; 03 : Read Holding Register 4xxxx MB4[x-y] 125
; 04 : Read Input Register 3xxxx MB3[x-y] 125
; 05 : Force Single Coil (Write) 0xxxx MB0[x] 1
; 06 : Preset Single Register(Write) 4xxxx MB4[x] 1
; 07 : Read Exception Status
; 08 : Get/Clear Netweork Statistics
; 15 : Force Multiple Coils(Write) 0xxxx MB0[x-y] 800
; 16 : Preset Multiple Register(Write)4xxxx MB4[x-y] 800
; ---------------------------------------------------------------------------