Sie sind auf Seite 1von 31

Industrial

Identification with
SIMATIC RF200 and
RF180C

SIMATIC RF, PROFINET, SIMATIC S7-300/S7-400,


Siemens
STEP 7 V5.5 Industry
Online
https://support.industry.siemens.com/cs/ww/en/view/109483371 Support
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 these Application
Examples and other Siemens publications e.g. Catalogs the contents of the other
documents 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 a condition which goes to the root of the contract
(wesentliche Vertragspflichten). The damages for a breach of a substantial
contractual obligation are, however, limited to the foreseeable damage, typical for
Siemens AG 2017 All rights reserved

the type of contract, except in the event of intent or gross negligence or injury to
life, body or 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 the 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 In order 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. Siemens products and solutions only form one element of such a
concept.
Customer is responsible to prevent unauthorized access to its plants, systems, machines
and networks. Systems, machines and components should only be connected to the
enterprise network or the internet if and to the extent necessary and with appropriate
security measures (e.g. use of firewalls and network segmentation) in place.
Additionally, Siemens guidance on appropriate security measures should be taken into
account. For more information about industrial security, please visit
http://www.siemens.com/industrialsecurity.

Siemens products and solutions undergo continuous development to make them more
secure. Siemens strongly recommends to apply product updates as soon as available and
to always use the latest product versions. Use of product versions that are no longer
supported, and failure to apply latest updates may increase customers exposure to cyber
threats.
To stay informed about product updates, subscribe to the Siemens Industrial Security
RSS Feed under http://www.siemens.com/industrialsecurity.

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 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 ...................................................................................................... 8
3.1 Complete overview ............................................................................... 8
3.2 Basics of using the Ident blocks ......................................................... 10
3.3 Explanation of HW_CONNECT ....................................................... 11
3.4 Explanation of the Ident blocks .......................................................... 13
3.4.1 Ident_Profile (FB1900) functionality................................................. 13
3.4.2 ResetRF200 functionality ................................................................. 15
3.4.3 SetAntRF200 functionality ............................................................... 16
3.4.4 Read functionality ............................................................................ 17
3.4.5 Write functionality............................................................................. 18
3.5 Diagnostics and error messages ........................................................ 18
4 Configuration and Project Engineering ......................................................... 19
5 Installation and Startup ................................................................................... 22
Siemens AG 2017 All rights reserved

5.1 Installing the hardware ....................................................................... 22


5.2 Installing the software (download) ...................................................... 23
5.3 Starting up the sample project ........................................................... 23
5.4 Description of the watch table ............................................................ 24
5.5 Using the watch table ......................................................................... 25
5.5.1 Executing a reset command ............................................................... 26
5.5.2 Executing a read command ............................................................... 27
5.5.3 Executing a write command ............................................................... 28
5.5.4 Executing an antenna command ........................................................ 29
6 Tips and Tricks ................................................................................................ 30
7 Links & Literature ............................................................................................ 31
8 History............................................................................................................... 31

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 3
1 Task

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

Overview of the automation task


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

PLC

RFID interface module

RFID field devices


Siemens AG 2017 All rights reserved

RFID transponders

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


SIMATIC Ident modules into a SIMATIC control system.
STEP 7 V5.5 provides suitable function blocks for programming the SIMATIC RFID
modules on SIMATIC S7 controllers.
Depending on the preferred transmission type, the user has to select the
appropriate communication module.

Objective of this configuring aid


In this application example, an RFID reader is connected to the control system via
PROFINET. The communication module required for this is the RF180C. SIMATIC
RF200 is used to identify RFID transponders.
The application example supports you in commissioning your SIMATIC Ident
modules. It mainly focuses on the ready-to-use blocks of this application example.
It additionally describes the project engineering and configuration of the SIMATIC
Ident modules.

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 4
2 Solution

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-300/
S7-400

PROFINET / IE
Siemens AG 2017 All rights reserved

SIMATIC
communication module
RF180C

Serial connection / RS422

SIMATIC RFID readers

RF200

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 5
2 Solution

Advantages
The application example offers the following advantages:
You save time and money when commissioning your own automation solution.
The supplied hardware configuration can be expanded as required or
integrated into your project.
By using the RF180C, the SIMATIC RFID reader is integrated into a control
system via PROFINET. This is a frequent requirement in modern automation
solutions.
The ready-to-use blocks significantly simplify operating the SIMATIC RFID
readers.

2.2 Description of the core functionality


Sequence of the core functionality
Figure 2-2

Trigger Display
reset job result
Siemens AG 2017 All rights reserved

Trigger Trigger Trigger


Set_Ant read write

Data
storage

Display Display Display


job result job result job result

Perform a reset (initialization) using the Reset block to set the RFID reader to
ready for operation. Once the reset has been performed, the user can choose
between different RFID operations and monitor their status.

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 6
2 Solution

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 6ES7318-3EL00- Alternatively, you can use a
CPU 319-3 PN/DP 0AB0 different S7-300/S7-400 CPU.

SIMATIC RF180C 1 6GT2002-0JD00 HW release 7 or higher, FW


V2.2 or higher
SIMATIC RF220R 1 6GT2821-2AC10 Alternatively, you can use a
different SIMATIC RF200
reader.
MDS D424 n 6GT2600-4AC00 Alternatively, you can use
different ISO transponders.
CAB_CONF_ASM 456, 1 6GT2891-4FH20
-
RF170C-READER_2M

Software components
Siemens AG 2017 All rights reserved

Table 2-2
Component No. Article number Note
STEP 7 V5.5 1 6ES7810-4C.10-.. V5.5 SP4 or higher

Sample files and projects


The following list contains all files and projects that are used in this application
example.
Table 2-3
Component Note
109483371_SIMATIC_RF200_RF180C_S7-300_V55_V1 This zip file contains the STEP
0.zip 7 project for the SIMATIC
S7-300.
109483371_SIMATIC_RF200_RF180C_V55_V10_en.pdf This document.

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 7
3 PLC Program

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
RF200
SetAnt
RF200
Read Write

Hardware
SIMATIC S7 controllers

Siemens AG 2017 All rights reserved

Interface modules

SIMATIC RFID readers


The Ident blocks control the RFID operations of the RFID readers. The command
frames the user 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: 109483371, V1.0, 05/2017 8
3 PLC Program

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
RF200 Connect

Read IdentData

Write
Siemens AG 2017 All rights reserved

Ident Profile

SetAnt Ident_
OB 1
RF200 Profile

To show the use of the Ident blocks in a simplified manner, the application example
calls them directly in the OB 1 cycle. Therefore, a minimum PLC program is
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 it
easier for you to implement the RFID functionalities.
The block names describe their basic core functionality. The following ready-to-use
blocks are available for the SIMATIC RF200 product portfolio:
Table 3-1
Ident block name Implemented in this example
ResetRF200 Yes
SetAntRF200 Yes
Read Yes
Write Yes
ReadUid No
AdvancedCMD No

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 9
3 PLC Program

Ident block name Implemented in this example


ReaderStatus No
TagStatus No

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:

Installing the Ident Profile library


Copy the Ident blocks integrated in the project to your project. This includes user-
defined data types (UDTs), the basic Ident Profile block and system function
blocks (SFCs and SFBs).

Working with multiple channels


If you are working with multiple channels, make sure that, for each channel, the
Ident Profile block is called with a separate instance DB.
Siemens AG 2017 All rights reserved

Call of the functions


The Ident Profile block is a complex block and includes all the functionalities for
communicating with RFID readers. The Ident Profile was specifically designed for
trained block users who configure complex functions with a single block. The
respective RFID functionality is implemented in an Ident block as an example and
called in OB1.

Addressing of the block


The Ident Profile block has an IN/OUT parameter called hwConnect. Via this
interface, the block is provided with the address information of the configured
interface module. For more information about using the IID_HW_CONNECT
UDT, please refer to Chapter 3.3.

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 this input interface responds only to positive edges. The blocks must be
executed with a logic 0 (false) at the execute parameter before they can detect
the change to a logic 1 (true) in a later CPU cycle.
After successful or unsuccessful processing of the Ident blocks, set the execute
parameter to 0 (false) to be able to start the block again at a later time. Please
see also Chapter 6.

Reset block
Before a SIMATIC RFID reader can perform its function, an execute must be
performed at the Reset block.

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

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 10
3 PLC Program

transponder in the RFID field. The buffered job will not be executed before a
transponder passes through the RFID field. To cancel a running buffered job, you
have to perform a reset.

3.3 Explanation of HW_CONNECT


The hwConnect input parameter of the Ident Profile block is used to address the
configured interface modules and requires the IID_HW_CONNECT UDT as the
data type.

Details about the IID_HW_CONNECT UDT


The following figure shows the structure of the IID_HW_CONNECT UDT:
Figure 3-3

For addressing the interface modules, the following three fields are provided in
UDT 1901:
HW_ID
CM_CHANNEL
Siemens AG 2017 All rights reserved

LADDR
The CM_CHANNEL is the slot of the RFID reader on communication module 1 or
2. LADDR is the I/O address of the RFID communication channel.

Using the IID_HW_CONNECT UDT


Use the following description to create the addressing tags:
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 Profile
block.

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

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 11
3 PLC Program

Reading correct address values


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

Use the following description to read the address values:


Siemens AG 2017 All rights reserved

4. In the SIMATIC Manager, navigate to HW Config.


5. Select your configured interface module.
6. 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 of the UDT (in this
application 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 2 of the interface module.

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 12
3 PLC Program

3.4 Explanation of the Ident blocks


This chapter explains the most important Ident blocks.

3.4.1 Ident_Profile (FB1900) functionality

The Ident Profile block is a complex block. It includes all the functionalities for
communicating with RFID readers. The Ident blocks are a simplified interface to the
Ident Profile block. Each Ident block contains a single Ident Profile command.

Note Basically, the decision which blocks to use, Ident Profile or Ident blocks, must be
made at the outset. You can only use one of the two blocks. Mixed use of the
Ident Profile and Ident blocks per channel is not possible!
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\).

Program details about the block


Figure 3-5
Siemens AG 2017 All rights reserved

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 13
3 PLC Program

The following tables describe the interfaces of the block.


Table 3-2
Input parameter Description
EXECUTE TRUE = trigger a new command
Before starting, set the command and the appropriate parameters
to the memory linked to CMDREF.
RPTCMD TRUE = repeat the command currently being executed / to be
executed next
SRESET TRUE = cancel the command currently being processed
INIT TRUE = communication module performs a reset and is
reparameterized
CMDDIM Number of commands in the CMDREF parameter
CMDSEL Selection of the CMDREF command to be executed
1 > 1. Command, for example Reset ...
HW_CONNECT Physical addressing of communication module and reader
CMDREF The command field can contain up to 10 commands.
TXREF Reference to global memory area for send data.
RXREF Reference to global memory area for receive data.

Table 3-3
Siemens AG 2017 All rights reserved

Output parameter Description


DONE TRUE = job successfully completed.
BUSY TRUE = job active.
ERROR TRUE = job completed with error
WARNING TRUE = warning was detected
STATUS Error message regarding an erroneous job (ERROR = TRUE)
RPTACT TRUE = RPTCMD is active
The acknowledgment bit indicates that repeat mode of the CM /
reader is active.
ERR_IREQ TRUE = an error has occurred on the communication module /
reader (e.g., during startup or disconnecting)
TPC Transponder Presence Changed
TRUE = new transponder in the readers antenna field.
TP Transponder presence in the RF field
UIN0..3 Number of transponders in the readers detection range.
TRLEN Amount of data received after successful execution of the
command.

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 14
3 PLC Program

3.4.2 ResetRF200 functionality

The ResetRF200 block sets the reader to ready for operation. When the block is
called, all settings of the blocks input parameters are transferred to the reader,
active reader jobs are canceled and reader errors are acknowledged.

Program details about the block


Figure 3-6

Table 3-4
Siemens AG 2017 All rights reserved

Parameter Description
execute Starts the reset job
mdsControl Presence check on/off
tagType Transponder type:
1 = ISO transponder
3 = MDS D3xx optimization
rfPower Transmitter power (for RF290R only):
HF power from 0.5 W to 5 W in increments of 0.25 W (range of
values: 0x02 ... 0x14); default value 0x04 1 W
hwConnect Address tag

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 15
3 PLC Program

3.4.3 SetAntRF200 functionality

The SetAntRF200 block turns the RF field of the readers on and off. This block is
mainly used to prevent overlapping fields between adjacent readers.

Program details about the block


Figure 3-7

Table 3-5
Parameter Description
execute Starts the antenna job
Siemens AG 2017 All rights reserved

antenna RF antenna on/off


1 = RF field on
0 = RF field off
hwConnect Address tag

NOTICE 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 at the antenna parameter, you will receive an error message. This error
occurs as you cannot reactivate an antenna that has already been active.

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 16
3 PLC Program

3.4.4 Read functionality

The Read block allows you to read process data from a transponder. The
addrTag and lenData parameters are used to define the memory area to be
read. The read data is provided via the identData.RXRef parameter.

Program details about the block


Figure 3-8
Siemens AG 2017 All rights reserved

Table 3-6
Parameter Description
execute Starts the read job
addrTag Physical address starting with which the transponder data is read
lenData Length of the data to be read
lenId (For RF600 only)
epcIdUid (For RF600 only)
hwConnect Address tag
identData Data buffer for the read transponder data

Compared to SIMATIC RF300, SIMATIC RF200 has a reduced set of


Note
commands. The Read block allows reading data with a maximum size of 1 Kbyte
in a sequence (except RF290R).

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 17
3 PLC Program

3.4.5 Write functionality

The Write block allows you to write process data to a transponder. The addrTag
and lenData parameters are used to define the transponder memory area to be
written. The data to be written is provided via the identData.TXRef parameter.

Program details about the block


Figure 3-9
Siemens AG 2017 All rights reserved

Table 3-7
Parameter Description
execute Starts the write job
addrTag Physical address starting with which the transponder data is
written
lenData Length of the data to be written
lenId (For RF600 only)
epcIdUid (For RF600 only)
hwConnect Address tag
identData Data buffer for the transponder data to be written

Compared to SIMATIC RF300, SIMATIC RF200 has a reduced set of


Note
commands. The Write block allows writing data with a maximum size of 1 Kbyte
in a sequence (except RF290R).

3.5 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.

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 18
4 Configuration and Project Engineering

4 Configuration and Project Engineering


This chapter shows the configuration steps necessary to create a project with the
SIMATIC S7 CPU, SIMATIC RF180C and SIMATIC RF200 reader.

Note Chapter 4 is only relevant if you are using hardware that differs from the
hardware listed in Chapter 2.3. If you are using identical hardware, continue with
Chapter 5.

1. Open your SIMATIC Manager.


2. Create a new project.
3. Select your SIMATIC station. For a SIMATIC 300 station, click, for example,
Insert > Station > SIMATIC 300 Station.
Siemens AG 2017 All rights reserved

4. Open HW Config and insert a rack from the RACK-300 folder.

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 19
4 Configuration and Project Engineering

5. In the SIMATIC 300 > CPU-300 hardware catalog folder, select the S7 CPU
you are using. Make sure that the CPU has a PROFINET port. For S7-400
CPUs, add a PROFINET CP to the CPU. Assign the CPU to slot 2 and set up
the PROFINET connection.

6. Open the Hardware catalog, PROFINET IO > Ident Systems > SIMATIC
RFID. Use drag and drop to move the interface module (RF180C V2.2) from
the hardware catalog to your workspace and connect the PROFINET port to
the CPU. Enter the device name for the RF180C. Click OK.
Siemens AG 2017 All rights reserved

7. Click Slot 0 in the declaration row of the RF180C. Open Object Properties.

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 20
4 Configuration and Project Engineering

8. Select Parameters. Set the parameters in Parameters as follows:


USER Mode: RFID standard profile
MOBY Mode: MOBY U/D/RF300/RF600 normal address.
Baudrate SLG: 115.2 kBaud
Diagnostic messages: None
Avoid active error LED after startup: None

9. Download the user program and the hardware configuration to your S7 CPU.
Siemens AG 2017 All rights reserved

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 21
5 Installation and Startup

5 Installation and Startup


This chapter shows the steps required to install and start up the application
example using the code from the sample program and the components from the
hardware list.

5.1 Installing the hardware


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

L+ (24V)

M (0V)

SIMATIC S7-300
Siemens AG 2017 All rights reserved

PROFINET IE

RF180C

SIMATIC RF220R

Reader cable

Note Always follow the installation guidelines for SIMATIC S7-300 (\8\), SIMATIC
RF180C (\5\) and SIMATIC RF200 (\4\).

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 22
5 Installation and Startup

5.2 Installing the software (download)


This chapter describes the steps for installing the sample code.
1. Install STEP 7 V5.5 or higher.
2. The STEP 7 project is available on the HTML page from which you
downloaded this document (\2\). Save the project to your hard drive.
3. Unzip the file.
4. In the SIMATIC Manager, open the project you have just unzipped:
File > Open > Browse
5. The project is now available to you.

5.3 Starting up the sample project


This chapter describes the steps for starting up the sample code.
1. Wire your hardware.
2. In the SIMATIC Manager, open the application example.
3. If you are using alternative hardware, perform the configurations described in
Chapter 4.
4. Assign an IP address from the IP range of the configured S7 CPU to your
Siemens AG 2017 All rights reserved

programmer. Alternatively, customize the CPUs IP address 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.

How to use the application example


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

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 23
5 Installation and Startup

5.4 Description of the watch table


The following figure shows the watch table for using the application example:
Figure 5-2
Siemens AG 2017 All rights reserved

The watch table is divided into four sections. Each section belongs to one of the
functions called in OB 1:
Reset Reader: INIT
Set Ant: Set Ant on/off
Read Tag: Read Data
Write Tag: Write Data

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 24
5 Installation and Startup

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

5.5 Using the watch table


This chapter describes the steps for using the sample code.
1. Open the IdentData data block and fill the TXRef tag as needed. This data
will be written to the transponders in a later step. Download the data block to
the S7 CPU.
2. Open the Force Table watch table from the project tree.
Siemens AG 2017 All rights reserved

3. In the watch table, click Monitor.

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 25
5 Installation and Startup

5.5.1 Executing a reset command

The following section shows how to reset the reader:


1. In the Modify Value column, enter the reset parameters for your application.

In this example, the values are defined as follows:


mdsControl: TRUE (presence check on)
tagType: 16#01 (ISO transponder)
rfPower: 16#00 (different value only for the RF290R reader)
2. Press <CTRL + F9> to transfer the values entered in 1 directly to the data
block of the S7 CPU.
Siemens AG 2017 All rights reserved

3. Execute a reset. To do this, click the row of the executeReset tag and press
<CTRL + F9>.
4. The Interface.resetError, Interface.resetDone and Interface.resetStatus
tags allow you to check whether or not the reset was successful.

An erroneous job has occurred if the Interface.resetError tag is set. In this


case, a hex error code is automatically written to the Interface.resetStatus
tag. This error code allows you to diagnose the cause of the error.
A successful job is indicated by a steady green status LED on the RFID reader.
5. Press <CTRL + F0> to reset the reset command.

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 26
5 Installation and Startup

5.5.2 Executing a read command

The below example shows how to read transponder data:


1. Enter your read parameters in the tags from the //Read Data section in the
fields of the Modify Value column.

In this example, the values are defined as follows:


addrTagRead: 0 (start address for read from transponder)
lenDataRead: 10 (length of the data to be read)
2. Click any row of the watch table. Press <CTRL + F9> to transfer the values
entered in 1 directly to the data block of the S7 CPU.
3. Execute a read. To do this, click the row of the Interface.executeRead tag.
Press <CTRL + 1>.
Siemens AG 2017 All rights reserved

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 readDone, readError and
readStatus output parameters will not be set before this has happened.

4. The Interface.readError, Interface.readDone and Interface.readStatus tags


allow you to check whether or not the reset was successful.
An erroneous job has occurred if the Interface.readError tag is set. In this
case, a hex error code is automatically written to the Interface.readStatus tag.
This error code allows you to diagnose the cause of the error.
5. Press <CTRL + 0> to reset the read command.
6. After a successful job, you will find the read transponder data in the
IdentData.RXRef data block or in the Read buffer section of the force table.

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 27
5 Installation and Startup

5.5.3 Executing a write command

The below example shows how to write data to the transponder:


1. Enter the parameters in the tags from the //Write Data section in the fields of
the Modify Value column.

In this application example, the values are defined as follows:


addrTagWrite: 0 (start address for write to transponder)
lenDataWrite: 10 (length of the data to be written)
2. Click any cell of the watch table. Press <CTRL + F9> to transfer the values
entered in 1 directly to the data block of the S7 CPU.
3. Execute a write. Click the row of the Interface.executeWrite tag. Press
<CTRL + 1>.
Siemens AG 2017 All rights reserved

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 writeDone, writeErrorand
writeStatus output parameters will not be set before this has happened.

4. The Interface.writeError, Interface.writeDone and Interface.writeStatus


tags allow you to check whether or not the write was successful.
An erroneous job has occurred if the Interface.writeError tag is set. In this
case, a hex error code is automatically written to the Interface.writeStatus
tag. This error code allows you to diagnose the cause of the error.
5. Press <CTRL + 0> to reset the write command.
6. After a successful job, the Read command allows you to read the written
transponder data from the transponder for verification.

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 28
5 Installation and Startup

5.5.4 Executing an antenna command

The below example shows how to turn off the HF field:


1. Enter the antenna parameter in the tag from the ////Set Ant on/off section in
the field of the Modify Value column.

In this example, the value for Interface.antOnOff is set to FALSE to turn off
the readers antenna.

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 at the antenna parameter, you will receive an error message. This error
occurs as you cannot reactivate an antenna that has already been active.

2. Click any cell of the watch table. Press <CTRL + F9> to transfer the values
entered in 1 directly to the data block of the S7 CPU.
3. Execute an antenna command. Click the row of the
Siemens AG 2017 All rights reserved

Interface.executeSet_Ant tag. Press <CTRL + 1>.


4. The Interface.setAntError, Interface.setAntDone and
Interface.setAntStatus tags allow you to check whether or not the SetAnt was
successful.
An erroneous job has occurred if the Interface.setAntError tag is set. In this
case, a hex error code is automatically written to the Interface.setAntStatus
tag. This error code allows you to diagnose the cause of the error.
5. Press <CTRL + 0> to reset the antenna command.

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 29
6 Tips and Tricks

6 Tips and Tricks


This chapter 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 parameter 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.
A transponder operation will be automatically started when a transponder passes
through the RF field of the readers.

Note Prerequisite: You have previously executed a reset command with the
mdsControl parameter = TRUE.
When a transponder has passed through the RF field, a CPU cycle elapses
before the transponder operation is started.

Optimizing the transponder processing time


Siemens AG 2017 All rights reserved

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.
When the Done output parameter of the previous transponder operation is set,
start a transponder operation (e.g., read or write) via the execute input
parameter.

Executing chained commands


The AdvancedCMD / Ident Profile 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. This additionally reduces the processing
time.
Compared to SIMATIC RF300, SIMATIC RF200 has a reduced set of
Note
commands. Chaining commands is also possible here. This chaining allows, for
example, the following sequence of commands:
SET-ANT on > write / read 1 Kbyte data > SET-ANT off

Visit our SIMATIC Ident guide


The Industrial Identification with SIMATIC Ident in the Siemens Industry Online
Support guide (\9\) provides you with more information about SIMATIC Ident and
related application examples.

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 30
7 Links & Literature

7 Links & Literature


Table 7-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/109483371

\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 RF200
https://support.industry.siemens.com/cs/ww/en/view/47189592

\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
Siemens AG 2017 All rights reserved

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


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/

8 History
Table 8-1
Version Date Modifications
V1.0 05/2017 First version

RFID Basics
Entry ID: 109483371, V1.0, 05/2017 31

Das könnte Ihnen auch gefallen