RFID Error Codes

Errors reports are made available at two outputs of the RFID PLC function block.
These two output variables iErrorID and iErrCodeRcv are described below.

Error ID - iErrorID

If an error is present, this output shows the type of error. The following list shows the possible values.

TYPE E_RFID_ErrID :(
    eRFERR_NoError                  := 0,

    (* general errors *)
    eRFERR_TimeOutElapsed           := 16#4001,

    (* invalid input parameters *)
    eRFERR_InvalidCommand           := 16#4101,
    eRFERR_IncompatibleCfg          := 16#4102,
    eRFERR_InvalidManufacturer      := 16#4103,
    eRFERR_InvalidTimeOutParam      := 16#4104,
    eRFERR_InvalidRawDataParam      := 16#4105,
    eRFERR_InvalidAccessData        := 16#4106,
    eRFERR_InvalidCfg               := 16#4107,
    eRFERR_InvalidCfgParam          := 16#4108,
    eRFERR_InvalidCtrlHeadNumber    := 16#4109,

    (* error at receive of response *)
    eRFERR_InvalidResponse          := 16#4201,
    eRFERR_InvalidRspLen            := 16#4202,
    eRFERR_InvalidBlocksize         := 16#4203,
    eRFERR_ErrorRcv                 := 16#4204,
    eRFERR_ChecksumError            := 16#4205,

    (* internal errors *)
    eRFERR_UnknownReaderGroup       := 16#4401,
    eRFERR_CreatedTelegramTooBig    := 16#4402,
);
END_TYPE

If iErrorID has the value eRFERR_ErrorRcv, an error code was received from the RFID reader. This received error code is indicated in the output variable iErrCodeRcv.

RFID Error Codes 1:

If iErrorID has a different value it may nevertheless be the case that an error has additionally been received from the reader, which is also indicated on iErrCodeRcv.

 

ID
(hex)

ID
(dec)

Description

eRFERR_TimeOutElapsed

0x4001

16385

This error occurs if the time period specified as timeout at the input (default = 5 sec) has elapsed. Any action still being processed will hence be aborted.

A timeout error also occurs if serial background communication does not work. This may be the case, for example, if an incorrect baud rate is set or if the task cycle time is not sufficient to process the data. More detailed information can be found in the chapter RFID reader connection and in the documentation of the PLC library Serial Communication.

eRFERR_InvalidCommand

0x4101

16641

The command has not been executed. The selected command cannot be executed with this RFID reader model. The commands available are listed in the command set.
In order to ensure that the RFID reader model is known to the function block, the command 'GetReaderVersion' must be executed first if possible.

eRFERR_IncompatibleCfg

0x4102

16642

The command has not been executed. The current RFID reader configuration (see output structure ST_RFID_Config) is not compatible with the selected command (and the associated input parameters).
Ensure that the configuration has been read once before. Otherwise this error code may also occur.

eRFERR_InvalidManufacturer

0x4103

16643

The manufacturer of the RFID reader model must be specified with the variable eManufacturer at the input of the generic function block FB_RFIDReader. The error eRFERR_InvalidManufacturer indicates invalid data.

eRFERR_InvalidTimeOutParam

0x4104

16644

This error is output if the specification of the input variable tTimeOut is invalid. The condition 'tTimeOut > tPreSendDelay + tPostSendDelay' applies.

eRFERR_InvalidRawDataParam

0x4105

16645

If raw data are to be sent, then these must be specified at the input of the function block. The error eRFERR_InvalidRawDataParam is output if the specification of the input variable pRawDataCommand or iRawDataCommandLen is invalid. More details on this topic in the chapter Low level communication.

eRFERR_InvalidAccessData

0x4106

16646

The command was not executed because the parameters specified at the input in the structure ST_RFID_AccessData are invalid.

eRFERR_InvalidCfg

0x4107

16647

The command 'Changing the configuration' was not executed because the specified configuration data are invalid. The configuration data are present as a configuration structure (bUseCfgReg = FALSE). In case of doubt, the exact valid value ranges of the data are given in the proprietary protocol specification by the manufacturer.
If the last read configuration is used for the parameters not available in the configuration structure (bUseCfgDefault = FALSE in ST_RFID_ConfigIn), it must be ensured that the configuration was read beforehand. Otherwise this error code may also occur.

eRFERR_InvalidCfgParam

0x4108

16648

The command 'Changing the configuration' was not executed because the specified input parameters of the configuration data are invalid. The configuration data should be present as a configuration register or a configuration structure. Its length or another parameter in ST_RFID_ConfigIn is invalid.

eRFERR_InvalidCtrlHeadNumber

0x4109

16649

If an RFID reader with several read heads is addressed, a choice of read head is specified in the input structure ST_RFID_Control. If no read head is available for the specified value, this error value is output.

eRFERR_InvalidResponse

0x4201

16897

This error is output if the byte sequence of the received response does not correspond to any known message type or if the individual bytes do not exhibit the necessary values. The received data can be analyzed as a raw data block at the output ST_RFID_RawData.

eRFERR_InvalidRspLen

0x4202

16898

This error message is generated if the byte sequence theoretically corresponds to a known message type, but the length is not as expected. The received data can be analyzed as a raw data block at the output ST_RFID_RawData.

eRFERR_InvalidBlocksize

0x4203

16899

If this error value occurs, then the received data read out from the transponder could not be evaluated. The number of received bytes indicates that the configured block size does not correspond to the input at the command call.

eRFERR_ErrorRcv

0x4204

16900

An error code was sent with the received message. The error displayed by the RFID reader is likewise output and represented by the output variable iErrCodeRcv (description at the end of this chapter).

eRFERR_ChecksumError

0x4205

16901

Depending on the protocol specification a checksum, for example a CRC checksum, is sent with the telegram. If a telegram with an incorrect checksum is received by the controller, then this error is output.

eRFERR_UnknownReaderGroup

0x4401

17409

The RFID library assigns the RFID reader models internally to groups. The error eRFERR_UnknownReaderGroup can occur if the RFID reader has not yet been assigned to a group. For this reason, the first query that should be made at the program start is the GetReaderVersion command, depending on the RFID reader model.

eRFERR_CreatedTelegramTooBig

0x4402

17410

An attempt was made to send a telegram that exceeded the maximum size of 300 bytes. Only telegrams with up to 300 bytes can be sent.

RFID Error Codes 2:

In a few cases, the RFID device sends several telegrams directly one after the other. It is therefore important to always detect and correct the first error that occurred.

Error Code Received - iErrCodeRcv

If an error code is sent by the RFID reader, it will be output here.

RFID Error Codes 3:

Status messages, which do not lead to an error, are sometimes sent by the RFID reader and then output at iErrCodeRcv (bError remains FALSE and iErrorID shows no error).

A list of possible values can be found either in the data type declaration of the PLC RFID Library in the Library Manager or directly in the protocol specification.
Data types in this regard are the enumerations E_RFID_ErrCodeRcv_Balluff, E_RFID_ErrCodeRcv_Deister, E_RFID_ErrCodeRcv_Leuze etc.