Application for Control Technology fileThey consist of the sample code and an extensive...

32
Application for Control Technology PC-based Automation with SIMATIC WinAC Basics for the Solution of Automation Tasks Based on WinAC RTX

Transcript of Application for Control Technology fileThey consist of the sample code and an extensive...

Page 1: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Application for Control Technology

PC-based Automation with SIMATIC WinAC

Basics for the Solution of Automation Tasks Based on WinAC RTX

Page 2: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Preamble

Automating with WinAC RTX – Basics

V1.1 10.01.2005 2/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

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

Page 3: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Preamble

Automating with WinAC RTX – Basics

V1.1 10.01.2005 3/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

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 “Automating with WinAC RTX“ (RTX: Real-Time Extension) is displayed with a red margin. Fig. 1-1

Page 4: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Preamble

Automating with WinAC RTX – Basics

V1.1 10.01.2005 4/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

Basis of the examples All examples are based on a virtual “mixing process”. Using this “mixing process” the different tasks and automation components from the product range of PC-based automation are applied.

System picture The following figure shows the system picture of the “mixing process”. The red margin indicates the components described in this example. Fig. 1-2

Page 5: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Warranty, Liability and Support

Automating with WinAC RTX – Basics

V1.1 10.01.2005 5/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

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:

[email protected]

Page 6: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Table of Contents

Automating with WinAC RTX – Basics

V1.1 10.01.2005 6/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

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 Basic performance data.................................................................................. 10

3 WinAC RTX Basics ....................................................................................... 11

4 Installation of Hardware and Software ....................................................... 13 4.1 Preliminary installation.................................................................................... 13 4.2 Hardware installation ...................................................................................... 14 4.3 Installation of WinAC RTX .............................................................................. 16

5 Operating WinAC RTX.................................................................................. 17

6 Embedding of WinAC RTX in Totally Integrated Automation (TIA).......... 19 6.1 Installing the PC station .................................................................................. 19 6.2 Process interface of WinAC RTX.................................................................... 22 6.3 WinAC RTX and STEP 7 ................................................................................ 26

7 Operating the Example Program................................................................. 30

8 Bibliography.................................................................................................. 32

Page 7: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Task

Automating with WinAC RTX – Basics

V1.1 10.01.2005 7/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

1 Task

Task / overview This application explains the basic factors of automation with WinAC RTX. The following tasks are described in this application:

• Installation and optimization of the PC platform

• Installation of hardware and software for WinAC RTX

• Process interface for WinAC RTX

• Configuration of WinAC RTX

• Support in case problems with the real-time capability of the PC platform occur.

• Programming example: Recipe data management in data blocks

Note The interaction of WinAC RTX with other Windows applications on a PC as well as the tuning of WinAC RTX are described in Example 3/8: “Configuration and Operation of WinCC as well as Tuning of WinAC RTX”

Basic figure of the automation solution The following figure shows the basic interaction of the automation components described in this document. Fig. 1-1

Customer benefit • Powerful control due to powerful PC platform.

• PC platform is composed of standard components.

• Full industrial capability due to robust industrial PC.

• Deterministics, real-time behavior and high operating stability due to RTX real-time extension by VenturCom.

• Fully compatible with SIMATIC S7.

• Configuration of the automation station with the standard SIMATIC tools.

Page 8: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Configuration of the Automation Solution

Automating with WinAC RTX – Basics

V1.1 10.01.2005 8/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

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 picture shows the hardware configuration of the example and the respective software components. Fig. 2-1

Page 9: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Configuration of the Automation Solution

Automating with WinAC RTX – Basics

V1.1 10.01.2005 9/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

2.2 Required components

The hardware and software components for SIMATIC PC station and I/O are listed in the following tables.

Instead of the rack PC listed below it is also possible to use another industrial PC (e.g. panel PC). 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).

Hardware components of the SIMATIC PC station (WinAC station) Instead of the rack PC listed in the table another industrial PC (e.g. panel PC) can also be used. Table 2-1

Component No. MLFB/Order number Note Industrial PC SIMATIC Rack PC IL 40 S

1 6AG4011-1CA21-0JX0 Configurator: See FAQ ID 17128155

Communications processor CP 5613 A2 for PROFIBUS, PCI card

1 6GK1 561-3AA01

I/O hardware components Table 2-2

Component No. MLFB/Order number Note Load current supply PS 307 2A

1 6ES 7307-1BA00-0AA0

Interface for ET200 M IM153-2

1 6ES7 153-2AA02-0XB0

Simulator module SM374

1 6ES7 374-2XH01-0AA0

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 6ES7751-0BA21-0LB2 Configurator: See FAQ ID 17128155; CP 5611 integrated

Page 10: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Configuration of the Automation Solution

Automating with WinAC RTX – Basics

V1.1 10.01.2005 10/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

Software components of the SIMATIC PC station (WinAC station) Table 2-4

Component No. MLFB/Order number Note SIMATIC WinAC RTX V4.1 1 6ES7671-0RC04-0YA0 SIMATIC NET CD

is included in the WinAC package.

Software-components of the PG/PC Table 2-5

Component No. MLFB/Order number Note STEP 7 V5.3 1 6ES7 810-4CC07-0YA5

Example project This example application consists of the following components. Table 2-6

Component Note 21004765_WinAC_SK_CODE_v11.zip This zip file contains the STEP 7

project (incl hardware configuration for both stations, connection configuration, S7 programs in STL source code).

21004765_WinAC_SK_DOKU_v11_e.pdf This document

2.3 Basic performance data Information on the most important basic data of the WinAC RTX system software is listed in the following table. You are provided with an overview of the performance of this application and its components. A complete list of the WinAC RTX performance data is available on the Internet at https://mall.automation.siemens.com. Table 2-7

Feature WinAC RTX Main memory PC main memory fully usable Load memory PC main memory fully usable Retentivity (only with UPS!)

All data (T, C, M and DBs as well as diagnostics buffer) Information on UPS: See FAQ ID 17241008

S7 counter / S7 timer 512 / 512 (all retentive) Block size 64 Kbytes Number of blocks Limiting only by available PC main memory Total number of DP connections

4 (with CP5613 A2)

Connections 64 DP master equidistant Yes

Page 11: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

WinAC RTX Basics

Automating with WinAC RTX – Basics

V1.1 10.01.2005 11/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

3 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 or Windows 2000 Professional. The controller performing the control tasks in WinAC RTX is the Windows Logic Controller (WinLC).

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

With regard to its functions WinAC RTX can be compared to an S7-400.

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

Performance of WinLC RTX If you are interested in details on the performance of WinLC RTX please refer to Example 4/8 entitled “Operator Control and Monitoring with WinCC“. Among other things, this application deals with the following topics:

• The WinLC RTX cycle

• Tuning for WinLC RTX (priorities, cycle times, idle times, etc.)

• Visualization with WinCC.

Page 12: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

WinAC RTX Basics

Automating with WinAC RTX – Basics

V1.1 10.01.2005 12/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

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

Process interface for WinAC RTX The process interface of WinAC RTX is performed via PROFIBUS DP. PROFIBUS communications processors (e.g. PCI card CP 5613 A2) are plugged into the PC and configured as interface modules (IF modules) in HW Config (as for the 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 DP master systems.

Up to four CPs can be configured as IF modules for WinAC RTX.

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 current SIMATIC NET CD).

Page 13: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Installation of Hardware and Software

Automating with WinAC RTX – Basics

V1.1 10.01.2005 13/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

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 12 4.2 Hardware installation 13 4.3 Installation of WinAC RTX 15

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. Table 4-1

No. Instruction Target system 1 STEP 7 V5.3 (or higher), see 4.1 Preliminary installation PG/PC 2 SIMATIC NET PC software V6.2 (or higher), see 4.1

Preliminary installation WinAC station

3 Installation of the CP 5613 A2, see 4.2 Hardware installation

WinAC station

4 WinAC RTX V4.1 (or higher), see 4.3 Installation of WinAC RTX This installation is divided into the following steps: 1. Installing and checking the VenturCom RTX

extensions 2. Installing and authorizing the WinAC RTX software

WinAC station

4.1 Preliminary installation

Introduction It is absolutely necessary to install STEP 7 and the SIMATIC NET software before installing WinAC RTX.

STEP 7 STEP 7 is installed on the PG/PC which is intended for the configuration and the programming of the automation stations. Alternatively you can install STEP 7 on the PC (WinAC station) 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.

Page 14: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Installation of Hardware and Software

Automating with WinAC RTX – Basics

V1.1 10.01.2005 14/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

SIMATIC NET The SIMATIC NET PC software is installed on the same PC (WinAC station) on which WinAC is to be installed. The software package includes all aids required to install and operate a PC station.

Operating SIMATIC NET as described in this application does not require a licensing.

From STEP 7 version 5.2 the “Advanced PC Configuration” procedure 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 installation

Installation of the CP 5613 A2 Install the CP 5613 A2 in an available PCI slot of the rack PC. Proceed as follows (see also FAQ ID 14179890, available on the A&D Support home page at http://support.automation.siemens.com). Depending on the automation task you can install up to four CP 5613 A2 in the PC for process communication (for up to four DP master systems) with WinAC RTX. The number of CPs is not limited for the system communication (e.g. S7 communication) with WinAC RTX. Table 4-2

No. Instruction 1 Turn off the SIMATIC PC and pull the mains plug.

Please observe the ESD measures for electrostatic sensitive devices. They are available in each SIMATIC PC manual (/5/).

2 Open the PC (see manual of the device). 3 Plug the CP5613 A2 into an available PCI slot (see installation instructions

/6/).

Note To use the isochronous mode for constant bus cycle time on PROFIBUS DP it is required to install the CP 5613 A2 in a PCI slot without interrupt sharing. In case of the Rack PC IL 40 P3 (6AG4010-0...) slots 1 or 3 or 4 are slots without interrupt sharing. See also FAQ ID 12981782 (PCI slots without interrupt sharing) or 13589353 (PCI slot numbering in SIMATIC PCs). If you use a different PC consult the user manual of the PC or of the mainboard.

4 Shut down the PC. 5 Start the PC. Windows detects the CP.

Page 15: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Installation of Hardware and Software

Automating with WinAC RTX – Basics

V1.1 10.01.2005 15/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

Connecting distributed I/O Distributed I/O is connected to the rack PC via the CP 5613 A2 on PROFIBUS DP.

To connect the ET 200M I/O for this application proceed as follows: Table 4-3

No. Instruction 1 Mount the

• PS 307 2A power supply • Interface for ET200 M, IM153-2 • SM374 simulator module on a mounting rail (IM153-2 and SM371 connected via bus connector)

2 Connect IM153-2 to the power supply. 3 Connect the power supply to the corresponding supply voltage. 4 Connect IM153-2 to the CP 5613 A2 of the rack PC via a PROFIBUS line. 5 Switch on the power supply of the I/O.

Page 16: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Installation of Hardware and Software

Automating with WinAC RTX – Basics

V1.1 10.01.2005 16/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

4.3 Installation of WinAC RTX

Note The PROFIBUS CP (e.g. CP 5613 A2) should be installed before installing WinAC RTX.

Administrator rights (“ADMIN”) for your operating system are required for the installation of WinAC RTX V4.0.

The installation of WinAC RTX is described in the following table. Table 4-4

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. VenturCom RTX is installed on your PC. 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).

4 After restarting the PC the functionality of the VenturCom RTX extensions has to be checked. Click the “Step 2” circle in the “WinAC RTX V4.1 Setup” dialog. You receive instructions for testing the RTX extensions.

5 By clicking the “Step 3” circle in the installation dialog the installation of the WinAC RTX software is started.

Page 17: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Operating WinAC RTX

Automating with WinAC RTX – Basics

V1.1 10.01.2005 17/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

5 Operating WinAC RTX

This section provides a brief overview of the use 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 WinAC RTX control panel is opened simultaneously.

The WinLC RTX control panel The exterior of the WinLC RTX control panel resembles the appearance of a conventional 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. Fig. 5-1

Page 18: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Operating WinAC RTX

Automating with WinAC RTX – Basics

V1.1 10.01.2005 18/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

Operating WinLC RTX The symbol in the task bar indicates that the WinLC RTX controller 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. The point on the right of the button indicates the current mode. Table 5-1

Button Function Setting the RUN-P mode

Setting the RUN mode

Setting the STOP mode

A memory reset of the controller is performed

Shutting down the WinLC RTX controller The controller is not terminated by shutting down the control panel (the

symbol is still in the task bar). To terminate WinAC RTX and thus the process control proceed as follows: Table 5-2

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.

Page 19: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Embedding of WinAC RTX in Totally Integrated Automation

(TIA)

Automating with WinAC RTX – Basics

V1.1 10.01.2005 19/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

6 Embedding of WinAC RTX in Totally Integrated Automation (TIA)

Introduction This chapter deals with the integration of WinAC RTX in the automation world of SIMATIC. You are provided with information on how to configure the WinAC RTX controller.

Topics

Chapter Title Page 7.1 Installing the PC station 20 7.2 Process interface of WinAC RTX 23 7.3 WinAC RTX and STEP 7 28

6.1 Installing the PC station

A PC station is a PC (e.g. rack PC) as a component in an automation solution with SIMATIC.

The configuration tool (SIMATIC Manager, HW Config, ...) handles the PC station in a similar way to a SIMATIC-400 station. In a PC station components or modules are plugged on a rack, even if this rack is only virtual. The configuration data are configured with HW Config or NetPro and loaded to the PC station.

Components of the PC station The PC station consists of the actual PC and components which are plugged on a virtual rack using the software. The components communicate via a PC-internal software bus which can be compared to the backplane bus of the S7-400. The components can be hardware or software components.

A selection of possible components is listed in the table below. Only the components PROFIBUS-CP and WinAC RTX are used in this application. Table 6-1

Hardware components Software components

• SIMATIC WinAC Slot 412 / 416 (S7-400 controller as PCI card)

• Various PROFIBUS or Ethernet CPs (configured mode has to be “Configured Mode”).

• WinAC Basis / RTX • SIMATIC NET OPC Server • WinCC • ProTool Pro • User-defined applications

Page 20: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Embedding of WinAC RTX in Totally Integrated Automation

(TIA)

Automating with WinAC RTX – Basics

V1.1 10.01.2005 20/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

Station Configuration Editor The Station Configuration Editor is the tool used to “plug” the components into a slot of the virtual rack of the PC station. This workstep corresponds to the hardware plugging of S7-400 modules into an S7-400 rack.

The Station Configuration Editor makes available a virtual rack with 32 slots. You can “plug” the desired components into these slots mostly without having to observe slot rules.

The components are configured completely from STEP 7 (via SIMATIC Manager, HW Config, NetPro, ...).

Open the Station Configuration Editor via:

Start Station Configuration Editor

or by double-clicking in the task bar.

Interface of the Station Configuration Editor The screenshot below shows the configuration of the PC station after the installation of WinAC RTX. The red cross in the status field indicates that no configuration data have been loaded from HW Config. Fig. 6-1

Page 21: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Embedding of WinAC RTX in Totally Integrated Automation

(TIA)

Automating with WinAC RTX – Basics

V1.1 10.01.2005 21/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

Important settings in the Station Configuration Editor To apply the example project for this application, the following settings should be made in the Station Configuration Editor:

• Change the station name to “PCWinAC” using the “Station Name” button.

• WinLC RTX should be on slot (Index) 2.

Note Importing the configuration using the “Import Station…” (XDB import) function is not possible in WinAC (Basis, RTX, Slot).

The “Configuration Console” tool The “Configuration Console” tool is used to manage the SIMATIC NET configuration of a PC station.

The tool is opened via:

Start Simatic SIMATIC NET Settings Configuration Console

Functions of “Configuration Console” The following table provides a brief overview of the functions of “Configuration Console”. A complete description is available in manual /6/ “Industrial Communication with PG/PC”. Table 6-2

Field Functions Applications OPC settings: Terminating OPC server, OPC protocol selection,

symbols, OPC trace, protocol trace Modules Settings and diagnostics for the existing communications cards:

Selection of mode, version information, address information, network diagnostics, display of the network stations (only MPI and PROFIBUS), reading of the softnet DP trace

Access points Managing the access points for SIMATIC software.

Page 22: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Embedding of WinAC RTX in Totally Integrated Automation

(TIA)

Automating with WinAC RTX – Basics

V1.1 10.01.2005 22/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

6.2 Process interface of WinAC RTX

Introduction The process interface for WinAC RTX to PROFIBUS DP is currently e.g. performed via CP 5613 or CP 5613 A2. In the future a process interface will also be possible via CP 5611. This enables plugging up to four CPs into the PC and thus configuring up to four DP master systems.

The CP, analog to the S7-400, is configured as interface module (IF module) in WinAC RTX. This configuration is performed in the Station Configuration Editor and described in the following.

CPs which are configured as IF modules are addressed via real-time hardware drivers. This enables the isochronous mode (constant bus cycle times) for the connected PROFIBUS DP.

Configuration of the CP 5613 A2 as IF module To configure a CP 5613 A2 as IF module for WinAC RTX follow the steps listed in the table below: Table 6-3

No. Instruction 1 Make sure that the WinAC RTX controller is shut down (in the control panel

via menu CPU Shut Down Controller). 2 Open the Station Configuration Editor via

Start Station Configuration Editor

or by double-clicking in the task bar.

3 Open the “WinLC Properties” dialog box for WinLC RTX via:

Right mouse click on WinLC RTX Properties 4 Select a slot for the IF

module (e.g. IF1) and open the “Add CP Module to WinLC RTX” dialog box by clicking “Add…”.

Page 23: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Embedding of WinAC RTX in Totally Integrated Automation

(TIA)

Automating with WinAC RTX – Basics

V1.1 10.01.2005 23/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

No. Instruction 5 Select the CP you want to configure as IF module for WinAC RTX from the

list. Confirm your selection by clicking OK.

6 Confirm the restart request by clicking “Yes”.

Note The baud rate of the CP 5613 A2 may be set to 187.5 Kbps after restarting. If you want to configure the WinAC station using PROFIBUS the PG/PC interface of the PG has to be set accordingly. The current bus parameters of a CP 5613 A2 can be displayed in the “WinLC Properties” dialog box by clicking the “Diagnostics” button (requires that the WinLC RTX controller is started).

Note After configuring a CP as IF module for WinAC RTX it is no longer visible

under “Configuration Console”. Diagnostics is performed via either STEP 7 or the “WinLC Properties” dialog box (by clicking the “Diagnostics” button for the corresponding IF module) in the Station Configuration Editor.

IRQ settings – General information IRQ means “Interrupt Request”. An IRQ is used to inform the PC processor that a PC component (e.g. the CP 5613 A2) wants to perform a specific action. This is done via interrupt lines which are continuously polled by a controller with regard to an interrupt request. One line is assigned to each component. 16 interrupt lines (the IRQs) are available in a PC. Two components can also share a line (interrupt sharing), but this may cause delays during processing interrupt requests.

Page 24: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Embedding of WinAC RTX in Totally Integrated Automation

(TIA)

Automating with WinAC RTX – Basics

V1.1 10.01.2005 24/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

Displaying the current IRQ settings You can view the current IRQ settings of your PC via the system information. Simply follow the instructions listed in the table: Table 6-4

No. Instruction 1 Open the “Run” dialog box via

Start Run 2 Enter “msinfo32” in the “Open” box and click “OK”.

The system information is displayed. 3 Navigate in the left tree of the system information:

System information Hardware resources IRQs

The device names of CPs configured as IF modules end with “for WinLC RTX”. IRQs which are not occupied are not listed (in the figure IRQs 7, 10 and 11; IRQ 2 is always diverted to IRQ 9).

IRQ setting for the PROFIBUS CPs The installed CP 5613 A2 have to feature an individual interrupt line and an individual IRQ to use the isochronous mode for constant bus cycle time on PROFIBUS DP.

This requirs either the installation of the CPs in a PCI slot without interrupt sharing (see 4.2 Hardware installation) or the deactivation of all components which use the same IRQ.

If the system information of your PC determined that the CP configured as IF module shares its IRQ with other modules you can change the IRQ settings of the CP as described in the following:

Page 25: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Embedding of WinAC RTX in Totally Integrated Automation

(TIA)

Automating with WinAC RTX – Basics

V1.1 10.01.2005 25/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

Table 6-5

No. Instruction 1 Open the “RTX Properties” dialog box via:

Start Programs VenturCom RTX RTX Properties 2 Click the “Plug and Play” tab.

The modules which are operated with a real-time hardware driver are listed, thus also the CP 5613 A2 configured as IF module.

4 Open the “RTX PCI Device Properties” dialog box via:

Right mouse click on the CP Properties 5 Enter an available IRQ between 3 and 15 in the “IRQ” box (see system information).

Select “Device Exclusive” in the “Disposition” box.

6 Click “OK” to confirm the settings and close the “RTX-Properties” dialog box by clicking

“OK”. 7 Restart the PC.

Page 26: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Embedding of WinAC RTX in Totally Integrated Automation

(TIA)

Automating with WinAC RTX – Basics

V1.1 10.01.2005 26/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

No. Instruction 8 Check the IRQ settings via the system information.

Possible reasons for unsuccessful settings are listed in the following: • The used PCI slot uses IRQ sharing.

This is the case if you selected an available IRQ for the CP but if a second module occupies the same IRQ after the restart. There are two options to solve this problem: – Install the CP in a different (IRQ sharing-free) slot. Refer to FAQ ID 12981782

or 13589353 or the user manual of your PC or mainboard. If no information on the IRQ sharing-free PCI slots of your PC is available searching for a PCI slot without IRQ sharing may take a considerable period of time.

– Deactivate or remove all devices which use the same IRQ. Such a device may e.g. be the USB controller (see 5 Optimizing the PC platform for WinAC RTX) or an Ethernet card (deactivation via device manager).

• The selected IRQ has already been used: – Select a different IRQ for the CP.

System communication with WinAC RTX System communication with WinAC RTX is performed via the CPs installed in 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. This topic is described in detail in the application on “Communication: S7 Communication with BSEND/BRCV for WinAC RTX and S7-300 via Industrial Ethernet” (Entry ID: 20987361).

6.3 WinAC RTX and STEP 7

Introduction This chapter describes the configuration of WinAC RTX with STEP 7. The intention is to make clear that there are no functional differences compared to the configuration of an S7-300 or S7-400.

Opening the example project The information in this chapter is explained using an example project. To open the example project retrieve the project “WinLC_SK.zip”, which is in the “21004765_WinAC_SK_CODE_v11.zip” ZIP file, in the SIMATIC Manager. Subsequently open the project “WinLC”.

Page 27: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Embedding of WinAC RTX in Totally Integrated Automation

(TIA)

Automating with WinAC RTX – Basics

V1.1 10.01.2005 27/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

WinAC RTX in the SIMATIC Manager The WinAC RTX controller is configured in a SIMATIC PC station. It is inserted into the STEP 7 project like an S7-400 station.

Note The name of the SIMATIC PC station in the STEP 7 project has to be identical with the station name in the Station Configuration Editor of the target PC (on which WinAC RTX runs). See screenshot below.

Configuration in HW Config The hardware configuration for WinAC RTX is identical to the hardware configuration of an S7 hardware controller. The configuration of the target PC (from the Station Configuration Editor) is reproduced in HW Config of the SIMATIC PC station.

A DP master system is automatically connected to the CPs on the IF slots. In this system you can configure the distributed I/O of the WinAC RTX controller. Fig. 6-2

Page 28: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Embedding of WinAC RTX in Totally Integrated Automation

(TIA)

Automating with WinAC RTX – Basics

V1.1 10.01.2005 28/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

Loading the configuration Depending on how you connect your PG to the WinAC station the following options of loading the configuration to WinAC RTX are available. The options and the corresponding procedure are listed in the following table. Table 6-6

Configuration Procedure STEP 7 and WinAC RTX on the same PC

Set the “S7ONLINE” access point to “PC internal” in the “Set PG/PC Interface” dialog box.

PG and WinAC station connected via PROFIBUS

1. Configure a PROFIBUS CP (e.g. as IF module for WinAC RTX) in the Station Configuration Editor of the WinAC station.

2. Adapt the HW Config of the STEP 7 project correspondingly.

3. Set the PG/PC interface of your PG to PROFIBUS. Make sure that you use the same bus parameters (baud rate!) as in the target CP of the WinAC station.

4. Connect your PG to the configured CP of the WinAC station via a PROFIBUS line.

5. Load the hardware configuration to the WinAC station (make sure that the PROFIBUS address is correct).

Note During configuring the CP 5613 A2 as IF module the baud rate may initially be set to 187.5 Kbps. It is then required to set the PG/PC interface on the PG accordingly.

PG and WinAC station connected via Industrial Ethernet

1. Configure an Ethernet CP (e.g. the integrated Ethernet card of the rack PC) in the Station Configuration Editor of the WinAC station.

2. Adapt the HW Config of the STEP 7 project accordingly (same MAC and IP address as in the WinAC station!).

3. Set the PG/PC interface of your PG to TCP/IP. Make sure that you use the same bus parameters as in the target CP of the WinAC station.

4. Connect your PG to the configured CP of the WinAC station via an Ethernet line.

5. Load the hardware configuration to the WinAC station (make sure that the IP address is correct).

Note For simple switching of the PG/PC interface it is recommended to add a “PG/PC” object to the STEP 7 project.

The example project already contains this object.

Page 29: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Embedding of WinAC RTX in Totally Integrated Automation

(TIA)

Automating with WinAC RTX – Basics

V1.1 10.01.2005 29/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

Loading the S7 program Loading the S7 program is identical to loading the configuration to the WinAC station: Table 6-7

No. Instruction 1 Connect STEP 7 and the WinAC station (see previous section). 2 Select the block folder of the example project “WinLC”. 3

Load the blocks to the WinAC RTX controller by clicking this button .

PG routing with WinAC RTX PG routing is not dealt with in this application. The following sections provide basic information.

WinAC RTX supports PG routing. This ensures that STEP 7 can reach further S7 stations in other subnets on a PG/PC via the CPs of a WinAC station.

This requires that the CPs are set to “Configured Mode” and that they exist in the configuration of the WinAC station in the STEP 7 project. It is insignificant whether the CPs are configured as IF modules for WinAC RTX or not.

Startup and diagnostics with the SIMATIC Manager The startup and diagnostic tools of the SIMATIC Manager can be applied to the WinAC RTX controller without restrictions. The procedure is identical to the procedure in the hardware S7 controllers.

However, the CPs plugged into the PC and used by WinAC RTX don’t make diagnostic information available. Diagnostics of these modules is performed directly in the WinAC station via the “Configuration Console” management console or the Station Configuration Editor.

Page 30: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Operating the Example Program

Automating with WinAC RTX – Basics

V1.1 10.01.2005 30/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

7 Operating the Example Program

Introduction The S7 program of the example program is explained in this chapter. You are provided with detailed information on the functionality of the program, the assignment of inputs and outputs on the distributed I/O as well as the operation of the program.

Note This chapter does not include an extensive program description. This application does not focus on the S7 program; it focuses on the configuration of WinAC RTX as well as on the process interface via distributed I/O.

Functionality of the S7 program The S7 program from the example project is used to control a virtual mixing plant and rack. This plant consists of:

• A boiler with two inlet and one outlet valves

• A mixer for the boiler

• A heater as well as a cooler for the liquid in the boiler.

The user has the option to influence the mixing process by selecting different recipe data records.

Assignment of inputs and outputs The S7 program is operated via digital inputs. The actual process is controlled via digital outputs. The assignment of inputs and outputs is listed in the following table. Table 7-1

Channel Symbol Function E0.0 “IN_Start_Process” Start mixing process E0.1 E0.2

Selection of recipe: 00: Keep current recipe 10: Select recipe 1 01: Select recipe 2 11: Select recipe 3

A0.0 “Out_InValve1” Open inlet valve 1 A0.1 “Out_InValve2” Open inlet valve 2 A0.2 “Out_OutValve” Open outlet valve A0.3 “Out_Heater” Turn on heater A0.4 “Out_Cooler” Turn on cooler A0.5 “Out_Mixer” Turn on mixer A0.7 “Out_Cycle” Continuous flashlight (flashes every 10 cycles)

Page 31: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Operating the Example Program

Automating with WinAC RTX – Basics

V1.1 10.01.2005 31/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

Operating the program To start and operate the mixing process follow the instructions listed in the following table. Table 7-2

No. Instruction 1 Requirements for starting the mixing process:

• The WinAC RTX controller has to be configured correctly • The configuration and the example program have to be loaded to WinAC

RTX • WinAC RTX has to be in “RUN” or “RUN-P” mode The controller is ready to start the mixing process as soon as you see the flashlight at output A0.7.

2 Select a recipe via the digital inputs E0.1 and E0.2. 3 Start the mixing process with input E0.0.

Switch E0.0 to “1”. 4 The status of the controller is indicated at the digital outputs or in the

variable table “VAT_1”.

5 The mixing process is stopped by setting E0.0 to “0”.

The current process is completed.

Page 32: Application for Control Technology fileThey consist of the sample code and an extensive documentation. Using these examples the user can familiarize with the individual topics on a

Bibliography

Automating with WinAC RTX – Basics

V1.1 10.01.2005 32/32

Cop

yrig

ht

Sie

men

s A

G 2

005

All

right

s re

serv

ed

2100

4765

_Win

AC

_SK_

DO

KU

_v11

_e.d

oc

2100

4765

8 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 (enter the Entry ID in the search field). Table 8-1

No. Topic Title 1 Description of functions and operation of

WinAC RTX V4.1. Available on the WinAC RTX V4.1 CD or directly from the control panel: Menu Help Help on Controller.

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 Manual for industrial communication on PG/PC with SIMATIC NET. Available in the Product Support; Entry ID: 2044387.

SIMATIC NET – Industrial Communication with PG/PC

4 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

5 Manual for SIMATIC Rack PC IL40S Available in the Product Support; Entry ID: 15317654.

SIMATIC Rack PC IL40S manual

6 Installation instructions for CP 5613 A2 available in the Product Support; Entry ID: 13664901.

SIMATIC NET product information / installation instructions for CP 5613 A2, CP5614, CP5613 FO, CP5614 FO