Table of Contents

Enum ModbusFunctionCode

Namespace
FluentModbus
Assembly
FluentModbus.dll

Specifies the action the Modbus server is requested to do.

public enum ModbusFunctionCode : byte

Fields

Error = 128

This function code is added to another function code to indicate that an error occured.

MaskWriteRegister = 22

This function code is used to modify the contents of a specified holding register using a combination of an AND mask, an OR mask, and the register's current contents.

ReadCoils = 1

This function code is used to read from 1 to 2000 contiguous status of coils in a remote device.

ReadDiscreteInputs = 2

This function code is used to read from 1 to 2000 contiguous status of discrete inputs in a remote device.

ReadExceptionStatus = 7

This function code is used to read the contents of eight Exception Status outputs in a remote device.

ReadFifoQueue = 24

This function code allows to read the contents of a First-In-First-Out (FIFO) queue of register in a remote device.

ReadFileRecord = 20

This function code is used to perform a file record read.

ReadHoldingRegisters = 3

This function code is used to read the contents of a contiguous block of holding registers in a remote device.

ReadInputRegisters = 4

This function code is used to read from 1 to 125 contiguous input registers in a remote device.

ReadWriteMultipleRegisters = 23

This function code performs a combination of one read operation and one write operation in a single MODBUS transaction. The write operation is performed before the read.

WriteFileRecord = 21

This function code is used to perform a file record write.

WriteMultipleCoils = 15

This function code is used to force each coil in a sequence of coils to either ON or OFF in a remote device.

WriteMultipleRegisters = 16

This function code is used to write a block of contiguous registers (1 to 123 registers) in a remote device.

WriteSingleCoil = 5

This function code is used to write a single output to either ON or OFF in a remote device.

WriteSingleRegister = 6

This function code is used to write a single holding register in a remote device.