Technical FAQs

Ask a Question

CommError & OperError details of Read_Var block of Somachine

The %READ_VAR function block is used to read data from a remote device on Modbus SL or Modbus TCP.

This illustration is the %READ_VAR function block:

The detected error codes in the software in actual are in 'decimal' you need to convert it into 'hex' to find the meaning from the table below.

Communication Error Codes
This table describes the error codes written to the %READ_VARi.CommError object:
Name Detected error code Description
CommunicationOK 00 hex Exchange is correct.
TimedOut 01 hex Exchange stopped because timeout expired.
Abort 02 hex Exchange stopped on user request (Abort input).
BadAddress 03 hex Address format is incorrect.
BadRemoteAddr 04 hex Remote address is incorrect.
BadMgtTable 05 hex Management table format is incorrect.
BadParameters 06 hex Specific parameters are incorrect.
ProblemSendingRq 07 hex Unsuccessful sending request to destination.
RecvBufferTooSmall 09 hex Reception buffer size is too small.
SendBufferTooSmall 0A hex Transmission buffer size is too small.
SystemResourceMissing 0B hex System resource is missing.
BadLength 0E hex Length is incorrect.
ProtocolSpecificError FE hex Indicates a Modbus protocol error. For more details, refer to Operation Error Codes.
Refused FF hex Message is refused. For more details, refer to Operation Error Codes..

Operation Error Codes

This return code is significant when the communication error code (CommError object) has the value:
  • 00 hex (correct)
  • FF hex (refused)
  • FE hex (Modbus exception code)
This table describes the error codes written to the %READ_VARi.OperError object:
CommError Name Detected error code Description
00 hex (correct) OperationOK 00 hex Exchange is correct.
NotProcessed 01 hex Request has not been processed.
BadResponse 02 hex Received response is incorrect.
FF hex (refused) TargetResourceMissing 01 hex Target system resource is missing.
BadLength 05 hex Length is incorrect.
CommChannelErr 06 hex Error detected on the communication channel.
BadAddr 07 hex Address is incorrect.
SystemResourceMissing 0B hex System resource is missing.
TargetCommInactive 0C hex Target communication function is not active.
TargetMissing 0D hex Target is absent.
ChannelNotConfigured 0F hex Channel not configured.
FE hex (Modbus exception code) IllegalFunction 01 hex The function code received in the request is not an authorized action for the slave. The slave may not be in the correct state to process a specific request.
IllegalDataAddress 02 hex The data address received by the slave is not an authorized address for the slave.
IllegalDataValue 03 hex The value in the request data field is not an authorized value for the slave.
SlaveDeviceFailure 04 hex The slave cannot perform a requested action because of an unrecoverable error.
Acknowledge 05 hex The slave acknowledged the request but communications timed out before the slave complied.
SlaveDeviceBusy 06 hex The slave is busy processing another command.
MemoryParityError 08 hex The slave detects a parity error in the memory when attempting to read extended memory.
GatewayPathUnavailable 0A hex The gateway is overloaded or not correctly configured.
GatewayTargetDeviceFailedToRespond 0B hex The slave is not present on the network.
Was this helpful?
What can we do to improve the information ?