Siemens Weather Radio S7-300F-2 PN, Weather Radio DP User Manual

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 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and RF180C
Page 1 of 65
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). Violators are held liable to pay damages. All rights -including translation- reserved, particularly if a patent is granted, or a utility model or design is registered.
We wish to thank the Michael Dziallas Engineering corporation and the instructors of vocational schools as well as all those who provided support during the preparation of this manual.
TIA Training Document Module E11 Status: 01/2010 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and RF180C
Page 2 of 65
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 ......................................................................................8
4 RFID Fundamentals ......................................................................................................................................9
5 Starting up an RFID project with CPU 315F-2 PN/DP and RF180C ........................................................10
5.1
5.2
5.3
5.4
5.5
5.6
5.7
5.8
5.9
5.10
5.11
5.12
Setting Up a New Project .....................................................................................................................11
Configuring the Hardware ....................................................................................................................13
Assigning a Device Name ....................................................................................................................20
Inserting UDT Blocks and FB45 ...........................................................................................................22
Generating Data Blocks .......................................................................................................................23
Programming a Restart or Warm Restart ............................................................................................33
FC11 Function for a Command or Request .........................................................................................34
Basics of Entries at Command Block FC11 .........................................................................................36
Command String ..................................................................................................................................39
Basics of FB45 and DB45 ....................................................................................................................40
FB10 Reader_Control Program............................................................................................................51
FB1 Control Program ...........................................................................................................................55
5.13
OB1 Program Call ................................................................................................................................61
5.14
Variable Table STATUS_SLG_1..........................................................................................................62
5.15
Variable Table STATUS_SLG_2..........................................................................................................63
5.16
Symbol Table .......................................................................................................................................64
5.17
Block Folder .........................................................................................................................................65
5.18
DB49 Data View ...................................................................................................................................65
TIA Training Document Module E11 Status: 01/2010 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and RF180C
Page 3 of 65
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 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and RF180C
Page 4 of 65
Industry Automation and Drive Technologies - SCE
2 to 3
days
Module
s A
1 PREFACE
Regarding its content, Module E11 is part of the instruction unit 'IT Communication with SIMATIC S7’.
Fundamentals of STEP7 Programmig
Additional Functions of STEP7 Programming
2 to 3 days Modules B
System Simulation with SIMIT SCE
1 to 2 days Modules G
Programming Languages
2 to 3 days Modules C
Industrial Fiedbus Systems
2 to 3 days Modules D
Process Visualization
2 to 3 days Modules F
Frequency Converter at SIMATIC S7
2 to 3 days Modules H
IT Communication with SIMATIC S7
2 to3 days Module E
Objective
In Module E11, the reader will learn how networking and data exchange between PLCs and RFID components is set up. As PLC, the CPU 315F-2 PN/DP and as Radio Frequency Identification (RFID), a SIMATIC RFID system is used. The RFID components consist of the interface module RF180C (ASM) with write/read device RF310R (Reader or SLG (write/read device)) and different mobile data systems such as RF340T, RF350T, RF360T or ISO Moby D MDS D124 (transponder or MDS). PROFINET is used for networking the PLC and the SIMATIC RF180C. Module E11 shows in principle the procedure for the startup, based on a brief example.
Prerequisites
To successfully work through Module E11, the following knowledge is assumed:
How to handle Windows
Fundamentals of PLC programming with STEP7 (for example, Module A ‘Startup’ PLC
Programming with STEP7).
Fundamentals of network engineering (for example, Appendix V – Basics of Network Engineering)
TIA Training Document Module E11 Status: 01/2010 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and RF180C
Page 5 of 65
Industry Automation and Drive Technologies - SCE
Hardware and Software Required
1 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
2 Software STEP 7 V 5.4 3 PLC SIMATIC S7-300 with CPU 315F-2 PN/DP and at least one digital Input and output module
Sample configuration:
- Power supply: PS 307 2A
- CPU: CPU 315F-2 PN/DP
- Digital inputs: DI 16x24V DC
- Digital outputs: DO 16x24V DC/0.5 A 4 SIMATIC RF180C IM (interface module)
RF310R or RF340R SLG (write/read device) Different transponder MDSs (Mobile Data System) of the type: RF340T (8 KB) RF350T (32 KB) RF360T (64 KB) ISO Moby D MDS D124 (112 bytes)
5 Ethernet connection between PC, CPU 315F-2 PN/DP and RF180C
2 STEP 7
1 PC
3 SIMATIC S7-300 with
CPU 315F-2 PN/DP
5 Ethernet Connection
4 SIMATIC RF180C (ASM)
with reader RF310R (SLG = write/read device) and transponder RF340T (MDS)
TIA Training Document Module E11 Status: 01/2010 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and RF180C
Page 6 of 65
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. This allows for using the CPU as PROFINET IO controller to operate distributed IO
on PROFINET. The CPU can be programmed by means of this interface also!
- Moreover, it is possible to use fail-safe IO devices on both interfaces.
Notes:
- In module E11, the CPU 315F-2 PN/DP is used as the controller for the data exchange of a
SIMATIC RFID system on the PROFINET.
- To run this CPU, a micro-memory card is required!
- The addresses of the input and output modules can be parameterized at this CPU.
TIA Training Document Module E11 Status: 01/2010 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and RF180C
Page 7 of 65
Industry Automation and Drive Technologies - SCE
write/read device)
to additional
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. FB 45 makes available to the S7user an interface that is easy to handle and is equipped with powerful commands (processing a complete tag with a single command; command chaining; S7 data structures by means of UDTs).
Controller For example, S7400 CPU
PROFINET IO cable
24V for RF180C and reader (SLG =
PROFINET IO stations
The RF180C is integrated into the hardware configuration by means of a GSDML file. Then, the RF180C can be configured by means of HWConfig of the SIMATIC Manager.
The GSDML file is provided on the CD "RFID Systems“.
Additional information is available in the operating instructions "RFID Systems Communication Module RF180C“.
TIA Training Document Module E11 Status: 01/2010 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and RF180C
Page 8 of 65
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. The reading device includes a software (a micro-program) that controls the actual read process, and an RFID middleware with interfaces to other EDP systems and data bases. As a rule, a read device generates an electro-magnetic high frequency field with a short range, preferably with induction coils. It is not only used to transmit data, but to also to supply the transponder with power. Only if larger ranges are to be obtained are active transponders used that have their own power supply. Usually, the frequency of 13.56 MHz is used (RF300, ISO). The reading device (reader) generates a high frequency electromagnetic alternating field that illuminates the aerial of the RFID transponder (RFID tag). As soon as the aerial coil enters the electro-magnetic field, an induction current is generated in it. This current is rectified, and with it, a capacitor is loaded as short time storage which, for the read process, provides for the power supply of the chip. For active tags, an installed battery takes care of the supply. The micro-chip thus activated in the RFID tag decodes the commands sent by the reader. This reader encodes and modulates the reply into the irradiated electro-magnetic field through field weakening in the contact-free short circuit, or in opposition reflection of the field that the reader transmitted. With this, the tag transmits its own unchangeable serial number, additional numbers of the marked object, or other data that the reader polled. The transponder itself does not transmit a field; it only changes the reader’s electro-magnetic transmission field.
Readout Station
Readout Station
Transponder switch open, aerial is on "Absorption“ (return value 0).
Transponder switch closed, aerial is on "Reflect“, (return value 1). (Source: Wikipedia)
TIA Training Document Module E11 Status: 01/2010 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and RF180C
Page 9 of 65
Industry Automation and Drive Technologies - SCE
Destination data
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.
In our example, it has to be possible to perform the following actions for each reader:
- Writing data to the transponder (DB48 of the CPU to the MDS).
- Reading the data from the transponder (MDS to DB48 of the CPU).
- Reading the transponder data information (MDS to DB49 of the CPU).
- Reading the reader status information (reader to DB50 of CPU).
The data structure of the German language UDTs is as follows:
FB45
for Reader 1
DB1
Multi-instance DB of FB45
FB45
for Reader 2
a UDT11 integrated for each reader
UDT11
Byte 0 to Byte 49 to Reader 1
UDT11
DB47 DB45
Per commd UDT21
Write to MDS Command 01
Read from MDS Command 02
Read MDS status Command 0B/01
Read MDS Status Command 0B/02
DB48
General data
Source data
DB49 MDS Status
UDT261
UDT271
Byte 50 to Byte 99 to Reader 2
Read reader status Command 04 /01
DB50 Reader Status
UDT111
DB1
Multi-instance DB of FB45
Read reader status Command 04/06 Reader diagnosis
UDT281
To generate the data structure, the required UDT data types have to be imported to the Step 7 project and function block FB45. A sample program with the blocks is provided on the CD "RFID Systems“.
Additional information about the data structure is available in the function manual "RFID Systems FB45“
TIA Training Document Module E11 Status: 01/2010 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and RF180C
Page 10 of 65
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. Next, we are assigning the ’Name’ 'RFID_RF180C’ to the project ( RFID_RF180C OK)
TIA Training Document Module E11 Status: 01/2010 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and RF180C
Page 11 of 65
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’. ( Insert Station SIMATIC 300 Station)
TIA Training Document Module E11 Status: 01/2010 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and RF180C
Page 12 of 65
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.
TIA Training Document Module E11 Status: 01/2010 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and RF180C
Page 13 of 65
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).
Note
If your hardware deviates from the one displayed here, simply select the corresponding modules from the catalog and insert them in your rack. The order numbers for the individual modules -that are also inscribed on the modules- are displayed in the footer of the catalog.
TIA Training Document Module E11 Status: 01/2010 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and RF180C
Page 14 of 65
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. Optionally, a ’Router address’ can be selected for network-overarching communication. Confirm your entries with ’OK’ ( IP address:
192.168.0.100 subnet screen form: 255.255.255.0 Ethernet(1) Don’t use a router OK)
TIA Training Document Module E11 Status: 01/2010 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and RF180C
Page 15 of 65
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. On each module, a MAC address specified by the factory is inscribed.
Value range for the IP address:
The IP address consists of 4 decimal numbers in the value range 0 to 255, separated by a period; for example: 141.80.0.16
Value range for the subnet screen form:
This screen form is used to establish whether a station or its IP address belongs to the local subnet, or can be reached only by means of a router. The subnet screen form consists of 4 decimal numbers in the value range 0 to 255, separated by a
period; for example: 255.255.0.0 The 4 decimal numbers of the subnet screen form have to contain -in their binary representation-
from the left a series of gapless values "1" and from the right a series of gapless values "0".. The values "1" determine the area of the IP address for the network number. The values "0" determine the area of the IP address for the station address. Example: Correct values: 255.255.0.0 Decimal = 1111 1111.1111 1111.0000 0000.0000 0000 binary
255.255.128.0 Decimal = 1111 1111.1111 1111.1000 0000.0000 0000 binary
255.254.0.0 Decimal = 1111 1111.1111 1110.0000 0000.0000.0000 binary Incorrect value: 255.255.1.0 Decimal = 1111 1111.1111 1111.0000 0001.0000 0000 binary
Value range for the address of the gateway (router):
The address consists of 4 decimal numbers in the value range 0 to 255 separated by a period; for example, 141.80.0.1.
Relationship of the IP addresses, router address and subnet screen form:
The IP address and the gateway address must differ only at those positions where an "0" is shown in the subnet screen form. Example: You entered the following: for subnet screen form 255.255.255.0; for IP address 141.30.0.5 and for router address 141.30.128.1. The value for the IP address and the gateway address is to differ only in the 4th decimal number. However, in the example, the 3rd position already differs. In the example, we have to alternatively change:
- the subnet screen form to: 255.255.0.0 or
- the IP address to: 141.30.128.5 or
- the gateway address to: 141.30.0.1
TIA Training Document Module E11 Status: 01/2010 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and RF180C
Page 16 of 65
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.
TIA Training Document Module E11 Status: 01/2010 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and RF180C
Page 17 of 65
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. ( PN-IO, PN-IOx100, OK)
TIA Training Document Module E11 Status: 01/2010 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and RF180C
Page 18 of 65
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. By clicking on '
TIA Training Document Module E11 Status: 01/2010 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and RF180C
’, the hardware configuration is saved and compiled.
Page 19 of 65
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. Highlight the SIMATIC RFID module and then click on the button “Assign name“. Then close the
window.
TIA Training Document Module E11 Status: 01/2010 Radio Frequency Identification (RFID) with SIMATIC S7-300F-2PN/DP and RF180C
Page 20 of 65
Loading...
+ 45 hidden pages