Command set

The following matrix lists the available command 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 means that it is inevitable that not every command or every detailed parameterisation option can also be given 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 on this can be found in the command description 'SendRawData' and in the chapter Low level communication.

Information on the characteristics and peculiarities of the proprietary protocols is to be procured for each model from the manufacturer and is usually provided 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 behaviour and characteristics. A detailed description of each command and the special behaviour 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 likewise be taken from 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 RFID PLC library.
The successful processing of the requested command by the RFID reader can be recognised by the status outputs of the function block and the respective response. A list of possible responses can be viewed under 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 described under ST_RFID_Config.

Further information is available in the chapter 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. More detailed information on the possible configuration of the RFID reader can be found under 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 available in the chapter 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. An appropriate response follows if no transponder is found.

Command set 1:

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]

Information is queried from the stack of the RFID reader. This may be, for example, the serial number of the last transponder. Please note that different RFID readers have differently sized stacks and that sometimes only one message is stored.

Command set 2:

Presence detection

If this cannot be adjusted via a configuration parameter, then it is necessary to keep the reader in readiness for reading by means of cyclic polling command, so that a transponder in range is detected automatically.

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 response telegram that follows is received by the function block of the Tc RFID library. There is no assignment of read transponder data in this case. The received raw data can be taken from the 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 currently being executed by the RFID reader, it can be aborted with this command.

Command set 3:

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 reading data from the transponder, it is usual to recognize and select the transponder (see command GetInventory).

Command set 4:

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 writing data to a transponder, it is usual to recognize and select the transponder (see command GetInventory).

Command set 5:

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.

Command set 6:

This is only possible if the switching output is not addressed automatically by means of 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.

Command set 7:

This is only possible if the switching output is not addressed automatically by means of 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 [16#0F]

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]

This command enables the RFID function block to 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 after that are available at the output of the function block in the raw data structure as an addressed data field. Further information on the sequence is available in the chapter Low level communication.

When using the SendRawData command, 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. An evaluation/storage of the data should therefore also take place manually with the aid of the raw data structure, which is always specified.

ChangeDCType [16#11]

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

Command set 8:

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'