Leuze electronic

RFID reader settings

For smooth communication between controller and RFID readers, some settings need to be made before the system startup. These include, for example, the baud rate for the serial communication. A proprietary tool from the manufacturer of the RFID reader may be required in order to transfer these settings to the RFID.

For all supported RFID reader models, these standard data transmission settings have been tried and tested:

Setting

Value

Baud rate (RS232 and RS485)

9600 baud

Parity Bit

none

Data bits

8

Stop bit

1

Depending on the hardware, other parameters can also be set, or the factory settings of the RFID reader can be used. These must then also be adopted in the software reader connection (see RFID reader connection).

Using the proprietary tools, the following special settings may have to be parameterized before the system is started:

Setting

Value

Data transmission parameters (see above)

Setting analogous to the values selected in the PLC program

If the RFID reader is triggered, the following response telegram is received by the function block of the TwinCAT RFID library. There is no assignment of read transponder data in this case. The received raw data can be taken from the function block interface for further processing.

RFID reader handling

The block size corresponding to the tag must be configured in the RFID reader configuration.

The Leuze devices support 4 bytes or 8 bytes block size.

Example: If a block size of 8 bytes is specified for the transponder, then the reader must be configured with the parameter iBlocksize := 8 and the read or write access via the structure ST_RFID_AccessData must take place with an 8-byte block size.

A write command can write up to 36 bytes of data at a time. If more data is to be written to the transponder, it must be divided into several commands.

It must be pointed out here that not all peculiarities of every supported RFID reader model can be named here. Therefore you are referred to the manufacturer’s own documentation for more detailed information.

Configuration

Note the following when a new configuration is written to the RFID device (command SetConfig):

Not every combination of configuration parameters (structure ST_RFID_CfgStruct_LeuzeRFM) is allowed. Disregard of the required dependencies leads to an error (eRFERR_InvalidCfg):

Configuration parameters

Required dependencies

eReadMode = eRFRD_ContinuousRead

eTriggerMode = eRFTR_ImmediateRead
eWriteMode = eRFWR_ImmediateWrite

eWriteMode = eRFWR_WriteToNextTag

eTriggerMode = eRFTR_ReadWithTrigger

bMultiTranspMode = TRUE

bSerialNumberMode = TRUE
eWriteMode = eRFWR_ImmediateWrite
eReadMode = eRFRD_SingleShot

If the configuration is transmitted as a register, these dependencies also exist and the RFID device will return an error code if inadmissible.