s5-155h (cpu 948r) - ucc.· simatic s5 siemens spares. ii cpu 948r programming guide ... approved

Download S5-155H (CPU 948R) - ucc.· SIMATIC S5 Siemens Spares. ii CPU 948R Programming Guide ... approved

Post on 20-Jan-2019




0 download

Embed Size (px)


How to Use the Manual, Contents

Introduction 1

User Program 2

Program Execution 3

Operating Statuses and ProgramExecution Levels 4

Interrupt and Error Diagnosis 5

Integrated Special Functions 6

Extended Data Block DX 0 7

Memory Assignment and Memory Organization 8

Memory Access UsingAbsolute Addresses 9

PG Interfaces and Functions 10

Appendix 11

Further Reading 12

List of AbbreviationsList of Keywords 13The Pocket Guide CPU 948ROrder No. 6ES5 997-3UR21is included in this manual.

03/2000C79000-G8576-C136Edition 05

S5-155HProgrammable Controller(CPU 948R)

Programming GuideVolume 2/2

This manual is part of the documentation package with the order number:6ES5 998-4SR11


Siemens Spares


iiCPU 948R Programming Guide

C79000 G8576 C136 04

This manual contains notices which you should observe to ensure your own personal safety, as well as to

protect the product and connected equipment. These notices are highlighted in the manual by a warning

triangle and are marked as follows according to the level of danger:


indicates that death, severe personal injury or substantial property damage will result if proper precautions arenot taken.


indicates that death, severe personal injury or substantial property damage can result if proper precautions arenot taken.


indicates that minor personal injury or property damage can result if proper precautions are not taken.


draws your attention to particularly important information on the product, handling the product, or to a particular

part of the documentation.

The device/system may only be set up and operated in conjunction with this manual.

Only qualified personnel should be allowed to install and work on this equipment. Qualified persons are

defined as persons who are authorized to commission, to ground, and to tag circuits, equipment, and sys

tems in accordance with established safety practices and standards.

Note the following:


This device and its components may only be used for the applications described in the catalog or the technicaldescription, and only in connection with devices or components from other manufacturers which have beenapproved or recommended by Siemens.

This product can only function correctly and safely if it is transported, stored, set up, and installed correctly, andoperated and maintained as recommended.

SIMATIC, SIMATIC NET and SIMATIC HMI are registered trademarks of SIEMENS AG.

Third parties using for their own purposes any other names in this document which refer to trademarks mightinfringe upon the rights of the trademark owners.

We have checked the contents of this manual for agreement with thehardware and software described. Since deviations cannot be precludedentirely, we cannot guarantee full agreement. However, the data in thismanual are reviewed regularly and any necessary corrections included insubsequent editions. Suggestions for improvement are welcomed.

Siemens AG 1994Technical data subject to change.

Disclaimer of LiabilityCopyright Siemens AG 1994 All rights reserved

The reproduction, transmission or use of this document or its contents isnot permitted without express written authority. Offenders will be liable fordamages. All rights, including rights created by patent grant or registrationof a utility model or design, are reserved.

Siemens AGBereich Automatisiserungs und AntriebstechnikGeschaeftsgebiet IndustrieAutomatisierungssystemePostfach 4848,D90327 Nuernberg

Siemens Aktiengesellschaft C79000-G8576-C136

Safety Guidelines

Qualified Personnel

Correct Usage


How to Use this Manual


This programming guide describes the following models of the CPU 948R and its system software:

Models of the CPU 948R

CPU 948R-1 with 640 Kbytes of user memory,Order no. 6ES5 948-3UR11, version 01 and higher

CPU 948R-2 with 1 664 Kbytes of user memory,Order no. 6ES5 948-3UR21, version 01 and higher

CPU 948R Programming Guide

C79000-J8576-C136-05 i

Siemens Spares


Overview of the Chapters

Chapter 1 This explains the typical mode of operation of the CPU and illustrateshow a CPU program is structured. The chapter also contains suggestions about how to tackleprogramming and which characteristics of the CPU 948R areimportant for programming. If you have already worked with the CPU 946R/947R and want toknow the differences between these CPUs and the CPU 948R you willfind this information in this chapter.

Chapter 2 This explains the components of a STEP 5 user program and how theprogram can be structured.

Chapter 3 This is intended for readers who do not yet have much experience ofusing the STEP 5 programming language. It therefore deals with thebasics of STEP 5 programming and explains the STEP 5 operations indetail (with examples).

Experienced readers who may find that the information about specificoperations in the pocket guide is inadequate, can use Section 3.5 as areference section.

Chapter 4 This provides an overview of the modes and program execution levelsof the CPU 948R. It provides you with detailed information aboutvarious start-up modes and the associated organization blocks inwhich you can program your routines for differrent start-up situations.

The chapter also explains the differences between the programexecution levels "cyclic processing", "time-controlled processing" and"interrupt-driven processing" and which blocks are available for youruser program.

Chapter 5 This informs you about errors to be avoided when planning andwriting your STEP 5 programs. The chapter tells you about the help you can obtain from the systemprogram for diagnosing errors and which reactions can be expectedand informs you about the blocks in which you can program reactionsto certain errors.The chapter also explains the CPU 948R self-test.

How to Use this Manual

CPU 948R Programming Guide

ii C79000-J8576-C136-05

Chapter 6 This covers the special functions integrated in the system program. Ittells you how to use the special functions and how to call and assignparameters to the special function OBs. The chapter also explains howto recognize and deal with errors in the processing of a specialfunction.

Chapter 7 This describes the use of data block DX 0 and its structure. The chapterinforms you of the significance of the various DX 0 parameters. Based onexamples, you will learn how to create data block DX 0 or how to assignthe parameters in a screen form.

Chapter 8 This is a reference section for experienced system users. It providesinformation about the memory organization of the CPU 948R andcertain system data words which contain information that can becalled up by the user.

Chapter 9 This is also for experienced system users. The chapter explains how toaddress data in certain memory areas using absolute addresses.

Chapter 10 This explains how to connect your CPU to a PG and the functionsprovided by the PG software for testing your STEP 5 program

Chapter 11 This contains the Appendix with technical data (typical executiontimes for operations, system times, memory capacity) of theCPU 946R/947R and the CPU 948R.

Chapter 12 This lists documentation for further reading

Chapter 13 This is intended to help you find topics quickly and contains a list ofabbreviations and a list of keywords as well as lists of all thenumbered tables and figures.

How to Use this Manual

CPU 948R Programming Guide

C79000-J8576-C136-05 iii

Siemens Spares


Conventions Used in the Text

To provide you with an overview of the contents of the pages, themanual uses the following conventions in addition to a 2nd and 3rdorder of titles:

Entries in the margin Entries in the margin are keywords printed in italics on the left-handedge of a page. They provide information about the contents of one ormore paragraphs on the page.

Fourth order entries Fourth order entries are not numbered but appear in the margin in boldface and identify a longer section of text.

The following conventions are also used.

NotesNoteImportant information is indicated in this format.

Instructions Instructions (often a sequence of operations to be performed) arerepresented in tables, e.g.

Step Action Result

1 Switch the mode selectorfrom RUN to STOP.

The CPU is in the stopmode. The STOP LED is litcontinuously.

2 Hold the reset switch in theOVERALL RESET position;at the same time, switch themode selector from STOP toRUN and back to STOP.

An OVERALL RESET isrequested. The STOP LEDflashes quickly.

How to Use this Manual

CPU 948R Programming Guide

iv C79000-J8576-C136-05

Reference tables Specific information you may require at any time is contained innumbered tables as shown in the following example and can be foundin the list of tables (refer to Chapter 13).

Operation Operand Function



I 0.0 to 127.7......

AND logic operation with scan for signal state "1"

OR logic operation with scan for signal state "1"

of an input in the PII........

Examples Examples, some of which cover several pages, are highlight


View more >