SIMATIC RF300 RF180C en

Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

Configuring Aid  05/2016

Industrial Identification
with SIMATIC RF300 and
RF180C
SIMATIC RF / PROFINET / SIMATIC S7-300/400/1200/1500

https://support.industry.siemens.com/cs/ww/en/view/109483372
Warranty and Liability

Warranty and Liability


Note The Application Examples are not binding and do not claim to be complete regarding the
circuits shown, equipping and any eventuality. The Application Examples do not represent
customer-specific solutions. They are only intended to provide support for typical
applications. You are responsible for ensuring that the described products are used
correctly. These Application Examples do not relieve you of the responsibility to use safe
practices in application, installation, operation and maintenance. When using these
Application Examples, you recognize that we cannot be made liable for any
damage/claims beyond the liability clause described. We reserve the right to make
changes to these Application Examples at any time without prior notice. If there are any
deviations between the recommendations provided in this Application Example and other
Siemens publications – e.g. Catalogs – the contents of the other documents shall have
priority.
We do not accept any liability for the information contained in this document.
Any claims against us – based on whatever legal reason – resulting from the use of
the examples, information, programs, engineering and performance data etc.,
described in this Application Example shall be excluded. Such an exclusion shall
not apply in the case of mandatory liability, e.g. under the German Product Liability
Act (“Produkthaftungsgesetz”), in case of intent, gross negligence, or injury of life,
body or health, guarantee for the quality of a product, fraudulent concealment of a
deficiency or breach of fundamental contractual obligations (“wesentliche
Vertragspflichten”). The damages for a breach of a substantial contractual
obligation are, however, limited to the foreseeable damage, typical for the type of
contract, except in the event of intent or gross negligence or injury to life, body or
 Siemens AG 2016 All rights reserved

health. The above provisions do not imply a change of the burden of proof to your
detriment.
Any form of duplication or distribution of these Application Examples or excerpts
hereof is prohibited without the expressed consent of Siemens AG.

Security Siemens provides products and solutions with industrial security functions that support the
informa- secure operation of plants, systems, machines and networks.
tion To protect plants, systems, machines and networks against cyber threats, it is necessary
to implement (and continuously maintain) a holistic, state-of-the-art industrial security
concept. Products and solutions from Siemens are only one part of such a concept.
The customer is responsible for preventing unauthorized access to the customer’s plants,
systems, machines and networks. Systems, machines and components should be
connected to the company network or the Internet only if and to the extent necessary and
if appropriate protective action (e.g., use of firewalls and network segmentation) was
taken.
In addition, Siemens’ recommendations regarding appropriate protective action should be
followed. For more information about industrial security, visit
http://www.siemens.com/industrialsecurity.
Siemens’ products and solutions undergo continuous development to make them even
more secure. Siemens strongly recommends to perform updates as they become
available and use only the latest product versions. Using versions that are out of date or
no longer supported can increase the risk of cyber threats.
To stay informed about product updates as they occur, subscribe to the Siemens
Industrial Security RSS feed at http://www.siemens.com/industrialsecurity.

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 2
Table of Contents

Table of Contents
Warranty and Liability ................................................................................................. 2
1 Task ..................................................................................................................... 4
2 Solution............................................................................................................... 5
2.1 Overview............................................................................................... 5
2.2 Description of the core functionality ..................................................... 6
2.3 Hardware and software components ................................................... 7
3 PLC Program ...................................................................................................... 9
3.1 Complete overview ............................................................................... 9
3.2 Basics of using the Ident blocks ......................................................... 11
3.3 Explanation of “HW_CONNECT” ....................................................... 12
3.4 Explanation of the Ident blocks .......................................................... 14
3.4.1 “RESET_RF300” functionality ............................................................ 14
3.4.2 “SET_ANT_RF300” functionality ........................................................ 15
3.4.3 “READ” functionality ........................................................................... 16
3.4.4 “WRITE” functionality ......................................................................... 17
3.5 Explanation of the “Ident_Profile” block ............................................. 18
3.6 Diagnostics and error messages ........................................................ 18
4 Configuration and Project Engineering ......................................................... 19
5 Installation and Startup ................................................................................... 23
 Siemens AG 2016 All rights reserved

5.1 Installing the hardware ....................................................................... 23


5.2 Installing the software (download) ...................................................... 24
5.3 Startup ................................................................................................ 24
6 Operation of the Application Example .......................................................... 25
6.1 Description of the watch table ............................................................ 25
6.2 Using the watch table ......................................................................... 26
6.2.1 Executing a reset command ............................................................... 26
6.2.2 Executing a read command ............................................................... 28
6.2.3 Executing a write command ............................................................... 29
6.2.4 Executing an antenna command ........................................................ 30
7 Tips and Tricks ................................................................................................ 32
8 Links & Literature ............................................................................................ 33
9 History............................................................................................................... 33

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 3
1 Task

1 Task
Introduction
To implement automatic identification of goods, materials and material carriers for
process and production plants, the SIMATIC Ident product portfolio from Siemens
offers customized modules for this task.
This application example shows what has to be considered when configuring RFID
systems.

Overview of the automation task


The figure below provides an overview of the automation task.
Figure 1-1

PLC

RFID interface module

RFID field devices


 Siemens AG 2016 All rights reserved

RFID transponders

A large number of interface and communication modules are available to integrate


the SIMATIC Ident modules into a SIMATIC control system.
For running the SIMATIC RFID modules on SIMATIC S7 controllers, suitable
function blocks are available for programming using STEP 7 TIA Portal.
Depending on the preferred transmission type, the user has to select the
appropriate communication module.

Objective of this configuring aid


The aim of this application example is to connect the RFID readers to the control
system via PROFINET. The communication module required for this is the
RF180C. SIMATIC RF300 is used as the RFID system for identification using
transponders.
The goal of this application example is to support you in commissioning your
SIMATIC Ident modules. The application example mainly focuses on the ready-to-
use blocks of the “SIMATIC Ident” library. It additionally describes the project
engineering and configuration of the SIMATIC Ident modules.

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 4
2 Solution
2.1 Overview

2 Solution
2.1 Overview
Diagrammatic representation
The diagrammatic representation below shows the most important components of
the solution:
Figure 2-1

SIMATIC S7 controllers
S7-1500 S7-1200 S7-300/
S7-400
 Siemens AG 2016 All rights reserved

PROFINET IE

SIMATIC
communication module
RF180C

Serial connection / RS422

SIMATIC RFID readers

RF300

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 5
2 Solution
2.2 Description of the core functionality

Advantages
The solution presented here offers the following advantages:
 The illustrations and explanations included in this application example save
you time and costs when commissioning your own automation solution.
 You can expand the supplied hardware configuration as desired or integrate it
into your project.
 Using the RF180C allows you to integrate the SIMATIC RF readers into a
control system via PROFIBUS. This is a frequent requirement in modern
automation solutions.
 The use of the ready-to-use Ident blocks significantly simplifies operating the
SIMATIC RF readers.

2.2 Description of the core functionality


Sequence of the core functionality
Figure 2-2

Trigger Display
reset job result
 Siemens AG 2016 All rights reserved

Trigger Trigger Trigger


Set_Ant read write

Data
storage

Display Display Display


job result job result job result

A reset (initialization) through the Ident blocks sets the RFID reader to ready for
operation. When the reset has been successfully performed, the user can choose
between different RFID operations and monitor their status.

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 6
2 Solution
2.3 Hardware and software components

2.3 Hardware and software components


This application example was created with the following components:

Hardware components
Table 2-1
Component No. Article number Note
SIMATIC S7-300 1 6ES7317-2EK14- Alternatively, a different
CPU 317-2 PN/DP 0AB0 S7-300/400 CPU can also be
used.
SIMATIC S7-1200 1 6ES7214-1AG40- Alternatively, a different
CPU 1214 DC/DC/DC 0XB0 S7-1200 CPU can also be
used.
SIMATIC S7-1500 1 6ES7516-3AN01- Alternatively, a different
CPU 1516-3 PN/DP 0AB0 S7-1500 CPU can also be
used.
SIMATIC RF180C 1 6GT2002-0JD00
SIMATIC RF310R 1 6GT2801-1AB10 Alternatively, a different
SIMATIC RF300 reader can
also be used.
SIMATIC RF340T n 6GT2600-4AC00 Alternatively, different RF300
 Siemens AG 2016 All rights reserved

transponders can also be


used.
KAB_KONF_ASM 456, 1 6GT2891-0FH20
RF170C-READER_2M

Note This document describes the automation solution with different S7 controller
types. You only need one of the above controllers to install and start up the
application example.

Hinweis When using a SIMATIC S7-400, only the function block "Ident_Profile" works.

Software components
Table 2-2
Component No. Article number Note
STEP 7 TIA Portal 1 6ES7822-0A.03-.. V13 SP1 or higher

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 7
2 Solution
2.3 Hardware and software components

Sample files and projects


The following list contains all files and projects that are used in this example.
Table 2-3
Component Note
109483372_SIMATIC_RF300_RF120C_S7- This zip file contains the STEP 7
300.zip project for the SIMATIC S7-300.
109483372_SIMATIC_RF300_RF120C_S7- This zip file contains the STEP 7
1200.zip project for the SIMATIC
S7-1200.
109483372_SIMATIC_RF300_RF120C_S7- This zip file contains the STEP 7
1500.zip project for the SIMATIC
S7-1500.
109483372_SIMATIC_RF300_RF180C_en.pdf This document.
 Siemens AG 2016 All rights reserved

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 8
3 PLC Program
3.1 Complete overview

3 PLC Program
The following chapters describe the PLC program of the configuring aid.

3.1 Complete overview


The diagrammatic representation below shows the interaction between the user
program and the SIMATIC hardware:
Figure 3-1

User program
Ident blocks

Reset_
RF300
Set_Ant_
RF300
Read Write …

Hardware
 Siemens AG 2016 All rights reserved

SIMATIC S7 controllers

Interface modules

SIMATIC RFID readers


The Ident blocks from the “SIMATIC Ident” library integrated in TIA Portal control
the RFID operations of the RFID readers. The command frames the Ident blocks
generate are sent from the SIMATIC S7 controller to the SIMATIC RFID readers
via the interface modules. The response frames of the RFID readers take the same
path back to the user program and are provided to the user via the block outputs.
For the Ident blocks, it is irrelevant whether the interface modules are connected to
the control system via PROFIBUS, PROFINET or on a proprietary basis.

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 9
3 PLC Program
3.1 Complete overview

Program overview
The following figure shows the call hierarchy of the user program of this application
example:
Figure 3-2

OB 1 cycle Ident blocks Data storage

Reset_ Hw-
Interface
RF300 Connect

Read IdentData

Write
 Siemens AG 2016 All rights reserved

Ident Profile

Set_Ant_ Ident_
OB 1
RF300 Profile

To show the use of the Ident blocks in a simplified manner, this application
example calls them directly in the OB 1 cycle. Therefore, a minimum PLC program
will be created.
Each Ident block is responsible for a specific RFID functionality.
The transponder data read and to be written is stored in the “IdentData” data block.
The “Interface” data block includes all tags of the application example that are to be
modified.
Internally, all Ident blocks call the basic block, “Ident_Profile”. Therefore, the Ident
blocks are only an encapsulation of the complex Ident_Profile block to make
implementing the RFID functionalities easier for the user.
The block names describe their basic core functionality. The following ready-to-use
Ident blocks are available for the SIMATIC RF300 product portfolio:
Table 3-1
Ident block name Implemented in this example
Reset_RF300 
Reset_Reader 
Set_ant_RF300 
Read 
Write 

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 10
3 PLC Program
3.2 Basics of using the Ident blocks

Ident block name Implemented in this example


Read_UID 
AdvancedCMD 
Reader_Status 
Tag_Status 

This application example discusses only the four implemented blocks as they
determine the basic operation of SIMATIC RF readers.

3.2 Basics of using the Ident blocks


To be able to use the Ident blocks, the following basics must be considered:

Call of the blocks


When an Ident block is called in TIA Portal, all required software components for
the block are automatically generated and added to your project. This includes
user-defined data types (UDTs), the basic “Ident_Profile” block and various system
function blocks (SFCs and SFBs).
 Siemens AG 2016 All rights reserved

In TIA Portal, you can find the Ident blocks in “Instructions” > “Optional packages” >
“SIMATIC Ident”.

Addressing of the blocks


All Ident blocks have an INOUT parameter called “HW_CONNECT”. Via this
interface, the blocks must be provided with the address information of the
configured interface module/reader: When an Ident block is called, the
“IID_HW_CONNECT” UDT is automatically generated and stored for your use in
the TIA project tree in “PLC data types”.
For more information on using the “IID_HW_CONNECT” UDT, please refer to the
next chapter, “3.3 Explanation of “HW_CONNECT””.

Edge-triggered execution of the blocks


All Ident blocks have an input parameter called “EXECUTE”. Execution of the
respective RFID functionality of the blocks is started via this interface. Please note
that the “EXECUTE” input interface responds only to positive edges. This means
that the blocks must be executed with a logic 0 (“false”) at the EXECUTE
parameter before they can detect the change to 1 (“true”) in a later CPU cycle.
Therefore, after successful or unsuccessful processing of the Ident blocks, it is
important that the EXECUTE parameter be set to 0 (“false”) to be able to start the
block again at a later time.
Please also see chapter “7 Tips and Tricks”.

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 11
3 PLC Program
3.3 Explanation of “HW_CONNECT”

Reset of the blocks


Before a SIMATIC RFID reader can perform its function, a RESET must be
performed. Special reset blocks are available for this purpose.

Command buffer for transponder operations


All transponder operations (e.g., “read” and “write”) are buffered on the SIMATIC
RFID readers. This allows you to send a read job to the reader, even if there is no
transponder in its RF field. The buffered job will not be executed before a
transponder passes through the RF field. To cancel a running buffered job, you
have to perform a reset.

3.3 Explanation of “HW_CONNECT”


The “HW_CONNECT” input parameter of the Ident blocks is used to address the
configured interface modules/readers and requires the “IID_HW_CONNECT” UDT
as the data type. This data type is automatically generated when calling an Ident
block; in the project tree, it can be found in “PLC data types”.

Details on the “IID_HW_CONNECT” UDT


The following figure shows the structure of the “IID_HW_CONNECT” UDT:
 Siemens AG 2016 All rights reserved

Figure 3-3

For addressing the interface modules/readers, the following three fields are
provided in the UDT:
 “HW_ID”
 “CM_CHANNEL”
 “LADDR”
The “HW_ID” (only relevant for S7-1200/1500) is the hardware identifier of the
interface module’s RFID communication channel. The “CM_CHANNEL” is the slot
of the RFID reader on the communication module (1 or 2). “LADDR” is the I/O
address of the RFID communication channel.

Using the “IID_HW_CONNECT” UDT


The following description explains the procedure for creating an addressing tag:
1. Create a tag of the “IID_HW_CONNECT” type.
2. Enter the correct address values in the tag (see below).
3. Connect this tag to the “HW_CONNECT” input parameter of the Ident blocks.

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 12
3 PLC Program
3.3 Explanation of “HW_CONNECT”

Note You have to create a separate address tag for each SIMATIC RFID reader in
your project.

Reading out the correct address values


The following figure shows where you can read out the correct values for
addressing interface modules/readers:
Figure 3-4

2
 Siemens AG 2016 All rights reserved

Table 3-2
No. Description
1. Value for “HW_ID” of the UDT (for S7-1200/1500 only)
2. Value for “LADDR” of the UDT

The following description explains the procedure for reading out the address
values:
1. In TIA Portal, navigate to the “Device view”.
2. Select your configured interface module.
3. In the “Device overview” window, select the “2x RS422 channels RFID_1”
module.
4. In the Inspector window, click “Properties” > “Hardware identifier”.
5. In the “Hardware identifier” field, you will find the value you have to enter in the
UDT in the “HW_ID” field (1) (in this example: 277).
6. Directly in the “I address” and “Q address” fields of the Device overview of the
selected module, you will find the value for the “LADDR” field (2) of the UDT (in
this example: 256). Make sure that the identical value is assigned to the I and
Q address.
7. In the “CM_CHANNEL” field, specify whether the reader is connected to port 1
or port 2 of the interface module.

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 13
3 PLC Program
3.4 Explanation of the Ident blocks

3.4 Explanation of the Ident blocks


This chapter explains the most important Ident blocks.

General output parameters of the Ident blocks


All Ident blocks share the following output parameters:
Table 3-3
Parameter Description
DONE Job successfully completed.
BUSY Job active.
ERROR Job completed with error
STATUS Error message regarding an erroneous job (ERROR = true)
PRESENCE Transponder presence in the RF field

3.4.1 “RESET_RF300” functionality

The “Reset_RF300” block sets the reader to ready for operation. When the block is
executed, all settings made at the block’s input parameters are transferred to the
reader.
 Siemens AG 2016 All rights reserved

Executing the block additionally cancels running jobs of the reader and
acknowledges reader errors.

Program details on the block


Figure 3-5

Table 3-4
Parameter Description
EXECUTE Starts the reset job
TAG_CONTROL Presence check on/off
TAG_TYPE Transponder type:
 1 = ISO transponder
 0 = RF300 transponder
RF_POWER Transmitter power (for RF380R only):
HF power from 0.5 W to 2 W in increments of 0.25 W (range of
values: 0x02 ... 0x08); default value 0x04 ≙ 1 W
HW_CONNECT Address tag

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 14
3 PLC Program
3.4 Explanation of the Ident blocks

3.4.2 “SET_ANT_RF300” functionality

The “SET_ANT_RF300” block is used to switch the RF field of the readers on and
off. This block is mainly used to prevent overlapping fields between adjacent
readers.

Program details on the block


Figure 3-6

Table 3-5
Parameter Description
 Siemens AG 2016 All rights reserved

EXECUTE Starts the antenna job


ANTENNA RF antenna on/off
 1 = RF field on
 0 = RF field off
HW_CONNECT Address tag

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 15
3 PLC Program
3.4 Explanation of the Ident blocks

3.4.3 “READ” functionality

The “Read” block allows you to read process data from a transponder. The
“ADDR_TAG” and “LEN_DATA” parameters are used to define the memory area to
be read. The read data is provided via the “IDENT_DATA” parameter.

Program details on the block


Figure 3-7
 Siemens AG 2016 All rights reserved

Table 3-6
Parameter Description
EXECUTE Starts the read job
ADDR_TAG Physical address starting with which the transponder data is read
LEN_DATA Length of the data to be read
LEN_ID (For RF600 only)
EPCID_UID (For RF600 only)
HW_CONNECT Address tag
IDENT_DATA Data buffer for the read transponder data; only an array of bytes
with variable length is allowed

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 16
3 PLC Program
3.4 Explanation of the Ident blocks

3.4.4 “WRITE” functionality

The “Write” block allows you to write process data to a transponder. The
“ADDR_TAG” and “LEN_DATA” parameters are used to define the transponder
memory area to be written. The data to be written is provided via the
“IDENT_DATA” parameter.

Program details on the block


Figure 3-8
 Siemens AG 2016 All rights reserved

Table 3-7
Parameter Description
EXECUTE Starts the write job
ADDR_TAG Physical address starting with which the transponder data is
written
LEN_DATA Length of the data to be written
LEN_ID (For RF600 only)
EPCID_UID (For RF600 only)
HW_CONNECT Address tag
IDENT_DATA Data buffer for the transponder data to be written

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 17
3 PLC Program
3.5 Explanation of the “Ident_Profile” block

3.5 Explanation of the “Ident_Profile” block


All Ident blocks are based on the “Ident_Profile” block. The simplified Ident blocks
run the Ident profile with the suitable parameter interconnection for the respective
RFID functionality. Therefore, the blocks are a simplified interface of the Ident
profile.

Note It is not recommended to work directly with the “Ident_Profile” block if the Ident
blocks can implement the required RFID functionalities.

The Ident profile is based on the standardized “Proxy Ident Function Block”
protocol. For the specification of the protocol, please refer to the PROFIBUS User
Organization (\10\).

3.6 Diagnostics and error messages


If an error has occurred, the “STATUS” output parameter of the Ident blocks
provides different hex codes. For the meaning of the codes, please refer to the
“SIMATIC Ident RFID systems Ident profile and Ident blocks, standard function for
Ident systems” manual (\3\), chapter 4 “Error messages”.
 Siemens AG 2016 All rights reserved

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 18
4 Configuration and Project Engineering
3.6 Diagnostics and error messages

4 Configuration and Project Engineering


This chapter shows the configuration steps necessary to create a project with the
SIMATIC S7 CPU, ASM 456 and SIMATIC RF300 reader.

Note Follow the instructions in this chapter if you are using alternative hardware.
If you are using identical hardware (see chapter “2.3 Hardware and software
components”), the below configuration steps do not have to be performed; they
have already been included in this project. Continue with chapter “5 Installation
and Startup”.

1. Open your TIA Portal V13 SP1.


2. Create a new project.
3. In the TIA Portal project tree, double-click “Add new device”.
Figure 4-1
 Siemens AG 2016 All rights reserved

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 19
4 Configuration and Project Engineering
3.6 Diagnostics and error messages

4. In the dialog that appears, select the S7 CPU you are using. Make sure that
the CPU has a PROFIBUS port or add a PROFIBUS CP to the CPU. Then
click “OK” to confirm.
Figure 4-2
 Siemens AG 2016 All rights reserved

5. Go to the “Network view”; in the “Hardware Catalog”, click “Other field devices”
> “PROFIBUS DP” > “Ident Systems” > “Siemens AG” > “Moby” > “ASM456”.
Use drag and drop to move the interface module (“6GT2002-0ED00”) from the
hardware catalog to your workspace and connect the PROFINET port to the
CPU.
Figure 4-3

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 20
4 Configuration and Project Engineering
3.6 Diagnostics and error messages

6. Double-click the RF180C and in the Inspector window, navigate to the


communication module properties.
7. Select “Module parameters”. Set the parameters in “Module parameters” as
follows:
– User Mode: RFID standard profile
– MOBY Mode: MOBY U/D/RF300/RF600 normal addressing
– Baudrate SLG (transmission speed): 115.2 kBaud
– Diagnostic messages: None
– Avoid active error LED after startup: None
Figure 4-4
 Siemens AG 2016 All rights reserved

8. Open an FC, FB or OB in which you want to call the Ident blocks.


9. In TIA Portal, navigate to “Instructions” > “Optional packages” > “SIMATIC
Ident”. Drag the Ident blocks you require to the block you have just opened:
Figure 4-5

10. Assign the required values/tags to the parameter interfaces of the Ident blocks.
11. Download the user program and the hardware configuration to your S7 CPU.
To do this, select the S7 CPU in your project tree and then click “Download to
device”.

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 21
4 Configuration and Project Engineering
3.6 Diagnostics and error messages

Figure 4-6
 Siemens AG 2016 All rights reserved

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 22
5 Installation and Startup
5.1 Installing the hardware

5 Installation and Startup


This chapter shows the steps necessary to install and start up the example using
the code from the download and the components from the hardware list.

5.1 Installing the hardware


The figure below shows the hardware configuration of the application.
Figure 5-1

L+ (24V)

M (0V)

SIMATIC S7-1500
SIMATIC S7-300
SIMATIC S7-1200
+ CM 1243-5
 Siemens AG 2016 All rights reserved

PROFINET IE

RF180C

SIMATIC
RF310R

Reader cable

Note Always follow the installation guidelines for SIMATIC S7-1500 (\6\), SIMATIC
S7-1200 (\7\), SIMATIC S7-300 (\8\), SIMATIC ASM 456 (\5\) and SIMATIC
RF300 (\4\).

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 23
5 Installation and Startup
5.2 Installing the software (download)

5.2 Installing the software (download)


This chapter describes the steps for installing the sample code.
1. Install TIA Portal V13 SP1 or higher.
2. The Step 7 V13 SP1 project is available on the HTML page from which you
downloaded this document (\2\). Save the
“109483372_SIMATIC_RF300_RF180C_S7-xxx.zip” project (depending on the
CPU) to your hard drive.
3. Unzip the file.
4. In TIA Portal, open the project you have just unzipped:
“Project” > “Open” > “Browse”.
5. The project is now available to you.

5.3 Startup
This chapter describes the steps for starting up the sample code.
1. Wire your hardware.
2. Open the application example in TIA Portal.
 Siemens AG 2016 All rights reserved

3. If you are using alternative hardware, perform the configurations described in


chapter “4 Configuration and Project Engineering”.
4. Assign an IP address from the IP range of the configured S7 CPU of the
application example to your programmer or customize the IP address of the
CPU to your preferences.
5. Download the user program to your S7 CPU. To do this, select the S7 CPU in
your project tree and then click “Download to device”.
Figure 5-2

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 24
6 Operation of the Application Example
6.1 Description of the watch table

6 Operation of the Application Example


The application example is controlled using a watch table.
This chapter describes how to use the application example.

6.1 Description of the watch table


The following figure shows the watch table for using the application example:
Figure 6-1
 Siemens AG 2016 All rights reserved

The watch table is divided into four sections: Each section belongs to one of the
Ident blocks called in OB 1:
 Reset Reader: “Reset_RF300”
 Read Tag: “Read”
 Write Tag: “Write”
 Set Ant: “Set_Ant_RF300”

The sections contain the tags – from the “Interface” data block – to be modified and
monitored. These tags are directly linked to the Ident blocks.

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 25
6 Operation of the Application Example
6.2 Using the watch table

6.2 Using the watch table


This chapter describes the steps for using the sample code.
1. Open the “IdentData” data block and fill the “writeData” tag as needed. This
data will later be written to the transponders. Download the data block to the
S7 CPU.
2. Double-click to open the “ControllingInterface” watch table from the project
tree.
Figure 6-2
 Siemens AG 2016 All rights reserved

3. In the watch table, click “Monitor all”.


Figure 6-3

6.2.1 Executing a reset command

1. Enter your desired reset parameters in the tags from the “Reset Reader”
section in the fields of the “Modify Value” column.
Figure 6-4

In this example, the values are defined as follows:

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 26
6 Operation of the Application Example
6.2 Using the watch table

– tagControl: 16#01 (presence control on)


– tagType: 16#0 (RF300 transponder)
– rfPower: 16#00 (for RF380R reader only)

2. Right-click any row of the watch table. Go to “Modify” and then left-click “Modify
now”. This transfers the values entered in 1 directly to the data block of the
S7 CPU.
Figure 6-5

3. Execute a reset. To do this, right-click the row of the “executeResetReader”


tag, select “Modify” and left-click “Modify to 1”.
Figure 6-6
 Siemens AG 2016 All rights reserved

4. The “doneResetReader”, “errorResetReader” and “statusResetReader” tags


allow you to check whether or not the job has successfully completed.
Figure 6-7

An erroneous job has occurred only if the “errorResetReader” tag is set. In this
case, a hex error code is automatically written to the “statusResetReader” tag.
This error code allows you to diagnose the cause of the error.
A successful job is indicated by the permanently lit green status LED on the
reader.

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 27
6 Operation of the Application Example
6.2 Using the watch table

6.2.2 Executing a read command

1. Enter your desired read parameters in the tags from the “Read TAG” section in
the fields of the “Modify Value” column.
Figure 6-8

In this example, the values are defined as follows:


– addrTagRead: 10 (start address for read from transponder)
– lenDataRead: 100 (length of the data to be read)

2. Right-click any row of the watch table. Go to “Modify” and then left-click “Modify
now”. This transfers the values entered in 1 directly to the data block of the
S7 CPU.
Figure 6-9
 Siemens AG 2016 All rights reserved

3. Execute a read. To do this, right-click the row of the “executeRead” tag, select
“Modify” and left-click “Modify to 1”.
Figure 6-10

Note When you have executed a read job, the command will be buffered in the reader
until a transponder passes through the RF field. The DONE, ERROR and
STATUS output parameters will not be set before this has happened.

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 28
6 Operation of the Application Example
6.2 Using the watch table

4. The “doneRead”, “errorRead” and “statusRead” tags allow you to check


whether or not the job has successfully completed.
Figure 6-11

An erroneous job has occurred only if the “errorRead” tag is set. In this case, a
hex error code is automatically written to the “statusRead” tag. This error code
allows you to diagnose the cause of the error.
After a successful job, you will find the read transponder data in the “IdentData”
data block in the “readData” tag.

6.2.3 Executing a write command

1. Enter your desired write parameters in the tags from the “Write TAG” section in
the fields of the “Modify Value” column.
Figure 6-12
 Siemens AG 2016 All rights reserved

In this example, the values are defined as follows:


– addrTagWrite: 10 (start address for write to transponder)
– lenDataWrite: 100 (length of the data to be written)

2. Right-click any row of the watch table. Go to “Modify” and then left-click “Modify
now”. This transfers the values entered in 1 directly to the data block of the
S7 CPU.
Figure 6-13

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 29
6 Operation of the Application Example
6.2 Using the watch table

3. Execute a write. To do this, right-click the row of the “executeWrite” tag, select
“Modify” and left-click “Modify to 1”.
Figure 6-14

Note When you have executed a write job, the command will be buffered in the reader
until a transponder passes through the RF field. The DONE, ERROR and
STATUS output parameters will not be set before this has happened.

4. The “doneWrite”, “errorWrite” and “statusWrite” tags allow you to check


whether or not the job has successfully completed.
Figure 6-15
 Siemens AG 2016 All rights reserved

An erroneous job has occurred only if the “errorWrite” tag is set. In this case, a
hex error code is automatically written to the “statusWrite” tag. This error code
allows you to diagnose the cause of the error.
After a successful job, the “Read” command allows you to read the written
transponder data from the transponder for verification.

6.2.4 Executing an antenna command

1. Enter your desired antenna parameter in the tag from the “Set Ant” section in
the fields of the “Modify Value” column.
Figure 6-16

In this example, the value for antennaAnt is set to FALSE (0) to turn off the
reader’s antenna.

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 30
6 Operation of the Application Example
6.2 Using the watch table

Note After a reset, the antennas of the SIMATIC RFID readers are turned on by
default. If, after a reset, you execute an antenna command with the value TRUE
(1) at the ANTENNA parameter, you will receive an error message as you cannot
reactivate an antenna that has already been active.

2. Right-click any row of the watch table. Go to “Modify” and then left-click “Modify
now”. This transfers the values entered in 1 directly to the data block of the
S7 CPU.
Figure 6-17

3. Execute an antenna command. To do this, right-click the row of the


“executeAnt” tag, select “Modify” and left-click “Modify to 1”.
Figure 6-18
 Siemens AG 2016 All rights reserved

4. The “doneAnt”, “errorAnt” and “statusAnt” tags allow you to check whether or
not the job has successfully completed.
Figure 6-19

An erroneous job has occurred only if the “errorAnt” tag is set. In this case, a
hex error code is automatically written to the “statusAnt” tag. This error code
allows you to diagnose the cause of the error.

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 31
7 Tips and Tricks

7 Tips and Tricks


This chapter additionally provides a number of tips and tricks to optimize your
SIMATIC RFID applications.

Automatic read from/write to transponder when transponder present


Use the “PRESENCE” output parameters of the Ident blocks to automatically
control the “EXECUTE” input parameters when a transponder is present. To do
this, assign the same tag to “PRESENCE” and “EXECUTE”:
Figure 7-1
 Siemens AG 2016 All rights reserved

If you interconnect the Ident blocks as shown above, a transponder operation will
be automatically started when a transponder passes through the RF field of the
readers.

Note This method is possible only if a reset command has been performed first with
the “TAG_CONTROL” parameter = true.
When using this method, a CPU cycle elapses before the transponder operation
is started when a transponder has passed through the RF field.

Optimizing the transponder processing time


Use the command buffer of the SIMATIC RFID readers to minimize the effective
processing time for transponder operations. This is particularly helpful when
implementing applications with fast transponder sequences.
To do this, start a transponder operation (e.g., “read” and “write”) via the
“EXECUTE” input parameter as soon as the “DONE” output parameter of the
previous transponder operation is set.

Executing chained commands


The “Ident_Profile” and “AdvancedCMD” blocks allow you to send chained
commands to the readers. By sending multiple command frames in one call, you
can reduce the communication load on the fieldbus, which additionally reduces the
processing time.

Visit our SIMATIC Ident guide


The “Industrial Identification with SIMATIC Ident in the Siemens Industry Online
Support” guide (\9\) provides you with a large number of SIMATIC Ident-related
application examples and more information on the topic.

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 32
8 Links & Literature

8 Links & Literature


Table 8-1
Topic
\1\ Siemens Industry Online Support
https://support.industry.siemens.com
\2\ Download page of the entry
https://support.industry.siemens.com/cs/ww/en/view/109483372

\3\ SIMATIC Ident RFID systems Ident profile and Ident blocks, standard function for
Ident systems
https://support.industry.siemens.com/cs/ww/en/view/106368029
\4\ SIMATIC Ident RFID systems SIMATIC RF300
https://support.industry.siemens.com/cs/ww/en/view/21738946

\5\ SIMATIC Ident RFID systems RF180C communication module


https://support.industry.siemens.com/cs/ww/en/view/30012157

\6\ SIMATIC S7-1500, ET 200MP Automation System


https://support.industry.siemens.com/cs/ww/en/view/59191792

\7\ SIMATIC S7 S7-1200 Programmable Controller


https://support.industry.siemens.com/cs/ww/en/view/109478121

\8\ SIMATIC S7-300, CPU 31xC and CPU 31x: Installation


 Siemens AG 2016 All rights reserved

https://support.industry.siemens.com/cs/ww/en/view/13008499

\9\ Industrial Identification with SIMATIC Ident in the Siemens Industry Online Support
https://support.industry.siemens.com/cs/ww/en/view/109477926

\10\ PROFIBUS User Organization home page


http://www.profibus.com/

9 History
Table 9-1
Version Date Modifications
V1.0 05/2016 First version

RFID Basics
Entry ID: 109483372, V1.0, 05/2016 33

You might also like