Sample 2

This example was developed with a Baltech RFID reader, which is optionally installed in the Beckhoff Control Panels and Panel PCs. The device is connected to a serial Com port or a USB port. It can be used for convenient commissioning and testing of the device.

If a Baltech RFID reader is used that is connected to a serial Beckhoff terminal instead of to the Com port, the serial background communication in the PLC code must be changed and reconfigured in the TwinCAT System Manager. (See RFID reader interfacing)

The example project contains the call of the RFID function block with different commands. The commands can be executed using the built-in visualization. The commands GetReaderVersion, GetInventory, ReadBlock and WriteBlock are implemented. Thus, an RFID transponder can also be tested and data can be written to and read from it in the form of an ASCII string.

Sample 2 1:

The RFID reader must first be initialized to enable correct communication with the RFID reader. The button Init Rfid Reader executes the command GetReaderVersion.

For further information on the RFID reader communication process, refer to the section Function block FB_RFIDReader > Handling instructions.

Activating LogView output displays the complete serial transmission in the TwinCAT System Manager LoggerView.

Download: RFID_InfoSys_Sample02.zip or RFID_InfoSys_Sample02usb.zip

Requirements

Development environment

Target platform

PLC libraries to include

TC3.1.4013

PC or CX (x86, x64)

Tc2_RFID v3.3.6.0