Book Review: Automating with STEP 7 in LAD and FBD by Hans Berger

cover of Book Review: Automating with STEP 7 in LAD and FBD by Hans BergerAutomating with STEP 7 in LAD and FBD: SIMATIC S7-300/400 Programmable Controllers

author: Hans Berger
rating:
asin: 3895782548
binding: Hardcover
list price: $95.00 USD
amazon price: $81.20 USD


The world would be a better place, at least for the Siemens PLC programmer, if there was a good instructional book available.  Unfortunately this book by Hans Berger is not it.  It’s definitely not a book for beginners and I couldn’t even recommend it for the more experienced programmer.  The only thing it might be good for is reference material in the later sections.

I’ve been programming PLCs for a number of years but even with that experience the Siemens ‘way’ of programming is quite different.  So it’s quite natural to go looking for more instruction.  The manuals are either to simplistic or overly technical.  It’s really left a gap for some good instruction on the why’s and how’s of programming in the Siemens world.  This book only looks to rehash the content in the manual without providing any additional insights.

Bad English

The major problem with this book is the way it is written.  The English is bad.  The likely reason for this is a bad translation from its original German.  If you like eating moth balls then you’ll enjoy it because it’s very dry reading.  Technical reading is not often fun but it shouldn’t have to be this excruciating.  It’s one of those books where you have to read over a section a couple of times before something may sink in.

Here’s a typical example from the text.

“When you load a data block from the CPU, its values are taken from work memory, for work memory is where all actual values are to be found.  You can view the actual values at the time they are read out with VIEW → DATA VIEW.  If you modify an actual value in the data block and write the block back to the CPU, the modified value is placed in work memory” (pg. 65)

Most of the sentences in the book are like these.  There’s an excessive amount of  “you can do this” or “you can do that” but with little explanation of why.

The book also suffers from a lot of non-explained technical terms.  For instance, here’s another all too frequent difficult paragraph.

“When you set up a project, you create “containers” for the resulting data, then you generate the data and fill these containers.  Normally, you create a project with the relevant hardware, configure the hardware, or at least the CPU, and receive in return containers for the user program.  However, you can also put an S7 program directly into the project container without involving any hardware at all.” (pg. 43)

Admittedly it’s hard to write a book about PLCs without experiencing the “chicken and egg” problem.  Which explanation comes first?  Some books handle it better then others but Berger has a difficult time introducing new subjects.

What?  No Pretty Pictures?

What makes a good book are often the figures, illustrations and charts accompanying the text.  I felt in this area the book was also lacking.  There are plenty of graphics (2-D, black and white) but they are either not too helpful or overly complicated.  Most of the tables seem to be pulled from the manuals.

The thing I found most frustrating was the lack of screen shots.  For a book specifically dealing with a programming environment I would have expected more.  Basically from page 37 to 244 (309 total) there are no screen shots.  An example where I thought it would be very appropriate to add a screen was the “Block Function” section where the example looks like this…

Berger book page 210

 

Isn’t that just screaming for a screen shot? 

Lack of Exercises

Another feature missing from the book are exercises and testing.  So for an educator looking to use this as a classroom textbook they will have to come up with their own material.  There are examples in the book (and on an accompanying floppy disk) but they also suffer from long technical explanations with no pictures followed by a code dump.  This makes the examples hard to follow.  It would have been a lot better to intersperse the comments throughout the ladder and FBD to break it up so that a student could make more sense of the code line by line.

Conclusions

The bottom line is that we would recommend not wasting your money on this book.  The major disadvantage is a difficult writing style making it very dry and confusing.  The illustrations and tables add nothing to the text.  Last of all, there is a complete lack of exercises and tests.  You’re best bet is to stick with the manuals and some of the other online helps found on the Siemens website.

 



Table of Contents 

Introduction

1              SIMATIC S7?300/400 Programmable Controller

1.1           Structure of the Programmable Controller

1.1.1        Components

1.1.2        S7?300 Station

1.1.3        S7?400 Station

1.1.4        CPU Memory Areas

1.1.5        Memory Card

1.1.6        System Memory

1.2           Distributed I/0

1.2.1        DP Master System

1.2.2        DP Master

1.2.3        DP Slaves

1.2.4        Connection to PROFIBUS?PA

1.2.5        Connection to AS?Interface

1.2.6        Connection to a Serial Interface

1.3           Communications

1.3.1        Introduction

1.3.2        Subnets

1.3.3        Communications Services

1.3.4        Connections

1.4           Module Addresses

1.4.1        Signal Path

1.4.2        Slot Address

1.4.3        Module Start Address

1.4.4        Diagnostics Address

1.4.5        Address for Bus Nodes

1.5           Address Areas

1.5.1        User Data Area

1.5.2        Process Image

1.5.3        Bit Memory

 

2              STEP 7 Programming Software

2.1           STEP 7 Basic Package

2.1.1        Installation

2.1.2        Authorization

2.1.3        SIMATIC Manager

2.1.4        Projects and Libraries

2.1.5        Online Help

2.2           Editing Projects

2.2.1        Creating Projects

2.2.2        Managing, Rearranging and Archiving

2.2.3        Project Versions

2.3           Configuring Stations

2.3.1        Arranging Modules

2.3.2        Addressing Modules

2.3.3        Parameterizing Modules

2.3.4        Networking Modules with MPI

2.4           Configuring the Network

2.4.1        Configuring the Network View

2.4.2        Configuring a DP Master System with the Network Configuration

2.4.3        Configuring Connections

2.4.4        Loading the Connection Data

2.5           Creating the S7 Program

2.5.1        Introduction

2.5.2        Symbol Table

2.5.3        Program Editor

2.5.4        Updating or generating source files

2.5.5        Address Priority

2.5.6        Reference Data

2.6           Online Mode

2.6.1        Connecting a PLC

2.6.2        Protecting the User Program

2.6.3        CPU Information

2.6.4        Loading the User Program into the CPU

2.6.5        Block Handling

2.7           Testing the Program

2.7.1        Diagnosing the Hardware

2.7.2        Determining the Cause of a STOP

2.7.3        Monitoring and Modifying Variables

2.7.4        Forcing Variables

2.7.5        Enabling Peripheral Outputs

2.7.6        LAD/FBD Program Status

 

3              SIMATIC S7 Program

3.1           Program Processing

3.1.1        Program Processing Methods

3.1.2        Priority Classes

3.1.3        Specifications for Program Processing

3.2           Blocks

3.2.1        Block Types

3.2.2        Block Structure

3.2.3        Block Properties

3.3           Programming Code Blocks

3.3.1        Generating blocks

3.3.2        Editing LAD Elements

3.3.3        Editing FBD Elements

3.4           Programming Data Blocks

3.4.1        Creating Blocks

3.4.2        Types of Data Blocks

3.4.3        Block Window

3.5           Variables, Constants and Data Types

3.5.1        General Remarks Concerning Variables

3.5.2        Addressing Variables

3.5.3        Overview of Data Types

3.5.4        Elementary Data Types

3.5.5        Complex Data Types

3.5.6        Parameter Types

3.5.7        User Data Types

 

4              Binary Logic Operations

4.1           Series and Parallel Circuits (LAD)

4.1.1        NO Contact and NC Contact

4.1.2        Series Circuits

4.1.3        Parallel Circuits

4.1.4        Combinations of Binary Logic Operations

4.1.5        Negating the Result of the Logic Operation

4.2           Binary Logic Operations (FBD)

4.2.1        Elementary Binary Logic Operations

4.2.2        Combinations of Binary Logic Operations

4.2.3        Negating the Result of the Logic Operation

4.3           Taking Account of the Sensor Type

 

5              Memory Functions

5.1           LAD Coils

5.1.1        Single Coil

5.1.2        Set and Reset Coil

5.1.3        Memory Box

5.2           FBD Boxes

5.2.1        Assign 5.2.2 Set and Reset Box

5.2.3        Memory Box

5.3           Midline Outputs

5.3.1        Midline Outputs in LAD

5.3.2        Midline Outputs in FBD

5.4           Edge Evaluation

5.4.1        How Edge Evaluation Works

5.4.2        Edge Evaluation in LAD

5.4.3        Edge Evaluation in FBD

5.5           Binary Scaler

5.5.1        Solution in LAD

5.5.2        Solution in FBD

5.6           Example of a Conveyor Control System

 

6              Move Functions

6.1           General

6.2           MOVE Box

6.2.1        Processing the MOVE Box

6.2.2        Moving Operands

6.2.3        Moving Constants

6.3           System Functions for Data Transfer

6.3.1        ANY Pointer

6.3.2        Copy Data Area

6.3.3        Uninterruptible Copying of a Data Area

6.3.4        Fill Data Area

 

7              Timers

7.1           Programming a Timer

7.1.1        General Representation of a Timer

7.1.2        Starting a Timer

7.1.3        Specifying the Duration of Time

7.1.4        Resetting A Timer

7.1.5        Checking a Timer

7.1.6        Sequence of Timer Operations

7.1.7        Timer Box in a Rung (LAD)

7.1.8        Timer Box in a Logic Circuit (FBD)

7.2           Pulse Timer

7.3           Extended Pulse Timer

7.4           On?Delay Timer

7.5           Retentive On?Delay Timer

7.6           Off?Delay Timer

7.7           IEC Timers

7.7.1        Pulse Timer SFB 3 TP

7.7.2        On?Delay Timer SFB; 4 TON

7.7.3        Off?Delay Timer SFB 5 TOF

 

8              Counters

8.1           Programming a Counter

8.2           Setting and Resetting Counters

8.3           Counting

8.4           Checking a Counter

8.5           IEC Counters

8.5.1        Up Counter SFB 0 CTU

8.5.2        Down Counter SFB I CTD

8.5.3        Up/down Counter SFB 2 CTUD

8.6           Parts Counter Example

 

Digital Functions

9              Comparison Functions

9.1           Processing a Comparison Function

9.2           Description of the Comparison Functions

 

10            Arithmetic Functions

10.1         Processing an Arithmetic Function

10.2         Calculating with Data Type INT

10.3         Calculating with Data Type DINT

10.4         Calculating with Data Type REAL

 

11            Mathematical Functions

11.1         Processing a Mathematical Function

11.2         Trigonometric Functions

11.3         Arc Functions

11.4         Miscellaneous Mathematical Functions

 

12            Conversion Functions

12.1         Processing a Conversion Function

12.2         Conversion of INT and DINT Numbers

12.3         Conversion of BCD Numbers

12.4         Conversion of REAL Numbers.

12.5         Miscellaneous Conversion Functions

 

13            Shift Functions

13.1         Processing a Shift Function

13.1.1      Representation

13.2         Shift

13.3         Rotate

 

14            Word Logic

14.1         Processing a Word Logic Operation

14.2         Description of the Word Logic Operations

 

Program Flow Control

15            Status Bits

15.1         Description of the Status Bits

15.2         Setting the Status Bits

15.3         Evaluating the Status Bits

15.4         Using the Binary Result

15.4.1      Setting the Binary Result BR

15.4.2      Main Rung, EN/ENO Mechanism

15.4.3      ENO in the Case of User?written Blocks

 

16            Jump Functions

16.1         Processing a Jump Function

16.2         Unconditional Jump

16.3         Jump if RLO = “l”

16.4         Jump if RLO = “0”

 

17            Master Control Relay

17.1         MCR Dependency

17.2         MCR Area

17.3         MCR Zone

17.4         Setting and Resetting 1/0 Bits

 

18            Block Functions

18.1         Block Functions for Code Blocks

18.1.1      Block Calls: General

18.1.2      Call Box

18.1.3      CALL Coil/Box

18.1.4      Block End Function

18.1.5      Temporary Local Data

18.1.6      Static Local Data

18.2         Block Functions for Data Blocks

18.2.1      Two Data Block Registers

18.2.2      Accessing Data Operands

18.2.3      Opening a Data Block

18.2.4      Special Points in Data Addressing

18.3         System Functions for Data Blocks

18.3.1      Creating a Data Block

18.3.2      Deleting a Data Block

18.3.3      Testing a Data Block

 

19            Block Parameters

19.1         Block Parameters in General

19.1.1      Defining the Block Parameters

19.1.2      Processing the Block Parameters

19.1.3      Declaration of the Block Parameters

19.1.4      Declaration of the Function Value

19.1.5      Initializing Block Parameters.

19.2         Formal Parameters

19.3         Actual Parameters

19.4         "Forwarding" Block Parameters

19.5         Examples

19.5.1      Conveyor Belt Example

19.5.2      Parts Counter Example

19.5.3      Feed Example

 

Program Processing

20            Main Program

20.1         Program Organization

20.1.1      Program Structure

20.1.2      Program Organization

20.2         Scan Cycle Control

20.2.1      Process Image Updating

20.2.2      Scan Cycle Monitoring Time.

20.2.3      Minimum Scan Cycle Time, Background Scanning

20.2.4      Response Time

20.2.5      Start Information

20.3         Program Functions

20.3.1      Real?Time Clock

20.3.2      Read System Clock

20.3.3      Run?Time Meter

20.3.4      Compressing CPU Memory

20.3.5      Waiting and Stopping

20.3.6      Multiprocessing Mode

20.4         Communication via Distributed 1/0

20.4.1      Addressing Distributed 1/0

20.4.2      Configuring Distributed 1/0

20.4.3      System Functions for Distributed 1/0

20.5         Global Data Communication

20.5.1      Fundamentals

20.5.2      Configuring GD communication

20.5.3      System Functions for GD Communication

20.6         SFC Communication

20.6.1      Station?Internal SFC Communication

20.6.2      System Functions for Data Interchange Within a Station

20.6.3      Station?External SFC Communication

20.6.4      System Functions for Station­ External SFC Communication.

20.7         SFB Communication

20.7.1      Fundamentals

20.7.2      Two?Way Data Exchange

20.7.3      One?Way Data Exchange

20.7.4      Transferring Print Data

20.7.5      Control Functions

20.7.6      Monitoring Functions

 

21            Interrupt Handling

21.1         General Remarks

21.2         Hardware Interrupts

21.2.1      Generating a Hardware Interrupt

21.2.2      Servicing Hardware Interrupts

21.2.3      Configuring Hardware Interrupts with STEP 7

21.3         Watchdog Interrupts

21.3.1      Handling Watchdog Interrupts

21.3.2      Configuring Watchdog Interrupts with STEP 7

21.4         Time?of?Day Interrupts

21.4.1      Handling Time?of?Day Interrupts

21.4.2      Configuring Time?of?Day Interrupts with STEP 7

21.4.3      System Functions for Time?of?Day Interrupts

21.5         Time?Delay Interrupts

21.5.1      Handling Time?Delay Interrupts

21.5.2      Configuring Time?Delay Interrupts with STEP 7

21.5.3      System Functions for Time?Delay Interrupts

21.6         Multiprocessor interrupt

21.7         Handling Interrupts

 

22            Restart Characteristics

22.1         General Remarks

22.1.1      Operating Modes

22.1.2      HOLD Mode

22.1.3      Disabling the Output Modules

22.1.4      Restart Organization Blocks

22.2         Power?Up

22.2.1      STOP Mode

22.2.2      Memory Reset

22.2.3      Retentivity

22.2.4      Restart Parameterization

22.3         Types of Restart

22.3.1      START?UP Mode

22.3.2      Cold Restart

22.3.3      Complete Restart

22.3.4      Warm Restart

22.4         Ascertaining a Module Address

22.5         Parameterizing Modules

 

23            Error Handling

23.1         Synchronous Errors

23.2         Synchronous Error Handling

23.2.1      Error Filters

23.2.2      Masking Synchronous Errors

23.2.3      Unmasking Synchronous Errors

23.2.4      Reading the Error Register

23.2.5      Entering a Substitute Value

23.3         Asynchronous Errors

23.4         System Diagnostics

23.4.1      Diagnostic Events and Diagnostic Buffer

23.4.2      Writing User Entries in the Diagnostic Buffer

23.4.3      Evaluating Diagnostic Interrupts

23.4.4      Reading the System Status List

 

Appendix

24            Supplements to Graphic Programming

24.1         Block Protection

24.2         Indirect Addressing

24.2.1      Pointers: General Remarks

24.2.2      Area Pointer

24.2.3      DB Pointer

24.2.4      ANY Pointer

24.2.5      "Variable" ANY Pointer

24.3         Brief Description of the "Message Frame Example"

 

25            Block Libraries

25.1         Organization Blocks

25.2         System Function Blocks

25.3         IEC Function Blocks

25.4         S5?S7 Converting Blocks

25.5         TI?S7 Converting Blocks

25.6         PID Control Blocks

25.7         Communication Blocks

 

26            Function Set LAD

26.1         Basic Functions

26.2         Digital Functions

26.3         Program Flow Control

 

27            Function Set FBD

27.1         Basic Functions

27.2         Digital Functions

27.3         Program Flow Control


( categories: )