You are on page 1of 36

Application for Communication

PC-based Automation with SIMATIC WinAC


S7-Communication with WinAC RTX and S7-300 via
Industrial Ethernet

Preamble
S7 Communication with WinAC RTX

V 1.0 28.07.2004 2/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

Preamble
Foreword
The SIMATIC Windows Automation Center (WinAC) offers you an open,
versatile and robust basis to realize your automation solution on a PC-
based basis.
Its full compatibility with SIMATIC S7 combined with interfaces to the
(open) PC world enables you to combine your classic automation tasks with
the options of the PC world. The use of SIMATIC industrial PCs provides a
powerful and robust platform for your automation solution with WinAC.
Eight examples were developed to provide a quick lead-in to PC-based
automation with SIMATIC WinAC. They consist of a sample code and an
extensive documentation. Using these examples the user can familiarize
with the individual topics on a task-specific basis.
Classification of the examples
The automation tasks described in the examples are related to typical tasks
occurring in automation technology:
Controlling
Communication
Visualization
Technology

Preamble
S7 Communication with WinAC RTX

V 1.0 28.07.2004 3/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

The individual examples
To enable optimum use of PC-based automation we have developed one
example from the classic PLC world and one from the open PC world for
each of the four typical automation tasks (controlling, communication,
visualization, technology).
All eight examples with their allocation to the respective automation tasks
are shown in the figure below. This example which deals with
S7 Communication with WinAC RTX is displayed with a red margin.
Fig. 1-1



Preamble
S7 Communication with WinAC RTX

V 1.0 28.07.2004 4/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

Basis of the examples
All examples are based on a virtual mixing process. Using this mixing
process the different tasks and automation components of the PC-based
automation product range are applied.
System overview
The following figure shows the system overview of the mixing process.
The red margin indicates the components described in this example.
Fig. 1-2


Warranty, Liability and Support
S7 Communication with WinAC RTX

V 1.0 28.07.2004 5/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

Warranty, Liability and Support


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 document 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
does not imply a change in the burden of proof to your detriment.
The Application Examples are not binding and do not claim to be complete
regarding the circuits shown, equipping and any eventuality. They do not
represent customer-specific solutions. They are only intended to provide
support for typical applications. You are responsible in ensuring that the
described products are correctly used.
These Application Examples do not relieve you of the responsibility in
safely and professionally using, installing, operating and servicing
equipment. When using these Application Examples, you recognize that
Siemens cannot be made liable for any damage/claims beyond the liability
clause described above. 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 - then the
contents of the other documents have priority.

Copyright 2004 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:

csweb@ad.siemens.de



Table of Contents
S7 Communication with WinAC RTX

V 1.0 28.07.2004 6/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

Table of Contents
1 Task.................................................................................................................. 7
2 Configuration of the Automation Solution................................................... 8
2.1 Display of the components involved ................................................................. 8
2.2 Required components....................................................................................... 9
2.3 Performance data ........................................................................................... 10
3 Function Mechanisms and Program Structures........................................ 11
3.1 WinAC RTX basics ......................................................................................... 11
3.2 S7 protocol...................................................................................................... 14
3.3 Configuration of an S7 connection.................................................................. 16
3.4 User interface (block-oriented service) ........................................................... 17
3.5 Logical core structure in the example............................................................. 19
3.6 Program structures ......................................................................................... 20
3.7 Program flow................................................................................................... 21
4 Installation of Hardware and Software ....................................................... 24
4.1 Preliminary installation.................................................................................... 24
4.2 Hardware configuration................................................................................... 25
4.3 Installation of the WinAC RTX software.......................................................... 26
4.4 Using WinAC RTX .......................................................................................... 27
4.5 Configuration of the automation stations ........................................................ 28
5 Operator Control and Monitoring................................................................ 33
6 Bibliography.................................................................................................. 36



Task
S7 Communication with WinAC RTX

V 1.0 28.07.2004 7/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

1 Task
Task / overview
The following example shows a connection between a WinAC RTX
controller and a classic SIMATIC S7-300 station via the S7 protocol in a
simple way.
The task is to transfer large amounts of data via Industrial Ethernet
communications processors (CPs) from station 1 to station 2 and vice versa
in a way that is as simple as possible.
Basic figure of the automation solution
The following figure shows the basic interaction of the automation
components described in this document.
Fig. 1-1

Solution requirements
The solution has to meet the following requirements:
One (bilaterally configured) S7 connection is used
A data packet is transferred in a user-defined direction.
Quantity framework of the example
The maximum data amount was selected for the communication. The data
amount to be transferred can be adapted in the application.
Table 1-1
Data amount
16 Kbytes (maximum size of a DB in the CPU315-2 DP)
Customer benefit
Efficient data communication via SIMATIC NET and S7 communication
Use of the integrated Ethernet interface by WinAC RTX
Independence of the S7 communication of the network physics
(PROFIBUS or Ethernet without changes in the S7 program)
Connection of the process level to the management level

Configuration of the Automation Solution
S7 Communication with WinAC RTX

V 1.0 28.07.2004 8/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

2 Configuration of the Automation Solution
This chapter shows the hardware configuration of the automation solution.
The required hardware and software components are listed in tabular form
in chapter 2.2 Required components.

2.1 Display of the components involved
The following overview shows the hardware configuration of the example
application and the respective standard and user software components.
Fig. 2-1



Configuration of the Automation Solution
S7 Communication with WinAC RTX

V 1.0 28.07.2004 9/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

2.2 Required components
The hardware and software components for the respective stations are
listed in the following tables.
Hardware components of the SIMATIC PC station (station 1)
The listed PROFIBUS-CP CP 5613 A2 is only required for the configuration
of the PC station from the PG. It is possible not to use this CP if station 1 is
configured via a locally installed STEP 7.
Instead of the rack PC listed below it is also possible to use a different
industrial PC (e.g. panel PC). It is required that this PC features an
Ethernet and an MPI or PROFIBUS interface.
You can order the components listed in the tables directly in the Siemens
A&D Mall at https://mall.automation.siemens.com. The FAQs are available
on the A&D Support home page at http://support.automation.siemens.com
(enter the FAQ ID in the search field).
Table 2-1
Component No. MLFB/Order number Note
Industrial PC
SIMATIC Rack PC IL 40 S
1 6AG4011-0CA21-0JX0 Configurator: See
FAQ ID 17128155
Communications
processor
CP 5613 A2 for
PROFIBUS, PCI card
1 6GK1 561-3AA01
Hardware components of the S7-300 station (station 2)
Table 2-2
Component No. MLFB/Order number Note
Power supply
PS 307 2A
1 6ES 7307-1BA00-0AA0
Central processing unit
CPU 315-2 DP
1 6ES7 315-2AG10-0AB0 Firmware V 2.0, or
a similar CPU
Communications
processor
CP 343-1
1 6GK7 343-1EX20-0XE0
Mounting rail L=480mm 1 6ES7 390-1AE80-0AA0

Hardware components for the PG/PC
Table 2-3
Component No. MLFB/Order number Note
Programming device
Power PG
1 6ES7 751-0BA21-0LB2 Configurator: See
FAQ ID 17128155;
CP 5611 integrated

Configuration of the Automation Solution
S7 Communication with WinAC RTX

V 1.0 28.07.2004 10/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

Software components of the SIMATIC PC station (station 1)
Table 2-4
Component No. MLFB/Order number Note
SIMATIC WinAC RTX V4.1 1 6ES7 671-0RC04-0YA0

SIMATIC NET
IE SOFTNET-S7 V6.2
1 6GK1 704-1CW62-3AA0 License for S7
communication
Software components of the PG/PC
Table 2-5
Component No. MLFB/Order number Note
STEP 7 V5.3 1 6ES7 810-4CC07-0YA5 Contains NCM S7
Ethernet
Example project
This example application consists of the following components.
For further information on commissioning hardware and software please
refer to chapter 4 Installation of Hardware and Software.
Table 2-6
Component Note
20987361_WinAC_KK_CODE_v10.zip
This zip file contains the STEP 7
project (incl hardware configuration
for both stations, connection
configuration, user programs in STL
source code).
20987361_WinAC_KK_DOKU_v10_e.pdf
This document
2.3 Performance data
The table below informs on the performance data of the system software
and configuration. You are provided with an overview of the performance of
this application and its components. Further performance data are listed in
chapter 3.2 S7 protocol.
Table 2-7
Feature CPU 315-2 DP WinAC RTX
Number of S7 connections Max. 16 Max 64
Maximum data block size 16 Kbytes 64 kKbytes
Transmission speed
(BSEND/BRCV)
Industrial Ethernet (100 Mbits): Approx. 13.5
Kbytes/s
PROFIBUS (12 Mbits): Approx. 5.5 Kbytes/s
Required memory Load memory: 32 KB
Main memory: 28 KB
Load memory: 19 KB
Main memory: 18 KB

Function Mechanisms and Program Structures
S7 Communication with WinAC RTX

V 1.0 28.07.2004 11/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

3 Function Mechanisms and Program Structures
The basics of WinAC RTX are briefly explained in this chapter. In addition
the functionalities on which the S7 protocol is based are explained.
Furthermore, the BSEND and BRCV services used in this example
application are described and details on system-specific characteristics are
given.
Topics
Chapter Title Page
3.1 WinAC RTX Basics 10
3.2 S7 protocol 13
3.3 Configuration of an S7 connection 15
3.4 User interface (block-oriented service) 16
3.5 Logical core structure in the example 18
3.6 Program structures 19
3.7 Program flow 20

3.1 WinAC RTX basics
What is WinAC RTX?
The Windows Automation Center with real-time extension (WinAC RTX)
offers the functionality of a programmable logic controller (PLC) in a PC-
based environment, e.g. Windows XP. The controller performing the control
tasks in WinAC RTX is the Windows Logic Controller (WinLC).
With regard to its functions WinAC RTX can be compared to an S7-400.
Windows Logic Controller RTX (WinLC RTX)
The Windows Logic Controller with real-time extension (WinLC RTX) is the
key element of WinAC RTX. It executes the S7 program on the PC and
controls the connected distributed I/O. WinLC RTX is fully code-compatible
with other SIMATIC S7 controllers. This ensures that existing S7 programs
of an S7-300 or S7-400 controller are also executable on WinLC.
RTX real-time extension
WinLC RTX uses the real-time extensions (RTX) for Windows by
VenturCom. These extensions enable the following functions:
Deterministic operation with predictable response times.
Isochronous mode (equidistance, constant bus cycle time)
In case of a Windows system failure (blue screen) the process control
of WinLC keeps running independent of the operating system and can
thus be properly shut down (via interrupt OBs).

Function Mechanisms and Program Structures
S7 Communication with WinAC RTX

V 1.0 28.07.2004 12/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

Software architecture
The figure below shows the configuration of a WinAC RTX system. It
illustrates the separation between the Windows operating system and the
RTX real-time system by VenturCom on which WinAC RTX runs.

Process interface for WinAC RTX
PROFIBUS DP forms the process interface of WinAC RTX. PROFIBUS
communication processors (e.g. PCI card CP 5613 A2, in the future also
CP 5611) are plugged into the PC and configured as interface modules
(IF modules) in HW Config (same as for S7-400).
The CPs configured as IF modules are addressed via real-time hardware
drivers. This enables the isochronous mode (equidistance of the bus
cycles) for the connected PROFIBUS DP master systems.
Up to four CPs can be configured as IF modules for WinAC RTX.

Function Mechanisms and Program Structures
S7 Communication with WinAC RTX

V 1.0 28.07.2004 13/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

System communication with WinAC RTX
The system communication with WinAC RTX is performed via CPs which
are plugged into the PC. These CPs are configured via HW Config of the
SIMATIC PC station.
S7 communication is used for the system communication of SIMATIC
S7 stations. To use S7 communication it is required to install the SIMATIC
NET PC software on the WinAC PC (the delivery of WinAC includes the
latest SIMATIC NET CD).
The CPs which can be used for the system communication with PROFIBUS
or Industrial Ethernet are listed in the following table.
Table 3-1
Network Applicable CPs
PROFIBUS CP 5611, CP 5613, CP 5613 A2, CP 5613 FO, CP 5614,
CP 5614 FO
Industrial Ethernet CP 1511, CP 1512, CP 1612, CP 1613, each further PC-
compatible Ethernet card
PG routing with WinAC RTX
WinAC RTX supports PG routing. This ensures that STEP 7 can reach
S7 stations in other subnets via the CPs of a WinAC PC station.
The WinLC RTX control panel
The user interface of the WinLC RTX controller resembles the appearance
of a classic S7-400 controller. It features the same status LEDs as well as
buttons to change the mode.
The control panel can be shut down during operating WinLC RTX, the
controller keeps running. To restart the control panel double-click in the
task bar.
The operation of WinLC RTX is explained in chapter 4.4 Using WinAC
RTX.

Function Mechanisms and Program Structures
S7 Communication with WinAC RTX

V 1.0 28.07.2004 14/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

Fig. 3-1

3.2 S7 protocol
Physical independence of the S7 protocol
The S7 protocol is a protocol which is independent of the network physics,
i.e. it does not depend on a network such as PROFIBUS or Industrial
Ethernet. It allows connections between two partners via the following
physical networks:
Industrial Ethernet
PROFIBUS
MPI.
Properties of the physical networks
The following table provides decision-making aid to select the physical
network to be used. Industrial Ethernet is used in this Application.
Table 3-2
Advantages Disadvantages
Industrial
Ethernet
Very high data transmission rates;
thus perfectly suitable for data-
intense communication. Enables
a very large expansion (worldwide
via WAN!).
No constant bus cycles. A CP is
required.
PROFIBUS Relatively high data transmission
rates.
A CP is required. Max. 126
stations per segment.
MPI Possible with all S7-CPUs via the
integrated interface.
Low data transmission speed.
Max. 32 stations.

Function Mechanisms and Program Structures
S7 Communication with WinAC RTX

V 1.0 28.07.2004 15/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

Services of the S7 protocol
For the user the S7 protocol consists of the following services:
Table 3-3
Service Description
BSEND /
BRCV
The block-oriented send and receive service enables an
asynchronous and bidirectional exchange of large data amounts
between two controllers via a bilaterally configured connection. The
data transfer is coordinated, i.e. the reception of the data is
automatically acknowledged by the BRCV block.
USEND /
URCV
Uncoordinated send or received services are capable of exchanging
data asynchronously and bidirectionally within one block between two
controllers via a bilaterally configured connection. The data are
transferred without coordination, i.e. without acknowledgement by the
URCV block.
PUT /
GET
Write and read services are realized as PUT and GET functions
within the S7 protocol. They enable to easily write small data amounts
on or read small data amounts from a controller (client / server
principle).

Note In the S7-400 (and also in WinAC RTX) communication SFBs are used;
in the S7-300 communication FBs are used.

Performance data of the S7 protocol services
The following table contains an overview of the respective performance
data for the S7 protocol services. BSEND / BRCV is used in this
Application.
Table 3-4
Services /
Properties
BSEND / BRCV USEND / URCV PUT / GET
Max. data length
S7-400 / S7-300
64 KB / 32 KB
(2
440 bytes / 440
bytes
(1

400 bytes / 164
bytes
(1

Possible address
areas
S7-400 / S7-300
M, T, Z, E, A, D /
M, D
M, T, Z, E, A, D /
M, D
M, T, Z, E, A, D /
M, D
Data consistency
S7-400 / S7-300
32 bytes to total
length /
8 32 bytes
(3

32 bytes to total
length /
8 32 bytes
(3

32 bytes to total
length /
8 32 bytes
(3

Communication -
principle
Client / client Client / client Client / server
Max. number of
connections
See CPU
specifications
See CPU
specifications
See CPU
specifications

Function Mechanisms and Program Structures
S7 Communication with WinAC RTX

V 1.0 28.07.2004 16/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

Services /
Properties
BSEND / BRCV USEND / URCV PUT / GET
Block types
S7-400 / S7-300
SFB 12 / FB 12
BSEND
SFB 13 / FB 13
BRCV
SFB 8 / FB 8
USEND
SFB 9 / FB 9
URCV
SFB 15 / FB 15
PUT
SFB 14 / FB 14
GET
(1 Corresponds to the total amount of user data for the SFB / FB in case of
Industrial Ethernet.
(2 Corresponds to the maximum length of a data block of the respective system.
(3 Depends on the CPU used.
Transmission speeds of the BSEND / BRCV service
The transmission speed of BSEND / BRCV via Industrial Ethernet and
PROFIBUS is listed in the following table. The data refer to the transfer of a
packet of 16 Kbytes from a WinAC RTX to a CPU 315-2 DP.
Table 3-5
Service Industrial Ethernet (100 Mbits / s) PROFIBUS (1.5 Mbits / s)
BSEND / BRCV Approx. 13.5 Kbytes/s Approx. 5.5 Kbytes/s

3.3 Configuration of an S7 connection
The S7 protocol is based on fixed configured connections which are stored
within the programmable logic control. One as well as several connections
can be configured to one connection partner.
A bilaterally configured connection is used for the viewed BSEND / BRCV
service. Unlike BSEND / BRCV the PUT / GET service uses a unilateral
connection configuration. This connection configuration, however, will not
be described in detail.
Bilaterally configured connection
Bilaterally configured connections are connections in which a fixed
connection was configured between two partners. The connection partners
can also be located in different STEP 7 projects.
In the connection configuration a connection resource for this
communication is reserved in both communication partners independent of
whether the communication partner can be addressed physically or not.

Function Mechanisms and Program Structures
S7 Communication with WinAC RTX

V 1.0 28.07.2004 17/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

3.4 User interface (block-oriented service)
Call parameter BSEND SFB / FB 12
For a detailed explanation on the parameters for BSEND please refer to
reference manual /5/ STEP 7 System and standard functions for S7-300
and S7-400.
Fig. 3-2

Note
The BSEND block for the S7-300 is taken from the
SIMATIC_NET_CP library as FB 12.
In contrast to the S7-400 SFBs, the FBs of the S7-300 can also be
provided with parameters dynamically.

Description on BSEND
SFB / FB 12 sends data to a remote partner where the data are received by
SFB / FB 13 (BRCV). During this data transfer a larger amount of data
can be transferred between the communication partners than would be
possible with all other communication SFBs / FBs for configured S7
connections.
The transferred data areas are divided into segments which comply with
the basic conditions of the used subnet. Each segment is individually sent
to the partner and acknowledged by the SFB / FB BRCV function block
which runs there.
In the S7-300 the parameter SD_1 defines the start address as well as the
maximum length of the complete send data. In the S7-400 the parameter
SD_1 only defines the start address. In case of S7-300 and S7-400 the
parameter LEN defines the length of the data block currently to be sent.
In the communication partners (BSEND and BRCV) the parameters SD_1
or RD_1 should be identical with regard to length and data type. However
the receive data area RD_1 of the BRCV block can be longer than the data
block currently to be sent. But this may cause problems when transferring
structures.

Function Mechanisms and Program Structures
S7 Communication with WinAC RTX

V 1.0 28.07.2004 18/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

Call parameter for BRCV SFB / FB 13
For a detailed explanation on the parameters for BRCV please refer to
reference manual /5/ STEP 7 System and standard functions for S7-300
and S7-400.
Fig. 3-3

Note
The BRCV block for the S7-300 is taken from the
SIMATIC_NET_CP library as FB 13.
In contrast to the S7-400 SFBs, the FBs of the S7-300 can also be
provided with parameters dynamically.

Description on BRCV
SFB / FB 13 BRCV receives data from a remote partner SFB / FB of the
BSEND type. In this process the data are transferred in a segmented
form. Each received data segment is acknowledged by BRCV.
The block is only ready for receiving after a positive edge at the control
parameter EN_R. Setting the parameter to 0 (FALSE) cancels the
currently running job or prevents a new send triggering in the sending
station with a corresponding error message (SFB / FB in wrong state).
In the communication partners (BSEND and BRCV) the parameters SD_1
or RD_1 should be identical with regard to length and data type. However
the receive data area RD_1 of the BRCV block can be longer than the data
block currently to be sent. But this may cause problems when transferring
structures.

Function Mechanisms and Program Structures
S7 Communication with WinAC RTX

V 1.0 28.07.2004 19/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

3.5 Logical core structure in the example
Introduction
This example illustrates in a simple way how a large data area is sent back
and forth between two automation stations via a configured S7 connection.
Data flow model
The following graphic illustrates the processes realized in this example.
Fig. 3-4
Significance of the address parameter R_ID
For referencing data paths within a bilaterally configured connection the
parameter R_ID is additionally available in the USEND/URCV and
BSEND / BRCV services.
With the parameter R_ID you define that a send and a receive SFB/FB
relate: The parameter R_ID has to correspond on the sending side of the
SFB/FB and on the receiving side of the SFB/FB.
This enables the communication of several SFB/FB pairs via the same
S7 connection.
Description of the processes in the example program
The process of the S7 program in the two stations is described in the
following table.
Table 3-6
No. Action
1 The send procedure is started by a trigger signal (M 1.0) in station 1.
2 A data packet of 16384 bytes (corresponds to the maximum size of a DB in
the S7-300) is sent from station 1 to station 2.
3 As soon as the data are received on station 2 the same data are sent to
station 1. This process is continuously repeated until the trigger (M 1.0) is
reset in station 1 .
4 A counter indicates how often the data packet was sent back and forth.

Function Mechanisms and Program Structures
S7 Communication with WinAC RTX

V 1.0 28.07.2004 20/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

3.6 Program structures
In the following chapter the setup and structure of the example are
described on function and data block level of the automation system.
Block structure
The following figure shows the block structure of the S7 program on the two
controllers.
Fig. 3-5

Description of the block structure
To be able to quickly illustrate the basic functionalities this example does
not include a complex structuring.
All send and receive blocks are directly called from OB 1 and thus run
cyclically.
Uniquely assigned instance data blocks are generated for each FB /
SFB.
In the sending station the data are removed from DB100 by the BSEND
send block and stored by the BRCV receive block in the target station in
DB100.
As soon as the sent data have completely arrived on one of the stations
a new send job is immediately triggered in opposite direction.
Note For initializing the BRCV receive blocks a positive edge is required at
the parameter EN_R. The first OB1 cycle is executed with
EN_R = FALSE and set to TRUE only in the second OB1 cycle.


Function Mechanisms and Program Structures
S7 Communication with WinAC RTX

V 1.0 28.07.2004 21/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

3.7 Program flow
In the following the S7 program is described which runs on station 1 in
WinAC. Since this program is almost identical with the program on station 2
(S7-300) the S7 program on station 2 will not be described.
Program flow chart
The following table describes the sequence of the S7 program in the form
of a program flow chart.
Table 3-7
Flowchart Description
The send procedure is started with a
positive edge at M 1.0 Startinput in
WinAC.
First the user data length of 16384 bytes is
loaded and subsequently the BSEND
block is called.



The BRCV block is called in every OB1
cycle. It is thus always ready for receiving.



After the first OB1 cycle the BRCV block is
initialized by setting the flag EN_R to
TRUE.
After each successful reception of a data
block a new send procedure is started.

Note For triggering a new send job a positive edge is required at the REQ input
of the BSEND block.


Function Mechanisms and Program Structures
S7 Communication with WinAC RTX

V 1.0 28.07.2004 22/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

Code excerpt of the BSEND call
The following figure illustrates the STL code in WinAC which belongs to the
call of the BSEND block.
Fig. 3-6

Description of the BSEND call
The BSEND call is divided into four networks which are described in the
following.
Table 3-8
Network Description
Load length In the first network the length of the data to be sent is stored in
MW BSEND_LEN. An absolute value may not be transferred
to the input/output parameter LEN of the BSEND block.
Call BSEND The second network includes the actual BSEND call. The
communication WinAC S7-300 is performed via ID = 1 and
R_ID = 1.
Reset
BSEND_REQ
After the send job for BSEND was started the trigger
BSEND_REQ is reset.
Error handler
BSEND
If errors occur during the data transfer information on these
errors is stored in MW BSEND_HISTORY.

Function Mechanisms and Program Structures
S7 Communication with WinAC RTX

V 1.0 28.07.2004 23/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

Code excerpt of the BRCV call
In the following figure the STL code which belongs to the BRCV call is
shown.
Fig. 3-7

Description of the BRCV call
The BRCV call is divided into three networks which are described in the
following.
Table 3-9
Network Description
Call BRCV This network contains the BRCV call. The S7-300 WinAC
communication is performed via ID = 1 and R_ID = 2.
Start BRCV To activate BRCV with a positive edge the first BRCV call has to
be processed with EMPTY_START = FALSE. Only after that
EMPTY_START is set to TRUE.
Start BSEND If BRCV has received all data from the S7-300 BRCV_NDR is
set to TRUE. This triggers a new call of BSEND via
BSEND_REQ.

Installation of Hardware and Software
S7 Communication with WinAC RTX

V 1.0 28.07.2004 24/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

4 Installation of Hardware and Software
This chapter describes the installation of the components for the
Application. It is divided into the following sections:
Topics
Chapter Title Page
4.1 Preliminary installation 23
4.2 Hardware configuration 24
4.3 Installation of the WinAC RTX software 25
4.4 Using WinAC RTX 26
4.5 Configuration of the automation stations 27
Installation sequence
A specific installation sequence should be followed to ensure correct
installation of the SIMATIC components. The components according to
their installation sequence are listed in the following table.
The installation will be described in this sequence in the following chapters.
Table 4-1
No. Instruction Target
1 STEP 7 V5.3 (or higher) PG/PC
2 SIMATIC NET PC software V6.2 (or higher) WinAC station
3 Installation of CP5613 A2 WinAC station
4 WinAC RTX V4.1 (or higher)
This installation is divided into the following steps:
Installing and checking the VenturCom RTX
extensions
Installing and authorizing the WinAC RTX software
WinAC station
4.1 Preliminary installation
STEP 7
STEP 7 is installed on the PG/PC which is intended for the configuration
and the programming of the automation stations. Alternatively STEP 7 can
also be installed on the PC (station 1) on which WinAC is to run.
At this point the installation of STEP7 will not be described. The installation
takes place in the familiar Windows environment and is self-explanatory.

Installation of Hardware and Software
S7 Communication with WinAC RTX

V 1.0 28.07.2004 25/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

SIMATIC NET PC software
The SIMATIC NET PC software is installed on the same PC (station 1) on
which WinAC is to be installed. The software package includes all the tools
required to install and operate a PC station.
To use this Application you require the SIMATIC NET IE SOFTNET-S7
V6.2 license.
From STEP 7 version 5.2 on Advanced PC Configuration is used to put
PC stations into operation. It enables the configuration of PC stations
directly in STEP 7. Prior to the use of Advanced PC Configuration we
strongly recommend to read manual /2/ SIMATIC NET Commissioning PC
Stations Quick Start.
4.2 Hardware configuration
For the components of the two controllers please refer to chapter 2.2
Required components.
Table 4-2
No. Focus Instruction
1 CP 5613 A2 Install the CP 5613 A2 in an available PCI slot of the rack PC
according to the enclosed mounting instruction /7/.
Note
The drivers for the CP have already been installed with the
SIMATIC NET PC software.
For further hints on the installation of PCI cards in the rack
PC please consult PC manual /6/.
2 S7
hardware
Mount the S7-300 into the prepared rack according to the
installation guidelines.
3 Bus cabling Connect the CP343-1 of station 2 and the integrated Ethernet
interface of station 1 to a common Ethernet network. There
are three options:
Connect both CPs to an existing network (e.g. office or
system network). It is absolutely necessary to consult the
network administrator beforehand.
Connect both CPs via a crossed Ethernet cable (cross
cable).
Connect both CPs via standard Ethernet cables via a
travel (device to connect several Ethernet stations).
4 Bus cabling The PG is connected to the respective automation station via
an MPI cable.

Installation of Hardware and Software
S7 Communication with WinAC RTX

V 1.0 28.07.2004 26/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

4.3 Installation of the WinAC RTX software
The installation of WinAC RTX is described in the following table.

Note The PROFIBUS CP (e.g. CP 5613 A2) should be mounted and installed
before installing WinAC RTX.
Table 4-3
No. Instruction
1 The setup program starts automatically after inserting the WinAC RTX CD. If
the program does not start automatically execute the Setup.exe program
on the CD.
2 After selecting the language a dialog box is displayed which guides you
through the installation tasks.
3 Click the install VenturCom RTX button and follow the instructions in the
dialog box.
Note
The license number (Runtime PAC Number) and the e-mail address for the
licensing of VenturCom RTX are on the rear of the WinAC RTX CD cover.
Note
If the error message Your System is using a HAL that is not supported by
RTX 5.12 is displayed during the installation of the VenturCom RTX
extensions, please read the FAQ with the ID 17053416 on the A&D Support
home page (http://support.automation.siemens.com).

Installation of Hardware and Software
S7 Communication with WinAC RTX

V 1.0 28.07.2004 27/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

4.4 Using WinAC RTX
General information
This section provides a brief overview of the usage of WinAC RTX. Only
the functions which are absolutely necessary are explained in the following.
It is recommended to read the /1/ WinAC RTX manual for the use of WinAC
RTX.
Starting WinLC RTX
WinLC RTX is started via: Start Simatic PC Based Control
WinLC RTX. The control panel of the controller is started simultaneously.
Operating WinLC RTX
The symbol in the task bar indicates that WinLC RTX is running. A green
margin signals RUN or RUN-P mode, a yellow margin indicates
STOP mode.
The buttons of the WinLC RTX control panel are explained in the following
table.
Table 4-4
Button Function
Setting the controller to RUN-P mode
Setting the controller to RUN mode
Setting the controller to STOP mode
A memory reset of the controller is performed.
Shutting down WinLC RTX
The controller is not terminated by shutting down the control panel (the
symbol is still in the task bar). The following operating instructions are only
for information. For the application of this Application it is absolutely
required that WinLC RTX is started and that it is in RUN or RUN-P mode.
To terminate the controller and thus the process control proceed as follows:
Table 4-5
No. Instruction
1 Open the WinLC RTX control panel by double-clicking .
2 Select CPU Shut down Controller in the menu.
3 Confirm the dialog box by clicking Yes to terminate the process control.

Installation of Hardware and Software
S7 Communication with WinAC RTX

V 1.0 28.07.2004 28/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

4.5 Configuration of the automation stations
Configuration with the Station Configuration Editor
The configuration of the SIMATIC PC station with the Station Configuration
Editor corresponds to the plugging of S7-400 hardware components into a
rack. The components of the PC station (hardware and also software
components) are assigned to a virtual slot using the software.
Table 4-6
No. Instruction
1 If WinLC RTX is started ( symbol in the task bar) you have to shut it down
first.
Open the WinLC RTX control panel by double-clicking .
Shut down the controller via the menu CPU Shut Down Controller in
the control panel.
2
Start the Station Configuration Editor by double clicking in the task bar or
via: Start Station Configuration Editor
3 Set the name of the WinAC station to PCWinAC using the Station Name
button.
Note
This name has to be identical with the name of the SIMATIC PC station in
the STEP 7 project (see Installation of the STEP 7 project).
4 Slots 1 to 32 have to be empty. Remove all existing components by selecting
the component and clicking Delete. Confirm the safety queries by clicking
OK.
Note
Importing the configuration using the Import Station (XDB import)
function is not possible in WinAC (Basis, RTX, Slot).
5 Select the line with index 3.
6 Click Add. The Add component dialog box is opened.
7 Select the entry IE General for Type.
8 If there are several Ethernet cards in the PC, you have to select the card
which is connected to station 2 under Parameterization.
9 Confirm the selection and
the safety query by clicking
OK.
In the Component
Properties dialog box you
see the current IP address
and the subnet mask of the
Ethernet card. Please write
down the information.

10 Confirm the dialog box by clicking OK.

Installation of Hardware and Software
S7 Communication with WinAC RTX

V 1.0 28.07.2004 29/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

Configuration of the PROFIBUS interface
With the following steps you configure CP5613 A2 as interface module for
WinAC RTX. This process corresponds to the plugging of IF modules into
an S7-400 CPU.
Table 4-7
No. Instruction
1 Select the line with index 2 (this line has to be blank!) in the Station
Configuration Editor and insert a WinLC RTX component by clicking
Add.
2 Open the WinLC RTX properties dialog box via the context menu of the list
entry.
3 Select IF1 from the list.
4 Open the Add CP Module to WinLC RTX dialog box by clicking Add.
5 Select CP5613A2 and confirm by clicking OK.

6 Close the properties dialog box and restart the PC.
The complete configuration
After performing these steps the configuration in the Station Configuration
Editor should be identical with the following figure.
Fig. 4-1


Installation of Hardware and Software
S7 Communication with WinAC RTX

V 1.0 28.07.2004 30/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

Installation of the STEP 7 project
Proceed as follows to open the STEP 7 project and to adapt it to your
configuration.
Table 4-8
No. Instruction Note / Explanation
1 Open the SIMATIC Manager.
2 Retrieve the archive
20987361_WinAC_KK_CODE_v10.zip via the
menu File > Retrieve....
You can open the project
immediately after retrieving.
3 From the project start the NetPro network
configuration tool by clicking .
In NetPro you see the
network configuration of the
STEP 7 project.
4 Adapt the IP address of station 1:
Double-click IE General in the
PCWinAC station.
Set the IP address and the subnet mask to
the values actually set on the WinAC PC
using the Properties button.
Confirm the property dialog boxes by
clicking OK.
IP address and subnet
mask, see Configuration
with the Station
Configuration Editor, step 9
5 Adapt the IP address of station 2:
Double-click CP 343-1 in the
SIMATIC 300 station.
Set the IP address and the subnet mask to
the desired values using the Properties
button in the General tab.
Confirm the property dialog boxes by
clicking OK.
Please make sure that the
same subnet mask is set in
both stations and that the IP
addresses match.
The easiest way is to select
the address of station 1
increased by one for the CP
343-1.
6 In the project adapt the MPI/PROFIBUS
address of the PG/PC object:
Successively double-click the red and
the violet square representing the MPI
and the PROFIBUS interface of the PG.
In the Parameter tab set the address to
the value of your PG (e.g. 0 or 1).
Confirm the settings by clicking OK.
You can also configure an
Ethernet interface in the PG.
However, this is not
described in detail at this
point. Of course it can be
used by experienced users.
7 Save and compile the configuration by clicking
and close NetPro.

Downloading the S7 program to the S7-300 (station 2)
The S7 program is downloaded to the S7-300 via MPI. To download the
S7 program follow the steps listed in the table below.
Table 4-9
No. Instruction
1 Connect your PG to the S7-300 CPU via an MPI cable.

Installation of Hardware and Software
S7 Communication with WinAC RTX

V 1.0 28.07.2004 31/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

No. Instruction
2 For simple switching of the PG/PC interface to MPI proceed as follows:
Double-click the PG/PC(1) object in the STEP 7 project
If not already done, assign the MPI interface using the Assign button in
the Not Assigned section.
In the Assignment tab in the lower section of Assigned select the MPI
interface.
Check S7ONLINE Access:
Confirm by clicking OK.

The PG/PC interface is now set to MPI.
3 Open the hardware configuration of the SIMATIC 300 station and download
it to the CPU. Use the correct MPI address of the CPU.
Note
We recommend to first delete the used MCC (Micro Memory Card) in the
PG.
4 Now download the blocks of the S7 program of the SIMATIC 300 station to
the target system.
5 Set the CPU and the CP to RUN mode.
Downloading the S7 program to WinAC RTX (station 1)
WinAC is downloaded to station 1 from the PG/PC via PROFIBUS. Follow
the steps listed in the table below.

Installation of Hardware and Software
S7 Communication with WinAC RTX

V 1.0 28.07.2004 32/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

Table 4-10
No. Instruction
1 If not already done, turn on the PC of station 1 and start WinLC RTX.
Note
Make sure that the Station Configuration Editor is configured correctly (see
Configuration with the Station Configuration Editor).
2
Perform a memory reset in WinLC RTX by clicking .
3 Connect your PG to the PROFIBUS-CP (CP5613 A2) of station 1 via an MPI
or PROFIBUS cable.
4 For simple switching of the PG/PC interface to PROFIBUS proceed as
follows:
1. Double-click the PG/PC(1) object in the STEP 7 project
2. If not already done, assign the PROFIBUS interface in the Not
Assigned section using the Assign button.
3. In the Assignment tab in the lower section of Assigned select the
PROFIBUS interface.
4. Check S7ONLINE Access:
5. Confirm by clicking OK.
The PG/PC interface is now set to PROFIBUS.
Note
When configuring CP5613 A2 as IF module in station 1 for the first time it
may occur that the baud rate is set to 187.5 Kbps. For downloading the
parameterization adapt the parameters of the PROFIBUS network
accordingly.
The current bus parameters of a CP5613 A2 can be displayed in the WinLC
Properties dialog box (from the Station Configuration Editor) by clicking the
Diagnostics button (requires that the WinLC RTX controller is started).
5 Open the hardware configuration of the PCWinAC station and download it
to station 1.
6 Now download the blocks of the S7 program of the PCWinAC station to the
PLC.
7
Set WinLC RTX to RUN-P mode by clicking .

Operator Control and Monitoring
S7 Communication with WinAC RTX

V 1.0 28.07.2004 33/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

5 Operator Control and Monitoring
Introduction
A variable table is available to operate the example application. This
enables to display also the status of the individual function calls.
The requirement for operator control and monitoring is the installation of
hardware and software described in chapter 4.
Activating the variable table
To display the variable table perform the following steps.
Table 5-1
No. Instruction
1 Connect your PG to the CP5613 A2 of station 1 via a PROFIBUS cable.
2 If not already done, open the STEP 7 project WinLC_315_SR_IE (archive
20987361_WinAC_KK_CODE_v10.zip).
3 Set the PG/PC(1) object in the STEP 7 project in such a way that the
PROFIBUS interface is active.
4 Open the variable table VAT_1 in the block folder of the PCWinAC station.

5
Start the Monitor variable function by clicking .

Operator Control and Monitoring
S7 Communication with WinAC RTX

V 1.0 28.07.2004 34/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

No. Instruction
6 To start the communication between the two automation stations modify the
variable Startinput to 1.
Note
For simple modifying of the values use the shortcuts:
<CTRL> + 1 for the value true and
<CTRL> + 0 for the value false
directly in the Status value box or by clicking .

7 To terminate the communication set flag 2.4 RESET to true.
The Startinput bit and the counter DB_DATA.BufferSnd(1) are reset.

Operator Control and Monitoring
S7 Communication with WinAC RTX

V 1.0 28.07.2004 35/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

Displayed BSEND parameters
The following BSEND parameters are displayed:
Table 5-2
Parameter Description
BSEND_REQ Trigger for new BSEND job
BSEND_DONE Done bit after completing a send job
BSEND_ERROR Error bit; is set if an error occurs
BSEND_STATUS Status word of the block
BSEND_HISTORY Error number of the last occurred error
Displayed BRCV parameters
The following BRCV parameters are displayed:
Table 5-3
Parameter Description
EMPTY_START Activation bit for the block
BRCV_NDR Done bit after completing the receive procedure
BRCV_ERROR Error bit; is set if an error occurs
BRCV_STATUS Status word of the block
BRCV_LEN Number of bytes already transferred for this job

Bibliography
S7 Communication with WinAC RTX

V 1.0 28.07.2004 36/36

C
o
p
y
r
i
g
h
t


S
i
e
m
e
n
s

A
G

2
0
0
4

A
l
l

r
i
g
h
t
s

r
e
s
e
r
v
e
d

2
0
9
8
7
3
6
1
_
W
i
n
A
C
_
K
K
_
D
O
K
U
_
v
1
0
_
e
.
d
o
c

2
0
9
8
7
3
6
1

6 Bibliography
This list is by no means exhaustive and only gives a selection of
appropriate sources. After installing the respective product most manuals
are available via:
Start Simatic Documentation English
The Product Support is available on the Internet at:
http://support.automation.siemens.com (entry of the Entry ID in the search
field).
Table 6-1
No. Topic Title
1 Description of the functions and the operation
of WinAC RTX V4.1. Available on the
WinAC RTX V4.1 CD.
SIMATIC WinAC RTX V4.1
2 Description or information on:
General information on the PC tools
Functions of NCM PC
Available in the Product Support; Entry ID:
13542666.
SIMATIC NET
Commissioning PC
Stations Manual / Quick
Start for SIMATIC NCM PC
/ STEP 7 version V5.2 and
higher
3 Overview of the communication with SIMATIC
S7 / M7 / C7. Available in the Product Support;
Entry ID: 1254686.
Communication with
SIMATIC
4 Manual for industrial communication on PG/PC
with SIMATIC NET.
Available in the Product Support; Entry ID:
16923753.
SIMATIC NET Industrial
Communication with
PG/PC
5 Complete overview of the organization blocks
(OB), system functions (SFC), system and
standard function blocks (SFB) and standard
function blocks as well as IEC functions
contained in the operating systems of the
CPUs of S7-300 and S7-400.
Available in the Product Support; Entry ID:
1214574.
System software for S7-
300/400 system- and
standard functions
Manual for SIMATIC Rack PC IL40S
Available in the Product Support; Entry ID:
15317654.
SIMATIC Rack PC IL40S
manual
7 Installation instructions for the CP5613 A2
Available in the Product Support; Entry ID:
13664901.
SIMATIC NET product
information / installation
instructions for CP5613,
CP5614, CP5613 FO,
CP5614 FO

Note If the entries are not displayed immediately after clicking the
links listed in the table above click Update in your browser.

You might also like