Error Code Details


This is the list of error codes (errno) in libmodbus.

Please refer to the function reference for the return value of each function.

 

Definition

Value

Meaning

EMBXILFUN

112345679

The function code is invalid.

EMBXILADD

112345680

The specified address is invalid.

EMBXILVAL

112345681

The data is invalid.

EMBXSFAIL

112345682

The Modbus slave is stopped.

EMBXACK

112345683

ACK response.

EMBXSBUSY

112345684

The Modbus slave is busy.

EMBXNACK

112345685

Negative Ack response.

EMBXMEMPAR

112345686

Memory parity error.

EMBXGPATH

112345687

The gateway is not configured properly or is overloaded.

EMBXGTAR

112345688

It indicates that no response was obtained from the target device.

EMBBADCRC

112345689

CRC error.

EMBBADDATA

112345690

The sent data or the received data is invalid.

EMBBADEXC

112345691

An unexpected exception code is received.

EMBUNKEXC

112345692

Reservation code

EMBMDATA

112345693

The number of requested data exceeds the maximum value of Modbus.

EMBBADSLAVE

112345694

The request slave ID and the receive slave ID are different.

 

In addition to the Modbus error codes defined in libmodbus, you may also get a general errno.

For more information about errno, please refer to the following URL.

https://learn.microsoft.com/en-us/cpp/c-runtime-library/errno-constants?view=msvc-160