Siemens SIMATIC S7-1500 Manual

Siemens SIMATIC S7-1500 Manual

Reading and writing rfid data via io-link
Hide thumbs Also See for SIMATIC S7-1500:

Advertisement

Quick Links

Reading and Writing
RFID Data with
SIMATIC S7-1500 via
IO-Link
SIMATIC RF220R Reader, ET 200SP
https://support.industry.siemens.com/cs/ww/en/view/73565887
Siemens
Industry
Online
Support

Advertisement

Table of Contents
loading

Summary of Contents for Siemens SIMATIC S7-1500

  • Page 1 Reading and Writing RFID Data with SIMATIC S7-1500 via IO-Link Siemens SIMATIC RF220R Reader, ET 200SP Industry Online https://support.industry.siemens.com/cs/ww/en/view/73565887 Support...
  • Page 2: Legal Information

    The foregoing provisions do not imply any change in the burden of proof to your detriment. You shall indemnify Siemens against existing or future claims of third parties in this connection except where Siemens is mandatorily liable.
  • Page 3: Table Of Contents

    Table of Contents Table of Contents Legal information ......................2 Task ........................4 Solution....................... 6 Overview....................6 Description of the core functionality ............. 8 2.2.1 Reading / writing of RFID data from / to a transponder ....... 9 Hardware and software components ..........12 2.3.1 Validity ....................
  • Page 4: Task

    1 Task Task Introduction With RFID, complete tracking and documentation of all delivered, stored and shipped goods can be performed for intralogistics or in small assembly lines. For this purpose, a small data medium – referred to as transponder – that stores all essential information is attached to each product or package.
  • Page 5 To realize the application, a SIMATIC RF220R IO-Link reader (version 1.1) with a SIMATIC S7-1513-1 PN CPU should be used. Further informations You can download the Library for IO-Link (LIOLink) separately in the Siemens Industry Online Support: https://support.industry.siemens.com/cs/ww/en/view/82981502 Read/write data with IO-Link Entry ID: 73565887, V3.4,...
  • Page 6: Solution

    2 Solution Solution Overview Schematic layout The figure below shows a schematic overview of the most important components of the solution: Figure 2-1 User program of the PG/PC S7-1500 CPU: IOL_READ_WRITE_ DATA S7-1500 PROFINET IE ET 200SP CM 4xIO- MDS Dxx RF220R Link Components included...
  • Page 7 2 Solution Component Description IO-Link master SIMATIC ET 200eco PN, ET 200S or • ET 200AL can also be used as IO-Link ET 200SP IM155-6PN HF master. • ET 200SP, CM 4 X IO-LINK ST Structure The integration of the RF220R via IO-Link to the S7-1500 is performed via the IO-Link Master ET 200SP/ CM 4xIO-Link, to which the RF220R is connected via its IO link interface The user blocks FB IolReadAnt and FB IolWriteAnt have been created with the...
  • Page 8: Description Of The Core Functionality

    2 Solution Description of the core functionality Realized functions The following core functions have been realized in the application example: • Switching on the integrated antenna of the RF220R reader before starting a read or write job. • Reading/writing RFID data when a transponder is located in the reader’s field. •...
  • Page 9: Reading / Writing Of Rfid Data From / To A Transponder

    2 Solution 2.2.1 Reading / writing of RFID data from / to a transponder HMI visualization "READ" The following figure shows the HMI visualization for the "READ" function and displays das "IOL_Station_READ" screen. Figure 2 Table 2-2 Description Entry of the time for the "Watchdog timers", the length, and the offset with the data to be read.
  • Page 10 2 Solution Description "ERROR" indicates whether an error has occurred. "STATUS" gives an indication of which error has happened (see Chapter 3.2.3). "READ" starts a read job. "DONE" indicates whether the last job has been processed without errors. Outputs up to 24 bytes of the read data after a job has been executed without errors. HMI visualization "WRITE"...
  • Page 11 2 Solution Sequence of the core functionality Figure 2-3 Wait for trigger Start Error Switching on IOL Reader Finished No transponder detected Watchdog timer Error and status output Transponder detected Read/write function Error Finished Switching off IOL Reader Table 2-4 Action Note Job triggered by the user.
  • Page 12: Hardware And Software Components

    Table 2-5 Component Article number Note SIMATIC S7-1500 Alternatively, any other 6ES7 513-1AL01-0AB0 SIMATIC S7-1500 with PN CPU 1513-1PN interface compatible with the CP can also be used. Alternatively, any other SIMATIC PM 1507 6EP1332-4BA00 voltage supply can also be 24 V used.
  • Page 13 2 Solution Software components Table 2-6 Component Article number Note 6ES7822-1A.06-.. TIA Portal V17 S7-PCT-Port Available for download in the Configuration Tool Online Support (as of V3.4 HF2) IODD file RF220R Available for download in the for IO Link V1.1 Online Support Example files and projects The following list includes all files and projects that are used in this example.
  • Page 14: Mode Of Operation

    3 Mode of Operation Mode of Operation General overview Figure 3-1 Start Error LIOLink_RF200_ SwitchAntenna No transponder detected Error and Watchdog timer status output Transponder detected Error LIOLink_RF200_ ReadTag/WriteTag Done LIOLink_RF200_ SwitchAntenna The table below shows the individual steps of the read/write function (reading/writing RFID data from/to the transponder).
  • Page 15 3 Mode of Operation Program overview Figure 3-2 Main IolReadAnt IolWriteAnt User program Lxx_ Lxx_ Lxx_ Lxx_ Switch Switch ReadTag WriteTag Antenna Antenna Library blocks Inst Inst DataBuffer IolWriteAnt IolReadAnt Interface Data blocks Program blocks Table 3-2 Element Symbolic name Description Main Cyclic OB:...
  • Page 16 InstIolWriteAnt Instance data block of the IolWriteAnt block Note For a more detailed description of the library blocks, refer to the library documentation: https://support.industry.siemens.com/cs/ww/en/view/82981502 sdsafasdfsa "Main" OB 1 calls the following blocks: • FB3: "IolReadAnt" contains the flowchart for a read job from switching the reader on, via the read function, to switching the reader off.
  • Page 17: Functionality

    3 Mode of Operation "DataBuffer" In data block "DataBuffer" (DB1), the RFID data to be read from or written to the transponder is stored. Table 3-4 Name Data type Description readData Array[0..1999] of byte Data read from the transponder after a read job. writeData Array[0..1999] of byte Data, to be written to a transponder during a...
  • Page 18: Program Details On Fb "Iolwriteant" (Fb5)

    3 Mode of Operation The block has the following in-/outputs: Name Data type Description identData Variant Data area where the read data is stored. The block has the following outputs: Table 3-6 Name Data type Description done Bool TRUE, if processing the routine has been terminated. FALSE, during and before executing a new command.
  • Page 19 3 Mode of Operation Name Data type Description addrTag Start address of the data to be written on the Word transponder. length DWord Length of the data that is written to the transponder. hwId HW_ANY Hardware identifier of the IO-Link communication module.
  • Page 20: Error And Status Display

    3 Mode of Operation 3.2.3 Error and status display For error diagnostics, the function blocks "IolReadAnt" (FB3) and "IolWriteAnt" (FB5) have one STATUS output each. By reading the STATUS output of the function block you receive information on • Error messages of the IolReadAnt function block (FB3) and the function blocks of the library •...
  • Page 21: Installation And Commissioning

    4 Installation and Commissioning Installation and Commissioning Hardware installation The required hardware components are listed in Chapter 2.3.2 (used hardware and software components). NOTICE Always follow the installation guidelines for all components. NOTICE Before you switch on the power supply, complete and check the installation! The figure below shows the hardware configuration of the application.
  • Page 22: Installing The Software

    4 Installation and Commissioning Table 4-1 Action Remarks Connect the individual modules to a suitable module rack. Connect the PM 1507 with the power supply When wiring the 24V, make sure that the system (230 V alternating current). polarity is correct. Interconnect the following devices: •...
  • Page 23: Setting The Ip Addresses

    4 Installation and Commissioning Result: The CPU then performs a "Reset to factory settings" whilst the RUN/STOP LED flashes yellow. If the RUN/STOP LED lights up yellow, the CPU has been reset to factory settings and is in STOP mode. The "Reset to factory settings" event is entered in the diagnostic buffer.
  • Page 24: Configuration Of The Io-Link Master

    4 Installation and Commissioning 4.3.4 Configuration of the IO-Link Master Before you start operating the application, the following steps are necessary to commission the RF200 IO-Link reader. Table 4-5 Action In the TIA Portal, open the Device configuration of the PLC_S7_1500 station. Open the properties of the CM 4xIO-Link module and activate a new potential group.
  • Page 25 4 Installation and Commissioning Action In PCT (S7 Port Configuration Tool) go to the Ports tab, open the product catalog in PCT and select an IO-Link device V1.1. Drag this device to the desired port of the master module. In this example an RF200 IO-Link reader is inserted. Go to the Addresses tab to perform a possible change of the device addresses.
  • Page 26: Change The Ip Address Of The Cpu

    4 Installation and Commissioning 4.3.5 Change the IP address of the CPU Before the STEP 7 project can be loaded into the CPU, the IP address of the S7- 1500 CPU with which you can load the project into the CPU, must be changed. Note The IP address configured in STEP 7 V17 (TIA Portal) for the S7-1500 CPU must be located in the same subnet as the IP address set in Windows.
  • Page 27: Loading The Step 7 Project Into The S7 Cpu

    4 Installation and Commissioning 4.3.7 Loading the STEP 7 project into the S7 CPU Requirement: • The STEP 7 V17 project has already been installed and retrieved (see Chapter 4.3). • The IO-Link master has already been configured (see Chapter 4.3.4).
  • Page 28: Operating The Application

    5 Operating the Application Operating the Application Menu navigation of the HMI Figure 5-1 Main menu Application example Industry Online Support Information READ WRITE Note In the user interface of the HMI you can change the display language of each screen from German to English and vice versa by clicking on the flag icons.
  • Page 29: Reading Rfid Data From The Transponder

    5 Operating the Application Reading RFID data from the transponder The table below lists instructions for reading RFID data from the transponder. HMI screen "IOL_Station_READ" is used here. Table 5-1 Action In the input fields "Timer" and "Length" you enter (an "Offset" if desired) the values relevant for reading the RFID data.
  • Page 30: Writing Rfid Data To The Transponder

    5 Operating the Application Writing RFID data to the transponder The following table provides instructions for writing RFID data to the transponder. The "IOL_Station_WRITE" screen is used here. Table 5-2 Action In the input fields "Timer" and "Length" you enter (an "Offset" if desired) the values relevant for writing the RFID data.
  • Page 31: Error States

    5 Operating the Application Error states An error while operating the application can have the following causes: • no transponder in the reader field • cancellation of the read function The following table shows an example for such a situation. Table 5-3 Action In the input fields "Timer"...
  • Page 32 5 Operating the Application Action An error has occurred: "ERROR" display: ON "STATUS": 16#00018103 -> No transponder in the reader field Place a transponder in the reader’s field and once again click on the "READ" button. The error was cleared. The read RFID data is available to you in the "Read Data"...
  • Page 33: Appendix

    Industry Online Support Do you have any questions or need assistance? Siemens Industry Online Support offers round the clock access to our entire service and support know-how and portfolio. The Industry Online Support is the central address for information about our products, solutions and services.
  • Page 34: Industry Mall

    6 Appendix Industry Mall The Siemens Industry Mall is the platform on which the entire siemens Industry product portfolio is accessible. From the selection of products to the order and the delivery tracking, the Industry Mall enables the complete purchasing processing –...
  • Page 35: Change Documentation

    6 Appendix Change documentation Table 6-2 Version Date Modifications V1.0 07/2013 First version V2.0 03/2015 Write function added and update of existing software. V2.1 12/2016 Update to TIA V14 V3.0 09/2017 Update to TIA V14 SP1 + adaption to the styleguide V3.1 12/2017 Update for IO-Link V1.1...

This manual is also suitable for:

Simatic rf220rSimatic et 200sp

Table of Contents