jl-iot/modbus/function_code.go
2023-12-06 17:07:52 +08:00

24 lines
553 B
Go

package modbus
// 功能码
type FunctionCode int
const (
// 读线圈
FCReadCoil FunctionCode = 0x01
// 读离散输入
FCReadDiscreteInput FunctionCode = 0x02
// 读多个寄存器
FCReadHoldingRegister FunctionCode = 0x03
// 读输入寄存器
FCReadInputRegister FunctionCode = 0x04
// 写单个线圈
FCWriteSingleCoil FunctionCode = 0x05
// 写单个寄存器
FCWriteSingleRegister FunctionCode = 0x06
// 写多个线圈
FCWriteMultipleCoil FunctionCode = 0x0F
// 写多个寄存器
FCWriteMultipleRegister FunctionCode = 0x10
)