RFID command set

The following matrix lists the available RFID instruction set.

Because of the fundamental differences between the various RFID reader models, not all instructions can be made available with each model.

The complexity of some proprietary protocols makes it necessary that not every command or every detailed parameterization option can be provided via the TwinCAT PLC library. In individual cases, therefore, recourse can be taken to the less convenient communication option by means of the offered low level interface. Information can be found in the description of the instruction SendRawData and in the section low‑level communication.

Information on the features and characteristics of proprietary protocols can be obtained from the manufacturer for each model and is usually supplied with the device. The user should at least be in possession of these protocol specifications, in order to be able to investigate detailed questions and to read up on the peculiarities of the RFID reader. Reference is already made as far as possible to the peculiarities of the individual RFID readers at special places within this documentation. However, the manufacturer of the RFID devices remains responsible for describing its devices and for guaranteeing their behavior and characteristics. A detailed description of each command and the special behavior of the RFID reader is given in the proprietary protocol specifications. The manufacturer’s proprietary command corresponding to the command listed here is indicated below in each case in italics. Details can also be found in the output structure ST_RFID_RawData of the function block FB_RFIDReader.

Command

Balluff
BIS M-40x
BIS L-60x0

Baltech IDE SD ANT1F

Deister electronic RDL90

Deister electronic UDL 500

Deister electronic PRM5M/2V

Leuze electronic RFM12; RFM32; RFM32ex

Pepperl+Fuchs IDENTControl Compact

GetReaderVersion

 

x

x

x

x

x

x

GetConfig

 

 

x

x

 

x

x

SetConfig

 

x

x

x

 

x

 

GetInventory

x

x

x

 

 

x

x

Polling

 

 

x

x

x

 

 

TriggerOn

 

 

x

x

 

x

 

TriggerOff

 

 

x

x

 

x

 

AbortCommand

 

 

x

 

 

x

x

ResetReader

x

x

x

x

x

x

x

ReadBlock

x

x

x

x

 

x

x

WriteBlock

x

x

x

x

 

x

x

OutputOn

 

 

x

x

 

x

 

OutputOff

 

 

x

x

 

x

 

FieldOn

 

x

x

x

 

x

 

FieldOff

 

x

x

x

 

x

 

SendRawData

x

x

x

x

x

x

x

ChangeDCType

 

 

 

 

 

 

x

This list is analogous to the enumeration E_RFID_Command in the TwinCAT RFID library.
Successful processing of the requested command by the RFID reader is indicated by the status outputs of the function block and the respective response. A list of possible responses can be found in the description of the enumeration E_RFID_Response.

The commands are explained in detail below:

GetReaderVersion [16#01]

Information on the RFID reader can be queried with this command. Depending upon availability, the model designation, the hardware and software version of the reader etc. are output from the function block in the structure ST_RFID_ReaderInfo.

Equivalent in proprietary protocol:
Deister: 0x02
Leuze: 'V'
Pepperl+Fuchs: 'VE'
Baltech: System GetInfo

GetConfig [16#02]

The current configuration of the RFID reader is queried with this command. All relevant received parameters are explained in the description of structure ST_RFID_Config. Further information is summarized in section Configuration.

Equivalent in proprietary protocol:
Deister: 0x09
Leuze: 'G'
Pepperl+Fuchs: 'GS'

SetConfig [16#03]

Parameterized configuration settings can be transferred to the RFID reader. For more information about the possible configuration of the RFID reader, see the description of structure ST_RFID_ConfigIn.

Following a configuration command it is recommended to query the current configuration of the reader once again using the GetConfig command. Further information is summarized in section Configuration.

Equivalent in proprietary protocol:
Baltech: System CfgWriteTLVBlock
Deister: 0x09
Leuze: 'C'

GetInventory [16#04]

This command is used to query the type and serial number of a transponder currently present in the reading field. If no transponder is found, a corresponding response follows.

Pepperl+Fuchs: The parameter iHeadNumber in the structure ST_RFID_Control determines for which read head the command is to be executed.

Equivalent in proprietary protocol:
Balluff: 'U'
Deister: 0x82
Leuze: 'I'
Pepperl+Fuchs: 'SF' & 'EF'
Baltech: VHLSelect + VHLGetSnr

Polling [16#05]

This command is used to retrieve information from the RFID reader stack. This may be, for example, the serial number of the last transponder. Note that different RFID readers have stacks of different sizes. In some cases only one message is stored.

Presence detection: If this cannot be set via a configuration parameter, it is necessary to keep the reader ready for reading by means of a cyclic polling command so that a transponder within range is automatically detected.

Equivalent in proprietary protocol:
Deister: 0x0B

TriggerOn [16#06]

If the trigger mode is active, then a software trigger instead of hardware trigger can be initiated with this command. The subsequent 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.

Equivalent in proprietary protocol:
Deister: 0x85
Leuze: '+'

TriggerOff [16#07]

See TriggerOn.

Equivalent in proprietary protocol:
Deister: 0x85
Leuze: '-'

AbortCommand [16#08]

If a command is being processed by the RFID reader, it is aborted with this command.

Pepperl+Fuchs: The parameter iHeadNumber in the structure ST_RFID_Control determines for which read head the command is to be executed.

Equivalent in proprietary protocol:
Leuze: 'H'
Pepperl+Fuchs: 'QU'

ResetReader [16#09]

This command causes the RFID reader to perform a reset.

Equivalent in proprietary protocol:
Balluff: 'Q'
Deister: 0x01
Leuze: 'R'
Pepperl+Fuchs: 'RS'
Baltech: System Reset

ReadBlock [16#0A]

This command is used to read a certain number of data bytes from the transponder memory in the form of blocks of a defined size.

The transfer of the input structure ST_RFID_AccessData is necessary for this command.

Before data is read from a transponder, it is usual to identify and select the transponder (see command GetInventory).

Pepperl+Fuchs: The parameter iHeadNumber in the structure ST_RFID_Control determines for which read head the command is to be executed.

Equivalent in proprietary protocol:
Balluff: 'L'
Deister: 0x83
Leuze: 'N'
Pepperl+Fuchs: 'SR' & 'ER'
Baltech: VHLRead

WriteBlock [16#0B]

This command is used to write a certain number of data bytes to the transponder memory in the form of blocks of a defined size.

The transfer of the input structure ST_RFID_AccessData is necessary for this command.

Before data is written to a transponder, it is usual to identify and select the transponder (see command GetInventory).

Pepperl+Fuchs: The parameter iHeadNumber in the structure ST_RFID_Control determines for which read head the command is to be executed.

Equivalent in proprietary protocol:
Balluff: 'P'
Deister: 0x84
Leuze: 'W'
Pepperl+Fuchs: 'SW' & 'EW'
Baltech: VHLWrite

OutputOn [16#0C]

This command sets the switching output of the RFID reader permanently to TRUE. This is only possible if the switching output is not automatically addressed via the configuration.

Equivalent in proprietary protocol:
Deister: 0x0F
Leuze: 'A0FF'

OutputOff [16#0D]

This command sets the switching output of the RFID reader permanently to FALSE. This is only possible if the switching output is not automatically addressed via the configuration.

Equivalent in proprietary protocol:
Deister: 0x0F
Leuze: 'A000'

FieldOn [16#0E]

The RFID field can be turned on with this command.

Equivalent in proprietary protocol:
Deister: 0x81
Leuze: 'F1'
Baltech: System HFReset

FieldOff

The RFID field can be turned off with this command. Depending on the RFID reader model, the field is reactivated in the case of a trigger or another command.

Equivalent in proprietary protocol:
Deister: 0x81
Leuze: 'F2'
Baltech: System HFReset

SendRawData [16#10]

With this command, the RFID function block can be used as a low-level interface. The data to be transmitted are transferred in the control structure as a pointer. A telegram is composed internally in the library and sent. Arbitrary data can be sent to the RFID reader in this way. The data received as a result is available at the output of the function block in the raw data structure as an addressed data field. For more information on the process, see section Low-level communication.

When using the command SendRawData, an evaluation of the received response cannot be guaranteed.

Example: If a read command is sent manually as a byte sequence by means of the SendRawData command, then received transponder data are not written at an address specified in ST_RFID_AccessData. Evaluation/storage of the data should therefore also be done manually with the help of the raw data structure, which is always specified.

ChangeDCType [16#11]

This command can be used to set the transponder type on the read head. Use iDCType in ST_RFID_Control to specify the type.

Pepperl+Fuchs: The parameter iHeadNumber in the structure ST_RFID_Control determines for which read head the command is to be executed.

Equivalent in proprietary protocol:
Pepperl+Fuchs: 'CT'