Download as pdf or txt
Download as pdf or txt
You are on page 1of 365

Student Handbook

PUBLISHED PLC Discipline Course for


Field Service Technicians Level 0

Document number 95961079


Revision 8
Page 1 of 365
Document number 95961079
Revision 8
Page 2 of 365

REVISION HISTORY

8 29-Mar-2017 VANI KLF KEAN


7 2-Mar-2017 VANI KLF KEAN
6 27-Feb-2017 VANI KLF KEAN
5 21-Jun-2016 VANI KLF KEAN
4 10-Mar-2016 VANI KLF KEAN
3 8-Mar-2016 VANI KLF KEAN
Rev Date Reason for issue Prepared Checked Approved

CHANGE DESCRIPTION

Revision Change description


8
7
6
5
4
3
2 Added proprietary std comment and disclaimer on fron page.
1
0
Document number 95961079
Revision 8
Page 3 of 365

Disclaimer
This course was developed by National Oilwell Varco as a training guide and while every effort was
made to insure its accuracy, this course is only intended to be used as a training aid. Improvements in
equipment including, but not limited to, design, engineering, materials, production methods or
customer specifications may necessitate changes in the equipment that may result in inconsistencies
between the contents of this publication and the end product. National Oilwell Varco reserves the right
to make these changes without incurring any liabilities or obligations beyond those stipulated in a
signed purchase contract with its customer. The images, photographs, charts, diagrams, drawings,
verbal contents and specifications contained herein are not to be construed as giving rise to any
warranty, and are not to be regarded as approval or disapproval of any specific product or practice on
the part of National Oilwell Varco.

About this document


This document is a handout intended for participants in PLC Discipline Level 0 course and exam.
This document does not necessarily cover all information provided in the course or tested in the exam.
Document number 95961079
Revision 8
Page 4 of 365

TABLE OF CONTENTS

INTRODUCTION TO PLCS AND TERMINOLOGY ..................................................................................... 9


PLC 11
Introduction ..................................................................................................................................... 12
PLC ................................................................................................................................................... 13
History .............................................................................................................................................. 17
Advantages of a PLC......................................................................................................................... 19
PLC ................................................................................................................................................... 22
Input Devices ................................................................................................................................... 24
Output Devices ................................................................................................................................ 25
What is Memory? ............................................................................................................................ 26
PLC Scan Cycle.................................................................................................................................. 28
SAFETY ............................................................................................................................................. 30
Safety ............................................................................................................................................... 31
HISTORY ........................................................................................................................................... 33
History .............................................................................................................................................. 34
PLC LANGUAGES (INTRO) .................................................................................................................. 36
PLC Languages (Intro) ...................................................................................................................... 37
PLC THEORY BASIC ............................................................................................................................ 42
Truth Tables ..................................................................................................................................... 43
Logic Functions (Intro) ..................................................................................................................... 44
Numbering Systems ......................................................................................................................... 54
Data Types (Intro) ............................................................................................................................ 66
Memory Addressing (Intro) ............................................................................................................. 70
INTRODUCTION TO S7 300 ................................................................................................................ 75
MODULE INFORMATION ................................................................................................................... 77
Module Information ........................................................................................................................ 78
Universal Rail (UR) ........................................................................................................................... 81
Power Supply (PS) ............................................................................................................................ 82
Central Processing Unit (CPU) ......................................................................................................... 84
Digital Input Signal Module (DI) ....................................................................................................... 92
Digital Output Signal Module (DO) .................................................................................................. 96
Analog Input Signal Module (AI) ...................................................................................................... 98
Analog Output Signal Module (AQ) ............................................................................................... 104
Function Module (FM) ................................................................................................................... 107
Communication Processor (CP) ..................................................................................................... 108
Module Positions ........................................................................................................................... 109
BATTERY CHANGE OF CPUS..............................................................................................................113
Document number 95961079
Revision 8
Page 5 of 365

Battery Change of CPUs ................................................................................................................. 114


MEMORY RESET ..............................................................................................................................115
Memory Reset ............................................................................................................................... 116
SIMATIC MANAGER SETUP ..............................................................................................................121
STEP7 NAVIGATION .........................................................................................................................123
Getting Started .............................................................................................................................. 124
SIMATIC Manager Windows .......................................................................................................... 125
Toolbars ......................................................................................................................................... 126
Preparation .................................................................................................................................... 128
Hardware Configuration ................................................................................................................ 129
Step7 Manager............................................................................................................................... 134
PG/PC INTERFACE ............................................................................................................................137
PG/PC Interface ............................................................................................................................. 138
MPI Adapter ................................................................................................................................... 140
CP 5711 .......................................................................................................................................... 142
Ethernet ......................................................................................................................................... 144
IT Security ...................................................................................................................................... 148
ONLINE TROUBLESHOOTING TOOLS .................................................................................................149
Accessible Nodes ........................................................................................................................... 150
Online / Offline View ..................................................................................................................... 151
HARDWARE CONFIGURATION TOOL ................................................................................................155
MODULE SETTINGS ..........................................................................................................................157
Hardware Configuration ................................................................................................................ 158
Digital Input/Output Modules ....................................................................................................... 161
Analog Input/Output Modules ...................................................................................................... 162
Central Processing Unit.................................................................................................................. 163
HARDWARE DIAGNOSTIC TOOLS ......................................................................................................164
Hardware Diagnostic Tools ............................................................................................................ 165
Diagnostic Buffer ........................................................................................................................... 166
Module specific .............................................................................................................................. 167
SIMATIC MANAGER STRUCTURE ......................................................................................................171
BLOCK ARCHITECTURE .....................................................................................................................173
Block Types .................................................................................................................................... 174
Program Structure ......................................................................................................................... 176
Example.......................................................................................................................................... 177
SCAN CYCLE .....................................................................................................................................178
Process Images............................................................................................................................... 179
Cycle ............................................................................................................................................... 180
PROGRAM EDITOR ..........................................................................................................................182
Document number 95961079
Revision 8
Page 6 of 365

Program Editor ............................................................................................................................... 183


Views .............................................................................................................................................. 185
Online Tools ................................................................................................................................... 188
F1 Help File..................................................................................................................................... 189
PROGRAMMING LANGUAGES ..........................................................................................................191
Ladder ............................................................................................................................................ 192
FBD ................................................................................................................................................. 194
STL .................................................................................................................................................. 197
SCL .................................................................................................................................................. 209
PLC SIMULATOR ..............................................................................................................................210
Introduction ................................................................................................................................... 211
Difference from a “real” PLC ......................................................................................................... 212
Modules ......................................................................................................................................... 214
Symbolic Addressing ...................................................................................................................... 216
Download to S7-PLCSIM ................................................................................................................ 217
Help File ......................................................................................................................................... 218
REFERENCE DATA TABLE ..................................................................................................................219
Overview ........................................................................................................................................ 220
Filter ............................................................................................................................................... 222
Go-To Functions ............................................................................................................................. 223
SIMATIC MANAGER NUMERIC SYSTEMS ..........................................................................................227
SIGNAL TYPES ..................................................................................................................................229
Signal Types ................................................................................................................................... 230
DATA TYPES.....................................................................................................................................232
Data Types ..................................................................................................................................... 233
ADDRESSING ...................................................................................................................................237
Addressing ..................................................................................................................................... 238
Addressing S7-300 Digital Modules ............................................................................................... 240
Types of Memory Addressing ........................................................................................................ 242
SYMBOL EDITOR ..............................................................................................................................244
Symbol Editor ................................................................................................................................. 245
Filter & Search ............................................................................................................................... 250
Creating & Editing Symbols ........................................................................................................... 254
Variable Tables............................................................................................................................... 259
Monitor Variables .......................................................................................................................... 262
Modify Variables ............................................................................................................................ 263
Triggering ....................................................................................................................................... 265
DATA BLOCKS ..................................................................................................................................267
Shared vs Instance ......................................................................................................................... 268
Document number 95961079
Revision 8
Page 7 of 365

Declaration & Data View ............................................................................................................... 271


Declaring Variables ........................................................................................................................ 273
DB Addressing ................................................................................................................................ 274
Uploading DB's ............................................................................................................................... 276
SIMATIC PROJECT HANDLING...........................................................................................................280
BACKUP ...........................................................................................................................................282
Create Project ................................................................................................................................ 283
Upload............................................................................................................................................ 284
ARCHIVE ..........................................................................................................................................285
RETRIEVE .........................................................................................................................................288
Retrieve .......................................................................................................................................... 289
COMPARE........................................................................................................................................290
Compare......................................................................................................................................... 291
DOCUMENTATION ...........................................................................................................................297
NOV DOCUMENTATION ...................................................................................................................299
NOV Documentation...................................................................................................................... 300
SOFTWARE HANDLING.....................................................................................................................301
Software Handling ......................................................................................................................... 302
NEVER HAND ANY SOFTWARE TO THE CUSTOMER! ..................................................................... 303
RigDoc/RigOffice ............................................................................................................................ 304
CUSTOMER DOCUMENTATION ........................................................................................................310
Customer Documentation ............................................................................................................. 311
SIEMENS DOCUMENTATION ............................................................................................................312
Siemens Documentation ............................................................................................................... 313
NOV CONTACTS ...............................................................................................................................314
NOV Contacts ................................................................................................................................. 315
INTRODUCTION TO SERVICELAB.......................................................................................................318
SERVICELAB .....................................................................................................................................320
Introduction ................................................................................................................................... 321
CONNECTION ..................................................................................................................................323
Connection Types .......................................................................................................................... 324
Startup ........................................................................................................................................... 325
Ethernet ......................................................................................................................................... 326
SIMATIC Connections..................................................................................................................... 328
DATA LOGGING ...............................................................................................................................330
Time Bases Settings ....................................................................................................................... 331
Opening a Project File .................................................................................................................... 332
Modules ......................................................................................................................................... 333
Start Logging .................................................................................................................................. 338
Document number 95961079
Revision 8
Page 8 of 365

Sampling_Time_Miss (STM) .......................................................................................................... 339


Time Control .................................................................................................................................. 340
TECH SUPPORT COMMUNICATION ..................................................................................................342
Tech Support Communication ....................................................................................................... 343
INTRODUCTION TO PLC LOGGER ......................................................................................................346
INTRODUCTION ...............................................................................................................................348
Introduction ................................................................................................................................... 349
CONNECTION ..................................................................................................................................350
Startup ........................................................................................................................................... 351
Setup .............................................................................................................................................. 352
DATA LOGGING ...............................................................................................................................353
Setup Application ........................................................................................................................... 354
Selecting Data ................................................................................................................................ 357
Logging Data .................................................................................................................................. 358
View Data ....................................................................................................................................... 359
File Logging .................................................................................................................................... 360
TECH SUPPORT COMMUNICATION ..................................................................................................361
Tech Support Communication ....................................................................................................... 362
Document number 95961079
Revision 8
Page 9 of 365

INTRODUCTION TO PLCS AND TERMINOLOGY

Notes:
Document number 95961079
Revision 8
Page 10 of 365
Document number 95961079
Revision 8
Page 11 of 365

PLC

Notes:
Document number 95961079
Revision 8
Page 12 of 365

Introduction

The abbreviation for PLC stands for Programmable Logic Controller. A PLC can be compared to a
human brain. The CPU would be the brain that reacts to input signals from your eyes, nose or ears.
Your brain calculates what would be the best action to take and sends the output signals to your
muscles, mouth etc. for action. Similarly a PLC executes a program that controls outputs like pumps,
valves, motors, alarms, lights etc. based on the input signals it receives from the field devices like
buttons, proximity sensors, sensors and switches.

A PLC can also be referred to as a PLS (Programmable Logic System) or PC (Programmable Controller),
depending on manufacturer and geographical location.

Notes:
Document number 95961079
Revision 8
Page 13 of 365

PLC

Notes:

Relays
In the past everything was controlled by relays. Relays are electromechanical switches that are
controlled by energizing a coil which will open or close a mechanical switch / contact.

The term normally open (NO) means when the relay is in the rest position (coil is not energized), the
contact would be in the open state.
The term normally closed (NC) means when the relay is in the rest position (coil is not energized), the
contact would be in the closed state.

Relays have different ratings. A relay with a 〖24V〗_DC and 5A rating means the coil can be energized
with 〖24V〗_DC and the contact is able to conduct 5A. Relays were used in different combinations
along with timers and counters to perform logical operations. Control tasks were solved with contact
and relay controls. The function of a controller was thereby defined through the wiring and
Document number 95961079
Revision 8
Page 14 of 365

combination of the switching elements. Such a controller is called a hard-wired programmed


controller.

Circuit diagrams, terminal connection diagram and wiring lists served as the foundation. Yet, the
system could only be installed after it was known which tasks had to be solved and which function
blocks, e.g. switches, contacts etc., were available. If a mistake was made, the wiring had to be
disconnected and reconnected correctly. Every change or expansion in function was always associated
with changes in components parts, rewiring and installation works.
Document number 95961079
Revision 8
Page 15 of 365

Relays

The term normally open (NO) means when the relay is in the rest position (coil is not energized), the
contact is in the open state.

The term normally closed (NC) means when the relay is in the rest position (coil is not energized), the
contact is in the closed state.

Notes:
Document number 95961079
Revision 8
Page 16 of 365

Relays

Here the coils are energized. This causes the normally open (NO) relay’s contact to be in the closed
state and the normally closed (NC) relay’s contact to an open state.

Notes:
Document number 95961079
Revision 8
Page 17 of 365

History

Due to the rising demand for flexibility in the U.S. automotive industry in the 1960's, there was a need
for new control system for production machines, which could replace the relay
and timer management. The process of updating the control system for the annual model change was
both time-consuming, expensive and required experienced electricians.

General Motors Hydra Matic (the part of General Motors that stood for automatic
transmission) produced in 1968 some specifications they wanted to be met:
- Programmable control for the sake of flexibility for rapid restructuring of the production equipment.-
Management to work in an industrial environment.- Input and output will be digital, and the
voltage should be within the areas in typical industrial applications.
- Management should be able to handle analog inputs and outputs, to be modular so that extension or
replacement shall be made easily and efficiently.- The programming will be easy and
could change rapidly, so that it can be a fast training of maintenance personnel.
The winning proposal came from Bedford Associates of Bedford, Massachusetts. The result was the
first PLC and called MODICON (MOdular DIgital CONtroller) 084, because it was the eighty fourth
Document number 95961079
Revision 8
Page 18 of 365

project to Bedford Associates. MODICON was sold to Gould Electronics, and later to Schneider Electric,
which still owns the brand today.

Source: automationmag
http://www.automationmag.com/features/the-father-of-invention-dick-morley-looks-back-on-the-
40th-anniversary-of-the-plc.html

Notes:
Document number 95961079
Revision 8
Page 19 of 365

Advantages of a PLC

Increase safety
The PLC can ensure a lower failure rate than the conventional control relays, by incorporating
redundancies. A redundancy is a duplication of a critical component of a system. Redundancy can be
considered as a backup or fail-safe that can be achieved for both hardware and software.

Easier fault finding


The PLC software can provide programming, monitoring and diagnostics functions for the PLC logic,
hardware configuration and network configuration. With such tool the user can perform step by step
fault finding through the system. Good code should be easy to read, structured and documented –
poor code can hinder troubleshooting.

Visual observation of the PLC program


While using the PLC, you can also create a user interface (Human Machine Interface - HMI) to provide
the operators with static and/or animated visualization to represent the process and the control
system in use, which makes it easier and more user friendly to control or modify the process.
Document number 95961079
Revision 8
Page 20 of 365

Process modification flexibility


Using the PLC to control a process, gives more flexibility to change the program whenever the process
changes, unlike the conventional control setup that requires rewiring each time a process modification
is required. The relative ease with which a change can be made does not mean that proper change
controls should not be used.

*IP: is the degree of protection code. The first digit indicates the level of protection that the enclosure
provides against access to hazardous parts (e.g., electrical conductors, moving parts) and the ingress of
solid foreign objects. The second digit indicates the level of protection that the enclosure provides
against harmful ingress of water.

Notes:
Document number 95961079
Revision 8
Page 21 of 365

Advantages of a PLC

Notes:
Document number 95961079
Revision 8
Page 22 of 365

PLC

Notes:

Components
The PLC station consists of different components. A PLC will have a central processing unit (CPU) which
will include memory to do calculations and store information. Some CPU models will have a memory
card. This CPU along with its memory allows the PLC to operate on its own without any computer
connected.

We use the computer and the programming software to create a suitable program for the PLC that
allows the PLC to perform a certain process or control a certain machine.

The PLC station also has input cards and output cards. Input cards allow the PLC to get feedback from
the field. The program we download to the PLC uses the inputs to decide what outputs to switch on
and off.
Document number 95961079
Revision 8
Page 23 of 365

Most PLC stations require 〖24V〗_DC power supply, but also some PLC types may use various voltages.
Some types of CPU have an integrated power supply in it, but mostly the power supply is added to the
panel depending on the supply available and what the requirement of the CPU.

Modular PLC allows the expansion of inputs, outputs, communication ports and other functions a PLC
can perform.

The following abbreviations are likely to be seen for these modules


UR: Universal Rack.
PSU: Power Supply Unit (Converts mains to required voltage for PLC).
CPU: Central Processing Unit.
DI: Digital Input Card (Can sense a high or low signal e.g. 0V / 24V).
DO: Digital Output Card (Can switch an output on or off).
AI: Analog Input Card (Can measure a signal range e.g. 0 to 10V).
AO: Analog Output Card (Can supply a signal range e.g. 0 to 10V).
Document number 95961079
Revision 8
Page 24 of 365

Input Devices

An input device is any device that can send electrical signals to the PLC to inform the PLC of a condition
in the field.

Input devices may include


 Push buttons.
 Selector Switches.
 Potentiometers.
 E-Stops.

Notes:
Document number 95961079
Revision 8
Page 25 of 365

Output Devices

An output device is the reason we have a PLC. An output device is what we want to control with the
PLC. We want to control output devices as efficiently and safely as possible. Output devices can have
many functions. Some outputs are just to inform an operator of a situation, while other outputs are
performing a mechanical function.

Output devices may include


 Displays.
 Lamps.
 Hydraulic/Pneumatic Valves.
 Sirens.

Notes:
Document number 95961079
Revision 8
Page 26 of 365

What is Memory?

The memory consists of registers. Each register can store an electric charge. No charge stored
represents a 0 and a charge stored represents a 1. Therefore all data stored in PLC memory consists of
combinations of 0’s and 1’s. This means we need to represent everything in the PLC in 0’s and 1’s.

There are two basic types of memory are ROM and RAM.

RAM (Random Access Memory)


Is a temporary storage memory that allows the CPU to access data on it in a fast way regardless of
where the data is stored in the memory, but loses its data if the power is switched off. This memory is
used for arithmetic operation, but not for storing data for long periods of time.

ROM (Read-Only Memory)


Will retain data even when power is lost. EEPROM (Electricity Erasable Programmable Read-Only
Memory) is commonly used these days and are easier to erase and change data and retains data when
power is lost. This type of memory is typically used to store the PLC programs and any other data we
want to retain. Some PLCs today use memory cards in conjunction with EEPROM.
Document number 95961079
Revision 8
Page 27 of 365

Data we don’t want to lose in the PLC we make as re-tentative, which means it gets retained even
when power is lost. Data we don’t need to keep after power loss we make as non-Re-tentative.

Notes:
Document number 95961079
Revision 8
Page 28 of 365

PLC Scan Cycle

A PLC is continuously scanning its inputs, executing the program and updating outputs. This is
traditionally known as the ‘input>process>output’ cycle.

START
The PLC scan cycle starts here and the scan cycles monitoring time is started to determine how long
the scan cycle takes to complete. This is used for error checking by the PLC.

READ INPUTS
The status of each input is read from the physical input terminal to the memory. This memory is called
Process Image Input Memory (PII).

EXECUTE PROGRAM
The program inside the program memory is executed in the PLC, the program makes use of the (PII) to
determine what outputs should be turned on/off. These output status are changed in Process Image
Output memory (PIQ).
Document number 95961079
Revision 8
Page 29 of 365

UPDATE OUTPUTS
The outputs are now being update from the (PIQ) at the end of the scan cycle simultaneously.

Notes:
Document number 95961079
Revision 8
Page 30 of 365

SAFETY

Notes:
Document number 95961079
Revision 8
Page 31 of 365

Safety

Task is always about SAFETY!


The accompanying picture is a result of how fast things can go wrong.

Situation: Testing of crane is in progress, crane started a lift operation from main deck. PLC override
functions were activated for load test, except from Automatic Overload Protection System (AOPS)
override. Test load dropped immediately when crane slewed over ship side. AOPS was activated
automatically by PLC control software when it detected outboard crane operation. Result was, as
picture tells, fortunately only a few smashed motorbikes.

Next time it can go way worse than this...


Ask yourself WHAT are you doing and WHY?! Are you 100% sure? Is what you are doing critical to
operation? Are there any alternative ways to solve this? What are my actions if things go horribly
wrong? And last but not least, WHAT can go wrong in a worst-case scenario and have I taken necessary
countermeasures?
Document number 95961079
Revision 8
Page 32 of 365

Consider possible range of movement of equipment should a motor or cylinder ‘take off’ at high speed
,and ensure the possible ‘swept’ area is cordoned off. When working with systems with devices spread
over a large area e.g. tanks with pumps and agitators consider if you can you see or ensure the area is
kept clear while you remotely operate equipment. If not involved, but in the area, beware that some
equipment can be started remotely/automatically – consider position and escape routes at all times.

Notes:
Document number 95961079
Revision 8
Page 33 of 365

HISTORY

Notes:
Document number 95961079
Revision 8
Page 34 of 365

History

History of PLC used by NOV


Many of the products that NOV supplies are controlled through the PLC are easily configurable and
highly reliable. Siemens has been the standard PLC supplier for all NOV Ross hill controls SCR systems
since 1997. Though it's the standard, several other PLCs have also been used.

Legacy Varco TDS GE Series 1/1Plus, Simatic TI355, Koyo 340


Legacy Varco Roughnecks Siemens S5-95
Legacy Varco Pipehandlers Siemens S5-135u
Tech Power SCR Allen Bradley SLC
Legacy NOI Power Swivel Toshiba
Ross Hill SCR Texas Instruments
KEMS Siemens 7-200
Amphion Wago 750
BOP GE 90-30, 90-70, RX3, Allen Bradley AAdvance
Document number 95961079
Revision 8
Page 35 of 365

Notes:
Document number 95961079
Revision 8
Page 36 of 365

PLC LANGUAGES (INTRO)

Notes:
Document number 95961079
Revision 8
Page 37 of 365

PLC Languages (Intro)

PLC Languages
There are four programming languages used by NOV. Each has its own syntax and, depending on how
it is written, the user can convert the code from one language to the other.

Ladder
Ladder (LAD) diagram resembles an electrical circuit diagram. It uses contacts and coils symbols to
denote inputs and outputs. People with an electrical background can relate to this language more
comfortably.

Function Block Diagram


Function Block Diagram (FBD) uses boxes for each function that represents a logic gate or operation.
Even people with non-programming backgrounds can work with this language if they understand Logic
operations.

Statement List
Document number 95961079
Revision 8
Page 38 of 365

Statement List (STL) is an instruction based language. STEP 7 has a list of instruction that are used to
perform a certain function. This programming language is preferred by people who already have a
programming background. It's seen as more complex, but has greater capabilities.

Structured Control Language


Structure Control Language (SCL) is a PASCAL-oriented high-level language for programming PLCs with
SIMATIC S7. S7-SCL is particularly suitable for the following tasks:
- Programming of complex algorithms
- Programming of mathematical functions
- Data and recipe management
- Process optimization

Notes:
Document number 95961079
Revision 8
Page 39 of 365

PLC Languages (Intro)

Ladder (LAD)
Ladder is a representation of an electrical circuit having current flow between two power lines. RLO
Result of logic operation is the point after all logic has been tested, just before the output. The RLO will
usually be assigned to the output using an assignment coil, but it can be used in many other operations
like starting a timer.

Normally Open will allow flow when the input it's addressed to is a high signal and it will block when
the input is a low signal. The Normally Open contact in ladder is also referred to as “Examine On” or
“Scan for On”.

Normally Closed will allow flow when the input it's addressed to is a low signal and it will block when
the input is a high signal. The Normally Closed contact in ladder is also referred to as “Examine Off” or
“Scan for “Off”.

Notes:
Document number 95961079
Revision 8
Page 40 of 365
Document number 95961079
Revision 8
Page 41 of 365

PLC Languages (Intro)

Ladder
In this example, we have a motor controlled by a two-position STOP/START switch. The motor is
supplied by a 3 Phase power supply and controlled by the switch. When the switch is at the STOP
position, the motor is not running and the red LED is light on. While when the switch is at the START
position, the motor is running and the green LED is light on.

Notes:
Document number 95961079
Revision 8
Page 42 of 365

PLC THEORY BASIC

Notes:
Document number 95961079
Revision 8
Page 43 of 365

Truth Tables

Truth Table
A Truth Table lists all the possibilities of inputs and gives the status of the output for each possibility
for a given rule/function. Truth Tables are used sometimes in programming to simplify problems.

One would list all the inputs a specific output would be influencing and list all the possible
combinations of those inputs. You then write down the desired output for each combination applying
the rule/function. This table can then be programmed using logic gates.

Notes:
Document number 95961079
Revision 8
Page 44 of 365

Logic Functions (Intro)

AND Gate
A represents one input of an AND gate.
B represents the other input of an AND gate.

Current will only flow through the circuit to the output if both A and B are both pressed. (A=1 and B=1).

Notes:
Document number 95961079
Revision 8
Page 45 of 365

Logic Functions (Intro)

AND Gate
We can achieve AND logic in ladder by putting two NO contacts in series. Both will scan for a high
signal on the input and because they are in series both conditions need to be true for the output to
become high.

Notes:
Document number 95961079
Revision 8
Page 46 of 365

Logic Functions (Intro)

OR Gate
A represents one input of an OR gate.
B represents the other input of an OR gate.

Current will flow through the circuit to the output if A or B are pressed. (A=1 or B=1). If both are off
the output will be off.

Notes:
Document number 95961079
Revision 8
Page 47 of 365

Logic Functions (Intro)

OR Gate
We can achieve OR logic in ladder by putting two NO contacts in parallel. Both will scan for a high
signal on the input and because they are in parallel if any one of the conditions are true the output will
become high.

Notes:
Document number 95961079
Revision 8
Page 48 of 365

Logic Functions (Intro)

NAND Gate
NAND logic gate output is AND logic gate output inverted.

Notes:
Document number 95961079
Revision 8
Page 49 of 365

Logic Functions (Intro)

NAND Gate
We can achieve NAND logic in ladder by putting two NO contact in series and inverting the RLO (Result
of Logic Operation). We can use a NOT in ladder and STL logic to invert the RLO (Result of Logic
Operation). In FBD a dot is used to represent the NOT to invert the RLO.

Notes:
Document number 95961079
Revision 8
Page 50 of 365

Logic Functions (Intro)

NOR Gate
NOR logic gate output is OR logic gate output inverted.

Notes:
Document number 95961079
Revision 8
Page 51 of 365

Logic Functions (Intro)

NOR Gate
We can achieve NOR logic in ladder by putting two NO contact in parallel and inverting the RLO (Result
of Logic Operation). We can use a NOT in ladder and STL logic to invert the RLO (Result of Logic
Operation). In FBD a dot is used to represent the NOT to invert the RLO.

Notes:
Document number 95961079
Revision 8
Page 52 of 365

Logic Functions (Intro)

XOR Gate
XOR (Exclusive OR) logic gate is similar to the OR logic gate. The only difference is when both inputs are
high, the XOR output will be off. In short XOR will be on if signals aren't identical and off when signals
are identical.

Notes:
Document number 95961079
Revision 8
Page 53 of 365

Logic Functions (Intro)

XOR Gate
We can achieve XOR logic in ladder by putting a NO contact and a NC contact in series. In parallel to
this circuit we place the opposite logic in series. In FBD and STL there are two methods of achieve an
XOR logic gate. One can use a combination of AND & OR gates or one can use the XOR instruction.

Notes:
Document number 95961079
Revision 8
Page 54 of 365

Numbering Systems

Notes:
Document number 95961079
Revision 8
Page 55 of 365

Numbering Systems

Notes:
Document number 95961079
Revision 8
Page 56 of 365

Numbering Systems

Decimal System
The decimal number system has the following characteristics
Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Base: 10
Positional Weight Power of base 10

The decimal number 173 has three digits. Each digit's in a unique position from 0 to 2. Each digit gets
multiplied by its positional weight, which is the base (10) to the power of its position. All these
numbers are added together to make up the number 173.

This may seem pointless seeing that we are converting from decimal to decimal, but this same method
will be used to convert from any other numbering system to decimal.

Notes:
Document number 95961079
Revision 8
Page 57 of 365

Numbering Systems

Binary System
The binary number system has the following characteristics
Digits: 0, 1
Base: 2
Positional Weight Power of base 2

In order to determine the numerical value of the binary number 10101101 we will follow the same
method as before. Each digit (1 or 0) must be multiplied by its positional weight, which is the base (2)
to the power of its position. All these numbers are added together to make up the number 173.

Notes:
Document number 95961079
Revision 8
Page 58 of 365

Numbering Systems

Binary System
We can also take a decimal number and attempt to represent it in binary. There are many methods.
We will look at the simplest one. You start off by writing down the positional weights for each position
from Right (1) to left. You carry on doing this until the positional weigh is greater that the number we
want to represent (173). If the positional weigh is greater than the number 173 we will not need it and
that positional weigh can be removed.

Now that we know how many positions we will require we will start from left.

Is 128 less than 173? Yes, so we write a 1 under the positional weight 128 and subtract 128 from 173,
which leaves us with 45.
Is 64 less than 45? No, so we write a 0 under 64.
Is 32 less than the remainder 45? Yes, so we write a 1 under 32 and subtract 32 from 45 leaving us with
13.
Is 16 less than remainder 13? No, so we write a 0 under 16.

We carry on doing this and it should always leave us at the end with a 0 remainder, which will indicate
we worked correctly.
Document number 95961079
Revision 8
Page 59 of 365

Notes:
Document number 95961079
Revision 8
Page 60 of 365

Numbering Systems

Notes:
Document number 95961079
Revision 8
Page 61 of 365

Numbering Systems

Hexadecimal System
The hexadecimal number system uses 16 digits. The first 10 digits are identical to the decimal number
system (0 to 9). For the remaining digits A to F is used. Each letter represents the following numbers:
A=10
B=11
C=12
D=13
E=14
F=15

Notes:
Document number 95961079
Revision 8
Page 62 of 365

Numbering Systems

Hexadecimal System
The hexadecimal number system has the following characteristics
Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Base: 16
Positional Weight Power of base 16

To convert the hexadecimal number AD to binary we will follow the following procedure:
First we have to convert each hex digital to its binary number individually.
D represents 13. 13’s binary number is 1101.
A represents 10. 10’s binary number is 1010.
If you place the two binary numbers next to each other you have your binary number for the
hexadecimal number AD.

Notes:
Document number 95961079
Revision 8
Page 63 of 365

Numbering Systems

Notes:
Document number 95961079
Revision 8
Page 64 of 365

Numbering Systems

Notes:
Document number 95961079
Revision 8
Page 65 of 365

Numbering Systems

Tools
The Windows Calculator can be of great help when converting numbers between numbering systems.
To convert numbers you will have to change the “View” from “Standard” or “Scientific” to
“Programmer”.

Notes:
Document number 95961079
Revision 8
Page 66 of 365

Data Types (Intro)

Basic Data Types


Data used in PLC programs can be assigned to a data type. By assigning a data type you define the size
of the data and the structure of the bits.

BIT:
Short for Binary digit. One character of a binary number.

BYTE:
8bits.

WORD:
16 bits or 2 bytes.

DOUBLE WORD:
32 bits or 4 bytes or 2 words.
Document number 95961079
Revision 8
Page 67 of 365

Notes:
Document number 95961079
Revision 8
Page 68 of 365

Data Types (Intro)

INTEGER 16 bits
There are many different data type formats. We will look at the integer and real format from Siemens.

The data type integer consists of 16 bits (Bit 0 to 15). Bit 15 is the sign bit (0 = positive, 1= negative). Bit
14 is the MSB (Most Significant Bit) as it has the biggest influence on the value of the number. Bit 0 is
the LSB (Least Significant Bit) as it has the least influence on the value of the number. The range of an
integer lies between -32768 and + 32767. An integer occupies one word in memory. We also get
something called a long integer which consists of 32 bits, which can hold much greater numbers. In this
course we will focus on the 16bit Integer.

Notes:
Document number 95961079
Revision 8
Page 69 of 365

Data Types (Intro)

REAL 32 bits
A real number is also referred to as a floating-point number. It can be a positive or negative number
that can have a remainder. Example: 1.224 or -0.343. Most of the time this number is represented in
exponent form. As a result the number 173.0 can be expressed as 1.73E2 which means 1.73×〖10〗^2. A
real number consists of 32 bits (Bit 0 to 31). Bit 31 is the sign bit (0 = positive, 1= negative). The range
of a real number lies between 〖−3.402823 ×10〗^38 and 3.402823× 〖10〗^38. A real number occupies
two words in memory.

Notes:
Document number 95961079
Revision 8
Page 70 of 365

Memory Addressing (Intro)

Types of Memory Addressing


Now that we know a BOOL is 1 bit, integer numbers take up 16 bits and real number take up 32 bits,
we can allocate memory to store different values in the PLC. Different PLCs have different notation to
allocate memory. For Siemens you can allocate main memory to values by using M (Single bit), MW
(Memory Word/16 bits) and MD (Memory Double Word/32 bits) followed by the address in the
memory you want to allocate.

Notes:
Document number 95961079
Revision 8
Page 71 of 365

Memory Addressing (Intro)

Class Exercise
If we want to store the value 10. We know it can be an integer or a real value, but we would prefer to
take the least amount of space in memory. We then know 10 is an integer and will require 16 bits of
space. Now we need to know where in memory we want to store this value. We wouldn’t want to
overwrite other data in the memory. Let’s say our memory is empty. We can then decide to store our
integer in MW0

2,5 is a real value. Real values require 32 bits of space. We have used byte 0 and byte 1 for our integer
10. So we will store 2.5 in MD2

-3 is a integer value. Integer value require 16 bits of space. We have used byte 0 to 5. So we will store -
3 in MW6

Bool:1 takes only 1 bit. We can store this value in M8.0

-34 is a integer value. An integer value requires 16 bits of space. We have used byte 0 to 8.0 We can’t
address a section of a byte. So we have to use the next available byte, 9.
So we will store -34 in MW9
Document number 95961079
Revision 8
Page 72 of 365

Bool:0 takes only 1 bit. We can store this value in M8.1

Notes:
Document number 95961079
Revision 8
Page 73 of 365

Review of lesson objectives

Notes:
Document number 95961079
Revision 8
Page 74 of 365

Review of lesson goal

Notes:
Document number 95961079
Revision 8
Page 75 of 365

INTRODUCTION TO S7 300

Notes:
Document number 95961079
Revision 8
Page 76 of 365
Document number 95961079
Revision 8
Page 77 of 365

MODULE INFORMATION

Notes:
Document number 95961079
Revision 8
Page 78 of 365

Module Information

S7-Family
S5
S5 is a discontinued product that was used in process industry and in manufacturing automation as a
complete controller family for a wide range of controller tasks. A migration from SIMATIC S5
controllers to SIMATIC S7 can be carried out according to the application.

S7-200
S7-200 micro PLC is a discontinued product that has a CPU with its own power supply and limited
integrated IOs. This controller is programmed by MicroWIN software. The successor of S7-200 is S7-
1200.

S7-1200
S7-1200 is a compact, scalable and flexible automation solution that is available in standard and
failsafe versions. This controller is scalable in terms of performance and is equipped with integrated
IOs, integrated PROFINET interface for programming, HMI connections, distributed IOs and distributed
drive architectures.
Document number 95961079
Revision 8
Page 79 of 365

S7-300
S7-300 is the most commonly used Siemens PLC for NOV systems, with this course focusing mainly on
the S7-300 series. NOV has used a wide variety of S7-300 CPUs, including the 314, 315, 316, 318 and
319.

CPU’s
312-319: Mostly used at NOV. Size of CPU depends on machine / equipment complexity
317T: Used on Hydraracker.
319F: Used in BOP control systems else rarely used.

T: Technology CPU’s are used for typical motion control applications where multiple axes have to be
controlled.
F: Fail-Safe CPU’s meet additional safety standards used in E-Stop circuits.

S7-400
S7-400 series is used in NOV systems for hot standby redundancy. Where there are two CPUs sharing
all the IOs. Both CPUs are running the same program, with one of the CPUs at a time having direct
control of the output signals. If one CPU fails, the other assumes control without affecting the
operation.

S7-1500
S7-1500 controller series is the ultimate plus in automation technology with the high-end CPUs. The
new controllers are in compact design. It ensures highest efficiency and maximum usability for medium
and high-end applications in machine and system automation. The S7-1500 is used in newer projects at
NOV. (900 Ton Subsea Cranes and Cyberbase Chairs)

Notes:
Document number 95961079
Revision 8
Page 80 of 365

Module Information

S7-300 Features
 Modular small control system for the lower performance range.
 Performance-graded range of CPUs.
 Extensive selection of modules.
 Expandable design with up to 32 modules.
 Backplane bus integrated in the modules.
 Can be networked with: Multipoint interface (MPI), PROFIBUS, or Industrial Ethernet.
 Central PG/PC connection with access to all modules.
 Configuration and parameter setting with the help of the Hardware Configuration tool.

Notes:
Document number 95961079
Revision 8
Page 81 of 365

Universal Rail (UR)

Universal Rail (UR)


All the modules can clip onto the S7-300 mounting rail, with screws to secure them to the rail at the
bottom. M6 screws are used to secure the rail to the substructure. Ensure that the protective ground
conductor is connected to the rail at the protective ground screw. A bus connector is used to connect
each module together to allow communication with the CPU. Various lengths of rails are available and
usage is dependent on application. This rail is used for all S7-300 modules and is used for the central
rack, expansion racks and remote racks.

While referred to as a rack with slots, there are no physical slots into which modules fit as may be
found with other PLC brands. Think of slot as position on the rail.

Notes:
Document number 95961079
Revision 8
Page 82 of 365

Power Supply (PS)

Notes:

Power Supply (PS)


If the Siemens power supply is used, it occupies the first slot in every rack in the PLC. Power is required
on central racks, expansion racks and remote racks.

This unit converts the utility power, either 230V_AC or 120V_AC, to the 24V_DC that the PLC system
requires. This is the only voltage produced by this module, all other voltages (i.e., 5V_DC, +/- 14V_DC)
are produced either by the CPU or externally.

Some power supplies have a switch on the front panel that is used to select the input voltage to the
power supply. When installing a new unit, be sure to select the proper range for your system. The
default setting is 230Vac in order to avoid damaging the Power Supply.

Alternatively, OEM power supplies can be used as long as they provide clean 24V_DC power to the
CPU. In most cases, NOV uses an OEM power supply for the PLC.
Document number 95961079
Revision 8
Page 83 of 365
Document number 95961079
Revision 8
Page 84 of 365

Central Processing Unit (CPU)

The CPU is the brain of the PLC system and its main function is to execute the program. it's built
around micro-computer architecture with a 386 processor. Only central racks need a CPU. expansion
and remote racks do not require a CPU. The CPU is always considered to be in slot 2 of the rack, even if
Siemens power supply is not used, the CPU is designated as slot 2.

Mode Selector
 STOP = Program is not executed.
 RUN = Program execution, read only access possible from PG/PC.
 RUN-P = Program execution, read / write access possible from PG/PC.
 MRES = Memory reset. Resets the RAM only.

Memory Card
A slot is provided for a memory card. The memory card saves the program contents in the event of a
power outage without the need for a battery.
Document number 95961079
Revision 8
Page 85 of 365

Notes:
Document number 95961079
Revision 8
Page 86 of 365

Central Processing Unit (CPU)

LED designation
SF - System Failure indicates group error, internal CPU fault.
DC5V - Internal 5V_DC indicator.
FRCE - Force, indicates a value has been forced.
Run - Run mode.
Stop - Shows steady light in stop mode. Flashes slowly during memory reset request. Flashes quickly
during memory reset.
BF1 - Bus Failure on X1 MPI/DP.
BF2 - Bus Failure on X2 PROFIBUS DP.
BF3 - Bus Failure on X3 PN LAN.
This is general description of LED designation. For more details, it’s a good practice to consult Siemens
specific CPU manual.

MPI Connection
Connection for a programming device or other device with an MPI interface.

DP Interface
Interface for direct connection of distributed IOs to the CPU.
Document number 95961079
Revision 8
Page 87 of 365

Industrial Ethernet PN
PROFINET Interface for central and distributed IOs to the CPU. It can also be used as standard Ethernet
communication to the CPU.

Notes:
Document number 95961079
Revision 8
Page 88 of 365

Central Processing Unit (CPU)

Memory
The memory of the S7 CPU can be divided into three areas:

Load Memory
Used for storing user programs. Doesn't store symbols or comments. The load memory can be either
RAM, ROM or EPR0M.

Work Memory
Storage area used for execution of the S7 program. Necessary for the program operation. Program
execution only takes place in Work Memory and System Memory areas.

System Memory
Used to store memory elements provided by the CPU, such as:
 Process image input and Process image output tables.
 Bit memory.
 Timers.
 Counters.
 Temporary variables.
Document number 95961079
Revision 8
Page 89 of 365

For more information see manual called “Programming with Step 7” (Pg418) .

Notes:
Document number 95961079
Revision 8
Page 90 of 365

Central Processing Unit (CPU)

Micro Memory Card


The MMC stores and saves the program (load memory) and system data (hardware configuration). This
method of storage is maintenance-free and retains the data even if the power is switched off (no
backup battery required). it‘s of a type EPROM (Erasable Programmable Read Only Memory).

The following data can be stored on the memory card:


• Complete project data from STEP 7.
• Station configurations.
• Symbol tables.
• Blocks and sources.
• Texts managed in many languages.
• Any other kinds of data, such as Word or Excel files.

Note that although it looks like a normal SD card, normal Windows operations should not be
attempted on this card as it may be irreparably damaged.

Notes:
Document number 95961079
Revision 8
Page 91 of 365
Document number 95961079
Revision 8
Page 92 of 365

Digital Input Signal Module (DI)

All the information from the field is passed to and from the CPU through IO modules. They provide
isolation from electrical noise and convert the signals to usable levels. The signals in the field aren't
usually +5V and ground, which the processor needs. Digital Modules use input or output signals that
are either on or off. Digital sensors can be connected to the PLC via this module. Input modules are
suitable for connection of toggle switches, push buttons and proximity switches. Different modules are
available for different input voltages and types.

Notes:
Document number 95961079
Revision 8
Page 93 of 365

Digital Input Signal Module (DI)

All signal modules have the following parts that make the system easy to use.

Front Connector
A front connector is used to wire the modules. To replace a module, the user will unclip the front
connector, remove the module and clip the front connector into the new module. The front connector
remains in its fully-wired state.

Coding Element
When the front connector is plugged into the module, a coding element clicks into place so that the
connector will only fit into module(s) with coding receptacles configured the same way. The use of this
coding function can vary by module type or position in rack. Double check before reconnecting and do
not force to prevent damage.

Backplane Bus
The backplane bus is used to connect all modules on the rack together. This allows for the CPU to
monitor and control the existing IOs.
Document number 95961079
Revision 8
Page 94 of 365

Notes:
Document number 95961079
Revision 8
Page 95 of 365

Digital Input Signal Module (DI)


The processor in a PLC can only use +5V_DC. Thus Optocouplers* are used to isolate two circuits and
can convert one signal voltage to another. In this case, the +24V_DC input signal becomes a +5V_DC
signal in the card.

Optocouplers or also known as opto-isolators. They are the components that use a beam of light for
transmission of the signals or data across two parts of an electronic device. They are mainly used to
prevent the damage of electronic components by isolating them from the high voltages.

Sometimes signals/data need to be transferred from one subsystem to another within an


electronics equipment without making a direct electrical connection between them. Often this is
because the source and destination are at very different voltage levels, like a microprocessor which is
operating from 5V_DC but being used to control a triac which is switching 240V_AC. In such
situations Optocouplers are employed to isolate the connection between the two, to protect the
microprocessor from overvoltage damage.

Notes:
Document number 95961079
Revision 8
Page 96 of 365

Digital Output Signal Module (DO)

All the information to the field from the CPU is passed through an output module. Digital output
modules provide electrical isolation from the field and convert the signals to a usable level. The
processor uses 5V, but the module outputs a 24V signal. Digital signals are either on or off. Output
modules are suitable for connection of solenoid valves, contactors, lamps and motor starters. Different
modules are available for different output voltages and types.

Notes:
Document number 95961079
Revision 8
Page 97 of 365

Digital Output Signal Module (DO)


To convert the PLC 5V to a 24V output, Optocouplers are used. This also isolates the PLC from the field.
Optocouplers contain an LED, a phototransistor, and a clear insulation barrier between them. When
the LED is switched on, the emitted light turns on the phototransistor. The two sections of the circuit
are isolated by the clear insulation barrier so that no voltage can physically pass from one side to the
other. The indicating LED in an output module is also powered by the field voltage. The 24V_DC
outputs are usually driven directly from the Optocoupler. When higher AC voltage outputs are
necessary, the Optocoupler drives a triac. Relay output modules use a relay to isolate and convert the
voltage levels, with the indicating LED being powered by the CPU.

Notes:
Document number 95961079
Revision 8
Page 98 of 365

Analog Input Signal Module (AI)

Converting Analog Values


The CPU processes the analog values in binary form only. Analog input modules convert the analog
process signal into digital form.

Analog Input Signal Module


On the rig there are a number of physical quantities that need to be processed (such as pressure,
temperature, speed, etc.) in the PLC for proper automated operation. These require analog process
signals. Analog actuators and sensors can be connected to a SIMATIC S7-300 via analog modules
without additional amplifiers.

Analog Modules are capable of reading or producing signals of varying levels. They aren't restricted to
just on or off, but range to a point in between. The number of points obtainable within the range is
called resolution.

The input signal is of the range +/-10V or 4-20mA. The module converts it to a representation in the
digital domain. The accuracy depends on the resolution (8 bit, 12 bit, 16 bit, etc.). Note that the
Document number 95961079
Revision 8
Page 99 of 365

maximum integer representation in the Siemens module is 27648. Analog sensors such as voltage and
current sensors, thermocouples, resistors and resistance thermometers are often used.

Notes:
Document number 95961079
Revision 8
Page 100 of 365

Analog Input Signal Module (AI)

Measuring Range Module


Analog input cards have 4 measuring range modules (one per channel group) that are used to set the
measuring range and the type of signal. They are located on the left hand side of the module. This
must be set correctly before the module is used.

The possible settings, A, B, C, D are for various input signals (voltage or current) and ranges. The
options are printed on the module. The orientation of the coding key determines which option is
selected. The required option also needs to be configured in the software.

Notes:
Document number 95961079
Revision 8
Page 101 of 365

Analog Input Signal Module (AI)


The PLC processor works only with digital values and can only use +5V_DC. As the analog input signals
are either +/-10V or 4-20mA, the incoming signal must be converted. The S7-300 reserves 16 bits (or
one word) of data for this conversion. The number of bits determines the resolution (or number of
steps between minimum and maximum). The more bits used, the smaller the steps will be and the
higher the resolution will be, and therefore, the more accurate. Theoretically, the maximum integer
value that can result from 16 bits is 32767. Siemens however, limits the maximum and the maximum
values.

Notes:
Document number 95961079
Revision 8
Page 102 of 365

Analog Input Signal Module (AI)

Notes:
Document number 95961079
Revision 8
Page 103 of 365

Analog Input Signal Module (AI)

Signal Wiring
There are different wiring configurations that can be used when wiring an analog card, depending on
the instrument and the application.

2-Wire Connection
A 2-wire (4-20mA) instrument is powered by the current loop. The resistance in those wires are added
to the sensor when measured.

4-Wire Connection
A 4-wire instrument is powered by an external supply. 2 wires are used for power feeding and the
remaining two wires are for the analog signal. With this configuration, an accurate reading can be
obtained without bothering about wire resistance at all.

Notes:
Document number 95961079
Revision 8
Page 104 of 365

Analog Output Signal Module (AQ)

Converting Analog Values


The CPU processes the analog values in binary form only. Analog output modules convert the digital
output value into an analog signal.

Analog Output Signal Module


These require analog process signals. Analog actuators and sensors can be connected to a SIMATIC S7-
300 via analog modules without additional amplifiers.

Analog Output Modules are capable of producing signals of varying levels. They aren't restricted to just
on or off, but range to a point in between. The user can select the output signal either as Current, I (4-
20mA/0-20mA), or Voltage, E (±10V/0-10V). This selection is dependent on the application.

Notes:
Document number 95961079
Revision 8
Page 105 of 365
Document number 95961079
Revision 8
Page 106 of 365

Analog Output Signal Module (AQ)

Notes:
Document number 95961079
Revision 8
Page 107 of 365

Function Module (FM)

There are many different Function Module. The FM often used at NOV is the Counter Module. It is
used to count high speed pulses. Encoders are often connected to these modules.

Notes:
Document number 95961079
Revision 8
Page 108 of 365

Communication Processor (CP)

The Communication Processor is used to connect the SIMATIC S7-300 to other Ethernet devices. It
allows one to add Ethernet communications to CPU’s that do not have Ethernet.

Notes:
Document number 95961079
Revision 8
Page 109 of 365

Module Positions

S7-300 Modules
There is a specific order to the placement of modules in the PLC rack. Specific modules must always
occupy certain slots. If that module is not used in that particular rack, then that slot is not used. The
dedicated slots are as follows:
 Slot 1: The power supply. Every rack needs power supply, but it can be supplied by an OEM power
supply, in which case there is no slot 1.
 Slot 2: The CPU. Only central racks require a CPU. A remote rack has a remote IO interface module
in slot 2.
 Slot 3: An interface module to communicate to expansion racks.
 Slot 4-11: Signal modules, function modules and communications processors. A maximum of 8 IO
modules can be used per rack.

Central Processor Unit (CPU).

Interface Modules (IM):


 IM 360/IM 361 and IM 365 expand PLC bus.
Document number 95961079
Revision 8
Page 110 of 365

Signal Modules (SM):


 Digital Input Modules.
 Digital Output Modules.
 Analog Input Modules.
 Analog Output Modules.

Notes:
Document number 95961079
Revision 8
Page 111 of 365

Module Positions

S7-300 Modules
Function Modules (FM): Can be used to perform special functions, such as:
 Counting.
 Positioning.
 Closed loop control.

Communication Processors (CP): Provides the following networking facilities:


 Point-to-point connections.
 PROFIBUS.
 Industrial Ethernet.

Accessories:
 Bus connectors.
 Front connectors.

Max. 11 modules in a rack.


Document number 95961079
Revision 8
Page 112 of 365

Notes:
Document number 95961079
Revision 8
Page 113 of 365

BATTERY CHANGE OF CPUS

Notes:
Document number 95961079
Revision 8
Page 114 of 365

Battery Change of CPUs

Change yearly or when indicator lights


Change with the CPU power on
Always good practice to ask customer when last the battery has been changed.
CPU’s: 318

Notes:
Document number 95961079
Revision 8
Page 115 of 365

MEMORY RESET

Notes:
Document number 95961079
Revision 8
Page 116 of 365

Memory Reset

IF YOU ARE NOT SURE WHAT YOU ARE DOING, STOP!

When to reset CPU memory?


You reset CPU memory
 In order to clear all retentive memory bits, timers and counters, and to initialize work memory with
the start values of the retentive DBs in load memory.
 If the new retentive new memory bits, timers and counters downloaded to the CPU user program
using the “Download user program to Memory Card” function are liable to cause unwanted
reactions. The reason for this is because the “Download user program to Memory Card” function
doesn't delete any retentive memory areas.
 If the CPU requests a memory reset, indicated by the STOP LED flashing at 0.5 Hz intervals. (When
inserting a new MMC)

Possible reasons of a CPU request to reset memory


 The SIMATIC MMC has been replaced.
 RAM error in CPU.
Document number 95961079
Revision 8
Page 117 of 365

 Insufficient work memory for loading all user program blocks from a SIMATIC MMC.
 Attempts to load faulty blocks, for example if a wrong instruction was programmed.

Notes:
Document number 95961079
Revision 8
Page 118 of 365

Memory Reset

Notes:
Document number 95961079
Revision 8
Page 119 of 365

Review of lesson objectives

Notes:
Document number 95961079
Revision 8
Page 120 of 365

Review of lesson goal

Notes:
Document number 95961079
Revision 8
Page 121 of 365

SIMATIC MANAGER SETUP

Notes:
Document number 95961079
Revision 8
Page 122 of 365
Document number 95961079
Revision 8
Page 123 of 365

STEP7 NAVIGATION

Notes:
Document number 95961079
Revision 8
Page 124 of 365

Getting Started

To open SIMATIC Manager, double click the icon on the desktop. If a New Project Wizard window
appears, click on the cancel button to continue to SIMATIC Manager as it's not necessary to use the
wizard.

This presentation is written with and for Simatic Manager V5.5 SP4.

Notes:
Document number 95961079
Revision 8
Page 125 of 365

SIMATIC Manager Windows

The SIMATIC Manager manages the STEP 7 projects. it's the main program and also appears on the
windows desktop. SIMATIC Manager is a graphic user-interface for online/offline editing of S7 objects
(projects, user program files, blocks, hardware stations, networks and tools). With the SIMATIC
Manager you can:
 Manage projects and libraries.
 Activate STEP 7 tools.
 Access the PLC online.
 Edit memory cards.

Notes:
Document number 95961079
Revision 8
Page 126 of 365

Toolbars

Title Bar
Contains the window title and the buttons for controlling the window.

Menu bar
Contains all the menus available for the current window.

Toolbar
Contains the most frequently used tasks as symbols. These symbols are self-explanatory.

Status Bar
Displays the current status and further information.

Taskbar
Contains all open applications and windows as buttons. You can position the taskbar on either side of
the screen by using the left mouse button and dragging it to its new position.

Note
Document number 95961079
Revision 8
Page 127 of 365

 When trying to see if the PG/PC is connected to the PLC, the Accessible Nodes button can be used.
 If you are looking for help or additional information on a particular subject, just highlight that item
and press the F1 key.

Notes:
Document number 95961079
Revision 8
Page 128 of 365

Preparation

Notes:
Document number 95961079
Revision 8
Page 129 of 365

Hardware Configuration

This tool is used to configure and assign parameters to the hardware of an automation project.
Independent of which structure a station has, the following steps can be used:
 Select a hardware component in the hardware “Catalog” window.
 Drag and drop the selected component to the station window.

Notes:
Document number 95961079
Revision 8
Page 130 of 365

Hardware Configuration

The user can select the different viewing options and which toolbars are to be displayed. For these
options, click “View” in the menu bar. The desired options/shortcuts can then be selected.

Notes:
Document number 95961079
Revision 8
Page 131 of 365

Hardware Configuration

Before downloading the hardware configuration to the PLC, the user must click the Save & Compile
button. Then the Download button can be clicked to download the configuration to the device.

Notes:
Document number 95961079
Revision 8
Page 132 of 365

Hardware Configuration

CPU Information
To view the CPU information:
1. Double click on the CPU (Slot 2 of the main rack) in the hardware configuration window.
2. The CPU properties window will appear.

CPU Properties
General
It provides information on the type and location of the module, Short description and module
information below it, Order number / firmware version, Name field that provides a short description of
the module.

Startup
IT determines the startup behavior of the CPU.

Protection
Here you can select one of three protection levels to protect the CPU from unauthorized access.
Document number 95961079
Revision 8
Page 133 of 365

This is an overview of the basic CPU properties. For more detailed CPU properties related information,
check SIMATIC Manager online help (F1).

Notes:
Document number 95961079
Revision 8
Page 134 of 365

Step7 Manager

Project Hierarchy
At first, only the Project Title will be visible with a + beside it. Click on the + to reveal the Station Titles.
At the Station Title level you will find the Hardware Configuration icon on the right side of the screen.
The Station Title will also have a + next to it which will reveal the CPU Configuration folder. Two or
more CPUs may be associated with a single station.

Clicking on the + next to the CPU Configuration folder will reveal the Program Title. This is the folder
where the program and symbol information can be found. The two folders below the Program Title
folder contain the program information. The Source File Folder is used for saving text or graphics
source files. The Blocks folder contains all the logic executed by the CPU. More than one program may
exist for a project, but only one can be within the Station Title folder.

An S7 Program contains the following objects:


• Blocks: where logic code is stored (OBs, FCs, FBs and DBs) that can later be downloaded to the CPU.
• Sources: for storing source programs that are created with text editors, for example, for STL.
Document number 95961079
Revision 8
Page 135 of 365

• Symbols: where you declare symbols (names) for global S7 addresses such as inputs, outputs, bit
memories, timers, counters.

Notes:
Document number 95961079
Revision 8
Page 136 of 365

Step7 Manager

Notes:
Document number 95961079
Revision 8
Page 137 of 365

PG/PC INTERFACE

Notes:
Document number 95961079
Revision 8
Page 138 of 365

PG/PC Interface

Connecting the PG/PC to the PLC can be accomplished using one of the following interface methods:
 PC Adapter MPI.
 CP5711 MPI.
 Ethernet TCP/IP.

Notes:
Document number 95961079
Revision 8
Page 139 of 365

PG/PC Interface

Whichever method is used to connect to the PLC, the user must select the desired PG/PC interface in
the SIMATIC Manager:
1. Click “Options” tab in the menu bar of SIMATIC Manager.
2. Click “Set PG/PC Interface” from the drop down menu.

Notes:
Document number 95961079
Revision 8
Page 140 of 365

MPI Adapter

PC Adapter MPI is a PC adapter USB A2 (USB v2.0) for connecting a PG/PC or Notebook to SIMATIC S7
via PROFIBUS or MPI USB cable 5m included MPI cable 0,3m. Can be used under WINXP / Vista /
Windows 7 both 32 bit and 64 bit.

MPI Multi-Point Interface network is one method that is used to communicate with the PG/PC. This
network allows communication speed up to 187.5 kbps. However, when using a PC, speed is limited to
either 19.2 kbps or 38.4 kbps. Ensure that the correct address is selected as every node on the network
must have a unique address.

Note:
 With Windows 7, by default the PC adapter setting is USB and there is no choice for selecting Com
ports. Users that have Windows 7 need to use the latest PC adapter USB version as there is no
driver for windows 7 for the old PC adapter using Com ports.

Notes:
Document number 95961079
Revision 8
Page 141 of 365
Document number 95961079
Revision 8
Page 142 of 365

CP 5711

CP 5711 MPI is a Communications processor CP5711 USB-adaptor (USB v2.0) for connecting a PG or
notebook to PROFIBUS or MPI, contains 2m USB cable with speed up to 12 Mbit/s. This adapter can
connect to any PROFIBUS device.

To set up the transmission rate and address, select the CP5711.MPI.1 interface assignment and then
left click on properties for the window to open. Remember that the address needs to be unique to
avoid clashes.

Notes:
Document number 95961079
Revision 8
Page 143 of 365

CP 5711

Using this diagnostics function in the PG/PC interface, you can check whether your communications
module is ready for operation. If the CP5711 is ready for operation, the module's bus parameters and
version data are displayed.
1. Select CP5711.MPI.1 .
2. Click “Diagnostics” for the diagnostics window to appear.
3. Click “Test” to test the selected connection is established or not.
4. Click “Read” to read the bus nodes.

Notes:
Document number 95961079
Revision 8
Page 144 of 365

Ethernet

When connecting your laptop to the network you have to consider your laptops IP address. Newer rigs
will have a DHCP (Dynamic Host Configuration Protocol) server that will issue your laptop with an IP
address automatically. Older rigs will not have this server, this will require you to setup a static IP
address for your laptop. When setting a static IP address care has to be taken to not choose an IP
identical to equipment. Choosing the same IP as the equipment may result in equipment loosing
communication.

Notes:
Document number 95961079
Revision 8
Page 145 of 365

Ethernet

Notes:
Document number 95961079
Revision 8
Page 146 of 365

Ethernet

Notes:
Document number 95961079
Revision 8
Page 147 of 365

Ethernet

Notes:
Document number 95961079
Revision 8
Page 148 of 365

IT Security

Service personnel are not allowed to be both hooked up to DCN (Drilling Control Network) and Internet
at the same time. The service personnel computer needs to have the common NOV Anti-Virus /
Malware Protection software installed.
Wireless connection to the DCN is prohibited.
Service personnel are not allowed to hook up their computer to any control system network apart
from the Drilling Control Networks (DCN).
Cyberbase System IT Security Policy Overview: CYBERBASE-SEC-010

Notes:
Document number 95961079
Revision 8
Page 149 of 365

ONLINE TROUBLESHOOTING TOOLS

Notes:
Document number 95961079
Revision 8
Page 150 of 365

Accessible Nodes

After configuring an online connection between the programming device and the PLC via a suitable
interface, you can then access the PLC via the online window of the project or the Accessible Nodes
window to verify that the connection is established.

Notes:
Document number 95961079
Revision 8
Page 151 of 365

Online / Offline View

Offline View
In the project window of the SIMATIC Manager, the offline view displays the project structure stored
on the hard disk of the programming device. The S7 Program folder contains the Sources and Blocks
objects. The Blocks folder contains the system data created with the Hardware Configuration tool and
the blocks created with the LAD/STL/FBD Editor.

Online View
The online view shows the offline project structure in the right window and in the left window it shows
the blocks stored online in the selected CPU. As a result, the S7 Program seen in the online view only
contains the Blocks folder which contains the following objects:
 System data blocks (SDB).
 User blocks (OB, FC, FB).
 System blocks (SFC, SFB).

Changing Views
Changing between offline and online view takes place:
Document number 95961079
Revision 8
Page 152 of 365

 Through the View → Offline or View → Online menu items.


or
 With the corresponding symbol in the toolbar.

Notes:
Document number 95961079
Revision 8
Page 153 of 365

Review of lesson objectives

Notes:
Document number 95961079
Revision 8
Page 154 of 365

Review of lesson goal

Notes:
Document number 95961079
Revision 8
Page 155 of 365

HARDWARE CONFIGURATION TOOL

Notes:
Document number 95961079
Revision 8
Page 156 of 365
Document number 95961079
Revision 8
Page 157 of 365

MODULE SETTINGS

Notes:
Document number 95961079
Revision 8
Page 158 of 365

Hardware Configuration

Notes:
Document number 95961079
Revision 8
Page 159 of 365

Hardware Configuration

Save & Compile


Before downloading the hardware configuration to the PLC, the user must click the Save & Compile
button. Then the Download button can be clicked to download the configuration to the device.

Notes:
Document number 95961079
Revision 8
Page 160 of 365

Hardware Configuration

Consistency Check
This menu command checks the current configuration and parameters of the programmable controller
for consistency, that is, whether configuration data can be created from the entries.

Notes:
Document number 95961079
Revision 8
Page 161 of 365

Digital Input/Output Modules

To change module specific settings you can right click on the module and select “object properties”.

Notes:
Document number 95961079
Revision 8
Page 162 of 365

Analog Input/Output Modules

To change module specific settings you can right click on the module and select “object properties”.

Notes:
Document number 95961079
Revision 8
Page 163 of 365

Central Processing Unit

Notes:
Document number 95961079
Revision 8
Page 164 of 365

HARDWARE DIAGNOSTIC TOOLS

Notes:
Document number 95961079
Revision 8
Page 165 of 365

Hardware Diagnostic Tools

In order to view the actual hardware diagnostics, the user will need to go “Online” to view what is
happening in with the hardware.

Notes:
Document number 95961079
Revision 8
Page 166 of 365

Diagnostic Buffer

To view the CPU status specifically:


 Right Click on the CPU
 Click “Module Information”

By selecting the “Diagnostics Buffer” in the online Module Information window, the user can view the
CPU fault history. This is useful for troubleshooting when the SF light on the CPU module is illuminated.

This diagnostic information can be printed, and the number of events that are recorded can be
adjusted.

Notes:
Document number 95961079
Revision 8
Page 167 of 365

Module specific

Notes:
Document number 95961079
Revision 8
Page 168 of 365

Module specific

Notes:
Document number 95961079
Revision 8
Page 169 of 365

Review of lesson objectives

Notes:
Document number 95961079
Revision 8
Page 170 of 365

Review of lesson goal

Notes:
Document number 95961079
Revision 8
Page 171 of 365

SIMATIC MANAGER STRUCTURE

Notes:
Document number 95961079
Revision 8
Page 172 of 365
Document number 95961079
Revision 8
Page 173 of 365

BLOCK ARCHITECTURE

Notes:
Document number 95961079
Revision 8
Page 174 of 365

Block Types

Block Types
Organization Block (OB1)
In STEP 7, Organization Block (OB1) is processed cyclically by the CPU. The CPU reads line by line and
executes the program commands. When the CPU returns to the first program line, it has completed
exactly one cycle. The time required for this is known as the scan cycle time.

Function Block (FB)


The Function Block (FB) is below the organization block in the program hierarchy. It contains a part of
the program which can be called many times in (OB1). All the formal parameters and static data of the
function block are saved in a separate data block (DB), which is called instance data block and is
assigned to the Function Block.

Function (FC)
The Function (FC) is also below the organization block in the program hierarchy. In order for a function
to be processed by the CPU, it must also be called in the block above it in the hierarchy. In contrast to
the function block, however, no instance data block is necessary.
Document number 95961079
Revision 8
Page 175 of 365

Data Block (DB)


The Data Block (DB) is used by logic blocks (including OB1) of the user program for storing values.
Unlike the temporary data, the data in data blocks is not overwritten when execution of the logic block
is completed or when the (DB) is closed. The user program can access the data in a data block with bit,
byte, word or doubleword operations. Symbolic or absolute addresses can be used.

Instance Data Block (DB)


In order for you to be able to program the call for a Function Block in (OB1) later on, you must
generate the corresponding data block. An instance Data Block is always assigned to a Function Block.

Notes:
Document number 95961079
Revision 8
Page 176 of 365

Program Structure

There are a number of programming structures that can be used to meet a program’s requirements.
Usually, there is a company convention that guides the programming structure that is used for each
program. This helps maintain uniformity. If not, the programmer can use whichever he feels
comfortable with.

Linear Program
All instructions are found in one block (OB1).

Structured Program
Reusable functions are loaded into individual blocks. OB1 and other blocks call these blocks and pass
on the pertinent data.

Notes:
Document number 95961079
Revision 8
Page 177 of 365

Example

Example of a Program Structure


OB: Organization Blocks
FC: Function.
FB: Function Block.
SFC: System Function.
SFB: System Function Block.
DB: Data Block (Global or Instance).

Notes:
Document number 95961079
Revision 8
Page 178 of 365

SCAN CYCLE

Notes:
Document number 95961079
Revision 8
Page 179 of 365

Process Images

If access is made to the inputs and outputs via the operands I... or Q... in the user program, then there
is no direct access to the input/output modules. In this case, access is made to a memory area in the
CPU's system memory. This area is called the process image of the inputs (PII) and the process image of
the outputs (PIQ).

The Process-Image Input (PII) table is in the CPU’s memory area and contains the signal state of all
inputs. The Process-Image Output (PIQ) table contains the Output values that result from the executed
program. At the end of the cycle, these outputs are then sent to the physical output card.

Notes:
Document number 95961079
Revision 8
Page 180 of 365

Cycle

The Scan Cycle has the form of the accompanying flow diagram. The Input signals from the process
input modules (PII) are checked before the program is executed on each scan cycle.

The process image output (PIQ) is updated at the end of the program execution. This means that if an
output is updated more than once during the program execution, only the last update instruction
result will be transferred to the output.

The program is processed cyclically in the following order:


1. Processing of internal jobs of the CPU's operating system.
2. Reading of the input states from the modules into the OB1 process image of the inputs.
3. Processing of the user program in OB1.
4. Writing of states from the OB1 process image of the outputs to the outputs of the modules.
5. Continue with Step 1.

Notes:
Document number 95961079
Revision 8
Page 181 of 365
Document number 95961079
Revision 8
Page 182 of 365

PROGRAM EDITOR

Notes:
Document number 95961079
Revision 8
Page 183 of 365

Program Editor

The “Program Editor” can be opened by double-clicking on the desired block in SIMATIC Manager. The
“Declaration Table” is used to declare variables and parameters for the block. The “Code Section”
contains the actual program written in the selected programing language. The program may be written
with multiple networks. The “Detail Window” displays the following information relating to the code,
such as:
 Errors.
 Additional information.
 Cross references.
 Address Information.
 Address modification.
 Diagnostics.
 Comparisons.

Notes:
Document number 95961079
Revision 8
Page 184 of 365
Document number 95961079
Revision 8
Page 185 of 365

Views

Program Languages
There are three programming languages used by NOV. Each has its own syntax, and when the correct
rules are followed, the user can convert the code from one language to another.

Ladder (LAD)
Ladder diagram resembles a circuit diagram. It uses contacts and coils symbols to denote inputs and
outputs. People with an electrical background can relate to this language more comfortably.

Function Block Diagram (FBD)


Function Block Diagram uses boxes for each function that represents a logic gate or operation. Even
people with non-programming backgrounds can work with this language if they understand Logic
operations.

Statement List (STL)


Document number 95961079
Revision 8
Page 186 of 365

Statement List is an instruction based language. STEP 7 has a list of instruction that are used to perform
a certain function. This programming language is preferred by people who already have a
programming background. It's seen as more complex, but has greater capabilities.

Structured Control Language(SCL)


Structure Control Language (SCL) is a PASCAL-oriented high-level language for programming PLCs with
SIMATIC S7. S7-SCL is particularly suitable for the following tasks:
- Programming of complex algorithms
- Programming of mathematical functions
- Data and recipe management
- Process optimization

Notes:
Document number 95961079
Revision 8
Page 187 of 365

Views

Select the Programming Language


The View tab in the menu bar allows the user to select the programming language for the code in the
block. A black dot indicates which language is currently been selected. The user can change the
language of the code in this block when the block is created, or later on if the correct rules have been
adhered to. LAD/FBD code will convert to STL, though the resulting STL code may not be the most
efficient manner of doing it. Converting from STL to LAD/FBD is not always possible. If not, the section
of code will remain in STL form. No sections of code are lost in the conversion.

Notes:
Document number 95961079
Revision 8
Page 188 of 365

Online Tools

Online Debugging
To monitor a program or block from the “Program Editor”, the user must ensure that the offline
program has been downloaded to the device and is identical. Then when the offline program and the
online program on the PLC are checked to be the same, the user can click on the glasses (monitor)
from the Toolbar to activate the debugging (monitoring) mode. The “Title Bar” will be highlighted in
light blue, to indicate that the debugging mode is active. The user can now view the status of the
variables, IOs and instructions in real time. This is used for troubleshooting.

Note
Before making any changes to the code, the user should deactivate the monitoring mode .

Notes:
Document number 95961079
Revision 8
Page 189 of 365

F1 Help File

The Step 7 Suite has some very good help files. To get help on a specific object or topic, click on the
item in Step 7 and press the “F1” key. Take note of which program you have open in the suite. Pressing
“F1” while in the SIMATIC Manager will take you to the help file called “Help on SMAITC Manger”.
Opening up another program like the “Program Editor” and hitting”F1” will take you to a different help
file.

Notes:
Document number 95961079
Revision 8
Page 190 of 365

F1 Help File

The Step 7 Suite has some very good help files. To get help on a specific object or topic, click on the
item in Step 7 and press the “F1” key. Take note of which program you have open in the suite. Pressing
“F1” while in the “Program Editor” will take you to the help file called “Help on Programming S7
Blocks”

Notes:
Document number 95961079
Revision 8
Page 191 of 365

PROGRAMMING LANGUAGES

Notes:
Document number 95961079
Revision 8
Page 192 of 365

Ladder

Notes:
Document number 95961079
Revision 8
Page 193 of 365

Ladder

Notes:
Document number 95961079
Revision 8
Page 194 of 365

FBD

Notes:
Document number 95961079
Revision 8
Page 195 of 365

FBD

Notes:
Document number 95961079
Revision 8
Page 196 of 365

FBD

Notes:
Document number 95961079
Revision 8
Page 197 of 365

STL

AND logic (Series Circuit)


The AND instruction operates the same way as Boolean AND logic. AND instruction scans for a HIGH
signal. It is comparable to a series branch in ladder logic, with the assigned output bit (e.g. Q0.0)
turning ON only when both of the bits assigned to the AND instructions (e.g. I0.0 and I0.1) are high.
For the Q0.0 to switch on, I0.0 should be ON AND I0.1 should be ON.

Notes:
Document number 95961079
Revision 8
Page 198 of 365

STL

AND NOT logic (Series Circuit)


The AND NOT instruction operates in a similar way as the Boolean AND logic. AND NOT instruction
scans for a LOW signal. It is comparable to a series branch in ladder logic, with the assigned output bit
(e.g. Q0.0) turning ON only when both of the bits assigned to the AND instructions (e.g. I0.0 and I0.1)
are LOW. For the Q0.0 to switch on, I0.0 should be OFF AND I0.1 should be OFF.

Notes:
Document number 95961079
Revision 8
Page 199 of 365

STL

OR Logic (Parallel Circuit)


The OR instruction operates the same way as Boolean OR logic. OR instruction scans for a HIGH signal.
It is comparable to a parallel branch in ladder logic, with the assigned output bit (e.g. Q0.0) turning ON
when either of the bits assigned to the OR instructions (e.g. I0.0 and I0.1) For the Q0.0 to switch on,
I0.0 should be ON OR I0.1 should be ON.

Notes:
Document number 95961079
Revision 8
Page 200 of 365

STL

OR NOT Logic (Parallel Circuit)


The OR NOT instruction operates the same way as Boolean OR logic. OR NOT instruction scans for a
LOW signal. It is comparable to a parallel branch in ladder logic, with the assigned output bit (e.g. Q0.0)
turning ON when either of the bits assigned to the OR NOT instructions (e.g. I0.0 and I0.1) is OFF. For
the Q0.0 to switch on, I0.0 should be OFF OR I0.1 should be OFF.

Notes:
Document number 95961079
Revision 8
Page 201 of 365

STL

Notes:
Document number 95961079
Revision 8
Page 202 of 365

STL

Result of Logic Operation


The result of logic operation takes the results of the previous checks also into account.

“A” / “AN” Instruction


These instruction require the previous RLO to be “1” AND the current result of check to be “1”. Only
then will the new RLO become “1” else the new RLO will be “0”.

“O” / “ON”
These instruction require the previous RLO to be “1” OR the current result of check to be “1”. If either
are “1” then the new RLO become “1”. The new RLO will only be “0” if both the previous RLO and the
current result of check is “0”.

Notes:
Document number 95961079
Revision 8
Page 203 of 365

STL

Notes:
Document number 95961079
Revision 8
Page 204 of 365

STL

Notes:
Document number 95961079
Revision 8
Page 205 of 365

STL

Notes:
Document number 95961079
Revision 8
Page 206 of 365

STL

Notes:
Document number 95961079
Revision 8
Page 207 of 365

STL

First Check
The First Check (FC) is accepted as the new RLO for a check instruction that directly follows an RLO
limiting operation (such as =, S, R, CU), regardless of the previous RLO.

Signal State (Status)


Represents the current state of the signal, whether inputs (I), outputs (Q), memories (M), timers (T), or
counters (C) or Data bits (D).
An example is when there is 24V at the input of I0.0, the first check will be “1”. OV on the input will
yield a “0”.

Result of Check
Represents whether or not the check condition is met. If the check condition is fulfilled, the result of
check is “1”. If the check condition is not fulfilled, the result of check is “0”.

Result of Logic Operation (RLO)


When the next check instruction is executed, the RLO is compared to the Result of Check and the new
instruction’s RLO is obtained.
Document number 95961079
Revision 8
Page 208 of 365

After the last instruction in a logic operation, the RLO remains the same and many instructions that use
that same RLO can follow (=, S, R, CU).

Notes:
Document number 95961079
Revision 8
Page 209 of 365

SCL

Structured Control Language(SCL)


Structure Control Language (SCL) is a PASCAL-oriented high-level language for programming PLCs with
SIMATIC S7. S7-SCL is particularly suitable for the following tasks:
- Programming of complex algorithms
- Programming of mathematical functions
- Data and recipe management
- Process optimization

Notes:
Document number 95961079
Revision 8
Page 210 of 365

PLC SIMULATOR

Notes:
Document number 95961079
Revision 8
Page 211 of 365

Introduction

In S7-PLCSIM you can execute and test your STEP 7 user program in a simulated programmable logic
controller (PLC). Simulation is executed on your PC or programming device, such as a Field PG. Since
the simulation is implemented completely in the STEP 7 software, you do not require any S7 hardware
(CPU or signal modules). You can use S7-PLCSIM to simulate STEP 7 user programs that were
developed for S7-300, S7-400 and WinAC controllers. It cannot simulate hardware faults.

Selecting the “Always On Top Command” will keep the S7-PLCSIM in front of any other concurrently
running applications. This can be very useful when wanting to monitor code in the Program Editor
while changing a value in the PLCSIM.

Notes:
Document number 95961079
Revision 8
Page 212 of 365

Difference from a “real” PLC

The simulated PLC provides the following functionalities that are not available in a "real" PLC:

The “Pause” command halts the simulated CPU and allows you to resume the execution of the
program at the instruction where the program was halted.

When you put the simulated CPU in STOP mode, S7-PLCSIM does not change the status of the outputs.
When you select the RUN mode selector position you cannot download a STEP 7 user program or use
the STEP 7 tools to change any parameters. A real S7 PLC allows program download and parameter
changes when the RUN mode selector is set.

S7-PLCSIM supports four accumulators (like an S7-400 CPU). In certain special cases, a program in S7-
PLCSIM (with four accumulators) can behave differently from the same program running on an S7-300
CPU, (with only two accumulators).
Document number 95961079
Revision 8
Page 213 of 365

Any change that you make with a view object immediately updates the contents of the memory
location. The simulated CPU does not wait until the beginning or end of the scan in order to update any
changed data.
Scan mode options allow you to select how the CPU runs the program:
Single Scan
Continuous Scan

Timers can be automatically processed or values can be entered manually. You can also reset timers
globally or individually.
You can manually trigger the error and interrupt OBs:
OB40 to OB47 (hardware interrupt)
OB70 (I/O redundancy error)
OB72 (CPU redundancy error)
OB73 (communication redundancy error)
OB80 (time error)
OB82 (diagnostic interrupt)
OB83 (insert/remove interrupt)
OB85 (program sequence error)
OB86 (rack failure).
Process image and peripheral memory: When you change a value in the process input image, S7-
PLCSIM copies it immediately to I/O area of the inputs. This way, when the I/O area input value is
written to the process input image at the beginning of the next scan, the desired change is not lost.
Correspondingly, when you make a change to an I/O area output value, it is copied immediately to
process output image.

When modifying variables in a simulated CPU from a STEP 7 variable table, you must ensure that
process image updates do not overwrite or overlay your intended modification. Set the trigger points
for modifying variables as follows:
For inputs, select "Beginning of scan cycle" as the "Trigger Point for Modifying".
For outputs, select "End of scan cycle" as the "Trigger Point for Modifying".

Notes:
Document number 95961079
Revision 8
Page 214 of 365

Modules

Vertical Bits
You can use the Vertical Bits view object with bit or byte addresses. You can see the symbolic or
absolute addresses of all bits in the "Vertical Bits" view object. You can monitor and control the
following data:
Peripheral (external) input and output variables: You can access the peripheral input (PI) and
peripheral output (PQ) memory areas of the CPU. S7-PLCSIM displays a yellow background for the view
object if the variable address corresponds to F-System peripheral I/O.
Process-image inputs and outputs: You can access the input (I) and output (Q) memory areas of the
CPU. By default, the CPU overwrites the I memory with the PI memory at the beginning of every scan.
If you change an I memory value, the simulation immediately copies the changed value to the
peripheral area. This way, the desired change is not lost when the peripheral value overwrites the
process input value on the next scan.
Bit memory: you can access the variables stored in the bit memory (M) area of the CPU.
Data blocks: you can access the data stored in the data blocks of the program.

Input Variable (F2)


Document number 95961079
Revision 8
Page 215 of 365

This view object allows you to monitor and modify the following data:
 Peripheral (external) input variables: You can access the peripheral input (PI) memory areas of the
CPU. S7-PLCSIM displays a yellow background for the view object if the variable address
corresponds to F-System peripheral I/O.
 Process input images: You can access the input (I) memory areas of the CPU. By default, the CPU
overwrites the I memory with the PI memory at the beginning of every scan. If you change an I
memory value, the simulation immediately copies the changed value to the peripheral area. This
way, the desired change is not lost when the peripheral value overwrites the process input value
on the next scan.
Note You can choose the numeric data format for the input variable and you can also use symbolic
addressing if you have attached symbols. You can also view input variables with a Vertical Bits View
Object.

Output Variable (F3)


This view object allows you to monitor and modify the following data:
 Peripheral (external) output variables: You can access the peripheral output (PQ) memory areas of
the CPU. Any change to a PQ memory value immediately updates the corresponding output (Q)
memory value. S7-PLCSIM displays a yellow background for the view object if the variable address
corresponds to F-System peripheral I/O.
 Process output images: you can access the output (Q) memory areas of the CPU. During the scan
cycle, the program calculates output values and places them in the process-image output table. At
the end of the scan cycle, the operating system reads the calculated output values from this table
and sends them to the process outputs. The process output image table maps the first 512 bytes
(CPU-dependent) of the peripheral output memory.
Note You can choose the numeric data format for the output variable and you can also use symbolic
addressing if you have attached symbols. You can also view output variables with a Vertical Bits View
Object.

Timer(F11)
This view object allows you to monitor and modify any timer used by your program. The timer view
object displays the name of the timer, the actual timer value, and the time base.
Note If you change the time base, the actual timer value changes, while the displayed value remains
the same. This is because the actual timer value is the product of the displayed value and the time
base. For example, if the value of timer T 0 is 600 and the time base is 10 ms, this represents a timer of
6 seconds. If you change the time base to 100 ms, then the actual timer value becomes 60 seconds.
(600 * 100 ms = 60 seconds)

Counter (F12)
This view object allows you to monitor and modify the counters used by your program. This view
object opens with a default memory location of C 0.

Notes:
Document number 95961079
Revision 8
Page 216 of 365

Symbolic Addressing

Click or select the menu command Tools > Options > Attach Symbols to use symbolic addressing in
your simulated program. This menu command invokes a dialog box where you can choose the STEP 7
symbol table to be referenced.
Once you have attached a symbol table, you can use the Show Symbols, Reference Data, and Symbol
Data options.

Notes:
Document number 95961079
Revision 8
Page 217 of 365

Download to S7-PLCSIM

Normal Download button can be used to download software to the PLCSIM for testing purposes.
Ensure the PLCSIM is in “STOP” or “RUN-P” mode. It will not allow download if the PLCSIM is in “RUN”
mode.
Once the software has been downloaded you can put the PLCSIM in “RUN” or “RUN-P” mode.

Notes:
Document number 95961079
Revision 8
Page 218 of 365

Help File

For more information on the S7-PLCSIM you can access the “S7-PLCSIM Help File” by pressing F1 or
clicking on the context sensitive help and clicking on the object you need help on.

Notes:
Document number 95961079
Revision 8
Page 219 of 365

REFERENCE DATA TABLE

Notes:
Document number 95961079
Revision 8
Page 220 of 365

Overview

By selecting Cross-references in the Reference Data options, the accompanying table appears.
The Cross Reference list gives you information on which addresses are used and in which blocks they
are used in.

Other than the location, it also indicates:


 The language it is written in
 Whether the program is reading or writing to the location

By adding a filter, only the selected addresses will be displayed. The yellow indicates that a filter is
active.
By clicking on the Filter Reference Data button (left of the “filtered” block) the filter selections can be
made in the window.

Notes:
Document number 95961079
Revision 8
Page 221 of 365
Document number 95961079
Revision 8
Page 222 of 365

Filter

Notes:
Document number 95961079
Revision 8
Page 223 of 365

Go-To Functions

Go to Location
The Go To Location function is called directly from the program editor and displays only the entries of
the cross reference list that are specific to the desired address.
By selecting “Local Application >>” the next instance where the variable is used in the block will be
called.
Similarly, By selecting “Local Application <<” the previous instance where the variable is used in the
block will be called.

Notes:
Document number 95961079
Revision 8
Page 224 of 365

Go-To Functions

Go to Location
The Go To Location function is called directly from the program editor and displays only the entries of
the cross reference list that are specific to the desired address.
By selecting “Local Application >>” the next instance where the variable is used in the block will be
called.
Similarly, By selecting “Local Application <<” the previous instance where the variable is used in the
block will be called.

Notes:
Document number 95961079
Revision 8
Page 225 of 365

Review of lesson objectives

Notes:
Document number 95961079
Revision 8
Page 226 of 365

Review of lesson goal

Notes:
Document number 95961079
Revision 8
Page 227 of 365

SIMATIC MANAGER NUMERIC SYSTEMS

Notes:
Document number 95961079
Revision 8
Page 228 of 365
Document number 95961079
Revision 8
Page 229 of 365

SIGNAL TYPES

Notes:
Document number 95961079
Revision 8
Page 230 of 365

Signal Types

Signal Types
Controllers use input signals from the field to determine what commands should be sent to control a
process accordingly. These input and output signals could just be on/off, but there are times when the
PLC needs a more accurate representation of a value within a range. Thus, Binary (Digital) and Analog
Signals are used depending on the application.

Binary (Digital) Signal


A Digital signal is either On or Off. The signal state is also referred to as High or Low, with no states
between. Examples of digital inputs are toggle switches, push buttons and proximity switches. Digital
output devices include solenoid valves, contactors, lamps and motor starters.

Analog Signal
Analog signals are continuous and represent a value within a range. There are many possible states, as
opposed to the two states of a digital signal. An input module converts the current level to a digital
(number) representation. Similarly, an output module can convert a digital representation to an actual
Document number 95961079
Revision 8
Page 231 of 365

analog signal. Examples of analog devices include voltage and current sensors, thermocouples,
resistors and resistance thermometers.

Notes:
Document number 95961079
Revision 8
Page 232 of 365

DATA TYPES

Notes:
Document number 95961079
Revision 8
Page 233 of 365

Data Types

Data Types
Overview
Data types determine the properties of data, that is, how the contents of one or more associated
addresses are to be represented and what the permissible range of values is. The data type also
determines which operations can be used and the amount of memory space required.

BOOL, BYTE, WORD, DWORD, CHAR


Variables of the BOOL data type consist of 1 bit. Variables of BYTE, WORD, and DWORD data types are
sequences of 8, 16 and 32 bits respectively. The CHAR data type represents a character in ASCII code.

S5TIME
Variables of the S5TIME data type are required for specifying time values in timer functions. The
format is S5T#, followed by the time. You specify the time in hours, minutes, seconds or milliseconds.
You can enter the timer values with an underline (1h_4m) or without an underline (1h4m).

INT, DINT, REAL


Document number 95961079
Revision 8
Page 234 of 365

Variables of these data types represent numbers that can be used in mathematical operations.

TIME
A variable of data type TIME takes up a doubleword. This variable is used, for example, for specifying
timer values. The contents of the variable are interpreted as a DINT number in milliseconds and can be
either positive or negative.

DATE
A variable of data type DATE is stored in a word in the form of an unsigned integer. The contents of the
variable represent the number of days since 01.01.1990 .

TIME_OF_DAY
A variable of data type TIME_OF_DAY takes up a doubleword. This variable contains the number of
milliseconds since the beginning of the day (0:00 o‘clock) in the form of an unsigned integer.

Notes:
Document number 95961079
Revision 8
Page 235 of 365

Data Types

Basic Data Types


Digital data storage makes use of binary logic (1 or 0) to represent the desired values. The different
data types are used to group data together so nothing gets lost. it's important to know the length of
each data type so that no data is overwritten during variable declaration or transfer.

Bit
One storage bit, either On (1) or Off (0).

Byte
Consists of 8 bits.

Word
Consists of 16 bits or 2 Bytes.

Double Word
Consists of 32 bits or 2 Words.
Document number 95961079
Revision 8
Page 236 of 365

Notes:
Document number 95961079
Revision 8
Page 237 of 365

ADDRESSING

Notes:
Document number 95961079
Revision 8
Page 238 of 365

Addressing

Addressing S7-300 Digital Modules


Slot-Specific Addressing of Modules
The slot-specific addressing is the default addressing mode if you have not yet downloaded any
configuration data to the CPU, every slot number is assigned a module start address. This is a digital or
analog address, based on the type of module.
For details about the Slot-Specific Addressing of Modules, check the additional PDF handout
“Addressing: Slot-specific addressing of module”.

User-Specific Addressing of Modules


User-specific addressing means that you can assign an address of your choice to any module
(SM/FM/CP). The addresses are assigned in STEP 7. There you specify the module start address that
forms the basis for all other addresses of the module.

Advantages of User-Specific Addressing


 Optimization of available address space as there are no address gaps between the modules.
Document number 95961079
Revision 8
Page 239 of 365

 In your standard software configuration, you can define addresses which are independent of the
relevant S7-300 configuration.

Notes:
Document number 95961079
Revision 8
Page 240 of 365

Addressing S7-300 Digital Modules

A correlation can be made between the physical wiring on the cards and the addresses in the PLC. Slot
4 is the first slot that can be used for an IO module, a communication processor (CP) or a function
module (FM).

Addressing Example
I 0.2 consists of input I, byte address 0 and bit address 2.

 The byte address is based on the module start address.


 The bit address is the number printed on the module.
 When the first digital module is located in slot 4, its default start address is 0. The start address of
each further digital module increments by the count of 4.
 The accompanying figure shows how the scheme by which the addresses of the various channels of
a digital input module are derived.

Notes:
Document number 95961079
Revision 8
Page 241 of 365
Document number 95961079
Revision 8
Page 242 of 365

Types of Memory Addressing

The accompanying notation is used when referring to specific addresses.

Memory Area
The following memory areas can be addressed:
 PII (Symbol = I).
 PIQ (Symbol = Q).
 Program Memory (Symbol = M).
 Data Block (Symbol = DB).

Amount of space
The user will define the amount of memory space to look at. These could be:
 X (Bit).
 B (Byte).
 W (Word, 2 Bytes).
 D (Double Word, 4 Bytes).
 R (Real, 4 Bytes).
Document number 95961079
Revision 8
Page 243 of 365

Address
All elements are addressed byte-by-byte. The user can load values to and from the storage area by
addressing the first byte. When using data words, the first byte will be addressed with the operation
and two bytes are loaded, beginning with the first byte of the address. Similarly with double words,
four bytes will be loaded beginning with the first byte entered.

Notes:
Document number 95961079
Revision 8
Page 244 of 365

SYMBOL EDITOR

Notes:
Document number 95961079
Revision 8
Page 245 of 365

Symbol Editor

Symbols
In a STEP 7 program, the user works with addresses such as IO signals, bit memory, counters, timers,
data blocks, and function blocks. These addresses can be accessed in the program absolutely, but the
program will be much easier to read if symbols are used for these addresses (for example,
Motor_A_On). An address in the user program can then be accessed via this symbol.

Notes:
Document number 95961079
Revision 8
Page 246 of 365

Symbol Editor

Symbols

Absolute Addressing
With absolute addressing, the user specifies the address directly (I0.2 or Q4.0). This method can be
used without the use of a symbol table, but the program may become difficult to read and follow.

Symbolic Addressing
With Symbolic addressing, the direct address is assigned a symbolic name (e.g.
SDI_HORN_DRILL_AREA_AW) that can represent it’s use in the program.

The user can store all of these symbols in a Symbol Table.

Notes:
Document number 95961079
Revision 8
Page 247 of 365

Symbol Editor

Symbol Table
Opening the Symbol Table
Every S7 program has its own symbol table. To open the symbol table:
1. Double click on the “S7 Program”.
2. Click on “Symbols” icon.

Notes:
Document number 95961079
Revision 8
Page 248 of 365

Symbol Editor

Symbol Table
Table Structure
In the symbol table, a line is created for every variable. You can then enter the symbol name, the
address, the data type and a comment for the variable in the columns. A blank line is automatically
added at the end of the table for defining a new symbol.

Status Column
Invalid symbol definitions are marked as follows in this column:
= The symbol name or address is identical to another entry in the symbol table.
x The symbol is incomplete (the symbol name and/or the address is missing).

Note
As soon as a symbol table has been created, it is available to all other tools (such as LAD/STL/FBD
Editor, HW-Config, and Monitor/Modify Variables).

Different NOV locations may have different standards for the way symbols are formatted. If
editing/adding check if/which format applies.
Document number 95961079
Revision 8
Page 249 of 365

Notes:
Document number 95961079
Revision 8
Page 250 of 365

Filter & Search

Symbol Table Filter


The filter function is used to display only the symbols that meet the specified filter criteria in the
opened window. To use the filter option:
1. Click “View” tab in the menu bar of the Symbol Editor.
2. Click “Filter” from the drop down menu.
3. The filter window will appear where the user can define one, or multiple filter criteria.

Wildcard characters (*) and (?) can be placed after the input search criteria for the following reasons:
 Asterisk (*) returns all instances that contain the search criteria as well as any number of additional
characters. For example, if the search criteria is T*, all the symbolic names that begin with the
letter T will be returned.
 Question mark (?) ensures that all instances of the search characters that contain one additional
unspecified character are displayed. For example, THERMOELEMENT_? returns all instances with
one varying character, such as THERMOELEMENT_1, THERMOELEMENT_2, etc.

Notes:
Document number 95961079
Revision 8
Page 251 of 365
Document number 95961079
Revision 8
Page 252 of 365

Filter & Search

Symbol Table Sort


The symbols inserted in the table can be sorted in according to the user’s preference, To access the
column sorting conditions:
1. Click “View” tab in the menu bar of the Symbol Editor.
2. Click “Sort” from the drop down menu.
3. The sort window will appear where the user can choose to sort the symbols ascending or
descending according to:
 Symbol Name.
 Address.
 Data Type.

Notes:
Document number 95961079
Revision 8
Page 253 of 365

Filter & Search

Symbol Table Find and Replace


All instances of a text entry in the opened window can be searched or replaced with the Find and
Replace operation. To access it:
1. Click “Edit” tab in the menu bar of the Symbol Editor.
2. Click “Find and Replace” from the drop down menu.
3. The find and replace window will appear.

The text that the user is looking for can be entered into the “Find what” textbox. Once found, it will be
replaced with the text that is inserted in the “Replace with” textbox. The user should insert a wildcard
after the address identifier in the “Find what” textbox so that the desired address can be found. The
*(for no character, or one unspecified) or the ? (for one unspecified character) can be used. For
example, I*2.*

Notes:
Document number 95961079
Revision 8
Page 254 of 365

Creating & Editing Symbols

Notes:
Document number 95961079
Revision 8
Page 255 of 365

Creating & Editing Symbols

Editing Symbols in Program Editor


Symbols can be added and edited in the “Program Editor” without opening the “Symbol Table”. The
assigned names are automatically entered into the “Symbol Table” when inserted using the following
method:
1. Highlight the address field in the Program Editor.
2. Right click and select “Edit Symbols” from the drop down menu.
3. The edit symbols window will appear where the user can enter the symbol name, data type and
a comment.

Note
It’s not possible to add duplicated names in the “Symbol Table”.

Different NOV locations may have different standards for the way symbols are formatted. If
editing/adding check if/which format applies.

Notes:
Document number 95961079
Revision 8
Page 256 of 365
Document number 95961079
Revision 8
Page 257 of 365

Creating & Editing Symbols

Edit Symbols in Hardware Configuration


Symbols can be added and edited in the “Hardware Configuration” tool without opening the “Symbol
table”. The assigned names are automatically entered into the “Symbol Table” when inserted using the
following method:
1. Highlight the required module in the Hardware Configuration.
2. Right Click and choose “Edit Symbols” from the drop down menu.
3. The edit symbols window will appear where the user can enter the symbol name, data type and
a comment.

Note
It’s not possible to add duplicated names in the “Symbol Table”.

Notes:
Document number 95961079
Revision 8
Page 258 of 365

Variable Tables

Notes:
Document number 95961079
Revision 8
Page 259 of 365

Variable Tables

Variable Table (VAT)


The Variable Address Table (VAT) is used to view (monitor) and change (modify) a CPU memory area‘s
address value in a defined format. To create a new VAT, the following steps can be used:
1. Click “Insert” tab in the menu bar of SIMATIC Manager.
2. Click “S7 Block” from the drop down menu.
3. Click “Variable Table” from the drop down menu.
4. The variable table properties window will appear where the user can edit the properties of the
VAT to be created.

Variable tables are only stored in the offline project. If creating VAT tables give them a meaningful
name and comments so that others can use them.

Notes:
Document number 95961079
Revision 8
Page 260 of 365

Variable Tables

VAT and Connection to the CPU


Before the user can monitor or modify any variables in the VAT, there needs to be an established
connection with the CPU. To establish this connection:
1. Click “PLC” tab in the menu bar of the VAT.
2. Click “Connect to” from the drop down menu.
3. The sub-menu will provide three connection options: Configured CPU, Direct CPU, and
Accessible CPU.

Configured CPU
 If the variable table is stored in the Blocks folder of a hardware-dependent S7 program (assigned to
a CPU in the project view), a connection to the station with the MPI address is established.
 If the variable table is stored in the Blocks folder of a hardware-independent S7 program folder
(assigned directly to the project root in the project view), the MPI address of the hardware-
independent S7 program can be established using the Properties dialog of the program folder while
in the online view of the SIMATIC Manager. The option of “hardware-independent S7 program” is
not likely used by NOV.

Direct CPU
Document number 95961079
Revision 8
Page 261 of 365

This command establishes an online connection between the active variable table and the CPU to
which the MPI cable from the PG/PC to the programmable controller is connected.

Accessible CPU
This command establishes an online connection between the active variable table and a CPU that you
select.

Notes:
Document number 95961079
Revision 8
Page 262 of 365

Monitor Variables

Monitor
To display the real-time values, click on the monitor icon (glasses).

Notes:
Document number 95961079
Revision 8
Page 263 of 365

Modify Variables

Modify
The VAT contains a “Modify value” column to drive a memory variable or output to a particular state. It
can be very dangerous to modify any input or output. If it doesn't seem to be updating, the frequency
will need to be set to “Every Cycle”.
 Type the value in the “Modify value” column.
 Click “Modify Variables” button from the toolbar of the VAT.

The modify option must be turned off, or the VAT must be closed, for modified IO to revert to normal
operation.

Note
 Peripheral outputs cannot be monitored in a VAT table but they can be modified (Force).
 Peripheral inputs can be monitored in a VAT table but they cannot be modified (Force).

Notes:
Document number 95961079
Revision 8
Page 264 of 365
Document number 95961079
Revision 8
Page 265 of 365

Triggering

Trigger Point
By specifying trigger points, you decide when the variables you want to modify are assigned fixed
values and when the values of the variables you want to monitor are updated. You must set the trigger
point for modifying and monitoring separately.

Beginning of Scan Cycle


Select this option if you want the variable values to be assigned or updated at the beginning of the
scan cycle.

End of Scan Cycle


Select this option if you want the variable values to be assigned or updated at the end of the cycle.

Transition to STOP
Select this option if you want the variable values to be assigned or updated at the transition from RUN
to STOP.
Document number 95961079
Revision 8
Page 266 of 365

Trigger Condition
By specifying the trigger frequency, you decide whether the values of the variables are assigned only
once when the trigger point is reached or in every scan cycle and whether the values should be
updated once or in every cycle. You must set the trigger frequency for modifying and monitoring
separately

Once
Select this option if you want the fixed variable values to be assigned or updated only once at the
trigger point. In this case, a message tells you whether the set variables could be modified (for
example, not possible for a data word if the appropriate data block is missing).

Every cycle
Select this option if you want the fixed variable values to be assigned or updated in every scan cycle at
the trigger point. In this case, no messages are output to tell you whether the variables could be
modified.

Notes:
Document number 95961079
Revision 8
Page 267 of 365

DATA BLOCKS

Notes:
Document number 95961079
Revision 8
Page 268 of 365

Shared vs Instance

A program contains data that stores information about various process states, as well as signals. This
data is processed by the user program instructions to achieve the desired result.

Variables are used to store data in the user program. These variables are identified by:
Storage location address, such as: PII, PIQ, bit memory, L stack and DB’s.
Data Type

Variables can have a permanent storage location in the process image, bit memory area or in a data
block. They can also be created temporarily in the L stack for use during a block execution.

Another distinction between variables is how accessible they are. There are:
Global variables – which are available to all programming areas
Local variables – which are specific to a OB, FB or FC

Notes:
Document number 95961079
Revision 8
Page 269 of 365
Document number 95961079
Revision 8
Page 270 of 365

Shared vs Instance

Data blocks are used for storing user data. They contain variable data such as numerical values, that
user program needs to use. The Bit, Byte, Word and Double Word values stored in the DB can be
accessed via absolute, or symbolic addresses in the user program.

There are two types of DB’s:


 Global (Shared) – which contain information that all the logic blocks can access
 Instance – which are always assigned to a particular Function Block (FB). The data is only used by
that FB.

Notes:
Document number 95961079
Revision 8
Page 271 of 365

Declaration & Data View

Data Blocks are edited in Declaration View. The variables are organized in table form, with rows
(variables) and columns (characteristics of the variable).

The column characteristics include:


 Address – which is the first byte address occupied by the variable
 Name – symbolic name of the variable
 Type – data type (INT, REAL, BOOL etc.)
 Initial Value – for setting a default value the first time the block is created or edited
 Comment – for additional information on the variable

Data view, as seen in the second window, is used to monitor the online, current variables in the CPU.
The change in view is accomplished via the “View” tab, followed by “Data View” selection.

When you initialize a DB, you overwrite the current values with the defined initialization values. This
must be done in Data View.
Document number 95961079
Revision 8
Page 272 of 365

Notes:
Document number 95961079
Revision 8
Page 273 of 365

Declaring Variables

Notes:
Document number 95961079
Revision 8
Page 274 of 365

DB Addressing

The elements in a DB are addressed byte-by-byte. The user can load values to and from the storage
area by addressing the first byte. When using data words, the first byte will be addressed with the
operation and two bytes are loaded, beginning with the first byte of the address. Similarly with double
words, four bytes will be loaded beginning with the first byte entered.

Remember, each byte has 8 bits.

Notes:
Document number 95961079
Revision 8
Page 275 of 365

DB Addressing

Notes:
Document number 95961079
Revision 8
Page 276 of 365

Uploading DB's

Before uploading a DB. Make sure you compare the two DB’s first to ensure the DB’s are the same size.
If you upload a DB of different size you will loose all symbolic information in the project for that DB.

Notes:
Document number 95961079
Revision 8
Page 277 of 365

Uploading DB's

Notes:
Document number 95961079
Revision 8
Page 278 of 365

Review of lesson objectives

Notes:
Document number 95961079
Revision 8
Page 279 of 365

Review of lesson goal

Notes:
Document number 95961079
Revision 8
Page 280 of 365

SIMATIC PROJECT HANDLING

Notes:
Document number 95961079
Revision 8
Page 281 of 365
Document number 95961079
Revision 8
Page 282 of 365

BACKUP

Notes:
Document number 95961079
Revision 8
Page 283 of 365

Create Project

Upload a Project from a PLC


If changes in Software are necessary, it's good practice to make a backup of the program currently on
the CPU. To do this, first create a new project with SIMATIC Manager:
1. Click “File” tab in the menu bar of SIMATIC Manager.
2. Click “New” from the drop down menu.
3. Give the project a descriptive name.
4. Assign a storage location.

Notes:
Document number 95961079
Revision 8
Page 284 of 365

Upload

Upload a Project from a PLC


Once an empty project is created, the station can be uploaded to the PG/PC using the following steps:
1. Click “PLC” tab in the menu bar of SIMATIC Manager.
2. Click “Upload Station to PG” from the drop down menu.
3.
The node address selection window will appear:
1. Select Rack 0, it’s the default Rack number for all NOV PLCs and Select Slot 2 for S7-300 CPU or
Slot 3 for S7-400 CPU.
2. Either enter the node IP address, or select the station from the accessible nodes list that can
populated by clicking the “View” button.
3. Click “OK” for the station to be loaded.

Notes:
Document number 95961079
Revision 8
Page 285 of 365

ARCHIVE

Notes:
Document number 95961079
Revision 8
Page 286 of 365

Archive

Archive an uploaded Project


The data in a project consists of many different files and can take up a lot of memory space. The
archive function compresses the data to a fraction of the original size and ensures all of the data stays
together. The archive function uses normal file compression software (e.g. WinZip, which must be
installed on the PG/PC) to accomplish this. To archive a project, the following steps can be used:
1. Click “File” tab in the menu bar of SIMATIC Manager.
2. Click “Archive” from the drop down menu.
3. Select the project to be archived from the list of saved project on the PG/PC hard drive.
4. Click “OK”.

Notes:
Document number 95961079
Revision 8
Page 287 of 365

Archive

Archive an uploaded Project


Once the project to archive has been selected:
1. Assign a storage location of the archived project.
2. Give the archived project a descriptive name.
3. Click “Save”.
4. The “Archive – Options” window will appear requesting to archive over multiple data media.
This is not necessary, select “No”.
5. Click “OK” for the project to be archived in a compressed format. This allows the user to
transfer it to portable storage devices if necessary.

Note
It’s a good practice to close all project windows and tools before archiving.

Notes:
Document number 95961079
Revision 8
Page 288 of 365

RETRIEVE

Notes:
Document number 95961079
Revision 8
Page 289 of 365

Retrieve

Retrieve a Project from a Zip File


A previously archived project needs to be retrieved using the SIMATIC Manager. The user cannot unzip
the project directly from the storage drive. To retrieve a project:
1. Click “File” tab in the menu bar of SIMATIC Manager.
2. Click “Retrieve” from the drop down menu.
3. Navigate to the file path in the retrieve window and select the previously archived project that
needs to be retrieved.
4. Click “Open”.
5. Select the directory where the retrieved (uncompressed) project should be saved. “S7Proj” is
the default folder by Siemens.
6. Click “OK” for the archived project to be retrieved. SIMATIC Manager will ask if you like to open
the retrieved project.

Notes:
Document number 95961079
Revision 8
Page 290 of 365

COMPARE

Notes:
Document number 95961079
Revision 8
Page 291 of 365

Compare

Compare Blocks
The user can compare blocks* between offline (PG/PC) and online (PLC) projects or between two
offline projects on the hard disk of the PG/PC. This will indicate any changes that have been made and
in which blocks these changes are found. Remember that program corrections can only be made in the
offline program. To compare the blocks the following steps can be used:
1. Right click on “Blocks” folder in SIMATIC Manager.
2. Click “Compare Blocks” from the drop down menu.
3. Select “ONLINE/Offline” radio button to compare an offline project to the one on the PLC or
Select “Path 1 / Path 2” radio button to compare two offline projects saved on the PG/PC.
4. Click “Compare”.
*For more details on how compare blocks works for different block types, check the additional PDF
handout “How Compare Blocks Works”

Notes:
Document number 95961079
Revision 8
Page 292 of 365
Document number 95961079
Revision 8
Page 293 of 365

Compare

Compare Blocks Results


A list of difference will appear (if there are any).

Note Section
Gives details about the block comparison result.

Details Button
Show time stamp of last modification, size, checksum, etc.

Go To Button
Opens “Program Editor” in which the results of the comparison are displayed.

Print
These results can be printed to PDF to be used as part of a report. This is a very good thing to do before
commencing work, during and after the work has been completed.

Notes:
Document number 95961079
Revision 8
Page 294 of 365
Document number 95961079
Revision 8
Page 295 of 365

Review of lesson objectives

Notes:
Document number 95961079
Revision 8
Page 296 of 365

Review of lesson goal

Notes:
Document number 95961079
Revision 8
Page 297 of 365

DOCUMENTATION

Notes:
Document number 95961079
Revision 8
Page 298 of 365
Document number 95961079
Revision 8
Page 299 of 365

NOV DOCUMENTATION

Notes:
Document number 95961079
Revision 8
Page 300 of 365

NOV Documentation

We have many different methods at NOV. Consult the software change document of the specific
product line. Material shown here outlines the basic generic principles but the detailed steps may vary
between product lines/engineering locations.

Notes:
Document number 95961079
Revision 8
Page 301 of 365

SOFTWARE HANDLING

Notes:
Document number 95961079
Revision 8
Page 302 of 365

Software Handling

-Software backup guidelines for the specific product line


-Always!! Document changes according to the product line.
-What was changed?
-Why was it changed?
-How was is verified?

Reason:
To keep track of changes
Make sure not more than one person is making changes to the same software at the same time
Some customers have an agreement to have access to software for troubleshooting. We need to keep
track of changes for liability.
A detailed report allows us to go back and understand what has been changed.

Notes:
Document number 95961079
Revision 8
Page 303 of 365

NEVER HAND ANY SOFTWARE TO THE CUSTOMER!

NB NEVER HAND ANY SOFTWARE TO THE CUSTOMER!


NB CUSTOMER SHOULD ALWAYS USE DOCUMENT CONTROL!
Using Document control protects yourself and the company.

Some customers have agreements to have customer version of the software. They should use
document control. Never hand software to customer.

Notes:
Document number 95961079
Revision 8
Page 304 of 365

RigDoc/RigOffice

Most of our software handling at NOV is done through RigDoc and RigOffice.
Same server, same content, different ways to access

Make sure you understand the following terms:


Revisions
Archive (Rig office: Release)
Check out
Check in

Notes:
Document number 95961079
Revision 8
Page 305 of 365

RigDoc/RigOffice

Create new Revision


New Revisions are created to move the software from “Archive” (RigOffice: “Release”) to “in-progress”
(RigOffice: “Working”). Only once it is “in-progress” will you be able to check the file out for editing.

Notes:
Document number 95961079
Revision 8
Page 306 of 365

RigDoc/RigOffice

Check out
Once a file is “in-progress” (RigOffice: “Working”) you will be able to right click on the files and select
“check out file”.

Notes:
Document number 95961079
Revision 8
Page 307 of 365

RigDoc/RigOffice

Check in
Once you have made all the changes to the software/document you can save it. In rigdoc you will then
be able to right click on the file and select “Check in file”.

NB If you are checking in software that was created in Step 7 you will have to archive the project with
the new changes inside the Step 7 software. This will create a new “.zip” file. When checking it in in
RigDoc/RigOffice it will prompt you to select the file from your computer. Remember to select the new
”.zip” file that includes the changes. RigDoc/RigOffice will then remove the file from its location on
your computer and place it in RigDoc/RigOffice. If you want to keep a copy remember to copy it before
checking it back in.

Notes:
Document number 95961079
Revision 8
Page 308 of 365

RigDoc/RigOffice

Check in
Files can also be checked in using the “RigDocument” ribbon available in Microsoft office package.

Notes:
Document number 95961079
Revision 8
Page 309 of 365

RigDoc/RigOffice

Archive
Once all the files is “checked in” you can then archive (RigOffice: “Release”) the version. Archiving the
files will move it from “In-Progress” (RigOffice: “Working”) to Archived (RigOffice: “Released”). Once
archived you will not be able to make any changes to that version or be able to remove it.

If you no longer want to archive the project, because no changes were made, you may select “Delete
Revision”.

Once this revision moves to Archived, the previous revision will move to “Superseded”.

Notes:
Document number 95961079
Revision 8
Page 310 of 365

CUSTOMER DOCUMENTATION

Notes:
Document number 95961079
Revision 8
Page 311 of 365

Customer Documentation

Don’t give out detailed change logs of the customer


Some customers have their own software change document.
Before downloading to PLC.
Techs are expected to sign these documents, but always involve your service manager before signing
any customer documentation.

Customer Specific
 What was changed?
 Why was it changed?
 How was is verified?

Notes:
Document number 95961079
Revision 8
Page 312 of 365

SIEMENS DOCUMENTATION

Notes:
Document number 95961079
Revision 8
Page 313 of 365

Siemens Documentation

 Siemens Website: support.industry.siemens.com


 Documentation in Step 7
 Help Files (F1)
 Siemens Manuals
 Siemens Automation/Manuals/English
 Siemens Automation/SIMATIC/Documentation/English

Notes:
Document number 95961079
Revision 8
Page 314 of 365

NOV CONTACTS

Notes:
Document number 95961079
Revision 8
Page 315 of 365

NOV Contacts

Its good practice for your first contact point to be Tech Support. You should first contact your local tech
support, before contacting the tech support in the centre of excellence for the product.

Don’t just phone the “Document Responsible” as you first contact. Tech Support will contact them if
needed.

Notes:
Document number 95961079
Revision 8
Page 316 of 365

Review of lesson objectives

Notes:
Document number 95961079
Revision 8
Page 317 of 365

Review of lesson goal

Notes:
Document number 95961079
Revision 8
Page 318 of 365

INTRODUCTION TO SERVICELAB

Notes:
Document number 95961079
Revision 8
Page 319 of 365
Document number 95961079
Revision 8
Page 320 of 365

SERVICELAB

Notes:
Document number 95961079
Revision 8
Page 321 of 365

Introduction

Notes:
Document number 95961079
Revision 8
Page 322 of 365

Introduction

Service lab can monitor the following:


 Analog inputs
 Analog outputs
 Digital inputs
 Digital outputs
 Counters
 Data blocks


Notes:
Document number 95961079
Revision 8
Page 323 of 365

CONNECTION

Notes:
Document number 95961079
Revision 8
Page 324 of 365

Connection Types

Notes:
Document number 95961079
Revision 8
Page 325 of 365

Startup

Notes:
Document number 95961079
Revision 8
Page 326 of 365

Ethernet

Notes:
Document number 95961079
Revision 8
Page 327 of 365

Ethernet

Notes:
Document number 95961079
Revision 8
Page 328 of 365

SIMATIC Connections

Notes:
Document number 95961079
Revision 8
Page 329 of 365

SIMATIC Connections

Notes:
Document number 95961079
Revision 8
Page 330 of 365

DATA LOGGING

Notes:
Document number 95961079
Revision 8
Page 331 of 365

Time Bases Settings

Notes:
Document number 95961079
Revision 8
Page 332 of 365

Opening a Project File

Notes:
Document number 95961079
Revision 8
Page 333 of 365

Modules

Notes:
Document number 95961079
Revision 8
Page 334 of 365

Modules

Notes:
Document number 95961079
Revision 8
Page 335 of 365

Modules

Notes:
Document number 95961079
Revision 8
Page 336 of 365

Modules

Notes:
Document number 95961079
Revision 8
Page 337 of 365

Modules

Notes:
Document number 95961079
Revision 8
Page 338 of 365

Start Logging

When logging bool (True/False) signals in service lab it will be represented by TTL 5 for True and 0 for
false.

Notes:
Document number 95961079
Revision 8
Page 339 of 365

Sampling_Time_Miss (STM)

Normally, the value of STM increases slightly in the beginning and stabilize.
 If the value of STM counter increases constantly, it means sampling rate is set to a very high value.
 In case the STM is set too high, the module text color changes to grey.

Notes:
Document number 95961079
Revision 8
Page 340 of 365

Time Control

Use this dialog box to start and to end a measurement time controlled or to repeat the measurement
periodically. When you close this dialog box you enable the time-controlled measurement.

Start the measurement


These settings specify when ServiceLab starts the measurement after the dialog box closes.
Start measurement time-controlled — Enables the time-control.
Start time — Specifies when the measurement starts.
Time — Specifies the point in time when ServiceLab starts the measurement.
Offset — Specifies period after which ServiceLab starts the measurement.
Day, Hour, Minute, Second — Specifies the start time.

Duration of a Measurement
These settings specify how long ServiceLab executes a measurement.
Stop measurement — Specifies that ServiceLab ends or interrupts the time-controlled measurement
after a specified period of time.
Measurement time — Specifies duration of a measurement.
Document number 95961079
Revision 8
Page 341 of 365

Days, Hours, Minutes, Seconds — Specifies the start time.

Periodic Measurement Restart


These settings specify whether and when ServiceLab repeats a measurement periodically.
Restart measurement — Specifies that ServiceLab repeats a measurement periodically.
Measurement interrupt — Specifies for how long the individual measurements are interrupted.
Days, Hours, Minutes, Seconds — Specifies the measurement interruption.

Notes:
Document number 95961079
Revision 8
Page 342 of 365

TECH SUPPORT COMMUNICATION

Notes:
Document number 95961079
Revision 8
Page 343 of 365

Tech Support Communication

Notes:
Document number 95961079
Revision 8
Page 344 of 365

Review of lesson objectives

Notes:
Document number 95961079
Revision 8
Page 345 of 365

Review of lesson goal

Notes:
Document number 95961079
Revision 8
Page 346 of 365

INTRODUCTION TO PLC LOGGER

Notes:
Document number 95961079
Revision 8
Page 347 of 365
Document number 95961079
Revision 8
Page 348 of 365

INTRODUCTION

Notes:
Document number 95961079
Revision 8
Page 349 of 365

Introduction

Notes:
Document number 95961079
Revision 8
Page 350 of 365

CONNECTION

Notes:
Document number 95961079
Revision 8
Page 351 of 365

Startup

Notes:
Document number 95961079
Revision 8
Page 352 of 365

Setup

Notes:
Document number 95961079
Revision 8
Page 353 of 365

DATA LOGGING

Notes:
Document number 95961079
Revision 8
Page 354 of 365

Setup Application

Notes:
Document number 95961079
Revision 8
Page 355 of 365

Setup Application

Notes:
Document number 95961079
Revision 8
Page 356 of 365

Setup Application

Notes:
Document number 95961079
Revision 8
Page 357 of 365

Selecting Data

Notes:
Document number 95961079
Revision 8
Page 358 of 365

Logging Data

Notes:
Document number 95961079
Revision 8
Page 359 of 365

View Data

Notes:
Document number 95961079
Revision 8
Page 360 of 365

File Logging

Notes:
Document number 95961079
Revision 8
Page 361 of 365

TECH SUPPORT COMMUNICATION

Notes:
Document number 95961079
Revision 8
Page 362 of 365

Tech Support Communication

Notes:
Document number 95961079
Revision 8
Page 363 of 365

Review of lesson objectives

Notes:
Document number 95961079
Revision 8
Page 364 of 365

Review of lesson goal

Notes:
Document number 95961079
Revision 8
Page 365 of 365

You might also like