Você está na página 1de 53

Application for Measurement & Sensors

Connecting SIMATIC RF660R read / write device to


SIMATIC S7 315-2PN/DP

Programming example
Warranty, Liability and Support

RF660R BID: 23626344

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 correctly
used. These Application Examples do not relieve you of the responsibility
of safely and professionally using, installing, operating and servicing
equipment. In using these Application Examples, you recognize that
Siemens 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.

Warranty, Liability and Support


Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

We accept no liability for 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). However, claims arising from a breach of a condition
which goes to the root of the contract shall be limited to the foreseeable
damage which is intrinsic to the contract, unless caused by intent or gross
negligence or based on mandatory liability for injury of life, body or health.
The above provisions do not imply a change in the burden of proof to your
detriment.
Copyright 2006 Siemens A&D. It is not permissible to transfer or
copy these Application Examples or excerpts of them without first
having prior authorization from Siemens A&D in writing.
For questions about this document please use the following e-mail address:
mailto:csweb@ad.siemens.de

Version - 1.0 Ausgabe 06.07.2006 2/53


Table of Contents

RF660R BID: 23626344

Table of Contents
Table of Contents ........................................................................................................... 3
1 Introduction....................................................................................................... 4
2 Quick Start ........................................................................................................ 6
2.1 Physical connection .......................................................................................... 6
2.2 Parameterization SIMATIC RF660R read/write device .................................... 7
2.3 Configuration and settings for the SIMATIC controller...................................... 8
2.4 Short description of the user interface ............................................................ 10
3 System Description ........................................................................................ 13
3.1 Physical connection ........................................................................................ 13
3.2 Parameterization SIMATIC RF660R read/write device .................................. 14
3.3 Configuration and settings for the SIMATIC controller.................................... 16
3.3.1 Parameterization of the connection ................................................................ 17
3.3.2 Parameter for the filter block........................................................................... 18
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

3.4 Description of the user interface ..................................................................... 19


3.4.1 Overview......................................................................................................... 20
3.4.2 Application of the user interface ..................................................................... 25
4 Multireader Mode............................................................................................ 29
5 WinCC user interface ..................................................................................... 32
6 S7 Program (Appendix).................................................................................. 34
6.1 OB1 main program (example user program) ............................................... 34
6.2 Function block RF600connect (FB300) .......................................................... 36
6.3 Data block Conparam_1 (DB300)................................................................... 49
6.4 Data block XML command (DB110) ............................................................ 51
6.5 Data block filter (DB111)................................................................................. 51
6.6 Data block Raw Data (DB 10)......................................................................... 51
6.7 Data block Tag-ID Memory (DB110) ........................................................... 52
6.8 UDT1 Template for data block Raw Data .................................................... 52
6.9 UDT2 Template for data block Tag-ID ......................................................... 52
7 History ............................................................................................................. 53

Version - 1.0 Ausgabe 06.07.2006 3/53


Introduction

RF660R BID: 23626344

1 Introduction

For goods receipt, stock keeping, production logistics and distribution, RFID (Radio
Frequency Identification) provides complete tracking and documentation of all
delivered, stored and sent goods. To do this, a small data carrier referred to as
smartlabel or tag and which stores all relevant information is attached to each item.
The data carrier receives the required electronic energy via the antennae which is also
used for data transmission.
A so-called read/write device is used for reading and writing the tags.
In many cases, a connection to an automation system is necessary for providing
complete tracking and documentation and to benefit from using the RFID technology.
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

The document on hand explains how a PLC user programmer can control one or
several SIMATIC RF660R read/write devices, which are connected to a SIMATIC S7
controller with Profinet interface via (Industrial) Ethernet.

The precise parameterization of the SIMATIC RF660R read/write device or the


SIMATIC controller is not part of this document, these information are available in the
respective manuals.
This document only lists and explains the configurations and settings of the individual
devices necessary or required for the mentioned connection (see chapter 2.2, 2.3, 3.2
and 3.3).

The SIMATIC RF660R read/write device for SIMATIC control can be connected via
HUB, Switch or directly via cross-link cable 1 .

This document describes how a SIMATIC S7 315-2PN/DP can be connected to a


SIMATIC RF660R read/write device and be addressed, this configuration has also
been tested.
During programming here described the blocks, it was paid attention to only using
standard functions available (as far as known) on all SIMATIC controllers with Profinet

1
For connection via cross-link cable, no further device can be connected to the Profinet interface of the
SIMATIC controller.

Version - 1.0 Ausgabe 06.07.2006 4/53


Introduction

RF660R BID: 23626344

interface, hence this should enable using them on controllers with Profinet interfaces
different to the ones mentioned here.
Transfer to another controller with Profinet interface is performed by creating a
respective project with the desired controller and copying the blocks.

To provide the PLC user programmer with a starting point regarding the usage of the
interface with the SIMATIC RF660R read/write device, a simple example application is
available in the OB1 of the here described Step7 project.
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

Version - 1.0 Ausgabe 06.07.2006 5/53


Quick Start

RF660R BID: 23626344

2 Quick Start

The quick start described in the following chapter is intended for persons which are
already familiar with the SIMATIC RF660R read/write device and also have experience
in handling SIMATIC controllers as well as the respective configuration and
programming envirionmentStep7.
The description enables the user to quickly and establish a connection between the
SIMATIC RF660R read/write device and the SIMATIC controller, without going into
details.
For users new to this environment or interested in detailed information, it is
recommended to proceed with chapter 3.
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

2.1 Physical connection

The SIMATIC RF660R read/write device can be connected directly with the Profinet
interface of the SIMATIC controller via HUB, Switch (see Figure 2-1) or directly via
cross-link cable.
If more than one SIMATIC RF660R read/write device shall be connected to the
respective SIMATIC controller, a HUB or a Switch must be used, using a cross-link
cable is then not possible.
To facilitate configuration using a cross-link cables is not recommended (see chapter
2.2).

Version - 1.0 Ausgabe 06.07.2006 6/53


Quick Start

RF660R BID: 23626344

Industrial Ethernet
TCP/IP
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

Figure 2-1: Physical connection with Ethernet via Switch incl. configuration PG

2.2 Parameterization SIMATIC RF660R read/write device

A PG/PC with respective configuration software is required, which is contained in the


MOBY product CD and is included in the SIMATIC RF660R read/write device.
If a HUB or a Switch is used during networking, then the respective configuration
computer can be additionally connected (see Figure 2-1).
However, either a (logic) connection can be established for the configuration or a
productive connection exists from the SIMATIC controller to the SIMATIC RF660R
read/write device.

For using the SIMATIC RF660R read/write device in conjunction with the SIMATIC
controller, the following parameters must be set as follows:

Version - 1.0 Ausgabe 06.07.2006 7/53


Quick Start

RF660R BID: 23626344

Ethernet settings according to the network structure, these settings must be consistent
with the settings in the program of the SIMATIC controller (see chapter 2.3).
The Read Trigger Mode must be set to On Application Request . The adjusted read
time must be set according to the respective task and is irrelevant for the general
program sequence on the SIMATIC controller.
For the communication with the SIMATIC S7 the Notify Channel Config must be set to
"none".

All other parameters of the SIMATIC RF660R read/write device must be set according
to the respective task and are irrelevant for the connection with the SIMATIC controller
and the general program sequence.
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

2.3 Configuration and settings for the SIMATIC controller

Configuration and programming of the SIMATIC controller requires the Siemens


configuration software Step7.
The SIMATIC configuration itself (HW Config) does not require any particular
configurations, as the communication uses blocks (TCON, TSEND, TRCV, TDISCON)
which when applied can be directly supplied with the required parameters.
Only the IP address of the SIMATIC controller must be assigned according to the
network structure. Regarding the settings for the cycle time, the following should be
observed, especially when using several SIMATIC RF660R read/write devices at one
SIMATIC controller, see chapter 4.
This means, that the SIMATIC controller should be configured according to their
possible additional tasks. The details for the communication with the SIMATIC RF660R
read/write device must be entered in the existing data block Conparam_1 (DB300) in
the Step7 project as described below.

Version - 1.0 Ausgabe 06.07.2006 8/53


Quick Start

RF660R BID: 23626344

The following values must be entered:


IP address of the SIMATIC RF660R read/write device (assigned as during
its configuration).
Port number of the SIMATIC RF660R read/write device (assigned as
during its configuration).

For a faster input of the values, the variable table (VAT) existing in the Step7 project
can be used.

Example for entering IP address and Port number (via variable table):

// IP adress Reader
Copyright Siemens AG 2006 All rights reserved

// e.g. 192.168.0.254 --> C0.A8.00.FE --> Byte1=FE Byte2=00 Byte3=A8 Byte4=C0


23626344_RF600toPNCPU_DOKU_V10_e.doc

DB300.DBB 148 Conparam_1.CONPARAM.rem_staddr[1] HEX B#16#FE


DB300.DBB 149 Conparam_1.CONPARAM.rem_staddr[2] HEX B#16#00
DB300.DBB 150 Conparam_1.CONPARAM.rem_staddr[3] HEX B#16#A8
DB300.DBB 151 Conparam_1.CONPARAM.rem_staddr[4] HEX B#16#C0

// Port Reader
// e.g. 10001 --> 2711 --> Byte1=11 Byte2=27
DB300.DBB 154 Conparam_1.CONPARAM.rem_tsap_id[1] HEX B#16#11
DB300.DBB 155 Conparam_1.CONPARAM.rem_tsap_id[2] HEX B#16#27

These settings already enable establishing a connection with a SIMATIC RF660R


read/write device from a user program and to have it read a tag (read process
according to the parameters set for the SIMATIC RF660R read/write device).

Further settings only affect the behavior regarding the user program and are therefore
described in the following chapter.

Requirements for using several SIMATIC RF660R read/write devices at a SIMATIC


controller and which additional settings are if necessary required for this is described in
chapter 4.

Version - 1.0 Ausgabe 06.07.2006 9/53


Quick Start

RF660R BID: 23626344

2.4 Short description of the user interface

The configurations and settings described in the previous chapters enable


communicating with the connected SIMATIC RF660R read/write device via the here
described user interface, which is realized in the function block RF600Connect (FB300,
see Figure 2-2).

The following calls are available for this:


Connect, establishes the connection with the connected SIMATIC RF660R
read/write device. A positive edge at the input starts the connection setup.
The existing connection is signaled via a positive signal at the Connected
output.
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

Read, this call initiates the SIMATIC RF660R read/write device to perform a
tag reading according to the set configuration. A positive edge at the input
starts the read process. The running read process is displayed as a 1 at the
Busy output, the Ready output is 0 during the process. At the end of the
read process (Busy output: 0 / Ready output: 1) the user has the data
available in the data block DBOUT (DB100).
Disconnect, cancels the connection with the connected SIMATIC RF660R
read/write device. Also a positive edge

Version - 1.0 Ausgabe 06.07.2006 10/53


Quick Start

RF660R BID: 23626344

Figure 2-2: User interface with the SIMATIC RF660R read/write device
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

The following sequence diagram roughly outlines the call sequence.

S7 Program Function blocks RF600

Activate conenction
Connect hostGreetings
Connected

Read tags

tagRead
Read
tagRead(response)
tagRead(response)

endNotify
Ready

Deactivate connection hostGoodbye


Disconnect

Figure 2-3: Sequence diagram interface application

Version - 1.0 Ausgabe 06.07.2006 11/53


Quick Start

RF660R BID: 23626344

Disconnect

Connected Read

Ready

Connect

t
Figure 2-4: Timing diagram for establishing and canceling the connection
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

1)
Trigger time
Reader

Busy

Ready

Read

t
Figure 2-5: Timing diagram for read job

1) As described in the Reader configuration.

Version - 1.0 Ausgabe 06.07.2006 12/53


System Description

RF660R BID: 23626344

3 System Description

Since the previous chapter Quick Start only described how a connection can be
established as fast as possible from a user program on a SIMATIC to a SIMATIC
RF660R read/write device, the next chapters describes this in greater detail and
provides detailed information on the delivered blocks.

3.1 Physical connection

The SIMATIC RF660R read/write device can be connected directly with the Profinet
interface of the SIMATIC controller via HUB, Switch (see Figure 3-1) or directly via
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

cross-link cable.
If more than one SIMATIC RF660R read/write device shall be connected to the
respective SIMATIC controller, a HUB or a Switch must be used, using a cross-link
cable is then not possible.
To facilitate configuration using a cross-link cables is not recommended (see chapter
3.2).

Version - 1.0 Ausgabe 06.07.2006 13/53


System Description

RF660R BID: 23626344

Industrial Ethernet
TCP/IP
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

Figure 3-1: Connection with Ethernet via Switch incl. configuration PG

3.2 Parameterization SIMATIC RF660R read/write device

A PG/PC with respective configuration software is required, which is contained in the


MOBY product CD and is included in the SIMATIC RF660R read/write device.
If a HUB or a Switch is used during networking, then the respective configuration
computer can be additionally connected (see Figure 3-1).
However, either a (logic) connection can be established for the configuration or a
productive connection exists from the SIMATIC controller to the SIMATIC RF660R
read/write device as the SIMATIC RF660R read/write device can only establish one
active connection at a time
Here you find all relevant settings for operating the SIMATIC RF660R read/write device
in conjunction with a SIMATIC controller and the delivered bocks.

Version - 1.0 Ausgabe 06.07.2006 14/53


System Description

RF660R BID: 23626344

All other settings are unimportant for the specific type of connection and should only be
adjusted depending on the task to be fulfilled.
How to do this is available in the respective documentation on the CD attached to the
SIMATIC RF660R read/write device.

Important:

For the communication with the SIMATIC S7 the message channel


configuration "none" must be set.

The parameters IP address and Port number (must be assigned


according to the network configuration) must be entered in the respective
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

configuration data blocks of the SIMATIC controller, see chapter 3.3.

The Read-Trigger Mode must be set to On Application Request.

Version - 1.0 Ausgabe 06.07.2006 15/53


System Description

RF660R BID: 23626344

3.3 Configuration and settings for the SIMATIC controller

Configuration and programming of the SIMATIC controller requires the Siemens


configuration software Step7.
The SIMATIC configuration itself (HW Config) does not require any particular
configuration, as the blocks (TCON, TSEND, TRCV, TDISCON) used for the
communication can be directly supplied with the required parameters when applied.
Only the IP address of the SIMATIC controller must be assigned according to the
network structure. Regarding the settings for the cycle time, the following should be
observed, especially when using several SIMATIC RF660R read/write devices at one
SIMATIC controller, see chapter 4.
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

This means, that the SIMATIC controller should be configured according to their
possible additional tasks.

The configuration of the connection with the SIMATIC S7 occurs via the instance data
block of the RF600connect. To facilitate configuration, the variable table contained in
the example can be used. It refers to the Conparam_1 (DB300) as instance data block
(not possible for Multireader application, see chapter 4).
The following chapters the configuration is explained using the data block.

Version - 1.0 Ausgabe 06.07.2006 16/53


System Description

RF660R BID: 23626344

3.3.1 Parameterization of the connection

Parameters relevant for the connection with the SIMATIC RF660R read/write device
(IP address and Port number) must be entered in the data block Conparam_1 (DB300)
as described below.

Connection ID, only important for Multireader

Local port on the S7, different ones for Multireader, otherwise select any
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

IP address reader

Port number reader

Version - 1.0 Ausgabe 06.07.2006 17/53


System Description

RF660R BID: 23626344

3.3.2 Parameter for the filter block

The filter block (FB111) has 2 parameters, which are also set via the respective
instance data block Conparam_1 (DB300) of the RF600connect.

Parameters and their significance:

deactivate (100.1). If this parameter is set, the filter loop is jumped and the
user can directly access the raw data. This is necessary for direct access to
the raw data, as the filter changes the raw data.
append (104.3). If this parameter is set, the newly read tag IDs are entered
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

in addition to those already entered at the tag ID data block (DB100) during
the last read job. If this parameter is not set, the tag ID data block (DB100)
is emptied at the start of the new read job, i.e. only those tag IDs are
available in the tag ID data block (DB100) which have been read at the
respective read job.

Version - 1.0 Ausgabe 06.07.2006 18/53


System Description

RF660R BID: 23626344

3.4 Description of the user interface

The configurations and settings described in the previous chapters enable


communicating with the connected SIMATIC RF660R read/write device via the user
interface described in the following chapters, which is realized in the function block
RF600Connect (FB300).

The following calls are available for this:


Connect, establishes the connection with the connected SIMATIC RF660R
read/write device.
Read, this call initiates the SIMATIC RF660R read/write device to perform a
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

tag reading according to the set configuration.


Disconnect, cancels the connection with the connected SIMATIC RF660R
read/write device.

These are described in greater detail after a brief overview of the function and data
blocks necessary for communication and reading of the tags.

Version - 1.0 Ausgabe 06.07.2006 19/53


System Description

RF660R BID: 23626344

3.4.1 Overview

The program package consists of several function and data blocks (see Figure 3-2),
which are described in greater detail in the following chapters, as well as a small user
example program to illustrate the benefits of the user interface.
The used function blocks TCON (FB 65), TSEND (FB 63), TRCV (FB64) and
TDISCON (FB66) are contained in the standard S7 library for Profinet.
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

Figure 3-2: Block diagram of the involved function and data blocks

Version - 1.0 Ausgabe 06.07.2006 20/53


System Description

RF660R BID: 23626344

Function block RF600connect (FB300)

In this function block, the user interface is realized.


As already mentioned, the calls Connect, Read and Disconnect are available, which
are explained in greater detail in the respective chapters.
Depending on the call, the function block RF600connect (FB300) makes the necessary
calls to the subordinate layers transparent for the user.
For example, during Connect the TCP/IP connection is first established via the TCON
block and then the Host-Greetings telegram sent to the SIMATIC RF660R read/write
device and the existing connection and function availability signaled to the user.
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

Figure 3-3: User interface with the SIMATIC RF660R read/write device

Version - 1.0 Ausgabe 06.07.2006 21/53


System Description

RF660R BID: 23626344

Instance data block for FB RF600Connect (DB300)

As described in greater detail in chapter 3.3, all parameter and setting necessary for
the communication with the SIMATIC RF660R read/write device for reading the tag IDs
are stored in this data block.

Function blocks (TCON, TSEND, TRCV, TDISCON)

The function blocks TCON (FB 65), TSEND (FB 63), TRCV (FB64) and TDISCON
(FB66) are the standard blocks for TCP/IP communication with a SIMATIC controller
with Profinet interface.
They are called in RF600connect and also supplied with the required parameters.
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

Data block XML command (DB110)

This data block contains the required XML commands for reader control.
Respectively one message for connection setup, read job and disconnection.
Depending on the parameter defined by the FB RF600 per call, the TSEND block
accesses the respective XML message and sends it to the SIMATIC RF660R
read/write device.

Version - 1.0 Ausgabe 06.07.2006 22/53


System Description

RF660R BID: 23626344

These are:

For the connection setup (Host Greetings):

<message>
<name type="c">hostGreetings</name>
<paramGroup name="hostGreetings">
<messagingVersion>GR_XML_2.0</messagingVersion>
<appVersion>Moby Control App V xyz</appVersion>
<userName>RF660RAdmin</userName>
<password>****</password>
</paramGroup>
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

</message>

Read job (TagRead):

<message>
<name type="c">tagRead</name>
</message>

Disconnecting (Host Goodbye):

<message>
<name type="c">hostGoodbye</name>
</message>

Version - 1.0 Ausgabe 06.07.2006 23/53


System Description

RF660R BID: 23626344

Data block raw data (DB10)

All of the data received by the function block TRCV (FB 64) are filed here.
Storage occurs as ring buffer, i.e. the data are cyclically written, so that there is no
overflow. Accordingly, the required data must be processed, which occurs parallel
through the filter block (FB111).

Function block Filter (FB111)

The filter block searches the tag IDs received by the SIMATIC RF660R read/write
device as well as the XML messages stored in the data block for raw data (DB10) and
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

filters the tag IDs .


IDs already read and stored in the data block Tag-ID Memory (DB100) are rejected, so
that each tag ID read by the SIMATIC RF660R read/write device is only saved once.
With the End Notify message the SIMATIC RF660R read/write device signals, that
the read job is completed.
If this message is recognized by the filter block, it is signaled to the user that the read
out tag IDs are available in the data block tag ID Memory (DB100) for processing.
Signaling occurs at the FB RF600Connect (FB300) interface via the outputs Ready (set
to 1) and Busy (set to 0).

Data block Tag-ID Memory (DB110)

This block stores the number of various read out tag IDs (without duplicates) as well as
the read tag IDs themselves.

Version - 1.0 Ausgabe 06.07.2006 24/53


System Description

RF660R BID: 23626344

3.4.2 Application of the user interface

As apparent in the sequence diagram below, a Connect call must initially be made
from the user program.
The Read jobs can be released on demand and the read out tag IDs be
evaluated/processed accordingly.
If the connection with the SIMATIC RF660R read/write device is no longer necessary,
the connection can be cancelled via the Disconnect call.
The application of the individual calls, as well as the things to be considered is
available in the respective sub-chapters.
Copyright Siemens AG 2006 All rights reserved

S7 Program RF600
23626344_RF600toPNCPU_DOKU_V10_e.doc

Function blocks

Activate connection
Connect hostGreetings
Connected

Tags lesen

tagRead
Read
tagRead(response)
tagRead(response)

endNotify
Ready

Deactivate connection hostGoodbye


Disconnect

Figure 3-4: Sequence diagram interface application

Version - 1.0 Ausgabe 06.07.2006 25/53


System Description

RF660R BID: 23626344

Connect

Preconditions: none.

The Connect call is triggered by a positive edge at the Connect input of the FB
RF600Connect (FB300), see Figure 3-3.
The existing connection is signaled with a 1 signal at the Connected output of the FB
RF600Connect (FB300).
At the same time the Ready signal is set, which signals the user that a read job or a
Disconnect can be initialized, see Figure 3-5.
A new edge change (even a renewed positive one) at the Connect input is ignored, as
long as the connection has not previously been canceled with a Disconnect call.
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

Disconnect

Connected Read possible

Ready

Connect

Figure 3-5: Timing diagram for establishing and canceling the connection

Version - 1.0 Ausgabe 06.07.2006 26/53


System Description

RF660R BID: 23626344

Read

Preconditions: Signal Connected and Ready have been set at the FB RF600connect
(FB300).

A positive edge at the Read input of the FB RF600connect (FB300) triggers a read
job.
While the read job is being processed, the Ready is set to 0 and the Busy to 1.
The end of the read job is signaled to the user by switching the Ready to 1 or Busy
to 0, see Figure 3-6.
This means that the read tag-IDs are available to the user consistently in the data block
Tag-ID Memory (DB100).
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

Trigger duration)
Reader

Busy

Ready

Read

Figure 3-6: Timing diagram for read job

Version - 1.0 Ausgabe 06.07.2006 27/53


System Description

RF660R BID: 23626344

Disconnect

Preconditions: connection existing, Connected and Ready outputs have been set to
1 at the FB RF600connect (FB300). Ready output of the FB RF600Connect (FB300)
must be have been set to 1 and the Busy output to 0.

A positive edge at the Disconnect input of the FB RF600connect (FB300) triggers the
disconnection process.

Note:
If the connection is cancelled during a read process by means of a Disconnect call,
then an End Notify message is not sent by the reader. The filter can therefore not
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

recognize, that the read job has been terminated and is unable to pass this on to
the user.
For the user this means filter block or read job are hung.
This status can only be exited via a new Connect call.

Version - 1.0 Ausgabe 06.07.2006 28/53


Multireader Mode

RF660R BID: 23626344

4 Multireader Mode

Should there be more than one SIMATIC RF660R read/write device connected to a
SIMATIC controller, the physical connection must be made via HUB or Switch in any
case.
If the configuration of the SIMATIC RF660R read/write devices is exclusively made via
Ethernet, then the SIMATIC RF660R read/write devices must be connected
successively.

For the configuration of the SIMATIC RF660R read/write devices nothing must be
observed or set differently for the Multireader operation, only the IP addresses must be
set differently.
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

Neither does the SIMATIC controller require specific configuration, except a possibly
necessary adjustment of the cycle time, see note at the end of this chapter.

For each connected SIMATIC RF660R read/write device, the following function and
data blocks must exist:

FB RF600Connect (FB300) with instance data block Conparam_1 (DB 300)


Instance DB filter (DB 111):
DB raw data (DB10)
DB Tag-ID Memory (DB110)

The FBs or DBs in the project are copied and added as many times (rename) and must
be adjusted according to the following description:

Version - 1.0 Ausgabe 06.07.2006 29/53


Multireader Mode

RF660R BID: 23626344

Parameterization in the function block RF600Connect FB 300 (copy):

Filter call:
Specify according copy of the DB raw data at DBRCV
Specify according copy of the DB Tag-ID Memory at DBOUT
Specify according copy from the instance DB
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

Additionally, the copy of the DB Raw Data must be specified at the FB T_RECV.

Version - 1.0 Ausgabe 06.07.2006 30/53


Multireader Mode

RF660R BID: 23626344


Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

The configuration of IP address, port number, connection ID (to be assigned uniquely


for each SIMATIC RF660R read/write device) must be made in the parameter data
block Conparam_1 (DB 300) or in the respective copy.

Note:
The minimal adjustable cycle time (without user program) is 2:
1 SIMATIC RF660R read/write device approx. 150ms
2 SIMATIC RF660R read/write devices approx. 200ms

2
Determined with a SIMATIC S7 315-2PN/DP MLFB:315-2EG10-0AB0 with one or two SIMATIC
RF600 read/write devices.

Version - 1.0 Ausgabe 06.07.2006 31/53


WinCC user interface

RF660R BID: 23626344

5 WinCC user interface


In addition to the STEP7 program, the project
23626344_RF600toPNCPU_WinCC_CODE_V10.zip also contains a
simple WinCC user interface which enables comfortably operating the
example application for demonstration purposes also.

Short description of the WinCC user interface


The following graphic shows the active operating elements of the WinCC
user interface.
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

The "Connect", "Read" and "Disconnect" buttons thereby control the respective call of
the communication block in the example user program. The "Ready/Busy" display
indicates the feedback of the block to the example user program during/after the read
process.
The connection with the SIMATIC RF600 read/write device is established via the
"Connect" button and cancelled with "Disconnect".
The current connection status is depicted as green (connected) or red (disconnected).
"Read" sends the read command to the reader.
The filtered IDs in the data block are displayed in the list, their number appears in the
counter on the left.
The "Filter active/inactive" button enables activating or deactivating the filter. If the filter
has been deactivated, no IDs are written to the data block and are not displayed.

Version - 1.0 Ausgabe 06.07.2006 32/53


WinCC user interface

RF660R BID: 23626344

"Append on/off" enables selecting whether newly read IDs should be attached to
already existing ones in the data block, or whether data block and counter are to be
deleted for each new read process. Additionally, counter and data block can be deleted
manually with the "Clear" button.
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

Version - 1.0 Ausgabe 06.07.2006 33/53


S7 Program (Appendix)

RF660R BID: 23626344

6 S7 Program (Appendix)

6.1 OB1 main program (example user program)


Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

Version - 1.0 Ausgabe 06.07.2006 34/53


Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

RF660R

Version - 1.0
BID: 23626344

Ausgabe 06.07.2006
35/53
S7 Program (Appendix)
S7 Program (Appendix)

RF660R BID: 23626344

6.2 Function block RF600connect (FB300)


Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

Version - 1.0 Ausgabe 06.07.2006 36/53


Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

RF660R

Version - 1.0
BID: 23626344

Ausgabe 06.07.2006
37/53
S7 Program (Appendix)
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

RF660R

Version - 1.0
BID: 23626344

Ausgabe 06.07.2006
38/53
S7 Program (Appendix)
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

RF660R

Version - 1.0
BID: 23626344

Ausgabe 06.07.2006
39/53
S7 Program (Appendix)
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

RF660R

Version - 1.0
BID: 23626344

Ausgabe 06.07.2006
40/53
S7 Program (Appendix)
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

RF660R

Version - 1.0
BID: 23626344

Ausgabe 06.07.2006
41/53
S7 Program (Appendix)
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

RF660R

Version - 1.0
BID: 23626344

Ausgabe 06.07.2006
42/53
S7 Program (Appendix)
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

RF660R

Version - 1.0
BID: 23626344

Ausgabe 06.07.2006
43/53
S7 Program (Appendix)
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

RF660R

Version - 1.0
BID: 23626344

Ausgabe 06.07.2006
44/53
S7 Program (Appendix)
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

RF660R

Version - 1.0
BID: 23626344

Ausgabe 06.07.2006
45/53
S7 Program (Appendix)
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

RF660R

Version - 1.0
BID: 23626344

Ausgabe 06.07.2006
46/53
S7 Program (Appendix)
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

RF660R

Version - 1.0
BID: 23626344

Ausgabe 06.07.2006
47/53
S7 Program (Appendix)
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

RF660R

Version - 1.0
BID: 23626344

Ausgabe 06.07.2006
48/53
S7 Program (Appendix)
S7 Program (Appendix)

RF660R BID: 23626344

6.3 Data block Conparam_1 (DB300)


Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

Version - 1.0 Ausgabe 06.07.2006 49/53


Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

RF660R

Version - 1.0
BID: 23626344

Ausgabe 06.07.2006
50/53
S7 Program (Appendix)
S7 Program (Appendix)

RF660R BID: 23626344

6.4 Data block XML command (DB110)

6.5 Data block filter (DB111)


Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

6.6 Data block Raw Data (DB 10)

Version - 1.0 Ausgabe 06.07.2006 51/53


S7 Program (Appendix)

RF660R BID: 23626344

6.7 Data block Tag-ID Memory (DB110)

6.8 UDT1 Template for data block Raw Data


Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

6.9 UDT2 Template for data block Tag-ID

Version - 1.0 Ausgabe 06.07.2006 52/53


History

RF660R BID: 23626344

7 History
Table 7-1 History
Version Data Change
V1.0 07/2006 First edition
Copyright Siemens AG 2006 All rights reserved
23626344_RF600toPNCPU_DOKU_V10_e.doc

Version - 1.0 Ausgabe 06.07.2006 53/53

Você também pode gostar