Click here for fast information :Home | Siemens | AllenBradley/Rockwell | Mitsubishi | SCADA |Training | PLC Communications | Emergency Support | Vision Software | contact us

Click here for our Home page and full range of training, fault finding support and programming

MR Control Ltd

Unit 5, Avonbank    Industrial Estate,
West Town Road,
Avonmouth
Bristol BS11 9DE
Tel: 0117 982 6608
Fax: 0117 982    6668

Click Here to Contact MR Control

This has been expanded to HTML format by Word 97 (which has NOT done a perfect job) so please note some formatting is not correct - fore further details click on Home

This is a sample document - all our training is customised to your needs. Training concentrates on what you NEED to know (not what we want to teach you!).

 

Siemens S5 Training

Notes (Contents

)

 

 

Section 1 Document History v

 Revision

Comments

Date

0.0

 

Initial Writing

15 November 1999

1.0

 

Initial Client Issue

20 December 1999

1.1

 

v7.0 Documentation added

15 March 2000

 

Section 2 Siemens Training 1

2.1 Introduction 1

2.2 What is a PLC? 1

2.3 Example 115U PLC Layout 2

2.4 Example 135/155 PLC Layout 3

2.5 Siemens Multitasking DOS S5-DOS/MT 4

2.6 Siemens Programming Software 4

2.7 Differences between v6.3 and v6.5 5

2.8 Differences between v6.5 and v6.6 5

2.9 Differences between v6.6 and v7.0 5

2.10 Starting the Siemens Programmer 6

2.11 Keyboard Notes 6

2.12 Siemens Blocks Structure 6

2.12.1 Organisation Blocks 8

2.12.2 Initiation OBs 8

2.12.3 Error OBs 8

2.12.4 Program Blocks 9

2.12.5 Function Blocks 9

2.12.6 Datablocks 9

2.12.7 Typical Program Structure 10

2.13 Compressing 10

2.14 Ladder, CSF or STL? 11

2.15 Statement list 11

2.16 Entering Statement List in a Ladder Program 12

 

Section 3 Siemens Memory Types 13

3.1 Datatype limitations 14

 

Section 4 Using the Programming Software 15

4.1 Introduction 15

4.2 Initiating a new PLC 15

4.3 Creating/Editing a block 16

4.3.1 Editing shortcuts 16

4.4 Adding a Segment 17

4.5 Copying a segment from another block 17

4.6 Deleting a Segment 18

4.7 TEST MODE - To display a block on-line 19

4.8 Searching in edit mode 20

4.9 Regenerating the Cross Reference 20

4.10 Searching in ladder mode 20

4.10.1 Cross Reference Detail 21

4.11 Checking the RLO 22

4.12 Displaying Status Information 23

4.13 Force Variables 23

4.13.1 Quick Information Access 24

4.13.2 Saving and Loading page setups 24

4.14 Forcing Outputs 25

 

Section 5 Printing 26

5.1 Introduction 26

5.2 132 character printouts 26

5.3 Printing in version 6 27

 

Section 6 Siemens Timers 28

6.1 Timer Boxes 28

6.2 Timers in STL 29

6.3 Timer Presets 30

6.4 Siemens Timer Types 31

6.4.1 SP 'Pulse' Timer 31

6.4.2 SE 'Extended Pulse' Timer 31

6.4.3 SD (SR) 'On Delay' Timer 32

6.4.4 SS 'Latched On Delay' Timer 32

6.4.5 SF 'Off Delay' Timer 33

6.4.6 Back to Back timers 33

6.5 Timer Representation in Ladder/CSF 34

6.5.1 SP Timer 34

6.5.2 SE Timer 34

6.5.3 SD Timer 34

6.5.4 SS Timer 34

6.5.5 SF Timer 34

 

Section 7 Counters 35

7.1 Count Down Counter 35

7.2 Counter Outputs 35

7.3 Counter Usage 36

7.4 Counter Parameters 36

7.5 Counter Presets 36

7.6 Retentive Counters 36

 

Section 8 R-S Flip Flops 37

 

Section 9 Siemens Analogues 38

9.1 Introduction 38

9.2 Bit Representation of Analogue Input (135) 38

 

Section 10 EPROM Programming 39

10.1 EPROM Types 39

10.2 EPROM Programming 39

10.3 Checking Your Program Size 39

10.4 Moving your Software onto EPROMs 40

10.5 EPROM Programming under Windows 95 41

 

Section 11 Fault Finding 42

11.1 Introduction 42

11.2 LEDs 42

11.3 The ISTACK 43

 

Section 12 Documentation 44

12.1 Introduction 44

12.2 Generating a New Symbols File. 44

12.3 Entering Tagnames with a Word Processor 44

12.4 Entering Tagnames Using INI files 45

12.5 Converting INI to SEQ files 45

12.6 Avoiding INI to SEQ problems 45

 

Section 13 Backing up and Restoring the PLC Program 46

13.1 Backing up the PLC 46

13.2 Restoring the PLC program 46

 

Section 14 Cross Reference 47

14.1 Introduction 47

14.2 Spurious Entries in the Cross Reference List 47

 

Section 15 Siemens S95U 48

 

Section 16 Siemens 100 series Analogues 49

16.1 Introduction 49

16.2 Typical I/O Layout 49

 

Section 17 Comparison with Other PLCs 50

17.1 Mitsubishi Timers 50

17.2 Mitsubishi Counters 50

17.3 I/O Descriptions 51

 

Appendix 1 - Analogue Processing on a 135U 52

 

Appendix 2 - Analogue Processing on a 115U 53

 

Appendix 3 - Siemens Floating Point Representation 54

3.1 Floating Point Accuracy 54

 

Appendix 4 - Analogue Output Wiring Diagrams 55

4.1 Wiring Configuration for Current sources 55

4.2 Wiring Configuration for Voltage source 55

 

Appendix 5 - Creating a new Project 56

5.1 Introduction 56

5.2 Project Directory 56

 

Appendix 6 - Recording Macros 59

 

Appendix 7 - Organisation Block Overview 60

 

Appendix 8 Abbreviations or Acryonyms used 63

 

 Section         1 Document History

 

 

 

 

 Section 2 Siemens Training

 

 2.1 Introduction

 

This document details training information for Siemens PLCs using Step 5 version 6.

 

 

 2.2 What is a PLC?

 

A PLC (Programmable Logic Controller) is effectively a computer with I/O. The I/O (input/output modules) are method of getting signals from the outside world into the computer and back again. The I/O are generally robust (so they can cope with noise and spikes). Also available are intelligent I/O cards (which effectively have a computer on the I/O card) and communication cards (which talk to other computers and graphic systems).

 

Siemens PLCs are among the top selling PLCs around the world. They are very reliable and robust PLCs.

 

 

 2.3 Example 115U PLC Layout

 

This diagram shows a typical Siemens 115U PLC rack layout.

 

 

%T%P%P%P%P%d%P%P%d%P%P%P%P%P%d%P%P%d%P%P%d%P%P%d%P%P%d%P%P%d%P%P%d%P%P%d%P%P%d%P%P%d%P%P%P%P%P%P%P%d%P%W

%Q % % % % % % % % % % % % % %Q

%Q P %C % C %I %I %I %I %I %I %I %I %I % %I%Q

%Q S %P % O %/ %/ %/ %/ %/ %/ %/ %/ %/ % %M%Q

%Q U %U % M %O %O %O %O %O %O %O %O %O % % %Q

%Q % % M % % % % % % % % % % % %Q

%Q % % S % % % % % % % % % % % %Q

%Q % % % % % % % % % % % % % %Q

%Q % % % % % % % % % % % % % %Q

%Z%P%P%P%P%g%P%P%g%P%P%P%P%P%g%P%P%g%P%P%g%P%P%g%P%P%g%P%P%g%P%P%g%P%P%g%P%P%g%P%P%g%P%P%P%P%P%P%P%g%P%]

 

 

The abbreviations are explained in this table:

 

 Abbreviation

Description

PSU

Power Supply Unit

CPU

Central Processor Unit

COMMS

Comms Card

I/O

I/O cards

IM

Interface Module (to other racks)

 

 

 2.4 Example 135/155 PLC Layout

 

 

CPU

(ladder) AI ETHERNET I/O LINK

CARD <---CARDS--->AO CARD CARDS

% ─%,────%,────────%,─%,─%,─%,─%,─%,─%,─%,─%,──────%,────%,──────%,──%,──%

% % % % % % % % % % % % % % % % %

% % % % % % % % % % % % % % % % %

% % % % % % % % % % % % % % % % %

% % % % % % % % % % % % % S2 % % % %

% % % % % % % % % % % % % % % % % % %

% % % % % % % % % % % % % %% % % % %

% % % % % % % % % % % % % %% % % % %

% % % % % % % % % % % % % %% % % % %

% % S1 % % % % % % % % % % % % % % %

% % % % % % % % % % % % % % % % % % % % %

% % %% % % % % % % % % % % % %% % % % %

% % %% % % % % % % % % % % % %% % % % %

% % %% % % % % % % % % % % % %% % % % %

%─%4────%4────────%4─%4─%4─%4─%4─%4─%4─%4─%4──────%4────%4──────%4──%4──%

This layout is similar to the 115 layout but the power supply is contained in the fan tray underneath the rack.

 

On this PLC configuration, the PLC is programmed using the S1 socket on the CPU unit. The PLCs connected on the H1 (Ethernet) link can be programmed using the S2 socket.

 

 

 2.5 Siemens Multitasking DOS S5-DOS/MT

 

Siemens use a 'multitasking DOS' called S5-DOS/MT for some of their programming devices. We would normally advise not to use proprietary operating systems for many reasons including the following:

 

They are unlikely to be upgraded

New devices (such as CDROMs, ZIP drives etc.) will not work on them

You are limited to one manufacturer for support

 

However in some cases you have no choice. Be warned that if you do use S5-DOS/MT you will not be able to use devices such as ZIP drives and other backup devices. You can however boot up in DOS and use backup devices there.

 

DOS 6.22 performs many functions around 5-10 times faster than S5-DOS/MT if you use and configure DOS v6.2 Smartdrv correctly.

 

 

 2.6 Siemens Programming Software

 

This document trains personnel specifically in the following version of Siemens software:

 SIMATIC S5

STEP 5 /ST VERSION 6.5

(Date: 02.03.95)

 

Information for the previous versions Step 5/ST v6.3 is also included here.

 

 2.7 Differences between v6.3 and v6.5

 

Version 6.5 fixes some of the most annoying features of v6.3. The main advantages are:

 

 Item

Description

1

The software finally is usable on portable PCs (for example v6.5 uses all cursor keys instead of just some of them (ie v6.3 uses the cursor keys which are most difficult to use on the portable keyboard)

2

F10 loads a new project

3

A help template is shown at the bottom of the screen.

 

 2.8 Differences between v6.5 and v6.6

 

Version 6.6 adds only a few features to the software:

 

 Item

Description

1

F3 delete line added to force variables page (VERY useful)

2

Load/Save Project now remains on the directory listing when you select a new directory

 

There may be more, but the update seems to be fairly cosmetic.

 

 2.9 Differences between v6.6 and v7.0

 

Version 7.0 adds only a few features to the software:

 

 Item

Description

1

Project overview now totally changed - your old projects will NOT work!

 

There may be more, but the update again seems to be cosmetic apart from the worse implementation of projects.

 

 2.10 Starting the Siemens Programmer

This section details how to start the Siemens programming software on the PG750.

 Step

Description

1

Turn on the programmer/PC

2

Start your Siemens software, normally by typing:

S5

3

The last PLC project you used will be active.

4

Check the active project by typing:

F4

F4

This will (at the top of the screen) show the active project. The filenames in the middle of the screen will show the PLC files being used.

5

See section Error! Reference source not found., page * for creating a new project.

6

If you have the wrong project loaded, press F10 (v6.5) or (v6.3) Object, Project, Load (then move to the correct directory and select the file)

 

 

 

 2.11 Keyboard Notes

 

The Siemens programming software, like most PLC programming software, is rather idiosyncratic. It has been developed from C/PM and still betrays much of it's origins. One somewhat annoying feature of version 6.3 is the fact that is doesn't use the keyboard in the normal manner but uses lower level information. This means that you can't use the cursor keys but have to use the numeric keypad. Also the INSert key (on the numeric keypad only) is the Siemens ACTION key (ie when you press this key, something normally happens). The ENTER key on the numeric keypad is different from the ENTER key on the main keyboard. You can't use the numeric keypad as a numeric keypad.

 

Many of these extremely annoying problems have been fixed in version 6.5.

 

 2.12 Siemens Blocks Structure

 

Siemens PLCs use a block structure. This is unlike most other PLCs but if used correctly can be a great aid to structuring your programs in a modular manner. This may sound like jargon but effectively it means you can simplify your programs to aid maintenance by personnel other than the programmer.

 

The block structure has great advantages for large programs but is still beneficial for smaller PLCs.

 

These are the types of blocks in Siemens:

 

 Block

Description

OB

Organisation Blocks

PB

Program Blocks

FB

Function Blocks

DB

Datablocks

 

The organisation blocks are special control blocks and will be explained later. The program blocks contain ladder programs (as the name implies). Function blocks generally contain modular functions called from Program Blocks (this is quite a generalisation and will be classified later). Datablocks contain data which the ladder program can manipulate.

 

When the PLC powers up it runs one of several special blocks (see section 0).

 

 

 

 2.12.1 Organisation Blocks

 

These blocks control the calling of other blocks (ie the organisation of the program & function blocks). Typically these blocks just contain calls to program/function blocks like this:

 

OB 1

SEGMENT 1

:JU PB 1

:JU PB 2

:JU PB 3

:JU FB 10

:BE

 

 

The line JU PB1 is a Jump Unconditionally to Program Block 1. The line JU FB10 is a Jump Unconditionally to Function Block 10. The BE is a block end and means that the OB ends there.

 

Typically the Program/Function blocks would call other blocks.

 

There are two main OBs used for this purpose:

 

 Item

Description

OB1

Called as often as possible

OB13

Called every 0.1 seconds

 

Other OBs are sometimes used but normally a PLC program will consist of these two OBs. See section Error! Reference source not found. for a list of OBs available.

 

 2.12.2 Initiation OBs

 

There are three possible initiation blocks which are called once on power up. The CPU will call either OB20, OB21 or OB22 depending on the type of power up. You are very strongly advised to make all these blocks a call to a single function block which contains your initiation program.

 2.12.3 Error OBs

Many OBs are called on error conditions. See section Error! Reference source not found. for a list of OBs available.

 2.12.4 Program Blocks

Program blocks can be programmed in Ladder, CSF or STL. They typically contain digital type control and call function blocks for repetitive functions or mathematical calculations.

 

Rather annoyingly, there are quite a lot of instructions which are only available in function blocks and not program blocks.

 

 2.12.5 Function Blocks

Function Blocks used to have to be programmed in Statement List (STL) although they can now be programmed and displayed in ladder (where translatable). More commands are available in STL than in CSF or LADDER (see section 0). These blocks typically contain repetitive functions or mathematical calculations.

 

 2.12.6 Datablocks

These blocks normally contain up to a maximum of 256 words (16 bit) of data. This is useful for containing scratch information. For example, if you had 10 recipes, you would store one recipe in DB21, the next in DB22 and so on up to DB30. The recipe being used would be selected by calling the datablock, EG C DB25 to use recipe 5.

You are strongly advised not to use the first 11 datablocks (numbers 0 to 10) as these can be used by Siemens for special functions. Never, ever use Datablocks 0 or 1.

 

 2.12.7 Typical Program Structure

 

This printout shows a simple program overview (from the Siemens XRF utility). These shows that FB29 is called from OB1 which then calls FB245, sets DB32 as the default datablock then called FB244 etc. On any powerup FB109 is called which calls other blocks.

 

 

P R O G R A M O V E R V I E W W I T H D B

 

 

+-OB 1-+-FB 29-+-FB245-

I

?-DB 32-

I

+-FB244-

I

?-DB 32-

I

+-FB244-

I

+-FB245-

+-OB 21-+-FB109-+-FB 30-+-FB249-

+-OB 22-+-FB109-+-FB 30-+-FB249-

 

 

 

 2.13  Compressing

 

Because of the block nature of the system, when you enter a new block, the Siemens PLC doesn't delete the old block - it keeps both blocks in memory. Eventually the memory becomes full and you need to COMPRESS the CPU. This deletes all the old blocks which aren't being used anymore. To do this, select Test, PLC control, Compress memory.

 

 

WARNING!

 

A serious bug exists on the S95 CPU (as of 1996) - when compression is required, instead of a warning message, the programming software hangs up and you lose the block you are working on! To try and get around this, backup often when using this CPU and COMPRESS very often.

 

 

 

 

 2.14 Ladder, CSF or STL?

 

There are three types of ways you can program, Ladder, CSF (Control System Flowchart) or STL (STatement List).

 

Ladder looks like this:

 

PB 1 C:TEST@@ST.S5D LEN=15

SEGMENT 1 0000 OUTPUT

 

%

%F 0.0 F 0.1

+───] [────+─────────+─────────+─────────+─────────+─────────+──( )─%$

%

 

 

The same rung in CSF looks like this:

 

PB 1 C:TEST@@ST.S5D LEN=15

SEGMENT 1 0000 OUTPUT

 

% ───% % ──────%

F 0.0 ───%$ & %──+─%$ = % F 0.1

%───% %──────%

 

 

 

and in STL it looks like this:

 

PB 1 C:TEST@@ST.S5D LEN=15

SEGMENT 1 0000 OUTPUT

:A F 0.0

:= F 0.1

:***

 

The difference in display is partly for the programmer's benefit - the PLC interprets the software in exactly the same manner. Which one you use in program blocks is generally a matter of personal preference.

We would recommend you don't program in STL unless you have to. While it is quick and easy the ladder and CSF methods are easier for other people to read (and maintenance of software should always be a concern).

 2.15 Statement list

Some commands are not available in LADDER or CSF. Mathematical commands such as addition, subtraction, multiplication and division are only available in STL. Calling blocks conditionally is also an STL only commands. Some of the STL only commands can be placed in Program Blocks, while others cannot.

 2.16 Entering Statement List in a Ladder Program

To enter STL while in LADDER mode, simply type :STL (note the semicolon). This temporarily puts you into STL mode for this segment only and you can enter STL commands such as JC FB10 which are not available in ladder.

 

 Section 3  Siemens Memory Types

 

These are the main types of Siemens PLC memory:

 

 Memory

Description

I

digital inputs

Q

digital outputs

F

Flag bits

FB

Flag Bytes (old Siemens Programming Software)

FY

Flag Bytes (new Siemens Programming Software)

FW

Flag Words

S

Extended flag bits (135 only)

SY

Extended flag bytes (135 only)

SW

Extended flag words (135 only)

T

timers

C

counters

PW

Analogue Inputs or Analogue Outputs

OW

Analogue Inputs or Analogue Outputs

D

Data bits

DR

Data byte (low byte)

DL

Data byte (high byte)

DW

Datawords

 

 

Flags are generally used for digital information (but can easily be used for analogue information if required) and Datablocks for Analogue Information. Datablocks are retentive (ie they keep their data when the mains is switched off) and some flags are (but check your CPU documentation to find out which these flags are).

 

 

 3.1 Datatype limitations

 

There are lots of strange and idiosyncratic limitations on datatypes. You can access bits for F flags always, in ladder but:

 

You cannot access D bits on 115 PLC (but you can on 135 and 155 PLCs)

 

You can never pass D or S bits as bit parameters to a function block (you can always pass F flags)

 

Different PLCs allow different datatypes - for example the 102 PLC has 64 timers, while most have 256. The 100 has 16 timers, with no function block parameters allowed:

 

 

This table shows some of the limitations at present:

 

 

100

102

103

115

Flags

to 127.7

to 127.7

to 255.7

to 255.7

Timers

0 to 15

0 to 31

0 to 127

0 to 255

Counters

0 to 15

0 to 31

0 to 127

0 to 255

Function Blocks

0 to 63

0 to 63

0 to 255

0 to 255

Program

Blocks

0 to 63

0 to 63

0 to 255

0 to 255

Data

Blocks

2 to 63

2 to 63

2 to 255

2 to 255

 

 

 Section 4  Using the Programming Software

 

 4.1 Introduction

 

This section details a few of the most common editing facilities in the programming software.

 

 

 4.2 Initiating a new PLC

 

 This will delete ALL PLC memory - do not use except when initiating a CPU!

 

 

Often, when first programming a PLC, the memory will be corrupted. In this case you must delete the PLC memory as follows:

 

 Step

Description

1

Select Object

2

Select Blocks

3

Select Delete

4

Select 'All blocks = PLC overall reset'

WARNING!

This will delete ALL PLC memory - do not use except when initiating a CPU!

5

Press INSERT (the Siemens 'Action' key).

 

You may also have to wipe memory using the front panel switches - this depends on the CPU type, consult your CPU manual for more information.

 

 Section 5  Siemens Timers

 

 5.1 Timer Boxes

 

The remainder of this document has not been included here......but you get the whole document free on an S5 Training course