Siemens Industry Online Support
Siemens AG
文档类型 应用与工具 文档编号 23626344, 文档发布日期 2013年4月23日

Reading and Writing RFID Data with SIMATIC S7-300/400 and SIMATIC RF670R

  • 文档
  • 涉及产品

For incoming goods, stock keeping, production logistics and distribution, RFID (Radio Frequency Identification) provides complete tracking and documentation of all delivered, stored and sent goods. Information of a mobile data storage unit (transponder) is read and written with the aid of the RFID device. The objective is to reliably identify objects with an attached data storage unit and to make the stored object data available to further process steps directly in a SIMATIC S7. In this example, a SIMATIC RF670 reader with Ethernet interface should be connected to a SIMATIC S7-300/400 controller.

The following solution shows you how to program a block in an S7 CPU with integrated PROFINET interface in order to implement the most important RFID functions.

The sample code contains a function block for the RF670R that provides the following functions that have already been implemented for you:

  • Connect to/disconnect from reader
  • Read/write transponder ID(s)
  • Read/write RFID data

Two additional function blocks show you the necessary format conversions for the RF670R using the example of the SIMATIC S7 variable type integer.

This sample application focuses on the explanation of the processes in the communication between the SIMATIC S7 CPU and the RF670R reader and a detailed explanation of the code. The blocks were created in SCL. Therefore, they can be easily customized for function extensions (for example, implementation of other RF670R functions).


Content of Downloads


Reading and Writing RFID Data with SIMATIC S7-300/400 and SIMATIC RF670R
23626344_Application_RF670R_DOKU_V11_en.pdf ( 1703 KB )
STEP 7 project (V 5.5) for the application example
23626344_RF670R_CODE_V11.zip ( 884 KB )


Content of Archives


Documentation and code 
Older application examples for RF660
23626344_Archiv_en.zip ( 10528 KB )

Additional Information



Reading and Processing of RFID Data with SIMATIC S7-1200 and SIMATIC RF600 with Ethernet Interface (CE-X36) Entry ID: 46476563

Note on Security
The functions and solutions described in this entry predominantly confine themselves to the realization of the automation task. Please also take into account that corresponding protective measures have to be taken in the context of Industrial Security when connecting your equipment to other parts of the plant, the enterprise network or the Internet. For more information, please refer to Entry ID 50203404.

Last Changes
Code: Change of the FB RF670R_RW (FB670) behavior, if a communication error occurs
Documentation has been changed