Industry Automation and Drive Technologies - SCE Training Manual for Integrated Automation Solutions Totally Integrated Automation (TIA) MODULE E11 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2 PN/DP and RF180C TIA Training Document Module E11 Status: 01/2010 RF180C Page 1 of 65 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and
Industry Automation and Drive Technologies - SCE This manual was prepared for training purposes by Siemens AG for the project Siemens Automation Cooperates with Education (SCE). Siemens AG does not guarantee the contents of this document. Passing on this document as well as copying it, using and communicating its contents is permitted within public training and continued education facilities. Exceptions require the written permission by Siemens AG (Michael Knust michael.knust@siemens.com).
Industry Automation and Drive Technologies - SCE PAGE 1 PREFACE .......................................................................................................................................................5 2 Notes regarding the usage of CPU 315F-2 PN/DP .....................................................................................7 3 Notes regarding the SIMATIC RFID components ......................................................................................
Industry Automation and Drive Technologies - SCE The following symbols serve as a guide through this module: Information Programming Sample Task Notes TIA Training Document Module E11 Status: 01/2010 RF180C Page 4 of 65 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and
Industry Automation and Drive Technologies - SCE 1 PREFACE Regarding its content, Module E11 is part of the instruction unit 'IT Communication with SIMATIC S7’.
Industry Automation and Drive Technologies - SCE Hardware and Software Required 1 2 3 4 5 PC, operating system Windows XP Professional with SP2 or SP3/Vista 32 bit Ultimate and Business/Server 2003 SP2 with 600MHz (only XP)/1 GHz and 512MB (only XP)/1 GB RAM, free disk storage approx. 650 to 900 MB, MS Internet Explorer 6.0 and network card Software STEP 7 V 5.
Industry Automation and Drive Technologies - SCE 2 NOTES REGARDING THE USAGE OF CPU 315F-2 PN/DP The CPU 315F-2 PN/DP is a CPU that is shipped with 2 integrated interfaces. - The first interface is a combined MPI/PROFIBUS DP interface that can be used at the PROFIBUS DP as master or slave to connect distributed IO/field devices with very fast reaction time. In addition, it is possible to program the CPU here by means of an MPI or PROFIBUS DP - The second interface is an integrated PROFINET interface.
Industry Automation and Drive Technologies - SCE 3 NOTES REGARDING THE SIMATIC RFID COMPONENTS The communication module RF180C is a module for operating RFID components at any controller by means of PROFINET IO. At the RF180C, up to 2 readers (SLG = write/read device) can be operated in parallel. The user can start a command in parallel on two readers (FB 45 if operated on a SIMATIC S7) The tag data is accessed by means of addressing the tag physically. In the SIMATIC S7, FB 45 is provided for this.
Industry Automation and Drive Technologies - SCE 4 RFID FUNDAMENTALS Radio Frequency Identification (RFID) makes it possible to automatically identify and localize objects and living beings, and thus considerably facilitates recording and storing data. The RFID system consists of the following: 1) a transponder that is located in the object or in the living being and identifies it, and 2) a reading device for reading out the transponder ID.
Industry Automation and Drive Technologies - SCE 5 STARTING UP AN RFID PROJECT WITH CPU 315F-2 PN/DP AND RF180C Below, the startup of an RFID project is described. As SIMATIC S7-300 station, the CPU 315F-2 PN/DP is used. In the CPU’s control program, a data structure has to be generated -by means of a function block call (FB45)- with data blocks and embedded UDT data types.
Industry Automation and Drive Technologies - SCE 5.1 Setting Up a New Project 1. The central tool in STEP 7 is the ’SIMATIC Manager’, which we call here with a double click. → SIMATIC Manager) 2. STEP 7 programs are managed in projects. We are now setting up such a project (→ File → New) 3.
Industry Automation and Drive Technologies - SCE 4. Highlight your project and insert an ’Industrial Ethernet Subnet’ (→ RFID_RF180C → Insert → Subnet → Industrial Ethernet). 5. Then, we insert a ’SIMATIC 300 Station’.
Industry Automation and Drive Technologies - SCE 5.2 Configuring the Hardware 6. With a double click, open the configuration tool for the ’Hardware’. (→ Hardware) 7. Open the hardware catalog by clicking on the symbol ' ’. (→ ) Insert the ’Mounting channel’ with a double click (→ SIMATIC 300 → RACK 300 → Mounting channel). Note A configuration table for configuring Rack 0 is displayed automatically.
Industry Automation and Drive Technologies - SCE 8. From the hardware catalog, we can now select all modules that are present in the actual rack and insert them in the configuration table. To this end, we click on the name of the respective module, hold the mouse key and drag it to a line in the configuration table. We start with the power unit ’PS 307 5A’ (→ SIMATIC 300 → PS-300 → PS 307 5A).
Industry Automation and Drive Technologies - SCE 9. Next, we drag the ’CPU 315F-2 PN/DP’ to the second slot. The order number and the version of the CPU are inscribed on the front of the CPU. (→ SIMATIC 300 → CPU-300 → CPU 315F-2 PN/DP → 6ES7 315-2FH13-0AB0 → V2.6) 10. When entering the CPU, the following window appears. In this window, we do the following: assign to CPU 315F-2 PN/DP an ’IP- address’, specify the ’Subnet screen form’ and select the ’Ethernet’ that has already been set up.
Industry Automation and Drive Technologies - SCE Notes regarding networking on the Ethernet (additional information is provided in Appendix V of the training manual): MAC address: The MAC address consists of a permanent and a variable part. The permanent part ("Basic MAC address") identifies the manufacturer (Siemens, 3COM, ...). The variable part of the MAC address differentiates the different Ethernet stations and should be assigned globally unique.
Industry Automation and Drive Technologies - SCE 11. Next, we are dragging the input module for 16 inputs to the 4th slot. The module’s order number is located on the front. (→ SIMATIC 300 → DI-300 → SM 321 DI16x24VDC). Note Slot 3 is reserved for interface modules and remains empty for that reason. The module’s order number is indicated in the footer of the catalog.
Industry Automation and Drive Technologies - SCE 12. Now we drag the output module for 16 outputs to the 5th slot. The module’s order number is located on the front (→ SIMATIC-300 → DO-300 → SM 322 DO16x24VDC/0.5A). Note The module’s order number is indicated in the footer of the catalog. 13. Now, we have to change the PROFINET device name to PN IOx100. Select ’PN-IO’ with a double click.
Industry Automation and Drive Technologies - SCE 14. Now, drag the PROFINET IO System (100) module tier toward the right and from the folder PROFINET IO, insert the SIMATIC RFID module RF180C into the module tier by dragging it there. If module RF180C should not yet be selectable, it first has to be inserted by a data carrier, using the menu "Options“ Install GSD files. 15. Then, double click on the inserted module and change the device name to RF180Cx110 and the IP address to 192.168.0.110 16.
Industry Automation and Drive Technologies - SCE 5.3 Assigning a Device Name 17. First, highlight the module RF180C and then select, under the menu "Destination system“ and under Ethernet Assign device name. Note A prerequisite for this is that the die PG/PC interface is set to TCP/IP and the PC’s network card is configured correctly. For example, IP address 192.168.0.99, subnet 255.255.255.0 and router address -.-.-.- (refer to Module E02) 18.
Industry Automation and Drive Technologies - SCE This is what the completed hardware configuration with the associated addresses looks like 19. By clicking on ' ’ we can load the hardware configuration to the PLC. The operating mode switch on the CPU should be on Stop ( → ). 20. Close hardware configuration.
Industry Automation and Drive Technologies - SCE 5.4 Inserting UDT Blocks and FB45 De-archive the library "RFID_FB45_UDT_Blocks“ from the template directory and open it. Copy UDT11, UDT21, UDT 111, UDT261, UDT271, UDT281 and FB45 and insert them in the block folder. Close the library. Note Instead of the library RFID_FB45_UDT_Blocks, the sample program MOBY FB45 can be dearchived. The file FB45_V1_3.zip is available on the RFID Systems CD in the directory "Data“, subdirectory "FB45“.
Industry Automation and Drive Technologies - SCE 5.5 Generating Data Blocks DB48 Write/Read Data Here, the source data of a write request to the transponder is stored, or the destination data for the read request from the transponder. Generating DB48 Open DB48, set up 1024 bytes Under Name, enter “Data“. At Type Combined data, select (with the right mouse key) the ARRAY data format. Enter 1..1024 within the brackets. In the next line, select or enter BYTE.
Industry Automation and Drive Technologies - SCE DB49 MDS Status Information In DB49, the MDS status Information is entered. The information is stored in a data block with a specified structure. Read MDS status with Sub_Command 01according to UDT261 or Sub_Command 02 according to UDT271. Generating DB49 Open DB49 and insert UDT261 and UDT271 DB49 data view The start address in DB49 is “0“ for Sub_Command 01 and “18“ for Sub_Command 02.
Industry Automation and Drive Technologies - SCE Save and close DB49 TIA Training Document Module E11 Status: 01/2010 RF180C Page 25 of 65 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and
Industry Automation and Drive Technologies - SCE DB50 Reader Status Information The reader status information is entered in DB50. Depending on the request, the information has to be stored in a data block with a specified data structure. Read reader status with Sub_Command 01 according to UDT111 or Sub_Command 06 according to UDT281. Generating DB50 Open DB50 and insert UDT111 and UDT281 Open DB50 and insert UDT111 for Reader_Status. For Reader_diagnosis, insert UDT281.
Industry Automation and Drive Technologies - SCE Data view of the Reader status in DB50 (UDT111) Byte 0 to 27 Data view of the Reader diagnosis in DB50 (UDT281) Byte 28 to 55 For Sub_Command 01, the start address in DB50 is "0“ Reader status information and for Sub_Command 06 "28“ Reader diagnosis information. The data length in both cases is 28 bytes.
Industry Automation and Drive Technologies - SCE DB47 Request Data Block The DB47 is set by means of the UDT11 in DB45. In DB47, a UDT21 is embedded for each reader. The request commands are then entered in the respective UDT21. The data of the read/write request is then stored in DB48. The reference to DB48 is assigned in UDT21 of DB47. Generate DB47 Open DB47 and add UDT21 for each request Open DB47 and for Reader1, insert the UDT21 five times by means of ARRAY format.
Industry Automation and Drive Technologies - SCE Data View of DB47 (Starting with byte 50, the commands for Reader2 or channel 2 start) Save and close DB47 TIA Training Document Module E11 Status: 01/2010 RF180C Page 29 of 65 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and
Industry Automation and Drive Technologies - SCE DB45 Reader Parameter Block Each MOBY channel (reader) needs its own parameters. These are predefined in a data structure as UDT 10 (with English comments), UDT 11 (with German comments) and UDT 14 (with Spanish comments). This UDT has to be called for each MOBY channel in a data block.
Industry Automation and Drive Technologies - SCE Entries in DB45 The base address for the RF180C is 256 (refer to hardware), here to be entered at address 0.0 and 50.0 The selection of Reader1 has to be entered under address 2.0. The selection of Reader2 has to be entered under address 52.0. DB47 (request data block) is referred to in DB45. The requests of the first reader have to be entered in DB47 starting with DBB0, here at address 4.0 and 6.
Industry Automation and Drive Technologies - SCE Data view of DB45 starting with byte 34 (SLG = Reader) Save and close DB45 Note The inputs in the data block are entered as actual value. Take note that when the data block is initialized or a general reset is performed on the CPU, the actual values are overwritten with the start values of the data blocks.
Industry Automation and Drive Technologies - SCE 5.6 Programming a Restart or Warm Restart A restart of the MOBYIM (interface module) is carried out by setting the variable "init_run". With "init_run“, the IM and FB45 are re-parameterized and synchronized.
Industry Automation and Drive Technologies - SCE 5.7 FC11 Function for a Command or Request Before starting a MOBY command with "command_start“, we have to define it. For a simple definition of a command, UDT 21 (German comments) is provided. UDT21 is embedded in DB47 multiple times. So that not all inputs have to be carried out in DB47, here a block for one command or request is generated. It is then possible to call this block in the control program multiple times; for example for a command string.
Industry Automation and Drive Technologies - SCE Enter Networks 1 to 6 Request or command Network 1 Network 2 Command Sub_Command Network 3 Data Length Network 4 MDS start address Network 5 DB number for data storage destination or source Network 6 Destination or target address of the DB of data storage Save and close FC11 TIA Training Document Module E11 Status: 01/2010 RF180C Page 35 of 65 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and
Industry Automation and Drive Technologies - SCE 5.8 Basics of Entries at Command Block FC11 The values for DB47 are specified by means of the input variables of FC11. One UDT21 is used for each request or command.
Industry Automation and Drive Technologies - SCE was read. Initialize Transponder Command Sub_command length (hex) 03 address_MDS [hex] DAT_DB [dec] Memory size of the - Comment [dec] 00 to FF hex - value that is MDS to be initialized written to the MDS Read out Reader status Command Sub_command length (hex) 04 address_MDS [hex] DAT_DB [dec] Comment [dec] 01 = status according to Pointer to the MOBY U/D or UDT 110¹ result.
Industry Automation and Drive Technologies - SCE pause with the remains set MDS¹ Switching the reader aerial on/off Command Sub_command length (hex) 0A address_MDS [dec] 01 = switch on aerial - DAT_DB [hex] - Comment [dec] - The command Aerial 02 = standby: on/off can not be started Switch aerial off with command repetition (refer to chapter "Command Repetition) 09 = adjust aerial to Only Reader 80 (MOBY the environment (FFT) F) Transponder Status Command Sub_command length (hex) 0
Industry Automation and Drive Technologies - SCE 5.9 Command String The user configures the command string by storing a corresponding number of UDT 21 one after the other in a DB. All commands that are strung together have to be of the "Command" type "4x". The last command of a string has to be of the type 0x. With it, the FB 45 recognizes the end of a command string. Example of a command string in DB47 Four data records are to be processed by an MDS.
Industry Automation and Drive Technologies - SCE 5.10 Basics of FB45 and DB45 FB45 accesses DB45. In DB45, a UDT11 is embedded for each reader.
Industry Automation and Drive Technologies - SCE Input Parameters of the UDT11 The user has to enter these variables during configuration (exception: command_DB_number/ command_DB_address). It is not necessary to change or poll these parameters during the entire execution time. Please note that before the new setting takes effect, "init_run“ has to be performed after an INPUT parameter is changed (refer to chapter "Programming Restarts and Warm Restarts").
Industry Automation and Drive Technologies - SCE Parameter “command_DB_address“ Value = 50 for Reader2 ___________________________ TIA Training Document Module E11 Status: 01/2010 RF180C Page 42 of 65 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and
Industry Automation and Drive Technologies - SCE Variable Description Setting the MOBY Operating Value Operating Mode IM Type Default -; reserved for setting with switch or GSD parameterization: different interfaces without switch under- stand under MOBY mode = 0 the MOBY I_mode. MOBY I or MOBY E (without MDS 507) MOBY I with MDS 507 MOBY U/D or RF300 – without multi tag handling Res.
Industry Automation and Drive Technologies - SCE Notes Parameter "option_1“ value = 2 to reset the red flashing of the error LED at the reader with “Init_Run” ______________________________________________________ __________________________________________________________________________ __________________________________________________________________________ TIA Training Document Module E11 Status: 01/2010 RF180C Page 44 of 65 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and
Industry Automation and Drive Technologies - SCE Variable multitag field_ON_control field_ON_time reserved Description MOBY U/D or RF300; maximum number of MDS processed in parallel in the field. Permissible values: 1 MOBY U: BERO operating mode; aerial field is switched on/off automatically. The command "Aerial ON/OFF“ is overlaid by the BERO operating mode. 00 hex = Without BEROs; no reader synchronization 01 hex = One or two BEROs; The BEROs are logically ored.
Industry Automation and Drive Technologies - SCE Command and Status Word "BEST" The control bits of FB45 are defined in the command and status word. The command and status word with the variables is generated with UDT 11. The variables and the associated relative addresses in UDT 11 are shown in the figure below. Control bits: The user starts his commands with these Boolean variables.
Industry Automation and Drive Technologies - SCE Control bits from Bit0 to Bit7 Variable Description cancel True =interruption of a current command or a command string. FB45 then sets the variable ready. MOBY U/D or RF300: the variable ‘cancel’ is not available. A command has to be canceled with the variable init_run. True = start of a command or a command string True = command repetition: The command or command chain stored last in the IM is reprocessed with the next MDS.
Industry Automation and Drive Technologies - SCE TIA Training Document Module E11 Status: 01/2010 RF180C Page 48 of 65 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and
Industry Automation and Drive Technologies - SCE Control bits from Bit8 to Bit15 Variable Description ANZ_MDS_present Indicates the presence of an MDS in the transmission window of the Read/Write MDS. ANZ_MDS_present is indicated only if the user set the INPUT parameter MDS_control. Please note that when init_run is executed, the ANZ_MDS_present indication briefly disappears even if an MDS stays permanently in the transmission window. The command executed last was a command interruption (cancel).
Industry Automation and Drive Technologies - SCE Additional indications The displays indicate to the user the progress of a command. Error analyses are easy to perform. Variable IM_busy command_rep_active number_MDS error_MOBY error_FB error_BUS version_MOBY Description This bit is set when the IM processes a command. Normally, "IM_busy“ is inverted to "ready“.
Industry Automation and Drive Technologies - SCE 5.11 FB10 Reader_Control Program Now, we are going to program the following in FB10: the control program for the control commands of a reader, and the call of FB45. In addition, the attendance time of the transponder is to be recorded. Generating FB10 First, set up a new function block FB10.
Industry Automation and Drive Technologies - SCE Then, set up STAT variables Next, set up TEMP variables Networks 1 to 3 Reader block Network 1 Network 2 Network 3: TIA Training Document Module E11 Status: 01/2010 RF180C Command start : Reset Reader ISO mode Page 52 of 65 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and
Industry Automation and Drive Technologies - SCE Networks 4 to 8 Network 4 RF300 mode Network 5 Network 6 : Attendance time MDS at reader Network 7 : Reader1 MDS time evaluaton time evalu ation time Network 8 : FB45 call #call_fb45 Note regarding networks 7and 8: The switch-on delay TON (SFB4) in Network 7 and the FB45 call in Network 8 are added as multiinstance. After insertion in the program, click on the block with the right mouse key and select “Change to multi-instance call“.
Industry Automation and Drive Technologies - SCE Save and close FB10 TIA Training Document Module E11 Status: 01/2010 RF180C Page 54 of 65 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and
Industry Automation and Drive Technologies - SCE 5.12 FB1 Control Program It is now possible to generate the control program with the completed blocks. Task: In our sample program, two command strings with two requests each will be processed. With the START_SLG1 (I0.0), the command chain of the first reader is executed. First, the MDS status information will be read, and then a write command is carried out on Reader1. With Reader1, we write 8 bytes that are stored in DB48 starting with DBB0 to the MDS.
Industry Automation and Drive Technologies - SCE TIA Training Document Module E11 Status: 01/2010 RF180C Page 56 of 65 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and
Industry Automation and Drive Technologies - SCE Setting up TEMP Variables Network 1 to 2 FB10 is inserted as a multi-instance block.
Industry Automation and Drive Technologies - SCE Network 3 TIA Training Document Module E11 Status: 01/2010 RF180C Page 58 of 65 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and
Industry Automation and Drive Technologies - SCE Network 4 to 5 TIA Training Document Module E11 Status: 01/2010 RF180C Page 59 of 65 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and
Industry Automation and Drive Technologies - SCE Network 6 Save and close FB1 TIA Training Document Module E11 Status: 01/2010 RF180C Page 60 of 65 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and
Industry Automation and Drive Technologies - SCE 5.13 OB1 Program Call Double click on OB1 in the project window, or open the object properties of OB1 and enter the symbolic name and the symbol comment. Open OB1 and call FB1 with DB1 Confirm the window with the query for generating DB1 by clicking on “Yes“. Save and close OB1 We can now load the program into the controller and test it.
Industry Automation and Drive Technologies - SCE 5.
Industry Automation and Drive Technologies - SCE 5.
Industry Automation and Drive Technologies - SCE 5.
Industry Automation and Drive Technologies - SCE 5.17 Block Folder 5.