Modbus Server Interface Error Constants

mbErrOk = 0

No Error.

mbErrTimeOut = -2147220991 (&H80040201)

Time-out error when executing communication with a slave.

mbErrInvResp = -2147220990 (&H80040202)

The slave returned an invalid response.

mbErrCRC =-2147220989 (&H80040203)

Failed to check CRC of slave response.

mbErrWrPort =-2147220984 (&H80040208)

Error when writing to a com port.

mbErrRdPort = -2147220983 (&H80040209)

Error when reading from a com port.

mbErrNotInit = -2147220982 (&H8004020A)

The com port was not initialized.

mbErrExceptionCode = -2147188224 (&H80048200)

Errors &H80048201 to &H800482FF mean that the slave return an Exception code where

&H80048201 Slave returned exception code 1
&H80048202 Slave returned exception code 2
&H80048203 Slave returned exception code 3
... ...

These error are defined by modbus protocol.

mbErrBufferOverflow = -2147219992 (&H800405E8)

The buffer can not store a modbus message.

mbErrReadSockError = -2147219989 (&H800405EB)

mbErrWriteSockError = -2147219990 (&H800405EA)

Error while reading or writing using a socket api funtion.

mbErrSocketError = -2147219991 (&H800405E9)

Not specified socket error.

mbErrSockNotConnected = -2147219988 (&H800405EC)

Try to send a modbus message with disconnected socket.

Modbus Automation Server.