Make your own free website on Tripod.com

Modbus classes Error contants

 

CModbus::ERR_OK = 0

No Error.

CModbus::ERR_TIMEOUT=1

Time-out error when executing communication with a slave.

CModbus::ERR_INV_RESP=2

The slave returned an invalid response.

CModbus::ERR_CRC= 3

Failed to check CRC of slave response.

CModbus::ERR_WR_PORT= 8

Error when writing to a com port.

CModbus::ERR_RD_PORT= 9

Error when reading from a com port.

CModbus::ERR_NOT_INT=10

The com port was not initialized.

CModbus::ERR_EXCPTION_CODE=0x8000

Errors 0x8000 to 0x80FF mean that the slave return an Exception code where

0x8001 Slave returned exception code 1
0x8002 Slave returned exception code 2
0x8003 Slave returned exception code 3
... ...

 

CRemoteModbus::ERR_BUFFER_OVERFLOW=1000

Message do not fit inside class buffer.

CRemoteModbus::ERR_SOCKET_ERROR=1001

Generic socket error.

CRemoteModbus::ERR_WR_SOCK_ERROR=1002

Error while sending a message.

CRemoteModbus::ERR_RD_SOCK_ERROR=1003

Error while receiving a message.

CRemoteModbus::ERR_SOCK_NOT_CONNECTED=1004

trying to use an unconnected socket.