Simatic S5100u
Simatic S5100u
Simatic S5100u
SIEMENS
6EJ5921-1AA21
OTHER SYMBOLS:
6EJ59211AA21, 6EJ5921 1AA21, 6EJ5921-1AA21, 6EJ5 9211AA21, 6EJ5 921 1AA21, 6EJ5 921-1AA21
[email protected]
+48 71 325 15 05
www.rgbautomatyka.pl
www.rgbautomatyka.pl
www.rgbelektronika.pl
Downloaded from www.Manualslib.com manuals search engine
YOUR
PARTNER IN
MAINTENANCE
Repair this product with RGB ELEKTRONIKA ORDER A DIAGNOSIS ∠
LINEAR
ENCODERS PLC
SYSTEMS
INDUSTRIAL
COMPUTERS
ENCODERS CNC
CONTROLS
SERVO AMPLIFIERS
MOTORS
CNC
MACHINES
OUR SERVICES
POWER
SUPPLIERS
OPERATOR
SERVO
PANELS
DRIVERS
At our premises in Wrocław, we have a fully equipped servicing facility. Here we perform all the repair
works and test each later sold unit. Our trained employees, equipped with a wide variety of tools and
having several testing stands at their disposal, are a guarantee of the highest quality service.
S5-100U
Programmable Controller
System Manual
CPU 100/102/103
Edition 04
Index
Contents
Page
3.2 Wiring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 9
3.2.1 Connection Methods: Screw-Type Terminals and Crimp Snap-in ...... 3 - 9
3.2.2 Connecting the Power Supply to the S5-100U . . . . . . . . . . . . . . . . . . . . 3 - 12
3.2.3 Connecting Digital Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 13
3.2.4 Connecting the Digital Input/Output Module . . . . . . . . . . . . . . . . . . . . . . 3 - 18
Page
4.7 Forcing Outputs, “FORCE”, for CPU 103 and Higher ............... 4 - 10
Page
6 Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 1
Page
8 STEP 5 Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 1
Page
10 Interrupt Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 - 1
Page
12 The Integral Real-Time Clock, for CPU 103 Version 8MA02 and Higher ... 12 - 1
12.1 Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 - 1
12.6 Setting Parameters for the Clock Data Area and the Status Word
in the System Data Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 - 15
Page
13 Connecting the S5-100U to SINEC L1, for CPU 102 and Higher ......... 13 - 1
14 Module Spectrum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 - 1
Page
Appendices
Index
In this system manual we have attempted to present this information as completely and as well
organized as possible. Certain information is repeated in various chapters so that you do not have
to leaf through the manual to find what you need.
This How to Use This System Manual section gives you information that will make it easier for you
to find what you need. This section explains how the manual is organized.
You will find correction pages at the end of the system manual. Use them to indicate any
corrections, additions, or suggestions for improvement you might have. Send these suggestions to
us. They will help us to improve the next edition of this system manual.
Conventions
This system manual is organized in menu form to make it easier for you to find information. This
means the following:
• Each chapter is marked with printed tabs.
• At the front of the system manual is an overview page that lists the title of each chapter.
Following this page, you will find a table of contents.
• At the beginning of each chapter is a table of contents for that chapter. Each chapter has three
level headings that are numbered. The fourth level heading is not numbered but appears in
boldface type.
• Pages, figures, and tables are numbered separately for each chapter. On the back of the table
of contents for each chapter you will find a list of the figures and tables that appear in that
chapter.
Warning
You will find definitions for the terms “Warning,” “Danger,” “Caution,” and “Note” in the Safety-
Related Guidelines for the User at the end of the introduction.
S5-100U System Manual (Order Number 6ES5 998-0UB23) has been completely revised:
• The format was adapted to the other system manuals in the SIMATIC S5 family.
• The contents were updated and reorganized.
Training
Siemens offers a wide range of training courses for SIMATIC S5 users. Contact your Siemens
representative for more information.
This document provides the information required for the intended use of the particular product. The
documentation is written for technically qualified personnel.
Qualified personnel as referred to in the safety guidelines in this document as well as on the product
itself are defined as follows.
• System planning and design engineers who are familiar with the safety concepts of automation
equipment.
• Operating personnel who have been trained to work with automation equipment and are
conversant with the contents of the document in as far as it is connected with the actual
operation of the plant.
• Commissioning and service personnel who are trained to repair such automation equipment and
who are authorized to energize, de-energize, clear, ground, and tag circuits, equipment, and
systems in accordance with established safety practice.
Danger Notices
The notices and guidelines that follow are intended to ensure personal safety, as well as protect the
products and connected equipment against damage.
The safety notices and warnings for protection against loss of life (the users or service personnel) or
for protection against damage to property are highlighted in this document by the terms and
pictograms defined here. The terms used in this document and marked on the equipment itself have
the following significance.
Danger Warning
indicates that death, severe personal injury indicates that death, severe personal injury or
or substantial property damage will result if substantial property damage can result if
proper precautions are not taken. proper precautions are not taken.
Caution Note
indicates that minor personal injury or contains important information about the
property damage can result if proper product, its operation or a part of the doc-
precautions are not taken. ument to which special attention is drawn.
Proper Usage
Warning
• The equipment/system or the system components may only be used for the
applications described in the catalog or the technical description, and only in
combination with the equipment, components, and devices of other manu-
facturers as far as this is recommended or permitted by Siemens.
• The product will function correctly and safely only if it is transported, stored, set
up, and installed as intended, and operated and maintained with care.
• Modular Design
Depending on the CPU you use, the S5-100U allows you to have a maximum of 448 digital
inputs and outputs. It is suitable for machine control and for process automation and monitoring
on a medium scale. The S5-100U allows a broad expansion capability with various types of
modules to adapt optimally to a control task.
The bus units snap onto a standard mounting rail. You can configure the S5-100U in one or
more tiers and configure it vertically or horizontally. The S5-100U offers such a wide range of
configuration possibilities that you can use it in rough and difficult operating conditions.
• Simple Programming
The programming language is STEP 5 and its comprehensive operations set. It provides three
different methods of representation, - four, if you have a CPU 103 or higher.
You can use any of the U series programmers to program your S5-100U, or you can load
programs from memory submodules.
Tables
Input/output modules
Input/output modules transfer information between the CPU and such process peripherals as
sensors, actuators, and transducers. You can use the following types of input/output modules
with your S5-100U:
• Digital input modules and digital output modules (4, 8, and 16/16 channel)
- Use these modules for simple control tasks involving signal states “0” and “1” only.
• Analog input modules and analog output modules
- Use these modules to record and generate such variable quantities as currents and
voltages.
• Timer module
- Use this module to set various times without having to change the program.
• Counter module
- Use this module to count pulses up to 500 Hz. You can input comparison values without
having to change the program.
• High-speed counter/position detection module
- Use the high-speed counter to record high-speed counter pulses of 25/500 kHz. You can
use this module for position detection in a positioning task.
• Comparator module
- This module makes it possible for you to monitor preset comparison values, such as for
current and voltage.
• Simulator module
- Use this module to generate digital input signals or to display digital output signals.
• Diagnostic module
- Use this module to check the function of the I/O bus.
• Communications module (CP)
- Use this module to output message texts with the date and clock time to a connected
printer. You can also use this module to connect to external systems.
• Intelligent I/O module (IP)
- Use these intelligent input/output modules for such special tasks as temperature control
and positioning tasks.
The remainder of this chapter explains how your S5-100U processes your program.
CPU
Process Interrupt
Program Timers Counters Flags I/O image process System
memory tables I/O image data
tables*
RAM
ROM
Memory
(operating submodule
system)
Processor
ALU Serial
(ACCU 1 and 2,
port
bit-ACCU (RLO))
I/O bus
Digital Analog
modules: modules: Function
- input - input modules
- output - output
I/O modules
* Beginning with CPU 103, version 8MA02
Figure 2-2. Functional Units of the S5-100U
Input and output modules have the following separate image tables:
• Process image input table (PII)
• Process image output table (PIQ)
Serial Interface
You can connect programmers, operator panels, and monitors to the serial port (cable connector).
You can use the serial port to connect your S5-100U as a slave to the SINEC L1 local area network.
There is another area in the RAM memory where information such as intermediate results can be
stored as flags. You can address the flags by bits, bytes, or words.
If battery backup is available, then some of the flags and counters remain in the internal RAM
memory even if the supply voltage fails or your S5-100U is switched off. These flags and counters
are retentive.
Table 2-1 gives information about the number and retentive characteristics (the internal memory
contents are retained/are not retained) of these timers, counters, and flags.
Retentive Non-Retentive
Operand
CPU 100 to 103 CPU 100 CPU 102 CPU 103
Counters 0 to 7 8 to 15 8 to 31 8 to 127
Timers 0 to 15 0 to 31 0 to 127
Arithmetic Unit
The arithmetic unit (ALU) consists of two accumulators, ACCU 1 and 2. The accumulators can
process byte and word operations.
Accumulator Design
ACCU 2 ACCU 1
15 8 7 0 15 8 7 0
Processor
According to the control program, the processor calls statements in the program memory in
sequence and executes them. It processes the information from the PII and takes into consideration
the values of internal timers and counters as well as the signal states of internal flags.
The S5-100U has a serial bus for the transfer of data between the CPU and the I/O modules. This
serial bus has the following characteristics:
• The modular design permits optimal adaptation to the particular control task.
• No addresses have to be set on the I/O modules.
• A terminating resistor connector is not required.
• Direct access to individual modules is not possible.
Four data bits and one check bit for bus monitoring are assigned to each slot in the bus unit. All
modules requiring more than four data bits have their own shift register and therefore do not have to
use the shift register of the particular slot.
CPU
0 1 2 3
5 Bits
Shift register
of a slot
Shift register of an
8-channel digital module n x 5 Bits
or of an analog module n=2, 4, 6 to 16
Data Cycle
Prior to a program scan, the external I/O bus transfers current information from the input modules to
the process image input table (PII). At the same time, information contained in the process image
output table (PIQ) is transferred to the output modules.
Data cycle
aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaa
Shift Program scanning Shift
data data
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
Time axis
Transfer data from the shift register to
the output modules.
Interrupt Data Cycle, for CPU 103 version 8MA02 and higher
There is an interrupt input data cycle prior to each time-controlled or interrupt-driven program scan.
Before a time-controlled program scan, current information about the input modules is read into the
interrupt PII. Before an interrupt-driven program scan, interrupt inputs on slots 0 and 1 only are read
into the interrupt PII.
Following a time-controlled program scan, there is not an interrupt output data cycle until data has
been moved into the interrupt PIQ via a transfer operation (see section 6.6.2).
Information is output from the interrupt PIQ to the output modules during an interrupt output data
cycle. The PIQ is updated.
* This does not apply to the 466-8MC11 analog input module (8 data bits).
The CPU specifies the maximum length of the shift register in a particular configuration.
• CPU 100: 256 data bits, 128 (max.) of these from analog modules
• CPU 102: 480 data bits, 256 (max.) of these from analog modules
• CPU 103: 704 data bits, 512 (max.) of these from analog modules
Note
If the maximum expansion allowed is exceeded, the S5-100U goes into the STOP mode.
The “PEU” bit (I/O not ready) is set in the ISTACK.
Examples:
a) CPU 100: This CPU lets you operate six digital modules (8-channel) and two analog modules
(4-channel):
[6 x 8+2 x (4 x 16)]=48+128<256
b) CPU 100: This CPU does not let you use three digital modules (8-channel) with three analog
modules (4-channel) because the maximum permissible number of analog data bits
would be exceeded:
[3 x 8+3 x (4 x 16)]=24+192<256
c) CPU 102: This CPU lets you operate seven digital modules (8-channel) and four analog
modules (4-channel):
[7 x 8+4 x (4 x 16)]=56+256<480
d) CPU 102: This CPU does not let you use 20 digital modules (8-channel) with 5 analog
modules (4-channel) because the maximum permissible number of analog data bits
would be exceeded:
[20 x 8+5 x (4 x 16)]=160+320=480
e) CPU 103: This CPU lets you operate 24 digital modules (8-channel) and eight analog modules
(4-channel):
[24 x 8+8 x (4 x 16)]=192+512=704
f) CPU 103: This CPU does not let you use 31 digital modules (8-channel) with four analog
modules (2-channel) because the maximum permissible number of slots would be
exceeded:
[31 x 8+4 x (2 x 16)]=248+128<704
3.2 Wiring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 9
3.2.1 Connection Methods: Screw-Type Terminals and Crimp Snap-in . . 3 - 9
3.2.2 Connecting the Power Supply to the S5-100U . . . . . . . . . . . . . . . 3 - 12
3.2.3 Connecting Digital Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 13
3.2.4 Connecting the Digital Input/Output Module . . . . . . . . . . . . . . . . . 3 - 18
Tables
3 Installation Guidelines
Except for the I/O module, all of the S5-100U components are mounted on standard mounting rails
in accordance with DIN EN 50022-35x15. Mount the rails on a metal plate to obtain the same
reference potential.
Bus units with a SIGUT/screw-type, or crimp snap-in connection method have different heights.
If you install, remove, or change any parts of your S5-100U system, your system must be in the
state indicated in Table 3-1.
Power supply X X
CPU power supply
voltage OFF
X=not relevant
If you do not have a 24 V DC power supply, you must have a power supply module.
Mount the first module on the extreme left end of the standard mounting rail. Add other modules to
the right of the first module.
Make sure that the S5-100U, the power supply, and all modules are well grounded. Mount the
S5-100U on a metal plate to help prevent noise. There should be electrical continuity between the
grounded enclosure and the mounting rails. Make sure that the system is bonded to earth.
You can use the 8LW system or the 8LX system mounting plates (see Catalog NV 21).
Adequate ventilation and heat dissipation are important to the proper operation of the system. You
must have at least 210 mm (8.3 in.) between each mounting rail (see Figures in Appendix B) for
proper ventilation.
Always locate the power supply and the CPU on the lowest tier to ensure better heat dissipation.
To measure cabinet ventilation, define the total heat loss by calculating the sum of all typical heat
losses (see Catalog ST 52.1).
a
a
a
a
aaaaaaaaaaaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
At least 210 mm
(8.3 in.)
a
a
a
a
aaaaaaaaaaaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
At least 210 mm
(8.3 in.)
a
a
a
a
aaaaaaaaaaaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
CPU
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaa
Wiring devices
and/or cable duct
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaa
a
At least 45 mm
210 mm+a (1.77 in.)
aaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaa
(8.3 in.+a)
CPU
Use the same minimum clearances for a vertical configuration as for a horizontal configuration.
You must install a clamp (see Catalog SA 2) on the lower end of the programmable controller tier to
hold the modules mechanically in position.
CPU
Clamp
3.2 Wiring
a
a
a
aaaaaa
aa
a
aaaaaaa
a
a
a
a
aaaaaaaaa a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
M3 screw
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
aa
aaa
a
a
a
a
a
a
a
a
a
aaaaaaaa
a
a
a
a
a
aaa
a
a
a
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaa
a
aa
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaa
aaa
aa
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaa
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
aa
aa
Wire clamp
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
Cables
All I/O modules are plugged into bus units. Connect the I/O modules to the terminal blocks of the
bus units. The connections illustrated in this section are of the screw terminal type (SIGUT
connection method).
You can also use the crimp snap-in connection method described in section 3.2.1. In both cases,
the terminal assignments are marked on the terminal blocks.
The assignments listed in Table 3-2 always apply for connecting the load voltage.
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
Table 3-2. Connecting the Load Voltage
24 V DC L+ M
115/230 V AC L1 N
* 115/230 V AC digital modules can be operated with a load voltage of 120/230 V AC.
Note
For digital outputs, energy is temporarily stored in an internal capacitor for about
100 ms after the L+ supply is switched off.
Please note that this energy may be sufficient to activate low-rating loads (e.g., pulse
valves) for a triggered output.
The four channels of a module are numbered from .0 through .3. (Numbers .4 through .7 are only
significant for the ET 100 distributed I/O system.) Each channel has a pair of terminals on the ter-
minal block.
The terminal assignments and the connection diagram are printed on the front plate of the module.
L+
aaaaaaa
aa
a
a
a
a
aa
aa
a
a
1
aa
aa
F M
a
aa
aaa
a
a
2
aa
aa
a
aa
3
aa
aa
aa
.0
aa
aa
aa
.4
aa
aa
aa
4
a
a
aa
a
a aa
aa
a
5
aa
aa
a
aa
aa
aa
aa
.1
aa
aa
aa
aa
aa
aa
.5 6
a
a
aa
a
a aa
aa
a
7
aa
aa
a
aa
.2
aa
aa
aa
aa
aa
aa
.6
aa
aa
aa
8
a
a
aa
a
a aa
a
aa
a
a
aa
a
aa
aa
9
aa
aa
aa
aa
.3
aa
aa
aa
aa
aa
aa
aa
.7 10
aa
a
aa
a
a
a
a
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
1 3 5 7 9
a
aa
a
aa
a
aa
a
aa
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
aa
aaa
4
a
a
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaa
2 4 6 8 10
aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaa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
aa
a
a
aa
aa
aa
aa
a aa
aa
aa
aa
a
Lamp
aaaa aaaaa
Example: Connecting a lamp to channel 3 (address Q 1.3) on the output module in slot 1
aaaaa
a aaaaa
10
a
aa
aa
aa
aa
aaaaa
a
Installation Guidelines
3-15
Installation Guidelines S5-100U
The eight channels of a module are numbered from .0 through .7. One terminal on the terminal
block is assigned to each channel. The terminal assignment and the connection diagram are printed
on the front plate of the module.
L+
a
aa
a
a
a
1
a
a
F
aa
a
a
aa
a
2M
aa
a
aa
aa
a
aa
a
a
aa
a
a
aaaa aaa aaa aaa aaa aaaa
aa
aa
a
a
a
a
.0 4
a
aa
a
a
a
a
a
a
a
aa
a
aa
a
a
a
3
aa
aa
a
a
.1
a
aa
a
a
a
a
a
a
a
6
aa
a
aa
a
a
a
.2
a
aa
a
a
a
a
a aa
a
aa
a
a
a
5
aa
aa
a
a
.3
a
aa
a
a
a
a
a aa
a
aa
a
a
a
8
aa
aa
a
a
.4
a
aa
a
a
a
a
a
a
a
aa
a
aa
a
a
a
7
.5
a
aa
a
a
a
a
a
a
a aa
a
aa
a
aa
a
aa
a
aa
aa
10
.6
a
aa
a
aa
aa
a
aa
a
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
5 7 aa
a9
a
a
a
a
a
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
1 3 aa
a
aa
aa
a
aa
a
aa
a
aa
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
aa
a
aa
aa
9
.7
a
aa
aa
a
a
a
a
aaa
aa
a
a
a
a
aaaaa
a
4
aa
aa
aa
a
aa
aa
a
aa
a
aa
a
aa
a
aa
a
a
a
a
a
2 4 6 8 10
a
a
aa
aa
a
aa
a
aa
a
a
a
a
aaa
aa
aaa
aa
aaa
aaa
a
aaa
aaa
a
aaa
aaa
a
a
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaaaaaaa
aaaaaaaaaa
aaaaa
Sensor
aaaaaaaaaaaaaaaaaaaaaa
a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a a aa
aaa
a
(see Figure 3-15)
a
aa
aa
aa
aa
a
aaaaa
L+
aaaa
aa
a aaaa
1
aa
aaa
aaa a
aa
aa
aa
a
aa aaaa
2
aaa
aa
aa
a a
M
a
aa
aa
aa
aa
a aa
aa
aa
a
aaaa
3
a
aa
aa
aa
a
aa
4
a
aaa
aa
a
aaaaaaaaaa aa
aa
aa
a
aaaa
5
aaaaaaaaaa a
aaaaaaaaaa aa
aa
aa
a
aa
aaaaaaaaaa aa
aa
aa
a
aaaaaaaaaa a
7a
aaaaaaaaaa a
aaa
aa
a
M Terminal
aaaaaaaaaa aa
aa
aa
a
aa
8
a
aaa
aa
a
aa
aa
aa
a
aa
9
a
aaa
aa
a
aaaa aa
aa
aa
a
a
aa
aa
aa
a
10
a
aa
aa
aa
aa
a aaa
aaaa
a
a
aa
aa
aa
aa
a
a
aa
aa
aa
aa
a
The actuators must be connected to terminal 2 via the M (negative) terminal block. This does not
aaaa
aaaaa
a Lamp
Installation Guidelines
3-17
Example: Connecting a lamp to channel 6 (address output Q 5.6) on an output module in slot 5
Installation Guidelines S5-100U
Every channel is assigned a terminal on the 40-pin connector. The channel numbers are printed on
the front plate.
The 16 channels on the input side (IN) are numbered from n.0 through n.7 and from n+1.0 through
n+1.7. The 16 channels on the output side (OUT) are numbered from n.0 through n.7 and from
n+1.0 through n+1.7. “n” is the start address of the slot. Slot 0, for example, has the start
address of n=64 (see chapter 6).
OUT IN
aaaa
aaaa
b
aa
L+ 1 1 L+
a
a
n+1 n+1
.0 2 2 .0
.1 3 3 .1
.2 4 4 .2
.3 0.5 A 5 5 .3
.4 6 6 .4
.5 7 7 .5
.6 8 8 .6
.7 9 9 .7
M 10 10 NC
n L+ 11 11
n NC
.0 12 12 .0
.1 13 13 .1
.2 14 14 .2
.3 0.5 A
15 15 .3
.4 16 16 .4
.5 17 17 .5
.6 18 18 .6
.7 19 19 .7
M 20 20 M
40-pin crimp
snap-in connector
Figure 3-16. Front View of the Digital I/O Module with a Crimp Snap-In Connector
(simplified view and not true to scale)
Example: The start address for the modules is 65.3. Inputs and outputs have the same address.
A sensor is to be connected to input I 64.4 and a lamp to output Q 7.3.
Figure 3-17 illustrates the wiring on the front connector.
OUT IN
L+ L+
1 1
2 2
3 3
A 65.3 4 4
5 5
6 6
7 7
8 8
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
M 9 9
10 10
11 11
12 12
13 13
14 14
15 15 E 64.4
16 16
17 17
18 18
19 19 M
20 20
L+ Lamp
M M
Sensor
L+
M Terminal
L+Terminal
Figure 3-17. Connecting a Sensor and a Load to Digital Input/Output Module 482
Note
Chapter 11 describes how to connect analog modules.
Control Circuit
The power source for the control circuit supplies the CPU, the bus units, the programmer interface,
and the internal control circuits for the I/O modules. When the incoming supply is 24 V DC/1 A, the
PS 931 power supply module provides an internal supply of +9 V up to a total of 1 A current input
to the I/O modules. The grounding spring on the CPU forces the control circuit to be connected to
the standard mounting rail. The grounding spring must also be protected from interference. The
grounding spring must be grounded.
Load Circuit
The power source for the load circuit supplies the actuators of the process peripherals.
It is suggested that you use one of the following for a 24 V DC power supply:
• The PS 931 power supply module (see Chapter 14)
• A Siemens load power supply from the 6EV1 series (see Appendix D)
If you use load power supplies other than the recommended ones, make certain that the load
voltage is in the range of 20 to 30 V (including ripple).
Note
If you use a switched-mode power supply unit to supply floating analog modules and
BEROs, then this supply must be filtered through a network.
You can connect several mutually independent load circuits adjacent to each other on a single
programmable controller. These connections can either be non-floating or floating (see
section 3.3.3).
Figures 3-18, 3-19, and 3-20 display different configuration possibilities. Pay attention to the
following points when you design your configuration. The numbers appearing in parentheses in the
following points refer to the numbers in Figures 3-18 to 3-20.
• You must have a main switch (1) in accordance with VDE 0100 for your S5-100U, the sensors,
and the actuators.
• You do not need an additional fuse (2) to connect your S5-100U and the load circuit to power if
your radial lines are a maximum of 3 meters (9.84 feet) long and are inherently earth-fault proof
and short-circuit proof.
• You need a load power supply (3) for 24 V DC load circuits.
- You need a back-up capacitor (rating: 200 µF per 1 A of load current) if you have non-
stabilized load power supplies.
• If you have AC load circuits, galvanic isolation via a transformer (4) is recommended.
• You should ground the load circuit at one end. Provide a removable connection (5) to the
ground conductor on the load power supply (terminal M) or on the isolating transformer.
- You must provide earth-fault monitoring for any non-grounded load circuits.
• You must separately fuse (6 and 7) the load voltage for sensor circuits and for actuator circuits.
• You must connect the standard mounting rail of the S5-100U to the ground conductor through a
capacitor (8, to suppress high-frequency noise) for a non-grounded configuration.
• You must have a low-resistance connection between the standard mounting rail and the
cabinet’s chassis ground (10) for a grounded configuration.
• You need a power fuse (9) to protect against a short-circuit occurring in the power supply.
3-22
L3
L2
L1
PE
(5)
aaaaaa
aaa
(1)
(4)
aaa aaa aaa
Installation Guidelines
a
aa
aa
a a
aa
aa
a a
aa
aa
a aaaaaaaaaa aaaaaaaa aaaaaa
aaa
aaaaaaaaaa aaaaaaaa
aaaaaaaaaa aaaaaaaa
a
aaa a
aaa aaaaaaaaaa
aaaaa
aaaaaaaa
aaaa aaaa
230 V AC
aa
aa
a aa
aa
a aa
(6)
(7)
a
aaa aaaaaa
aa
aa
a aaa
a
aa
aa
aa
a
aa
aa
a
aaaaaaaaaa
a aaaaaa
aaa (10)
aaaaaaa
aaaa
aaaa aaaa
aa
(9)
a
aa
aa
aa
a aaaaaaaaaaaaaaaaaaaaaaaaaa
aaaa
PS
a
aaaa aaaaaaaaaaaaaaaaaaaaaaaaaa
aa
aa
aa
aaaaaaaaaaaaaaaaaaaaaaaaaaa
a
aa
aa
aa
a aaaaaaaaaaaaaaaaaaaaaaaaaa
a
aa
aa
aa
a aaaaaaaaaaaaaaaaaaaaaaaaaa
a
aa
aa
aa
a aaaaaaaaaaaaaaaaaaaaaaaaaa
a
aa
aa
aa
a aaaaaaaaaaaaa
CPU
aa
aaa
aa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
a
aaaa aaaaaaaaaaaaa
aa
aa
aa
aaaaaaaaaaaaaaaaaaaaaaaaaaa
a
aa
2
1
a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
a
aa
a
aa
a
a
a
a
a
aa
L+
aa
a
a
a
a
a
a
a
a
a
aa
a
aa
a
aa
aa
a
a
a
a
a
aa
a
aa
a
a
a
a
a
a
a
a
a
a
a
aa
a
aa
a
aa
a
a
a
a
a
aa
M
DI DI DO DO
a
aa
aa
a
a
a
a
a
a
a
aa
a
aa
a
aa
aa
a
a
a
a
a
aa
aaa
a
a
a
a
a
a
aa
a
aa
a
aa
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaaa a
a
a
1
a
a
1 1 1
a
aa
a
2 2 2 2
a
aa
a
(6)
aa
aa
a
aaaa
aa
a
aa
aa
a
a
a
aa
a
aa
aa
aa
aa
a
a
a
(7)
aa
aa
a
aaaa
aa
a
aa
aa
a
a
a
aa
a
aa
aa
aa
aa
a
a
a
M L+
Interference voltages are discharged to the ground conductor (PE) via a capacitor. You can prevent
static charges by connecting a high-ohmic resistor (approx. 100 k / W) parallel to the capacitor.
The S5-100U is powered by its own control circuit. The I/Os are powered by the load circuit.
The circuits can either be connected to the same grounding point (non-floating) or galvanically
isolated (floating).
Central
grounding point
PS CPU
L+
M
Common
chassis ground
M L+
Load power
supply
The common chassis grounding connection makes it possible for you to use reasonably priced non-
floating I/Os. These modules function according to the following principles.
• Input modules
- The ground line, line M (control circuit chassis) is the reference potential. A voltage drop V1
on line affects the input signal level VI.
• Output modules
- Terminal 2 (M) of the terminal block is the reference potential. A voltage drop V2 on the
line raises the chassis potential of the output driver and thus reduces the resulting control
voltage VCV.
Figure 3-22 shows a simplified connection of the S5-100U with a non-floating external I/O.
+9 V
Data
GND
a
a
aa
a
aaaaaa
aaa
aaa
VCV
aa
aa
a
a
aa
a
a
a
a
a
a
a
a
aa
a
aaaaa
a
a
a
a
a
aa
CPU
a
a
a
a
aa
a
a
a
a
aa
a
a
a
a
a
a
a
a
aaaaaaaa
a
a
a
a
a
L+
a
a
a
a
a
a
a
a
a
a
a
a
M
a
a
a
a
aa
aa
a
a
a
a
a
aa
VI
a
a
a
a
aa
aa
aa
a
a
aa
aa
a
aa
aa
a
aa
aa
1 2
aa
aa
aa
aa
aa
aa
a
a
a
a
aa
a
aa
a
a
aa
aa
a
V1
aa
aa
a
aa
a
aa
a
a
aa
a
aa
aa
a
a
a
a
aa
a
aa
a
a
aa
aa
aa
aa
a
a
aa
L+
aa
aa
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
aaaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
24 V DC supply
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
aa
a
aa
a
a
a
a
a
a
a
a
aaaaa a
a
a
a
a
a
a
a
a
a
a
aa
aa
V2
aa
aa
a
a
aa
a
aa
a
a
aa
a
a
aa
aa
a
a
a
a
a
aa
aa
M
a
a
a
aa
a
a
a
a
a
When you have a non-floating configuration, you must make certain that the voltage drop on
cables and does not exceed 1 V. If 1 V is exceeded, the reference potentials could change
and the modules could malfunction.
Warning
If you use non-floating I/O modules, you must provide an external connection between
the chassis ground of the non-floating I/O module and the chassis ground of the CPU.
If you have a floating configuration, the PLC's control circuit and the load circuit must be galvanically
isolated.
Central
grounding point
PS CPU
L+
M
aa
a
aa
a
aa
aa
L+
aa
aa
M
a
aa
a
a
a
Load power
supply
Figure 3-24 shows a simplified schematic for the connection of floating I/O modules.
aaaaaaaaaa
aaaaa
•
aaaaaaaaaa
aaaaa
aaaaaaaaaa
aaaaa
+9 V
• •
aaaaaaaaaa
aaaaa
Data
• GND
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaa
CPU
1L+
M
L1 2L+
N • • 2M
This section describes the wiring arrangements for bus cables, signal cables, and power supply
cables that guarantee the electromagnetic compatibility (EMC) of your installation.
Dividing the lines into the following groups and running the groups separately will help you to
achieve electromagnetic compatibility (EMC).
Group A: Shielded bus and data lines (for programmer, OP, printer, SINEC L1, Profibus,
Industrial Ethernet, etc.)
Shielded analog lines
Unshielded lines for DC voltage 60 V
Unshielded lines for AC voltage 25 V
Coaxial lines for monitors
You can use the following table to see the conditions which apply to the running of the various
combinations of line groups.
Run lines outside buildings where possible in metal cable supports. Connect the abutting surfaces of
the cable supports galvanically with each other and ground the cable supports.
When you run cables outdoors, you must observe the regulations governing lightning protection and
grounding. Note the general guidelines:
Lightning Protection
If cables and lines for SIMATIC S5 devices are to be run outside buildings, you must take measures
to ensure internal and external lightning protection.
• Varistors
or
• Lightning arresters filled with inert gas
Install these protective elements at the point where the cable enters the building.
Note
Lightning protection measures always require an individual assessment of the entire
system. If you have any questions, please consult your local Siemens office or any
company specializing in lightning protection.
Grounding
Make certain that you have sufficient equipotential bonding between the devices.
Potential differences may be caused, for instance, by differences in the system input voltage. These
differences must be reduced by means of equipotential bonding conductors to ensure proper
functioning of the electronic components installed.
• A low impedance of the equipotential bonding conductor makes equipotential bonding more
efficient.
• If any shielded signal cables connected to earth/protective earth at both ends are laid between
the system sections concerned, the impedance of the additional equipotential bonding conductor
must not exceed 10 % of the shield impedance.
• The cross-section of the equipotential bonding conductor must be matched to the maximum
compensating currents. The following cross-sections are recommendable:
- 16 mm2 copper wire for equipotential bonding line up to 200 m (656.2 ft).
- 25 mm2 copper wire for equipotential bonding line over 200 m (656.2 ft).
• Use equipotential bonding conductors made of copper or zinc-plated steel. Equipotential bonding
conductors are to be connected to earth/protective earth via a large contact area and to be
protected against corrosion.
• The equipotential bonding conductor should be laid in such a way as to achieve a relatively
small contact area between equipotential bonding conductor and signal cables (see Figure 3-25).
aaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaa
Signal line
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
Use only cables with shield braiding if possible. The effectiveness of the shield should be more than
80%. Avoid cables with foil shielding since the foil can easily be damaged by tension and pressure;
this leads to a reduction in the shielding effect.
As a rule, you should always shield cables at both ends. Only shielding at both ends provides good
suppression in the high frequency range.
As an exception only, you can connect the shielding at one end. However, this attenuates only the
lower frequencies. Shielding at one end can be of advantage in the following cases:
Always use metallic or metalized connectors for data lines for serial connections. Secure the shield
of the data line at the connector housing. Do not connect the shield to the PIN1 of the connector
strip!
In the case of stationary operation, you are recommended to insulate the shielded cable without
interrupt and to connect it to the shield/protective ground bar.
Note
If there are potential differences between the earthing points, a compensating current
can flow over the shielding that is connected at both ends. For this reason, connect an
additional equipotential bonding conductor.
aaaaaaaaaaaa
aaaaaa
aaaaaa
aaaaaa
aaaaaa
aaaaa
a aa
aaaaaaaaa
aaaaaa
aaa
aaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaa
a a
Figure 3-26. Fixing Shielded Cables with Various Types of Cable Clamps
Normally, inductive circuits (e.g. contactor or relay coils) energized by SIMATIC S5 do not require to
be provided with external arc suppressing elements since the necessary suppressing elements are
already integrated on the modules.
It only becomes necessary to provide arc supressing elements for inductive circuits in the following
cases:
• If SIMATIC S5 output circuits can be switched off by additionaly inserted contactors (e.g. relay
contactors for EMERGENCY OFF). In such a case, the integral suppressing elements on the
modules become ineffective.
• If the inductive circuits are not energized by SIMATIC S5.
You can use free-wheeling diodes, varistors or RC elements for wiring inductive circuits.
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
aaaaaa
aa
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aaa
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
aa
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
Wiring coils activated by direct current Wiring coils activated by alternating current
aaaaa
aaaaa
aaaaa a
a
aaaaa a
aaaaa
aaaaa a
aaaaa a
aaaaa a
aaaaa
aaaaa a
a
aaaaa a
aaaaa a
aaaaa
aaaaa a
aaaaa a
aaaaa a
aaaaa
aaaaaa
aaaaa
a
aaaaa
aaaaa
aaaaa a
a
aaaaa a
aaaaa a
aaaaaaa a
aaaaa a
aaaaa a
aaaaa
aaaaa a
aaaaa a
aaaaa a
aaaaa
aaaaa a
a
aaaaa a
aaaaa a
aaaaa
aaaaa a
aaaaa a
aaaaaa
aaaaa
aaaaaaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaa
aaaaaaaaaa
aaaaaaaaaa
+ +
aaaaaaaaaa
aaaaa
aaaaaaaaaa
- -
Figure 3-27. Wiring Coils
Provide a power connection for a programmer in each cabinet. The plug must be supplied from the
distribution line to which the protective ground for the cabinet is connected.
Cabinet Lighting
Use, for example, LINESTRA® lamps for cabinet lighting. Avoid the use of fluorescent lamps since
these generate interference fields. If you cannot do without fluorescent lamps, you must take the
measures shown in Figure 3.28.
Shielded cable
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaaa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
Metal-encased switch
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
Mains filter or shielded mains cable
4.3 Loading the Program into the Programmable Controller ........ 4-5
4.7 Forcing Outputs, “FORCE”, for CPU 103 and Higher .......... 4-10
Table
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
BATTERY Operating mode display
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaa
aaaaaaaa
aaaa
Battery low OFF/ RUN
(green LED: RUN)
LOW
(yellow LED lights:
Operating mode display
aaaaaaaa
aaaaaaaa
aaaaaaaa
battery discharged or STOP
not installed) (red LED: STOP)
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
aaaaaaaa
aaaaaaaaaaaaaaaaa
RUN
I
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaa
STOP Operating mode switch
O
aaaa
aaaa
aaaa
aaaaaaa
aaaa
aaaa
aa
aaaaaaa
aaaa
aaaaa
COPY
ON/OFF switch
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
ON/OFF Switch
The ON/OFF switch turns on the CPU’s voltage regulators. This switch does NOT separate the
voltage regulator from the L+/M terminals.
You should perform an overall reset before you input a new program. An overall reset erases the
following:
• The programmable controller's program memory
• All data (flags, timers, and counters)
• All error IDs
Note
If you do not perform an overall reset, then the information indicated above is retained
even if the program is overwritten.
Manual Reset
To perform a manual overall reset, you must:
1. Set the operating mode switch to STOP.
2. Remove the battery.
3. Set the ON/OFF switch to “0”.
4. Change the ON/OFF switch to “1”.
5. Insert the battery.
The following section contains suggestions for configuring and starting up a system containing
programmable controllers.
Warning
• Adhere to any safety and accident-prevention regulations applicable to your
situation and system.
• If your system has a permanent power connection (stationary equipment) that is
not equipped with an isolating switch and/or fuses that disconnect all poles,
install either a suitable isolating switch or fuses in the building wiring system.
Connect your system to a ground conductor.
• Before start-up, if you have units that operate using the main power supply,
make sure that the voltage range setting on the equipment matches the local
main power voltage.
• When using a 24 V supply, make sure to provide proper electric isolation
between the main supply and the 24-V supply. Power supply units must meet
the requirements of EN 60950 or be manufactured in accordance with
DIN VDE 0551/EN 60742 and DIN VDE 0160. The requirements of electro-
magnetic compatibility (EMC) must also be adhered to.
• Fluctuations or deviations of the supply voltage from the rated value may not
exceed the tolerance limit specified in the technical data. If they do, functional
failures or dangerous conditions can occur in the electronic modules or
equipment.
• Take suitable measures to make sure that programs that are interrupted by a
voltage dip or power failure resume proper operation when the power is restored.
Make sure that dangerous operating conditions do not occur even momentarily.
If necessary, force an EMERGENCY OFF.
• EMERGENCY OFF devices must be in accordance with EN 60204/IEC 204
(VDE 0113) and be effective in all operating modes of the equipment. Make
certain to prevent any uncontrolled or undefined restart when the
EMERGENCY OFF devices are released.
• Install power supply and signal cables so that inductive and capacitive
interference can not affect the automation functions.
• Install your automation system and its operative components so as to prevent
unintentional operation.
• Automation equipment can assume an undefined state in the case of a wire
break in the signal lines. To prevent this, take the proper hardware and software
safety measures when linking the inputs and outputs of the automation
equipment.
* For the CPU 102 only: press the <COPY> key simultaneously (manual loading).
You can load a program from a connected programmer (online operation). When you load a
program, it is transferred to the programmable controller's program memory. There are specific
instructions in your programmer manual for doing this.
You can also load your program from a memory submodule, but only valid blocks can be loaded.
See section 7.5.2. The different memory submodules you can use are listed in Appendix D.
Section 4.3 describes how you can load a program from a memory submodule.
Warning
You can connect or disconnect memory submodules only in the Power OFF mode.
No battery is installed
(yellow LED lights). PLC overall reset
Error
Switch the S5-100U on.
Program is in the
S5-100U.
Error
Turn on the S5-100U. Red LED flashes.
A program can be backed up only if the back-up battery is connected. Backing up copies a program
from the program memory of the CPU to a memory submodule. Only valid blocks are backed up.
As soon as you have changed the integral, default DB1 data block, it is a valid block that can be
backed up. See section 7.5.2.
You can use various EEPROM memory submodules to back up a program. Appendix D contains a
list of the submodules you may use. Figure 4-4 illustrates how to back up a program on a memory
submodule.
No
If the power fails or the programmable controller is turned off, the contents of the internal (retentive)
memory are stored only if a back-up battery is connected. When power is recovered or when the
programmable controller is turned on, the following contents are available:
• Control program and data blocks (see section 7.3.5)
• Retentive flags and count values (see section 2.2.1)
• ISTACK contents (see section 5.3]
Note
• Insert and replace the battery while the programmable controller is turned on.
Otherwise, an OVERALL RESET is required when you turn the programmable
controller on.
• The lithium battery in the programmable controller has a life expectancy of at least
one year.
• The yellow LED on the operator panel lights up if the battery fails.
Warning
Do not charge lithium batteries. They could explode. Dispose of used batteries properly.
Note
The current signal states are displayed only in the RUN operating mode.
Cycle trigger
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
ontrol
STATUS ogram
= Q 2.0 1 1
Transfer data
Refer to your programmer manual for information about the test function on your programmer.
This test function specifies the status of the operands (inputs, outputs, flags, data words, counters,
or timers) at the end of program processing. You can obtain information about inputs and outputs
from the process image I/O tables of the selected operands.
Cycle trigger
Control program
Transfer data
STATUS
VAR
Refer to your programmer manual for information about the test function on your programmer.
Outputs can be set directly to a desired status even without the control program. This enables you
to control the wiring and functionality of output modules. This does not change the process I/O
image table, but the output disable condition is cancelled.
Note
The programmable controller must be in the STOP operating mode.
Refer to your programmer manual for information about calling up the test function on your
programmer.
The process image I/O table of the operands is changed regardless of the programmable controller's
operating mode. You can change the following variables: I, Q, F, T, C, and D.
The program is processed in the RUN operating mode using the changed process variables. They
can be changed again during program scanning without an acknowledgement being required. The
process variables are forced asynchronously to the program scanning.
Special characteristics
• You can change the I, Q, and F variables in the process I/O image table by bits, bytes, or words.
• For the T and C variables in KM and KH format, note the following:
- For programmers with screens, you must also enter “YES” in the system commands input
field in the presettings screen.
- You must be careful when you force edge trigger flags. You do not want to enable a higher-
order byte inadvertently because this could give you a timer or counter value you did not set.
• The signal status display breaks off if there is an error in the format entry or operand entry. The
programmer then displays the “NO FORCING POSSIBLE” message.
Refer to your programmer manual for information about the test function on your programmer.
This function allows you to search for specific terms in the program and list them on the pro-
grammer's display panel. You can perform program changes at this point.
Note
Search runs are handled differently by different programmers. The respective users
guides contain extensive information about search runs.
When this programmer function is called up, program scanning is stopped at a definite point. The
cursor indicates this breakpoint, which is a statement in the program. The programmable controller
scans the program up to the statement selected. The current signal states and the RLO up to the
statement selected are displayed (as in the “STATUS” test function).
The program can be scanned section by section by shifting the breakpoint. Program scanning takes
place as follows:
• All jumps in the block called are executed.
• Block calls are executed immediately. The program check is not resumed until control is
returned to the calling block.
During the program check, you can execute the following additional test and programmable
controller functions from the programmer:
• Input and output (program modification possible)
• Direct signal status display (STATUS VAR)
• Forcing of outputs and variables (FORCE, FORCE VAR)
• Information functions (ISTACK, BSTACK)
If the function is aborted due to hardware faults or program errors, the programmable controller goes
into the STOP mode and the red LED on the control panel of the CPU lights.
Refer to your programmer manual for information about calling up these functions on your
programmer.
Tables
The programmable controller's operator panel will show you if your device is not functioning
correctly (see Table 5-1).
If both LEDs light, your programmable controller is in the START-UP operating mode.
Note
Only ISTACK bytes 1 through 6 can be output in the RUN mode. There is no cause for
an interrupt to force the CPU to go into the STOP mode. The control bits are output in
bytes 1 through 6.
16
15
14
13
12
11
10
Byte
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aaaa
aa
a Bit
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
a a
aa
aa
a
aaaaaaaaaaaaaaaaa aaaaaa aaa
shaded bits).
NAU
AS
aa
a aa
a
ZUS
STO
aa
aaa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aaa aa
aaa
aa
aa
aa
aaaaa
KEIN
ANZ1
aaaaaaaaaaaaaaaaa aaaaaa aaa
STOPS
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa a
aa
aa
aa
aa
aa
aaaa
aa
a
aaaaaaaaaaaaaaaaa
a a
aa
aa
aa
aa
aa
a a
aa
aa
a
aa
aaaaaa aa
aa
a
aaa
aa
aa
aa
aaaaa
6
a
aa
aa
aa
aa
aa
a a
aa
aa
a
ANZ
STO
FEH
SYN
aaaaaa aaa
ANZ0
a
aa
aa
aa
aa
aa
a a
aa
aa
a
aaaaaaaaa a
aa
aa
aa
aa
aa
a aaa
aaaaa
a
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
a
aaa
aa
aa
aa
aa
aa
aa
a
aaaaaaaa
aaaaaaaaa aaaaaa aaaaaaa aaaaaaaa
NI
Diagnostics and Troubleshooting
SUF
SCH
NEU
OVFL
aaaaaaaaa
KOPF
NINEU
a
aa
aa
aa
aa
aa
aa
aa
aa
a
aa
a
a
aa
a
aa
a
aa
a
aa
a
aa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aa
aa
aa
aa
aa
aa
aa
aa
aa
aaa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aaaa
aaa
a
1
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
VKE
VKE
VKE
VKE
BAU
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
STUEB
aaaaaaaaaaaaaaaaa
Table 5-2. ISTACK Output (Bytes 1 to 16)
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aaaaaaa
aaaaaaa
a
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
0
aaaaaaaaaa
UR
aaaaaaaaaa
FKT
FKT
FKT
LAD
aaaaaaaaaa
ERAB
aaaaaaaaaa
ASPFA
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aaaaaaaaaa
a
lute
EBA6
EBA8
EA0E
EA0A
EA0C
EBAA
EBAC
Addr. (SD)
The following table shows which positions in the bit pattern are relevant for error diagnosis (gray-
SD 7
SD 6
SD 5
ta Word
(UAW)
SD 211
SD 212
SD 213
SD 214
Abso- Syst. Da-
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
aaaaaaaaaaaaaaaaaa
7
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
section 9.1).
aa
aaa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aaaa
aaa
a
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
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a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
1
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
VKE
VKE
VKE
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
aa
aaaaaaaaaaaaaaaaa
aa
a
a
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
aaa
a
aaaaaaaaaaaaaaaaaa
0
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
FKT
FKT
FKT
aaaaaaaaaaaaaaaaaa
Table 5-2. ISTACK Output (Bytes 17 to 32) [continued]
aa
aaaaaaaaaaaaaaaaa
aa
a
aaa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aaaaaaaaaaaaaaaaaa
a
lute
EB96
EB98
EB9A
EB9E
EBA0
EBA2
EBA4
EB9C
Addr. (SD)
If the step address counter displays a DB1 address, then there is a DB1 parameter setting error (see
The absolute memory address of the next statement to be processed from the faulty block is displayed.
ta Word
SD 203
SD 204
SD 205
SD 206
SD 207
SD 208
SD 209
SD 210
Abso- Syst. Da-
Diagnostics and Troubleshooting
5-3
Diagnostics and Troubleshooting S5-100U
BAU 10 When automatically loading the program: Replace the battery and
- Battery is missing or dead and there is no recreate the program, or
valid program available on the memory load the program again.
submodule
NINEU 6 The program in the PLC memory is defective. Perform an overall reset
Cause: and load the program
• A power failure has interrupted one of the again.
following operations.
- Compress
- Block transfer from the PG to the PLC or
memory submodule to the PLC
- PLC overall reset
• Battery has been replaced while the power
was off.
STUE 9 Block stack overflow: the maximum block call Eliminate program
nesting depth (16) has been exceeded. errors.
* SAZ = STEP address counter - The ISTACK bytes 25 and 26 read “1111 1111(FF)”.
** Relevant only for the PG 605U and for the CPU 103, version 8MA03 and higher.
Error message: after the <COPY> key is released, the red LED continues flashing.
ASPFA Loading the memory submodule into the PLC: Check the program on the
• Program on the memory submodule is too long memory submodule.
for the PLC's program memory.
ASPFA Saving from the PLC to the memory submodule: Replace the memory
EEPROM memory submodule is defective or too submodule, or use a larger
small for the program in the PLC memory. EEPROM memory
submodule.
ANZ 1/ANZ 0 12 Condition code bits for arithmetic, logic, and shift operations.
OV Arithmetic overflow
OR ID bit of OR memory
STATUS Status ID of operand of last binary statement executed
VKE Result of logic operation (RLO)
ERAB ID bit of first scan
FKT 13 0: O( OR parenthesis open
1: A( AND parenthesis open
FKT 0 : O( 1 : A(
KE1...KE6 Nesting stack entry 1 to 6 entered for A( and O(
STUE Block stack overflow: The maximum block call nesting depth of 16
has been exceeded.
Use the “DIR PC” programmer function to determine the associated block start address.
Example: You have entered a control program consisting of OB1, PB0 and PB7. An illegal
statement has been programmed in PB7.
PB7
PB0
OB1
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
aaaaaa
a
JU PB0 Illegal
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
L PB 0
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
statement
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
JU PB7
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
BE
BE
BE
When it reaches the illegal statement, the CPU interrupts program scanning and enters the STOP
mode with the “NNN” message. The STEP address counter is at the absolute address of the next
(but not yet scanned) statement in the program memory.
i
a
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaa aa
a
xx
aa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programmed blocks.
42
EE
Contents
paring these two addresses.
absolute start addresses of all
5-9
Diagnostics and Troubleshooting S5-100U
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaa
ISTACK byte 25 26 DIR PC
“0006” is the relative address of the statement in PB7 following the statement that
caused the CPU to go into the STOP mode.
During program processing, the following information about jump operations is entered in the block
stack (BSTACK):
• The data block that was valid before program processing exited a block.
• The relative return address
- It specifies the address where program processing will continue after the return from the
called up block.
• The absolute return
- It specifies the memory address in the program memory where program processing will
continue after the return.
You can call up this information with the “BSTACK” programmer function in the STOP operating
mode if a fault caused the CPU to go into the STOP operating mode. “BSTACK” then reports the
status of the block stack at the time the interruption occurred.
Example:
Program scanning was interrupted at function block FB2. The CPU went into the STOP mode with
the error message “TRAF” (because of incorrect DB access, e.g., DB5 is two words long and DB3
is ten words long).
“BSTACK” lets you determine the path used to reach FB2 and lets you know which DB was open
at the time of call up. “BSTACK” contains the three (marked) return addresses.
a
a
a
a
a
aa
a
a
aaaaaa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
PB1
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
00 Interrupt with the
“TRAF” error
message
xx BE
PB4
OB1
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
aa
a
PB2
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
aa
00
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
aaaaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
aa
00 JU PB1
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
00 C DB5
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
02 02 JU PB4
08 JC FB2
04 JU PB2 04 10
06
08 JC PB3
FB2
xx BE xx BE
10 00
PB3
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaa
2A L DW4
xx BE 00 C DB3
16 JU FB2
18 BE xx BE
Fault
yes yes
no Module addressable via
the process input image yes - Check module
Red LED lights. (exchange).
(PII) and the process out-
put image (PIQ) (STA- - Check program.
yes TUS VAR, FORCE VAR)
no Check no
Module power supply
supply ok? no
leads. Bus connection ok? Replace bus unit.
yes
yes Eliminate yes
Short circuit at
short
the outputs? Replace module with
circuit. yes
simulator module. Replaced module
no Is a check with STATUS is defective.
VAR or FORCE VAR
no possible?
Defective
Defective fuse module
no
yes Check connections of
other bus units and
Replace fuse. interface modules.
Possible cause: The battery was installed or changed when the programmable controller
was turned off.
Contact your local Siemens representative if the above measures are ineffective.
6.5 The Structure of Process Image Input and Output Tables ....... 6 - 8
6.5.1 Accessing the Process Image Input Table (PII) . . . . . . . . . . . . . . . 6 - 10
6.5.2 Accessing the Process Image Output Table (PIQ) . . . . . . . . . . . . . 6 - 11
Tables
6 Addressing
The inputs and the outputs have different assigned addresses so that you can access them
specifically. The I/O addresses are the same as the module slot addresses.
When you mount a module in a slot on a bus unit, the module is assigned a slot number and
consequently a fixed byte address in one or both process image I/O tables.
Connect the sensors and actuators to the terminal block. The terminal selected determines the
channel number.
Slot numbers
CPU 0 1 2 3 30 31
If the programmable controller consists of more than one tier, numbering of the expansion tiers is
continued at the slot on the extreme left.
Slot numbers
26 27 28 29 30 31
18 19 20 21 22 23 24 25
8 9 10 11 12 13 14 15 16 17
CPU 0 1 2 3 4 5 6 7
When expanding your system, always add the new bus units to the topmost tier on the right. Other-
wise, the slot numbers on the right of the new bus units will be changed, requiring address changes
in your control program.
Note
After every expansion, check to make certain that the addressing used in the control
program is the same as that in the actual configuration.
Existing configuration
8 9 10 11 12 13
CPU 0 1 2 3 4 5 6 7
8 9 10 11 12 13 14 15 16 17
CPU 0 1 2 3 4 5 6 7
a
a
a
a
a
a
8 9 10 11 12 13 14 15 16 17
8 9 10 11 12 13
Each channel of a digital module is displayed by a bit. This is the reason that every bit must be
assigned its own number. Use the following form for a digital address:
x . y
Bit number (channel number)
Byte number (slot number)
This defines the address used by the control program to evaluate the signal states of the BERO.
• The byte address is 3 since the module is plugged into slot 3.
• As shown on the frontplate, channel number 1 is used.
• The complete address for the BERO switch is 3.1.
Note
You can address 4-channel digital modules only with channel numbers 0 through 3. The
channel numbers 4 through 7 printed on the frontplate are relevant only for the ET 100U
system.
The programmable controller takes this increased address requirement into account when an analog
module is plugged in.
• Eight bytes (=four words) are reserved per slot.
• Two bytes (=1 word) are reserved per channel.
• The slot addressing area is changed.
• The permissible address space extends from byte 64 (slot 0, channel 0) to byte 127 (slot 7,
channel 3).
68+69 2
70+71 ...79 ...87 ...95 ...103 ...111 ...119 ...127 3
Note
Any combination of analog and digital modules is possible in slots 0 through 7.
The byte addresses in the process image input table (PII) and process image output table (PIQ) are
identical. The meaning of the transferred data is usually different.
In addition to the fault LED (red LED), the following output modules can signal errors to the CPU.
4 x 24 V DC / 0.5 A (6ES5 440-8MA12)
4 x 24 V DC / 2.0 A (6ES5 440-8MA22)
4 x 24 to 60 V DC / 0.5 A (6ES5 450-8MB11)
You can read the error messages on input channels I X.0 and I X.1 (not with CPU 100, version
8MA01).
Table 6-1. Error Messages for Output Modules with Error Diagnostics
Address Type of Error
Signal state “1” indicates an error is present. The PII is set to “0” for output modules without error
diagnostics.
The address consists of byte address n or n+1 and channel number Y. “n” is the start address of
a slot, the first of the reserved bytes (e.g., byte 64 for slot 0). “n+1” is therefore the second of the
reserved bytes. The designations “n” and “n+1” are printed on the frontplate of the module.
The channel number is defined by the connection of the actuators and sensors to the crimp
connector. The channel numbers are printed on the frontplate.
Slot Number 0 1 2 3 4 5 6 7
Address Channel 64.0 to 72.0 to 80.0 to 88.0 to 96.0 to 104.0 to 112.0 to 120.0 to
PII (IN) n.0 to n.7 64.7 72.7 80.7 88.7 96.7 104.7 112.7 120.7
and
PIQ Channel 65.0 to 73.0 to 81.0 to 89.0 to 97.0 to 105.0 to 113.0 to 121.0 to
(OUT) n+1.0 to
n+1.7 65.7 73.7 81.7 89.7 97.7 105.7 113.7 121.7
Function modules have module-specific addressing. Some function modules are addressed like
digital modules, and other function modules are addressed like analog modules. The addressing for
each function module is explained in chapter 15.
The PII and the PIQ each have an area of 128 bytes in the RAM memory.
The PII and the PIQ have identical structures. The PII and the PIQ can be divided into three address
areas as shown in Table 6-3.
0 to 31 Digital modules 0 to 31
• The address space for bytes 0 through 31 is reserved for information from or to modules that
are addressed like digital modules.
• The unassigned address space in bytes 32 to 63 can be used to store intermediate results.
• The address space in bytes 64 to 127 is reserved for information from or to modules that are
addressed like analog modules.
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
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a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a aaaaaa aaaaaaaaaaaaaaaaaaaa
7 6 5 4 3 2 1 0
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa a
aa
aa
aa
aa
aa
aa
a aaa aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaa
a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
a aaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaa
Figure 6-7 shows a possible programmable controller configuration and storage of information in the
Addressing
6-9
Addressing S5-100U
Access to the PII is expressed by the operand identifiers “I”, “IB”, or “IW” in a statement in the
control program.
The letter “L” identifies the “Load” operation (see chapter 8). The letter “A” identifies the “AND
logic” operation (see chapter 8).
PII
• Bit-by-bit reading “I <bit address>” Bit number
Example: Reading in the signal state of
7 6 5 4 3 2 1 0
channel 2 of a 4-channel digital input module
in slot 2
aaaaaaa
aaa
Byte 2
a
aa
a
a
a
A I 2.2
L IB 12
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
aaa
a
Byte 12
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
15 0
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
ACCU 1
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
L IW 102
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
Byte 102
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
aaaaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
Byte 103
aaa
aaa a
a
aaa
aaa a
a
aaa a
aaa a
aaa
aaaa
aaa
a
15 0
ACCU 1
High byte Low byte
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
During a program cycle, data coming from the control program to the output modules is written into
the process image output table (PIQ). The data is transferred to the output modules in the following
data cycle.
Access to the PIQ is expressed by the operand identifiers “Q”, “QB”, or “QW” in a statement in
the control program.
The letter “T” identifies the “Transfer” operation (see Chapter 8). The “=” character assigns the
result of a logic operation (RLO) to the operand that follows the character (see chapter 8).
PIQ
aa
a
aa
a
= Q 4.6 Byte 4
aa
aa
a
aa
a
a
a
• Byte-by-byte writing
“QB <byte address>”
Example: Writing the signal states to all
channels of an 8-channel digital output
module in slot 29
aa
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
aa
a
T QB 29
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
aa
Byte 29
aa
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
aa
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
15 0
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
aaaa
a
ACCU 1
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
• Word-by-word writing
“QW <word address>”
Example: Writing an analog value to
channel 2 of a 4-channel analog output
module in slot 6
T QW 116
Byte 116
aaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
Byte 117
15 0
ACCU 1
High byte Low byte
In the event of a time-controlled or process interrupt, the CPU does not access the I/O modules
directly. The CPU stores its information in interrupt process images.
• The interrupt process images are used only for time-controlled or interrupt-driven program
processing.
• The interrupt process images and the “normal” process images have identical structures.
• The interrupt process input image (interrupt PII) and interrupt process output image (interrupt
PIQ) take up an area of 128 bytes each in the RAM.
The interrupt PII and interrupt PIQ can be divided into three address areas as shown in Table 6-4.
Table 6-4. Structure of the Interrupt PII and the Interrupt PIQ
Byte address in interrupt Module Slot number
PII and interrupt PIQ
0 to 31 Digital modules 0 to 31
Note
The interrupt process images can be accessed by byte or word operations only.
• The interrupt PII can only be accessed in connection with time-controlled or interrupt-driven
program processing.
• Data from inputs is read into the interrupt PII only at the beginning of time-controlled program
processing. This data is available only to the time-controlled program for evaluation.
Interrupt PII
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaa
L PY 21 Byte 21
15 0
aaaaaaaa
aaaaaaaa
aaaaaaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaa
ACCU 1
High byte Low byte
Note
The interrupt output data cycle is executed only after the interrupt PIQ has been written
to.
Access to the interrupt PIQ is expressed by the “PB” or “PW” operand identifiers in a statement in
the time-controlled or interrrupt-driven program.
The letter “T” identifies the “Transfer” operation (see chapter 8).
Interrupt PIQ
• Byte-by-byte writing
“PB <byte address>”
Example: Writing signal states to all
channels of an 8-channel digital output
module in slot 13
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aaa
a
T PY 13 Byte 13
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
15 0
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
aaaa
a
ACCU 1
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
• Word-by-word writing
“PW <word address>”
Example: Writing an analog value to channel 3
of a 4-channel analog output module in slot 5
T PW 110
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaa
Byte 110
Byte 111
15 0
ACCU 1
High byte Low byte
The following table gives an overview of the major addresses in the RAM of the three CPUs (in
hexadecimal code).
The following table gives an overview of the most important system data in the system data area.
Tables
7 Introduction to STEP 5
This chapter explains how to program the S5-100U. It describes how to write a program, how the
program is structured, the types of blocks the program uses, and the number representation of the
STEP 5 programming language.
The following methods of representation are possible with the STEP 5 programming language.
• Statement List (STL)
STL represents the program as a sequence of operation mnemonics. A statement has the
following format:
Operation
Operand
aa
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
aaaaaaa
a
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
002: A I 0.1
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
Parameter
Operand ID
Relative address of the statement
in a particular block
The operation tells the programmable controller what to do with the operand. The parameter
indicates the operand address.
• Control System Flowchart (CSF)
CSF represents logic operations with graphics symbols.
• Ladder Diagram (LAD)
LAD graphically represents control functions with circuit diagram symbols.
• GRAPH 5, for CPU 103 and higher
GRAPH 5 describes the structure of sequence control systems.
You cannot use CSF, LAD, or GRAPH 5 with the PG 605 programmers.
Each method of representation has its own special characteristics. A program block that has been
programmed in STL cannot necessarily be output in CSF or LAD. The three methods of graphic re-
presentation are not compatible. However, programs in CSF or LAD can always be converted to
STL. Figure 7-1 illustrates these points in a diagram.
CSF LAD
STL
The STEP 5 programming language has the following three operation types:
• Basic
• Supplementary
• System
Supplementary
Basic Operations System Operations
Operations
Methods of
STL, CSF, LAD STL STL
representation
For users with good
Special features
system knowledge
Refer to Chapter 8 for a description of all operations and for programming examples.
OB, PB, SB
FB, DB (blocks) Program structuring aids
If your automation task is in the form of a circuit diagram, you must convert it to STL, CSF, or LAD.
S1
a
a
a
aa
a
aaaaaa
aa
a
aa
a
a
aaaaaa
a
a
a
a
a
a
aaaaaa
aaa
a
a
a
a
aa
a
a
a
aa
a
aaa
a
a
a
aa
a
aa
a
a
aaa
a
a
a
a
a
a
A I 0.0 I 0.0 I 0.1 Q 1.0
a
a
a
a
aa
a
aa
a
a
aa
aa
a
aaa
a
a
a
a
a
a
I 0.0
a
a
a
a
a
a
aa
a
aa
a
a
a
a
aa
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
S2
a
a
a
a
a
a
a
a
a
A I 0.1 & ( )
a
a
a
a
a
aa
a
a
a
aa
a
a
a
a
a
a
a
aa
a
aa
I 0.1 Q 1.0
a
a
a
a
a
a
aa
a
aa
a
a
a
a
a
a
a
a
a
= Q 1.0
H1
Programming individual operations in one section (block) is sufficient for handling simple automation
jobs. For the S5-100U, this is organization block 1 (see section 7.3.1). The S5-100U scans this
block cyclically. After the S5-100U scans the last statement, it goes back to the first statement and
begins scanning again. Please note the following rules:
• When OB1 is called, five words are assigned to the block header in the program memory (see
section 7.3).
• Normally, a statement takes up one word in the program memory.
Two-word statements also exist (e.g., with the operation “Load a constant”). Count these
statements twice when calculating the program length.
• Like all blocks, OB1 must be terminated by a Block End statement (BE).
To solve complex tasks, it is advisable to divide a program into individual, self-contained program
parts (blocks). This procedure has the following advantages:
• Simple and clear programming, even for large programs
• Program parts can be standardized
• Easy alterations
• Simple program test
• Simple start-ups
• Subroutine techniques (block call from different locations)
The STEP 5 programming language has the following five block types:
• Organization Block (OB)
Organization blocks manage the control program.
• Program Block (PB)
Program blocks arrange the control program according to functional or technical aspects.
• Sequence Block (SB)
Sequence blocks are special blocks that program sequence controls. They are handled like
program blocks. (This is available for CPU 103 and higher.)
• Function Block (FB)
Function blocks are special blocks for programming frequently recurring or especially complex
program parts (e.g., reporting and arithmetic functions). You can assign parameters to them
(available for CPU 103 and higher). They have an extended set of operations (e.g., jump
operations within a block).
• Data Block (DB)
Data blocks store data needed to process a control program. Actual values, limiting values, and
texts are examples of data.
The program uses block calls to exit one block and jump to another. You can therefore nest pro-
gram, function, and sequence blocks randomly up to 16 levels (see section 7.3). Nesting can be up
to 32 levels for CPU 103 version 8MA03.
Note
When calculating the nesting depth, note that the system program in the programmable
controller can call an organization block automatically under certain circumstances
(e.g., OB2).
The total nesting depth is the sum of the nesting depths of call programmed organization blocks. If
nesting goes beyond 16 levels (32 levels for CPU 103 version 8MA03), the CPU goes into the
STOP mode with the error message “STUEB,” block stack overflow (see section 5.2). Figure 7-2
illustrates the nesting principle.
OB 1
.......
.......
The following table lists the most important characteristics of the individual block types:
Number 64 64 64 62
CPU 100 OB0 to OB63 PB0 to PB63 FB0 to FB63 DB2 to DB63
Number 64 64 64 62
CPU 102 OB0 to OB63 PB0 to PB63 FB0 to FB63 DB2 to DB63
Number 256 256 256 2562 254
CPU 103 OB0 to OB255 PB0 to PB255 SB0 to SB255 FB0 to FB255 DB2 to DB255
Length (max.)
4 Kbytes 4 Kbytes 4 Kbytes 256 data words
CPU 100
Length (max.)
4 Kbytes 4 Kbytes 4 Kbytes 256 data words
CPU 102
Length (max.)
8 Kbytes 8 Kbytes 8 Kbytes 8 Kbytes 8 Kbytes
CPU 103
7-8
byte
order)
Absolute
addresses
Programming
Block Structure
(in ascending
Introduction to STEP 5
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
a
a aaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaa
a
a aaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaa
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
a
a
a aaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaa
The block header that specifies the block type, number, and length
a
a aaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaa
Figure 7-3. Structure of a Block Header
a
a aaaaaaaaaaa aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
a
a
a aaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaa
a
a aaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaa
a
aaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaa
aaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaa
pattern
Block type
Block length
Block number
Library number
Programmer ID
Synchronization
OB2
OB1
aaaaaaaa
7.3.1
OB31
OB34
OB22
OB21
OB13
OB251
OB No.
S5-100U
Function
aaa aa
aa
aaaa
aaa aa
a aa
a a aa aa
aaa aaaaaa
a
aa
a
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
aaa
a
aa
a
a
aa
a
aa
a
aa
a
aa
aaa
a
aa
a
a
aa
aa a
aa
a a
aa
a
aaa aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a a
aa
aa
a a
aa
a a
aa
a
Organization block OB1 is called cyclically by the operating system.
You must program the OB. The operating system calls up the OB.
aaa aa
aa
aa
aaa aa
aaa
aa
aa
aa
aa
aa
aa
aa
aa
aaa aa
aaa
aa
aa
aaa aa
aa
a a
aa aa
aaa aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a aaa a
aa
a a
aa
a
aaa aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a a
aa
aa
a a
aa
a a
aa
a
aaa aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
a a
aa
aaa aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a aa
aaa
aa
aa
aa
aaaa
a
a
aaa aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
a a
aa
a
aaa aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
a a
aa
a
aaaaaa aaaaaaaaaaaaa aaaaaaa aaaaaa aa
CPU 102
aaa a
aaa
aaa
aaa
aa
aaa aaaaaaaaaaaa
aa
a aaaaaa
aa
a aaaaaa a
aa
a
aaaaaaaaaaaaaaaaaaaaaaaaaa aaa aaaaaa
a
aa
a
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
aaa
a aaaaaaaaaaaaa
aa
a
a
aa
a
aa
a
aa
a
aa
aaa
a
aa
a
a
aa
a
aa
a
aa
a
aa
a
aa
a aa
a
aaaaa aaaaaaaaaaaaa aaaaaaaaaaaaa aaaaaaa aaaaaa aa
OB integrated in
You can program all organization blocks using parameters from the permissible range. CPU 100
aaaaaaaaaaaaaaaaaaaaaaaaaa aaa aaaaaa aaaaaaaaaaaaa aaaaaaaaaaaaa aaaaaaa aaaaaa aa
aaaaa aaaaaaaaaaaaa aaaaaaaaaaaaa aaaaaaa aaaaaa aa
Some organization blocks are event-driven or time-controlled. They can be called in response
blocks). They can be called by the control program (for CPU 103 and higher; see section 9.3).
and CPU 102 use organization blocks OB0 to OB63. CPU 103 uses OB0 to OB255. However, you
Organization blocks (OB) form the interface between the operating system and the control program.
aaaaaaaaaaaaaaaaaaaaaaaaaa a
aaa
aa
aa
aa
aa
aa a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa a
aa
aa
aa
aa
aa
aa aa
aaa
aa
aa
aa
aa
aaaaaaaaa
7-9
Introduction to STEP 5
aaaaaaaaaaaaa aaaaaaa
a aaaaaaaaaaaaa
a aaaaaaaaaaaaa
a aaaaaaa
a
a
aa
aa
aa
a
aaaa
7-10
a
aa
aa
aa
a
a
aa
aa
aa
a
a
aa
aa
aa
a
a
aa
aa
aa
a
a
aa
aa
aa
a
a
aa
aa
aa
a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaa
aa
aaa
aa
a a
aa
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a
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaaaaa
aaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
a
aa
aa
aa
a aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaaaaa
aaa
aaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
a
aa
aa
aa
a
System program
* For CPU 103 and higher
a
aa
aa
aa
a
a
aa
aa
aa
a
a
aa
aa
aa
a
OB1
a
aa
aa
aa
a
a
aa
aa
aa
a
aa
aaa
aa
a
a
a
aa
aaa
a
aaaa
OB21/OB22
a
aa
aa
aa
a
a
aa
aa
aa
a
a
aa
aa
aa
a
aaa
aaaa
a
FB2
PB1
Control program
SB1*
FB61
Call
Block calls JU and JC activate program blocks. You can program these operations in all block types
except data blocks. Block call and block end cause the RLO to be reloaded. However, the RLO
can be included in the “new” block and be evaluated there.
Sequence blocks (SB) are special program blocks that process sequence controls. They are treated
like program blocks.
Frequently recurring or complex control functions are programmed in function blocks (FB).
If you are using CPU 102 version 8MA02 or higher, you have the following types of function blocks
available:
• FBs that you can program
• FBs that are integrated in the operating system (see section 9.2)
• FBs that are available as software packages (standard function blocks, see Catalog ST 57)
Block Header
Besides the block header, function blocks have organizational information that other blocks do not
have.
Block header
Name
NAME: EXAMPLE
aaaaaaaaaa
aaaaaaaaaa
aaaaa
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaa
aaaaaaaaaaa
DES: IN 1 I BI Block parameter
a
a
a
a
a
a
aa
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
aa
aa
DES: IN 2 I BI
a
a
a
a
a
a
aa
a
aa
Name
a
a
a
a
a
a
aa
a
aa
aa
Block
a
a
a
a
a
a
aa
a
aa
a
a
a
a
a
a
a
a
a
a
parameter DES: OUT 1 Q BI
. Data type
.
. Parameter type
: A = IN 1
: A = IN 2
Control
program : == OUT 1
.
.
.
Memory assignment Program example
Figure 7-5. Programming a Function Block Parameter, for CPU 103 and Higher
Table 7-4. Block Parameter Types and Data Types with Permissible Actual
Parameters, for CPU 103 and Higher
Parameter
Data Type Permissible Actual Parameters
Type
I, Q BI for an operand with bit address I x.y Inputs
Q x.y Outputs
F x.y Flags
B Type designation not permitted DBx Data blocks. The C DBx operation is
executed.
OBx Organization blocks are called
unconditionally (JU ... x).
FBx Function blocks (permissible without
parameters only) are called
unconditionally (JU..x).
PBx Program blocks are called
unconditionally (JU..x).
SBx Sequence blocks are called
unconditionally (JU..x).
Function blocks can be called only if they have been programmed. When a function block call is
being programmed, the programmer requests the parameter list for the FB automatically if block
parameters have been defined in the FB.
Example: The name (DES) of a parameter is IN1, the parameter type is I (as in input), the data
type is BI (as in bit). The formal operand for the FB has the following structure:
DES: IN1 I BI
Specify in the parameter list of the calling block which actual operand is to replace the
formal operand in the FB call. In our example it is : I 1.0.
Enter in the parameter list:
IN1: I 1.0
When the FB is called, it replaces the formal operand “IN1” with the actual operand
“I 1.0”.
Figure 7-6 provides you with a detailed example of how to set parameters for a function block.
The FB call takes up two words in the internal program memory. Each parameter takes up an
additional memory word.
You can find the memory requirements for standard function blocks and the run times in the
specifications in Catalog ST 57.
The name of the function block is stored in the function block. The designations (DES) of the
function block inputs and outputs that appear on the programmer during programming are also
stored in the function block. Before you begin programming on the programmer, you must choose
one of the following two options:
• Transfer all necessary function blocks to the program diskette (for off-line programming)
• Input all necessary function blocks directly into the program memory of the programmable
controller
Executed
PB 3 FB 5 program
NAME : EXAMPLE
DES: X1 I BI
DES: X2 I BI
: JU FB5 DES: X3 Q BI
: A = X1
NAME : EXAMPLE : A = X2 First call
X1 : I 0.0 : = = X3 A I 0.0
Parameter list
X2 : F 1.3 for first call : BE A F 1.3
X3 : Q 1.0 = Q 1.0
. Formal operands
. Actual operands
: A I 0.1
: JC FB5
NAME : EXAMPLE Second call
X1 : I 0.3 A I 0.3
Parameter list
X2 : I 0.2 for second call A I 0.2
X3 : Q 1.0 = Q 1.0
Formal operands
If the information takes up less than 16 bits, the high-order bits are padded with zeros. Data input
begins at data word 0 and continues in ascending order. A data block can hold up to 256 data
words. You can call up or change the data word contents with load or transfer operations.
You can also create or delete data blocks in the control program (see section 8.1.8).
Valid Valid
DB PB7 PB20 DB
C DB10 DB10
DB10
C DB11
JU PB20
DB11
DB10
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaa
When PB20 is called, the valid data area is entered into memory.
When the program jumps back, this area is reopened.
Figure 7-8. Validity Areas of Data Blocks
Some of the organization blocks (OBs) are responsible for structuring and managing the control
program.
The S5-100U has additional OBs whose functions are similar to those of integral function blocks
(e.g., PID control algorithm). These OBs are described in chapter 9.
Comparing Programming Possibilities for CPU 100, CPU 102, and CPU 103
Interrupt-driven No No Yes
(for 8MA02 and higher)
Time-controlled No No Yes
(for 8MA02 and higher)
Integral FBs No Yes Yes
(for 8MA02 and higher)
Graph 5 No No Yes
Beginning with section 7.4.2, you learn which special organization blocks each of the CPUs has
available to perform the programming tasks described in Table 7-5. You also learn which pre-
cautions you need to take when you program.
Program processing is faster in the normal mode, but you can not use the STATUS test function.
Transferring from one mode to the other is called a mode change.
Test Mode:
Scanning the STEP 5 program
Normal Mode:
The control program you have written in STEP 5 is not processed directly. What is processed is a
translated or runtime-optimized form of the program generated by the programmable controller.
Cycle trigger
Cycle trigger
Control Runtime-
Assemble
program optimized
(compile)
in STEP 5 program
Transfer
data
Transfer
data
The CPU RAM contains the STEP 5 program and the compiled program to be processed.
Program Change
You can enter, modify, or erase PBs, OBs and FBs only in the test mode.
You can read out the STEP 5 program with the programmer.
Diagnostics
The “BSTACK” diagnostics function cannot be activated.
Fault Analysis
The ISTACK bytes 23 to 27 are not valid. Therefore, you cannot determine the point in a program
where an interruption took place (programmable controller in STOP, e.g., programmed loop with
timeout). However, when compiling the program, errors (e.g., illegal operations and parameters) are
detected and displayed by the STEP address counter in the ISTACK. This counter points to the
error in the STEP 5 program.
a
aa
a a
a a
a a
a a
a a
a a
a a a a a a a a a a a
aa a a a a a a a a a
a a
a a
a a
a a
a a
a a
a a
a a
a a
aa aa aa aa aa aa
aa a a a a a a a a a
Mode Change
aa a a a a a a a a a aaaaaaaaaaaaaaaaaaaa
a
a
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aaaaaaaaaaaaaaaaaaaa
a a a a a a a a a a
aaa
aa a
a a
a a
a a
a a
a a
a a
a a
a a
aa
a
aaaa a
a a
a a
a a
a a
a a
a a
a a a a a a a a a a a a
a a
a a
a a
a a
a a
a a
a a
a a
a a
aa
a
a a a a a a a a a
a a
a a
a a
a a
a a
a a
a a
a a
a a
a a a a a a a a a a
aaaaaaaaaaaaaaaaaaa a a a a a a a a aaaaaaaaaaaaaaaaaaaa
module
aa a a a a a a a a
hold it down
a a a a a a a a aaaaaaaaaaaaaaaaaaaa
submodule
Test
aa
aa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
a a a a a a a a a aaaaaaaaaaaaaaaaaaaa
(manual)
aa a a a a a a a a
mode
aaaaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
a a
a a
a a
a a
a a
a a
a a
a a
a a
aa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaaa a a a a a a a a a a a a a a a aa
Load program
a a a a a a a a a a a a a a a a a aaaaaaaaaaaaaaaaaaaa
Reset PLC
a a a a a a a a a a
(without PG)
a a a a a a a a aaaaaaaaaaaaaaaaaa a
aa a a a a a a a a
a a a a a a a a a a
flickering
submodule
Battery required
CPU’s RAM
(with PG)
Load program
the red LED starts
3. Perform an overall
- Program is stored in
4. Press COPY key for at
EEPROM submodule
a
aa
aa
aa
aa
aaaaaaaaaaaaa
a
aa
aa
aa
aa
aaaaaaaaaaaa
aaaaa a a a
a a
a a
a
aaaaaaaaaaaaa
a
a a a a aaaa a aaaaaaa
a a a a a a a aa
aa
aaa
aa
aaa
aa
aaa
aa
aaa
aa
aaa
aa
aaa
aa
aaa
aa
aa
aaaa aa aa aa aa a
a
a a
a a
a a
a a
a a
a a
a a
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
a a
aa
a a
aa
a a
aa
a a
aa
a a
a
resumed.
a a aaaaaaaaaaaaaaaa a a a a a a a a a a
aa
a a
aa
a a
aa
a a
aa
a a
aa
a
a a aaaaaaaaaaaaaaaa a a a a a a a a a
loaded
interrupted
a aa aaaaaaaaaaaaaaaa aa
aaaa
aaaa
aaaa
aa a
aa
a a a a a a a a aaaaaaaaaaaaaaaaaaaa aa aa aa aa
submodule
aaa
a aa
aaaaaa
aaa
aaa
aaa
aaa
aaa
aaa
a a aa aa aa aa
aaa
aaaa
aaaa
aaaa
aaaa
aaaa
aaaa
aaaa
aaaa
aaaa
a aa
a aa
a aa
a aa
a aa
a aa
a aa
a aa
a aa
a aa aa aa aa aa
(automatic)
aaaaaaaaaaaaaaaaaaaa a a a a a a a a a aa aa aa aa aa
1. Reset the PLC
aa aa aa aa aa
mode
aaaaaaaaaaaaaaaaaaaa a a a a a a a a a
Load program
3. Plug in memory
at STOP or Power
when program
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
a a a a a a a a a a
7-21
Introduction to STEP 5 S5-100U
Bit
Byte 7 6 ...
1
2
.
.
.
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
6 KEIN
AS
7
.
.
.
You can use a programmer to check the current processing mode in the ISTACK. The ISTACK
display, byte 6, is possible in RUN and STOP (see section 5.2).
Example 1: Example 2:
A I 0.0 5 A I 0.0 5
AN I 1.1 6 AN I 0.1 2
ON I 2.3 6 ON I 0.3 2
O I 3.5 6 O I 0.5 2
= Q 4.2 8 = Q 4.2 8
A F 15.1 5 A F 15.1 5
A F 16.3 6 A F 15.3 2
AN F 17.7 6 AN F 15.7 2
= Q 4.5 8 = Q 4.5 8
2
1
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
7-24
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
7.4.2
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
Introduction to STEP 5
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
Interpret DB12
Processing OB21
counters, and flags.
Interrupts are not processed.
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
OB21 is called up for a manual cold restart.
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
START-UP Program Processing
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
Process OB1
Read in the PII
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
Interpret DB12
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
Processing OB22
Power recovery1
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
the battery was not inserted, you must insert a memory submodule containing the valid blocks.
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
If you have programmed start-up OBs, they are processed before the cyclic program processing
occurs. The start-up OB program is appropriate, for example, for a one-time presetting of certain
aaaaaaaaaaaaaaaaaaaaaaaaaaaa UP
Cold
RUN
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
system data. If the appropriate start-up OB is not programmed, the programmable controller jumps
restart
routine
In the START-UP mode, the operating system of the CPU automatically calls up a start-up OB if the
START-
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
OB22 is called up for an automatic cold start after power recovery if the programmable controller
This is the procedure if the programmable controller was in the RUN mode when the power went off,
if the mode switch was still on RUN when the power was restored, and if the battery was inserted. If
The following two examples show you how you can program a start-up OB.
You can set the monitoring time (see Table 6-6). You could
have a control program that is so complex that it cannot be
processed within 300 ms. With CPU 103 and higher, you can
use OB31 (see section 9.3) to lengthen (retrigger) the scan
monitoring time in the control program. Transfer
Monitoring time is exceeded, for example, if you program data
endless loops or if there is a malfunction in the programmable
controller.
Response Time
Response time tR is defined as the time between a change in the input signal and the subsequent
change in the output signal.
tTm
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
tRm = tG ( 1 + ) + tTm.
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
10 ms
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
During the transition from STOP to RUN, there is a one-time increase in the response time to about
200 ms.
Response
a
a
a
a
aaaaa
a
a
a
a
a
a
aa
a
a
a
a
Input
aa
a
a
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
a
module
delay
1
I 0.0
0
1
Q 1.0 0
Time
OB13 is available for time-controlled program processing when using CPU 103 version 8MA02 and
higher. You determine the intervals at which you want the operating system to process OB13. It is
also possible to change the call-up intervals during cyclic program processing. Cyclical program
processing continues if OB13 is not programmed.
• Saving data
If a time-controlled OB uses scratchpad flags that are also used in the cyclic control program,
then these scratchpad flags must be saved in a data block during the processing of the time-
controlled OB.
Note
When processing OB13, you may not exceed the block nesting depth of 16 levels.
When processing with CPU 103 (6ES5 103-8MA03), you may not exceed the block
nesting depth of 32 levels.
Note
The interrupt output data cycle is executed only if the interrupt PIQ has been written to.
For CPU 103 version 8MA02 and higher, interrupt-driven program processing is initiated when a
signal from the process causes the CPU to interrupt the cyclic or time-controlled program
processing and execute a specific program. When this program has been scanned, the CPU returns
to the point of interruption in the cyclic or time-controlled program and resumes scanning at that
point. Chapter 10 contains detailed information about interrupt processing.
These three programmer functions make it possible for you to make the following types of changes:
• Delete, insert, or overwrite statements.
• Insert or delete segments.
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Valid
blocks
Invalid
Compress Input
possible
Input not
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaa
possible
PB
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa
PB Available
memory space
You can use the COMPRESS programmer function to clean up internal program memory.
If there is a power failure during the compress operation when a block is being shifted and block
shifting can not be completed, the CPU remains in the STOP mode. The “NINEU” error message
appears. Both the“BSTSCH” and the “SCHTAE” bits are set in the ISTACK.
Remedy: Overall reset.
With STEP 5 you can work with numbers in the following five representations:
• Decimal numbers from -32768 to +32767 (KF)
• Hexadecimal numbers from 0000 to FFFF (KH)
• BCD-coded numbers (4 tetrads) from 0000 to 9999
• Bit patterns (KM)
• Constant byte (two-byte representation) from 0 to 255 for each byte (KY)
Number Formats
The programmable controller is designed to process binary signal states (only “0” and “1”).
Therefore the programmable controller represents all numbers internally as 16-bit binary numbers or
as bit patterns.
Four bits can be combined into a tetrad (BCD) to shorten the binary code representation. The value
of these tetrads can be displayed in hexadecimal representation.
Word no. n
Bit no. 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
aaaaaaaaaa
aaaaaaaaaa
aaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaa
Hexadecimal representation 1 F 6 3
You can work with binary-coded decimals to program timers and counters in the decimal system.
Word No. n
Bit No. 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
BCD No. 0 0 0 0 1 0 0 1 0 0 1 1 0 0 0 1
a
a
a
aaaaa
a
a
aa
a
aa
a
a
aa
a
aa
a
a
a
a
a
a
a
a
a
aa
aa
aa
aa
aa
aa
a
a
a
a
a
a
a
a
aa
aa
aa
aa
Decimal format 0 9 3 1
a
a
a
a
a
a
a
a
a
a
aa
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
Figure 7-17. BCD and Decimal Formats
You can use the “LC” operation to convert a binary number to a BCD number for timers and
counters.
aa
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
aaaaa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
High Byte Low Byte
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
0 0 0 0 0 0 0 1 1 1 1 1 0 0 1 1 0 0 0 0 0 0 0 1 1 1 1 1 0 0 1 1
L KF+499 L KF+499
0 0 0 0 0 1 0 0 1 0 0 1 1 0 0 1 0 0 0 0 0 0 0 1 1 1 1 1 0 0 1 1
LC C 1 L C1
Tables
Basic Operations
8-1 Overview of Boolean Logic Operations . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 2
8-2 Overview of the Set/Reset Operations . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 7
8-3 Overview of Load and Transfer Operations . . . . . . . . . . . . . . . . . . . . . . 8 - 11
8-4 Overview of Timer Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 15
8-5 Overview of Counter Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 25
8-6 Overview of Comparison Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 30
8-7 Overview of Arithmetic Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 31
8-8 Overview of Block Call Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 33
8-9 Other Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 38
Supplementary Operations
8-10 Load Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 40
8-11 Enable Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 41
8-12 Overview of Bit Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 42
8-13 Effect of “TB” and “TBN” on the RLO ......................... 8 - 42
8-14 Overview of Digital Logic Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 44
8-15 Overview of Shift Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 48
8-16 Overview of Conversion Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 50
8-17 Decrement/Increment Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 52
8-18 Disable/Enable Interrupt Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 53
8-19 Overview of the “DO” Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 54
8-20 Overview of Jump Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 56
8-21 Overview of Binary Logic Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 58
8-22 Overview of Set/Reset Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 59
8-23 Overview of Load and Transfer Operations . . . . . . . . . . . . . . . . . . . . . . 8 - 60
8-24 Overview of Timer and Counter Operations . . . . . . . . . . . . . . . . . . . . . . 8 - 61
8-25 “DO” Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 63
8-26 Overview of Set Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 64
System Operations
8-27 Overview of Load and Transfer Operations . . . . . . . . . . . . . . . . . . . . . . 8 - 65
8-28 Overview of the “ADD” Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 - 67
8-29 The “TAK” and “STS” Operations ............................ 8 - 68
8-30 Condition Code Settings for Comparison Operations . . . . . . . . . . . . . . . . 8 - 69
8-31 Condition Code Settings for Fixed-Point Arithmetic Operations . . . . . . . . . 8 - 69
8-32 Condition Code Settings for Digital Logic Operations . . . . . . . . . . . . . . . 8 - 70
8-33 Condition Code Settings for Shift Operations . . . . . . . . . . . . . . . . . . . . . 8 - 70
8-34 Condition Code Settings for Conversion Operations . . . . . . . . . . . . . . . . 8 - 70
8 STEP 5 Operations
The STEP 5 programming language has the following three operation types:
• Basic Operations include functions that can be executed in organization, program, sequence,
and function blocks. Except for the addition (+F), subtraction (-F), and organizational ope-
rations, the basic operations can be input and output in the statement list (STL), control system
flowchart (CSF), or ladder diagram (LAD) methods of representation.
• Supplementary Operations include complex functions such as substitution statements, test
functions, and shift and conversion operations. They can be input and output in STL form only.
• System Operations access the operating system directly. Only an experienced programmer
should use them. System operations can be input and output in STL form only.
Table 8-1 provides an overview of Boolean logic operations. Examples follow the table.
) Close parenthesis
Conclude the expression enclosed in parentheses.
A Scan operand for “1” and combine with RLO through logic AND
The result is “1” when the operand in question carries signal state “1”.
Otherwise the scan results in “0”. Combine this result with the RLO in the
processor through logic AND1.
O Scan operand for “1” and combine with RLO through logic OR
The result is “1” when the operand in question has signal state “1”.
Otherwise the scan results in “0”. Combine this result with the RLO in the
processor through logic OR1.
AN Scan operand for “0” and combine with RLO through logic AND
The result is “1” when the operand in question has signal state “0”.
Otherwise the scan results in “0”. Combine this result with the RLO in the
processor through logic AND1.
ON Scan operand for “0” and combine with RLO through logic OR
The result is “1” when the operand in question has signal state “0”.
Otherwise the scan results in “0”. Combine this result with the RLO in the
processor through logic OR1.
AND Operation
The AND operation scans to see if various conditions are satisfied simultaneously.
Q 1.0
&
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
A I 0.1 I 0.1
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
A I 0.2
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
aaaaa
a
I 0.2 Q 1.0
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
= Q 1.0 I 0.0 I 0.2 Q 1.0
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
OR Operation
The OR operation scans to see if one of two (or more) conditions has been satisfied.
Q 1.0
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaa
I 0.0 Q 1.0
O I 0.0
O I 0.1 I 0.0
aaaaaaaa
aaaaaaaa
aaaaaaaaaaaa
aaaaaaaa
aaaa
>=1 I 0.1
O I 0.2 I 0.1
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
= Q 1.0
I 0.2 Q 1.0
I 0.2
Q
I
I
I
I
STL
been satisfied.
1.0
0.3
0.2
0 1
0.0
STEP 5 Operations
I 0.3
I 0.2
I 0.1
I 0. 0
aa
aaaaa
aaa
a aa
a aa
aaa
a aa
a aa
aaa
a aa
aaaaa
aaa
a
a
aa
aa
aa
aa
a a
aa
aa
aa
a a
aa
aa
aa
a a
aa
aa
aa
aa
a
&
&
CSF
>=1
Q 1.0
Output Q 1.0 is “1” when at least one AND condition has
a
aa
aa
aa
aa
a a
aa
aa
aa
aa
a
a
aa
aa
aa
aa
a a
aa
aa
aa
aa
a
a
aa
aa
aa
aa a
aa
aa
aa
aa
I 0.2
I 0.0
aa
aaaaa
aaa
a aa
aaaaa
aaa
a
I 0.1
I 0.0
aaaa
aaaaa
a aaaa
aaaaa
a
a
aa
aa
aa
a a
aa
aa
aa
aa
a
a
aa
aa
aa
a a
aa
aa
aa
aa
a
a
aa
aa
aa
a a
aa
aa
aa
aa
a
I 0.3
I 0.1
aaaa aaaaa
LAD
a
aa
aa
aa a
aa
aa
aa
aa
Q 1.0
aaaa
a aaaaa
a
I 0.3
I 0.2
aa
Circuit Diagram
a
aaa
aa
aa
a
aa
aaa
aaa
aaa
aa
a
a
aa
aa
aa
aa
a
Q 1.0
a
aa
aa
aa
aa
a
aaaa
aaaaa
a
A(
S5-100U
Q
I
I
I
I
STL
been satisfied.
1.0
0.3
0.2
0.1
0.0
I 0.3
I 0.2
I 0.1
I 0.0
a
aa
aa
aa
aa a
aa
aa
aa
aa a
aa
aa
aa
aa a
aa
aa
aa
aa
OR before AND Operation
aa
aaaaa
aaa
a aa
aaaaa
aaa
a aa
aaaaa
aaa
a aa
aaaaa
aaa
a
aaaa
aaaaa
a aaaa
aaaaa
a aaaa
aaaaa
a aaaa
aaaaa
a
&
CSF
• Input I 0.1 and either input I 0.2 or I 0.3 is “1”.
>=1
aaaaaa
Output Q 1.0 is “1” when one of the following conditions
a
aa
aa
aa
aa
aa
a
aaaaa
aa
a
Q 1.0
aa
aaa
aa
aaa
a
aa
aa
aa
aa
aa
a
Output Q 1.0 is “0” when none of the AND conditions has
a
aa
aa
aa
aa
aa
aaaaaa
a
a
aa
aa
aa
aa
a a
aa
aa
aa
aa
a a
aa
aa
aa
a
I 0.0
a
aa
aa
aa
aa
a a
aa
aa
aa
aa
a a
aa
aa
aa
a
a
aa
aa
aa
aa
a a
aa
aa
aa
aa
a a
aa
aa
aa
a
aaaaa aaaaa aaaa
I 0.3
I 0.2
I 0.0
a
aa
aa
aa
aa
a a
aa
aa
aa
aa
a a
aa
aa
aa
a
aaaa
aaaaa
a a
aa
aa
aa
aa
a aaa
aaaa
a
a
aa
aa
aa
aa
aa
a
I 0.2
aa
aaa
aaa
a
aa
aa
aa
aa
a
I 0.1
a
aa
aa
aa
aa
a
LAD
aaaa
Q 1.0
aaaaa
a
I 0.3
Circuit Diagram
I 0.1
a
aa
aa
aa
aa
a
a
aa
aa
aa
aa
a
aaaaa
Q 1.0
a
aa
aa
aa
aa
a
a
aa
aa
aa
aa
aaaaa
a
8-5
STEP 5 Operations
STEP 5 Operations S5-100U
I 0.2 I 0.3
Q 1.0
A( I 0.0 >=1
a
a
a
a
a
a
a
a
aaaaa
a
a
aa
a
a
a
a
a
a
a
aaaaa
a
a
a
a
a
a
a
a
a
aaaaa
a
O I 0.0
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
I 0.0 I 0.2 Q 1.0
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
O I 0.1 &
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
I 0.1
)
a
a
a
a
a
a
a
a
aaaa
a
a
aa
a
a
a
a
a
a
aaaa
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
I 0.1 I 0.3
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
A(
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
O I 0.2 I 0.2 >=1
O I 0.3
)
I 0.3 Q 1.0
= Q 1.0
Set/reset operations store the result of logic operation (RLO) formed in the processor. The stored
RLO represents the signal state of the addressed operand. Storage can be dynamic (assignment)
or static (set and reset). Table 8-2 provides an overview of the set/reset operations. Examples
follow the table.
R Reset
The first time the program is scanned with RLO = “1”, signal state
“0” is assigned to the addressed operand. An RLO change does
not affect this status.
= Assign
Every time the program is scanned, the current RLO is assigned to
the addressed operand.
ID Parameter CPU 100 CPU 102 CPU 103
I 0.0 to 127.7 0.0 to 127.7 0.0 to 127.7
Q 0.0 to 127.7 0.0 to 127.7 0.0 to 127.7
F 0.0 to 127.7 0.0 to 127.7 0.0 to 255.7
*
a
aa
aa
a
aaaaaaaa
aaa aaaaaaaa
8-8
R
A
S
A
a
aa
aa
a aaaaaaaa
aaa
NOP
a
aa
aa
a
aaaaaaaa
aaaa
aaa
NOP 0
aa
aaa
aaaaaaaaaaaaa
0
Q
I
Q
I
a
aa
aa
a aaaaaaaa
program.
aaa
STL
a
aa
aa
a
aaaaaaaa
aaaa
*
aa
aaa
a
a
aa
a
aaaaaaaaaaaaa
a
aaa aaaaaaaa
1.0
0.0
1.0
0.1
aaa
STEP 5 Operations
a
aa
aa
a
aaaaaaaa
a
aa
aa
a
aaaaaaaa
a
aa
aa
a
aaaaaaaa
aaa aaaaaaaa
automatically.
a
aa
aa
a aaaaaaaa
a
aa
aa
a aaaa
aa
aaa
aaaaaaaaaaaaa
a
aa
aa
a aaaaaaaa
I 0.0
I 0.1
aaa
Example
a
aa
aa
a
aaaaaaaa
a
aa
aa
a
aaaaaaaa
a
aa
aa
a
aaaaaaaa
a
aa
aa
a
aaaaaaaa
R
aaa aaaaaaaa
CSF
a
aa
aa
a aaaaaaaa
Q 1.0
aaa aaaa
Q
aa
aaa
a
a
aa
a
aaaaaaaaaaaaa
a
a
aa
aa
a
aaaaaaaa
a
aa
aa
a
aaaaaaaa
aaaa
In this example, resetting output Q 1.0 has priority.
aaa
signal (input I 0.0) are applied at the same time, the
output Q 1.0 is maintained, i.e., the signal is latched.
aa
aaa
aaaaaaaaaaaaa
aaa
A I 0.0) is in effect during processing of the rest of the
aaa aaaaaaaa
A “1” at input I 0.0 resets the flip-flop (signal state “0”).
aaa
the signal state at input I 0.1 changes to “0”, the state of
aaa aaaaaaaa
Flip-Flop for a Latching Signal Output (reset dominant)
aaa
A “1” at input I 0.1 sets flip-flop Q 1.0 (signal state “1”). If
aaa aaaaaaaa
scanning operation that was programmed last (in this case
a
aa
aa
a aaaaaaaa
a
aa
aa
a aaaaaaaa
a
aa
aa
a aaaaaaaa
a
aa
aa
a aaaa
a
aa
aa
aa
a a
aa
aa
aa
aa
a
aa
a
a
aa
a
aaaaaaaaaaaaa
a
a
aa
aa
aa
a a
aa
aa
aa
aa
a a
aa
aa
a
aaaaaaaa
a
aa
aa
aa
a a
aa
aa
aa
aa
a a
aa
aa
a
aaaaaaaa
aaaa
aaa aaaa aaa
I 0.0
I 0.1
aa
a aa
aaa
a aa
aaaaa
aaa
a aa
aaa
aaaaaaaaaaaaa
a
aaaa a
aaaaa a
aa
aa
a aaaaaaaa
aa
aa
aa
a aa
aa
aa
aa
a a
aa
aa
a aaaaaaaa
S
a
aa
aa
a aaaaaaaa
aaa
I 0.0
aaa aaaaaaaa
Q 1.0
a
aa
aa
a aaaaaaaa
Q
a
aa
aa
a aaaaaaaa
LAD
a
aa
aa
a aaaa
aa
aaa
aaaaaaaaaaaaa
a
aa
aa
a aaaaaaaa
aaa
Circuit Diagram
aaa aaaaaaaa
Q 1.0
a
aa
aa
a aaaa
with a screen. During programming in LAD and CSF, such “NOP 0” operations are allotted
I 0.1
aa
aaa
aaaaaaaaaaaaa
a
aa
aa
a aaaaaaaa
aaa
“NOP 0” is necessary if the program is to be represented in LAD or CSF form on programmers
a
aa
aa
a
aaaaaaaa
a
aaa
aa
aaaaaaaa
aaaa
a
aaa
a
a
a
a
aa
a
a
aaaaaa
a
a
a
a
aa
a
A I 0.1 F 1.7 I 0.1 F 1.7
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
R F 1.7 R
aa
a
aa
a
a
a
a
a
aaaa
a
I 0.1 R
a
a
a
a
a
aa
a
a
aaaaa
a
aa
aa
a
a
a
a
a
A I 0.0 Q 1.0
a
a
a
a
a
a
aa
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
I 0.0
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
S F 1.7
S Q
A F 1.7 I 0.0 S Q Q 1.0
= Q 1.0
Information flows indirectly via accumulators (ACCU 1 and ACCU 2). The accumulators are special
registers in the programmable controller that serve as temporary storage. They are each 16 bits
long. The accumulators are structured as shown in Figure 8-1.
ACCU 2 ACCU 1
15 8 7 0 15 8 7 0
You can load and transfer permissible operands in bytes or words. For exchange in bytes, infor-
mation is stored right-justified, i.e., in the low byte.
The remaining bits are set to zero.
You can use various operations to process the information in the two accumulators.
Load and transfer operations are executed independently of condition codes. Execution of these
operations does not affect the condition codes.
You can program load and transfer operations graphically only in combination with timer or counter
operations; otherwise you can represent them only in STL form.
Table 8-3 provides an overview of the load and transfer operations. Examples follow the table.
ID Parameter
CPU 100 CPU 102 CPU 103
IB 0 to 127 0 to 127 0 to 127
IW 0 to 126 0 to 126 0 to 126
QB 0 to 127 0 to 127 0 to 127
QW 0 to 126 0 to 126 0 to 126
FY 0 to 127 0 to 127 0 to 255
FW 0 to 126 0 to 126 0 to 254
DR 0 to 255 0 to 255 0 to 255
DL 0 to 255 0 to 255 0 to 255
DW 0 to 255 0 to 255 0 to 255
T1 0 to 15 0 to 31 0 to 127
C1 0 to 15 0 to 31 0 to 127
PY ----- ----- 0 to 127
PW ----- ----- 0 to 126
KM1 random bit random bit random bit
pattern (16 bits) pattern (16 bits) pattern (16 bits)
KH1 0 to FFFF 0 to FFFF 0 to FFFF
KF1 -32768 to+32767 -32768 to +32767 -32768 to +32767
KY1 0 to 255 0 to 255 0 to 255
per byte per byte per byte
KB1 0 to 255 0 to 255 0 to 255
KS1 any 2 any 2 any 2
alphanumeric alphanumeric alphanumeric
characters characters characters
KT1 0.0 to 999.3 0.0 to 999.3 0.0 to 999.3
KC1 0 to 999 0 to 999 0 to 999
LD Load in BCD
Binary times and counts are loaded into ACCU 1 in BCD code regardless
of the RLO.
ID Parameter CPU 100 CPU 102 CPU 103
T 0 to 15 0 to 31 0 to 127
C 0 to 15 0 to 31 0 to 127
1 These operands cannot be used for transfer.
Load Operation
During loading, information is copied from a memory area, e.g., from the PII, into ACCU 1.
The previous contents of ACCU 1 are shifted to ACCU 2.
The original contents of ACCU 2 are lost.
Example: Two consecutive bytes (IB7 and IB8) are loaded from the PII into the accumulator.
Loading does not change the PII (see Figure 8-2).
Lost Information
information ACCU 2 ACCU 1 from the PII
L IB7
Byte d Byte c Byte b Byte a 0 IB7 IB7
L IB8
Byte b Byte a 0 IB7 0 IB8 IB
Transfer Operation
During transfer, information from ACCU 1 is copied into the addressed memory area, e.g., into the
PIQ.
This transfer does not affect the contents of ACCU 1.
Example: Figure 8-3 shows how byte a, the low byte in ACCU 1, is transferred to QB5.
T QB5
Previous value
Byte d Byte c Byte b Byte a Byte a of QB5
Loading and Transferring a Time (See also Timer and Counter Operations)
Example Representation
During graphic input, QW62 is assigned to output BI of
a timer. The programmer automatically stores the
corresponding load and transfer operation in the
control program. Thus the contents of the memory lo-
cation addressed with T 10 are loaded into ACCU 1. T 10 Load
Afterwards, the contents of the accumulator are
transferred to the process image addressed with
QW62. In this example, you can see timer T 10 at
QW62 in binary code.
Outputs BI and DE are digital outputs. The time at Transfer
QW62
output BI is in binary code. The time at output DE is
in BCD code with time base.
A I 0.0 I 0.0 T 10
L IW 22 T 10 1
SP T 10 I 0.0 1
NOP 0
IW22 TV IW22
L T 10 BI QW62 TV
BI QW62
T QW 62 DE DE
R Q R Q
NOP 0
NOP 0
Example Representation
The contents of the memory location addressed with
T 10 are loaded into the accumulator in BCD code.
Then a transfer operation transfers the accumulator
T 10
contents to the process image memory location Load
A I 0.0 T 10
T 10 I0.0
L IW 22
1
SP T 10 I 0.0 1
NOP 0
a
a
a
a
a
a
aa
a
aaaaa
a
IW22 TV
a
a
a
a
a
a
a
aa
NOP 0
a
a
a
a
a
a
a
aa
BI IW22 TV
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
LD T 10 DE QW50 BI
R Q DE QW50
T QW 50 R Q
NOP 0
The program uses timer operations to implement and monitor chronological sequences. Table 8-4
provides an overview of timer operations. Examples follow the table.
SP Pulse Timer
The timer is started on the leading edge of the RLO.
When the RLO is “0”, the timer is set to “0”.
Scans result in signal state “1” as long as the timer is running.
SE Extended Pulse Timer
The timer is started on the leading edge of the RLO.
When the RLO is “0”, the timer is not affected.
Scans result in signal state “1” as long as the timer is running.
SD On-Delay Timer
The timer is started on the leading edge of the RLO.
When the RLO is “0”, the timer is set to “0”.
Scans result in signal state “1” when the timer has run out and the
RLO is still pending at the input.
SS Stored On-Delay Timer
The timer is started on the leading edge of the RLO.
When the RLO is “0”, the timer is not affected.
Scans result in signal state “1” when the timer has run out.
The signal state becomes “0” when the timer is reset with the “R”
operation.
SF Off-Delay Timer
The timer is started on the trailing edge of the RLO.
When the RLO is “1”, the timer is set to its initial value.
Scans result in signal state ”1” as long as the RLO at the input is
“1” or the timer is still running.
R Reset Timer
The timer is reset to its initial value as long as the RLO is “1”.
When the RLO is “0”, the timer is not affected.
Scans result in signal state “0” as long as the timer is reset or has
not been started yet.
ID Parameter CPU 100 CPU 102 CPU 103
T 0 to 15 0 to 31 0 to 127
Loading a Time
Timer operations call internal timers.
When a timer operation is started, the word in ACCU 1 is used as a time value. You must therefore
first specify time values in the accumulator.
You can load a timer with any of the following data types:
Operation
Operand
L KT 40.2
Coded time base (0 to 3)
Time (0 to 999)
Base 0 1 2 3
Tolerance:
Note
Always use the smallest time base possible.
15 11 0 Bit
1 0 0 1 1 0 0 0 1 1 1 0 0 0 DW2
Base 00 01 10 11
You can also use the control program to write to data word DW2.
Example: Store the value 270 x 100 ms in data word DW2 of data block DB3.
C DB 3
L KT 270.1
T DW2
You can use a load operation to put the current time into ACCU 1 and process it further from there
(see Figure 8-4).
Use the “Load in BCD” operation for digital display output.
Current time in T1
L T1 LD T1
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaa
ACCU 1
Starting a timer
In the programmable controller, timers run asynchronously to program scanning. The time that has
been set can run out during a program scanning cycle. It is evaluated by the next time scan. In the
worst case, an entire program scanning cycle can go by before this evaluation. Consequently,
timers should not activate themselves.
Example:
1s - n · tp
A T 17
= Q 1.0
Pulse
Example:
Output Q 1.0 is set when the signal state at input I 0.0 changes from “0” to “1”.
However, the output should not remain set longer than 5 s.
Signal states
I 0.0
1
I 0.0
0
aaaa
aaaa
aaaa
aa
aaaaaaa
T1
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
1
a
a
a
a
a
a
a
a
Q 1.0
aaa
a
a
a
a
a
a
a
aa
a
0
a
a
a
a
a
a
aa
Q 1.0
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
Time in s
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
aaaaaaa
a
5
a
a
a
a
a
a
a
Time relay with transitional
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
T 1:
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
NO contact
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
STL CSF LAD
A I 0.0
T1 T1
L KT 500.0 I 0.0
SP T 1 I 0.0 1 1
NOP 0 KT 500.0 TV BI KT 500.0 TV BI
NOP 0 DE DE
NOP 0
R Q Q 1.0 R Q
a
a
a
a
a
a
a
a
aa
a
a
A T 1
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
aa
Q 1.0
a
a
a
a
a
a
a
a
a
aa
= Q 1.0
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
Note
The time tolerance is equivalent to the time base. Always use the smallest time base
possible.
SE
NOP 0
NOP 0
NOP 0
0
1
0
1
S5-100U
Example:
Q
T
T
I
IW
STL
t
2
2
Extended pulse
16
1.0
0.0
indicated in IW16.
Signal states
R
TV
Timing Diagram
T2
V
CSF
BI
Q
DE
I 0.0
Q 1.0
Time
Q 1.0
a
aa
aa
aa
aa
aa
a aaa
a
aa
aa
aa
aa
aa
a a
aa
aa
a
aa
a
aaaaaa aaa
T2
aaaaa a
aa
aa
aa
aa
aa
a aa
aaa
aaaa
a
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
a aaa
aaaaa
a
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
a
aaaaa aaaaaa
I 0.0
aa
aaaa
aa
a aaaaa
aa
a
aaa
aaa aa
aaa
aa
aaa
IW16
a
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
a
I 0.0
aaaa
aaaaa
a a
aa
aa
aa
aa
aa
a
aaaaaaa aaaaaa
1
R
aaaaaaa aaaaa
TV
a
aa
aa
aa
aa
aa
aa
a aa
aaa
aaaa
aaa
a
a
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
a
T2
LAD
aaaaaaa aaaaaa
V
a
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
a
aaaaaa
aaaaaaa
a a
aa
aa
aa
aa
aa
a
BI
Q
DE
a
aa
aa
aa
aa
aa
a
aaaaaa
Circuit Diagram
a
aa
aa
aa
aa
aa
a
a
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
a
aa
aa
aa
aa
a aa
aaa
aaaa
aaa
a
Output Q 1.0 is set for a specific time when the signal at input I 0.0 changes to “1”. The time is
Q 1.0
aaaaa aaaaaa
Q 1.0
a
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
a
T 2: Time relay with pulse shaper
a
aa
aa
aa
aa a
aa
aa
aa
aa
aa
a
aaaaa
a aaaaa
aaaaaa
a
STEP 5 Operations
8-21
STEP 5 Operations S5-100U
On-Delay
Example:
Output Q 1.0 is set 9 s after input I 0.0 and remains set as long as the input carries signal “1”.
Signal states
I 0.0
1
0 I 0.0
1
Q 1.0
0
T3
Time in s
9 9
Q 1.0
A I 0.0
T3 T3
a
a
a
a
a
a
aa
a
aaaaa
a
L KT 900.0
a
a
a
a
a
a
a
aa
I 0.0
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
T 0 T 0
a
a
a
a
a
a
a
SD T 3 I 0.0 a
NOP 0 KT 900.0 TV BI KT 900.0 TV BI
NOP 0
DE DE
NOP 0
A T 3 R Q Q 1.0 R Q
a
a
a
a
a
a
a
a
aaaaa
a
= Q 1.0 a
a
a
a
a
a
a
a
a
Q 1.0
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
SS
0
1
0
1
0
1
NOP 0
NOP 0
S5-100U
Example:
Q
T
T
I
T
I
KT
STL
5
4
4
4
Note
Signal states
1.0
0.1
0.0
500.0
I 0.0
aaaaa
I 0.1
a
aa
aa
aa
aa
a
Stored On-Delay and Reset
a
aa
aa
aa
aa
a
KT 500.0
aaaa
R
TV
Timing Diagram
T4
s
CSF
BI
Q
DE
in s
I 0.1
I 0.0
Q 1.0
Time
Q 1.0
a
aa
aa
aa
aa
a a
aa
aa
aa
aa
a a
aa
aa
aa
aa
a
a
aa
aa
aa
aa
a a
aa
aa
aa
aa
a aaaa
aa
a aaaa
aa
a
a
aa
aa
aa
aa
a a
aa
aa
aa
aa
a
aa
a
a
aa
a
aa
aaa
a
aa
aaa
aaa
aaaaa aaaaa aaaaa
I 0.1
I 0.0
a
aa
aa
aa
aa
a a
aa
aa
aa
aa
a a
aa
aa
aa
aa
a aa
KT 500.0
Further changes in the signal state at input I 0.0 do not affect the output.
a
aa
aa
aa
aa a
aa
aa
aa
aa a
aa
aa
aa
aa a
aaa
aa
aa
a a
aa
aa
aa
aa
a
aa
a aaaaa
a aa
a aa
aa
aa
aa
a aaaaa
Input I 0.1 resets timer T 4 to its initial value and sets output Q 1.0 to zero.
H1
aa
aaa
aaa aa
aaa
aaa aaaaa aaaaa
Q 1.0
T
aaaaa aaaaa aaaaa
R
aaaaa aaaaa aaaa
TV
a
aa
aa
aa
aa
a a
aa
aa
aa
aa aaaaa
a
a
aa
aa
aa
aa
a aaaaa
a
aaaaa
T4
s
a
aa
aa
aa
aa
a a
aa
aa
aa
a aaaaaaaaaa
H 1: Auxiliary relay
aaaaa aaaa
LAD
BI
Q
DE
I 0.1
a
aa
aa
aa
aa
a a
aa
aa
aa
a aaaaaaaaaa
aa
aaaa
aa
a aaa
aa
a aaaaaaaaaa
a
a
aa
a
aa
aaa
a
aa
aaa
aaaa
a aaaaaaaaaa
aaaaa
Circuit Diagram
aaaaa
Q 1.0
a
aa
aa
aa
aa
a
aa
aaaa
aa
a a
aa
aa
aa
aa
a
aaa
aaa aaaaa
H1
a
aa
aa
aa
aa
a a
aa
aa
aa
aa
a a
aa
aa
aa
aa
a
aaaaa aaaa aaaaa
H1
a
aa
aa
aa
aa aaaaa
a a
aa
aa
aa
aa
a
aaaaa
a aa
aaaa
aa
a
aaa
aaa
STEP 5 Operations
8-23
STEP 5 Operations S5-100U
Off-Delay
Example:
When input I 0.0 is reset, output Q 1.0 is set to zero after a certain delay (t). The value in FW14
specifies the delay time.
Signal states
I 0.0
1
0 I 0.0
1
0 Q 1.0
Time in s T5
t t
Q 1.0
A I 0.0 T5
T5
a
a
a
a
a
a
a
a
aaaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
L FW 14 I 0.0
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
SF T 5 I 0.0 0 T 0 T
NOP 0 FW14 TV BI FW14 TV BI
NOP 0
DE DE
NOP 0
A T 5 R Q Q 1.0 R Q
a
a
a
a
a
a
a
a
a
aaaaa
a
a
a
a
a
a
a
a
a
a
a
= Q 1.0 Q 1.0
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
The programmable controller uses counter operations to handle counting jobs. Counters can count
up and down. The counting range is from 0 to 999 (three decades). Table 8-5 provides an
overview of the counter operations. Examples follow the table.
S Set Counter
The counter is set on the leading edge of the RLO.
R Reset Counter
The counter is set to zero as long as the RLO is “1”.
CU Count Up
The count is incremented by 1 on the leading edge of the RLO.
When the RLO is “0”, the count is not affected.
CD Count Down
The count is decremented by 1 on the leading edge of the RLO.
When the RLO is “0”, the count is not affected.
Loading a Count
Counter operations call internal counters.
When a counter is set, the word in ACCU 1 is used as a count. You must therefore first store
counts in the accumulator.
You can load a count with any of the following data types:
KC constant count
or
DW data word
IW input word The data for these words must
QW output word be in BCD code.
FW flag word
Operation
Operand
L KC 38
Count (0 to 999)
15 11 0 Bit
0 1 0 0 0 0 0 1 0 0 0 0 DW3
Three-digit count
(in BCD code)
L C2 LD C2
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaa
ACCU 1
Example:
When input I 0.1 is switched on (set), counter 1 is set to count 7. Output Q 1.0 is now “1”.
Every time input I 0.0 is switched on (count down), the count is decremented by 1.
The output is set to “0” when the count is “0”.
I 0.1
aaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaa
aaaaa aaaaaaa
1
0 I 0.0
KC 7
1 I 0.1 R S CI
aa
aa
0
aa
aa
aa
aa
aa
aa
C1
aa
aa
7
aa
a a
a
a aa
I 0.0
aa
aa
IIII
aa
aa
0
aa
aa
a a
a a
Binary
aa
aa
CQ
aa
aa
1 Q 1.0 0
aa
aa
16 bits
aa
aa
aa
aa
0
a
aa
a
a
a
Time
Q 1.0 Count
S C1 S C1
a
a
a
a
aa
a
a
a
a
a
a
C1
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
C1 I 0.0
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
CD C 1
a
a
a
a
a
a
a
a
a
a
a
I 0.0 CD CD
NOP 0
A I 0.1 CU CU
I 0.1
L KC 7 S
I 0.1 S
S C 1 KC 7
KC 7 CV BI CV BI
NOP 0 DE
DE
NOP 0
R Q Q 1.0 R Q
NOP 0
A C 1 Q 1.0
= Q 1.0
Example:
When input I 0.0 is switched on, the count in counter 1 is incremented by 1. As long as a second
input (I 0.1) is “1”, the count is reset to “0”.
The A C 1 operation results in signal state “1” at output Q 1.0 as long as the count is not “0”.
1 I 0.0 I 0.1
0
1
0 I 0.1 R S CI
aa
aa
aa
aa
aa
aa
aa
aa
2
aa
aa
C 1
aa
aaaa
aa
a
aaa
0
aa
aa
I 0.0
aa
aa
IIII
a a
a a
aa
aa
aa
aa
1 Q 1.0 Binary
aa
aa
aa
aa
CQ
aa
aa
16 bits
aa
aa
0 0
a
aa
a
a
a
Time
R C1 Q 1.0
A I 0.0 C1 C1
CU C 1 I 0.0
I 0.0 CU CU
NOP 0
NOP 0 CD CD
NOP 0 S S
A I 0.1
CV BI CV BI
R C 1 DE DE
NOP 0 I 0.1
I 0.1 R Q Q 1.0 R Q
NOP 0
A C 1 Q 1.0
= Q 1.0
Comparison operations compare the contents of the two accumulators. The comparison does not
change the accumulators' contents. Table 8-6 provides an overview of the comparison operations.
An example follows the table.
Note
When using comparison operations, make sure the operands have the same number
format.
Example: The values of input bytes IB19 and IB20 are compared. If they are equal, output
Q 1.0 is set.
IB19 IB20
L IB 19
L IB 20
!=F C1 F
C1 C2 IB19
= Q 1.0
!=
=
IB20 C2 Q Q 1.0
Q 1.0
Arithmetic operations interpret the contents of the accumulators as fixed-point numbers and
manipulate them. The result is stored in ACCU 1. Table 8-7 provides an overview of the arithmetic
operations. An example follows the table.
+F Addition
The contents of both accumulators are added.
-F Subtraction
The contents of ACCU 1 are subtracted from the contents of
ACCU 2.
CPU 102 and higher have integral function blocks for multiplication and division (see section 9.2).
Note
When using arithmetic operations, make sure the operands have the same number
format.
Arithmetic operations are executed independently of the RLO. The result is available in ACCU 1 for
further processing. The contents of ACCU 2 are not changed.
These operations do not affect the RLO. The condition codes are set according to the results.
STL Explanation
Numeric Example
15 0
876 0 0 0 0 0 0 1 1 0 1 1 0 1 1 0 0 ACCU 2
+ +F
668 0 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 ACCU 1
=
1544 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 ACCU 1
* The length of the DB must be loaded into ACCU 1 before execution of the operation. A length of 0
makes the DB invalid.
** Data blocks DB0 and DB1 are reserved for special functions.
Example: A special function has been programmed in FB26. It is called at several locations in
the program, e.g., in PB63, and processed.
.
PB63 FB26 . The “JU FB26” statement in program
. block PB63 calls function block FB26.
.
.
JU FB 26
.
JU FB26
Example: A special function has been programmed in FB63. It is called and processed under
certain conditions, e.g., in PB10.
.
PB10 FB63 . The “JC FB63” statement in program
. block PB10 calls function block FB63
S F 1.0 if input I 0.0 is “1”.
A I 0.0 A I 0.0
JC FB 63
JC FB63 .
Example: Program block PB3 needs information that has been programmed as data word DW1 in
data block DB10. Other data, e.g., the result of an arithmetic operation, is stored as
data word DW3 in data block DB20.
PB3 DB10
C DB 10 The information from data word DW1
in data block DB10 is loaded into the
C DB10 DW1 L DW 1 accumulator. The contents of ACCU 1
L DW1 . are stored in data word DW3 of data
. block DB20.
.
C DB20 .
DB20
C DB 20
T DW3
DW3
T DW 3
If you specify zero as the data block length, the data block in question is deleted, i.e., it is removed
from the address list. It is considered nonexistent.
Note
The block is stored in memory and is designated as invalid until the programmable
controller memory is compressed (see section 7.5.3).
If you try to set up a data block that already exists, the “G DB x” statement is not executed.
A data block can be a maximum of 256 data words (DW0 to 255) in length.
PB8 FB21 .
. The “BEU” statement causes program
. scanning to leave function block FB21
. and return to program block PB8.
JC=
JC= BEU
.
JU FB21 BEU .
.
.
BE
BE
PB7 FB20 .
. The “BEC” statement causes program
. scanning to return to program block
. PB7 from function block FB20 if input
A I 0.0 I 0.0 is “1”.
A I 0.0 BEC
.
JU FB20 BEC .
.
.
Table 8-9 lists other basic operations. Explanations follow the table.
ID Parameter
130, 131, 132, 133, 255
Note
These operations can be programmed in STL form only.
STOP Operation
The “STP” operation puts the programmable controller into the STOP mode. This can be desirable
for time-critical system circumstances or when a programmable controller error occurs.
After the statement is processed, the control program is scanned to the end, regardless of the RLO.
Afterwards the programmable controller goes into the STOP mode with the error ID “STS”. You
can restart the programmable controller with the mode selector (STOP to RUN) or with a
programmer.
“NOP” operations and display generation operations are significant only for the programmer when
representing the STEP 5 program.
The programmable controller does not execute any operation when these statements are processed.
Supplementary operations extend the operations set. However, compared to basic operations,
which can be programmed in all blocks, supplementary operations have the following limitations.
• They can be programmed in function blocks only.
• They can be represented in STL form only.
As with the basic load operations, the supplementary load operation copies information into the
accumulator. Table 8-10 explains the load operation. An example follows the table.
L Load
A word from the system data is loaded into ACCU 1 regardless of the
RLO.
ID Parameter
RS 0 to 255
You can use the enable operation (FR) to execute the following operations even without an edge
change.
• Start a timer
• Set a counter
• Count up and down
Table 8-11 presents the enable operation. An example follows the table.
ID Parameter
T 0 to 127
C 0 to 127
If output Q 1.1 is reset repeatedly, the A Q 1.1 If output Q 1.1 is set (positive
timer should also be restarted FR T 2 edge change of the RLO) during
repeatedly. the time in which input I 0.0 is
BE set, timer T 2 is restarted. Output
Q 1.0 therefore remains set at the
restarted time or is reset.
If input I 0.0 is not set during the
edge change of output Q 1.1, the
timer is not restarted.
Bit test operations scan digital operands bit by bit and affect them. Bit test operations must always
be at the beginning of a logic operation. Table 8-12 provides an overview of these operations.
Table 8-13 shows how the RLO is formed during the bit test operations “TB” and “TBN”. An
example for applying the bit operations follows the table.
A photoelectric barrier that counts :A I 0.3 Input I 0.4 loads the count of counter
piece goods is installed at input :CU C 2 20 with the constant 0. The count is
I 0.3. After every 256 pieces, the :A I 0.4 incremented by 1 with each positive
counter is supposed to be reset and :L KC 000 edge change at input I 0.3. If the
start counting again. :S C 20 count has reached 256 = 100H (bit 8
is “1”), program scanning jumps to
:TB C 20.8 the label “FULL”. Otherwise the
block is terminated.
:JC = FULL
:BEU
Note
Times and counts are stored in the timer/counter word in hexadecimal notation in the
10 least significant bits (bits 0 to 9).
The time base is stored in bits 12 and 13 of the timer word.
Digital logic operations combine the contents of both accumulators logically bit by bit.
Table 8-14 provides an overview of these digital logic operations. Examples follow the table.
Note
Make sure both operands have the same number format. Then load them into the
accumulators before executing the operation.
The result of the arithmetic operation is available in ACCU 1 for further processing. The contents of
ACCU 2 are not affected.
STL Explanation
L KH 00FF Load a constant into ACCU 1. The previous contents of ACCU 1 are shifted
to ACCU 2.
AW Combine the contents of both accumulators bit by bit through logic AND.
Numeric Example
ACCU 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
Result
ACCU 1 0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 0
STL Explanation
L KH 00FF Load a constant into ACCU 1. The previous contents of ACCU 1 are shifted
to ACCU 2.
OW Combine the contents of both accumulators bit by bit through logic OR.
Numeric Example
IW36
15 0 Set the 8 low-order bits in input word
ACCU 2 1 1 1 0 0 1 0 0 1 1 0 0 0 1 1 0 IW36 to “1”. Compare both words
bit by bit.
OR If either of the corresponding bits is
KH 00FF “1”, a “1” is set in the result word.
ACCU 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
Result
ACCU 1 1 1 1 0 0 1 0 0 1 1 1 1 1 1 1 1
STL Explanation
L IW 6 Load input word IW6 into ACCU 1. The previous contents of ACCU 1 are
shifted to ACCU 2.
XOW Combine the contents of both accumulators bit by bit through logic
EXCLUSIVE OR.
Numeric Example
ACCU 1 1 0 0 1 1 0 0 1 1 1 0 0 0 1 1 0
Result
ACCU 1 1 0 0 0 0 0 1 0 1 0 1 0 1 0 1 0
Shift operations shift a bit pattern in ACCU 1. The contents of ACCU 2 are not affected. Shifting
multiplies or divides the contents of ACCU 1 by powers of two. Table 8-15 provides an overview of
the shift operations. Examples follow the table.
Parameter 0 to 15
The shift statement parameter indicates the number of bit positions by which the contents of
ACCU 1 are to be shifted to the left (SLW) or to the right (SRW). Bit positions vacated during
shifting are assigned zeros.
The contents of the bits that are shifted out of ACCU 1 are lost. Following execution of the
operation, the state of bit 20 (SRW) or bit 215 (SLW) has an influence on the CC1 bit, which can
then be evaluated.
A shift operation with parameter “0” is handled like a “NOP” operation. The central processor pro-
cesses the next STEP 5 statement with no further reaction.
Before executing a shift operation, load the operand to be processed into ACCU 1.
The altered operand is available there for further processing.
STL Explanation
SLW 3 Shift the bit pattern in ACCU 1 three positions to the left.
Numeric Example
ACCU 1 0 0 0 0 1 1 1 0 1 0 0 0 0 0 0 0
STL Explanation
SRW 4 Shift the bit pattern in ACCU 1 four positions to the right.
Numeric Example
2210
15 0
ACCU 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0
Conversion operations convert the values in ACCU 1. Table 8-16 provides an overview of the
conversion operations. Examples follow the table.
STL Explanation
Numeric Example
STL Explanation
Numeric Example
CSW +1
15 0
ACCU 1 1 0 1 0 0 1 1 0 0 0 1 1 1 0 1 1
The decrement/increment operations change the data loaded into ACCU 1. Table 8-17 provides an
overview of the decrement/increment operations. An example follows the table.
D Decrement
Decrement the contents of the accumulator.
I Increment
Increment the contents of the accumulator.
The contents of ACCU 1 are either decremented or incremented by
the number indicated in the parameter.
Execution of the operation is unconditional and is limited to the
right-hand byte (without carry).
Parameter
0 to 255
Processing
Execution of the decrement and increment operations is independent of the RLO and does not affect
the RLO or the condition codes.
The parameter indicates the value by which the contents of ACCU 1 are to be changed.
The operations refer to decimal values; however, the result is stored in ACCU 1 in binary form.
Changes relate only to the low byte in the accumulator.
8.2.8 Disable/Enable Interrupt, for CPU 103 Version 8MA02 and Higher
The disable/enable interrupt operations affect interrupt-driven and time-controlled program scanning.
They prevent process or time interrupts from interfering with the processing of a sequence of state-
ments or blocks. Table 8-18 lists the disable/enable interrupt operations. An example follows the
table.
IA Disable interrupt
RA Enable interrupt
Processing
Execution of the disable/enable interrupt operations does not depend on the RLO. These operations
do not affect the RLO or the condition codes. After the “IA” statement is processed, no more
interrupts are executed. The “RA” statement cancels the effect of “IA”.
IA Disable interrupt.
A I 0.0
.
.
.
JU FB 3 If an interrupt occurs, the program
. section between the “IA” and
. “RA” is scanned without
. interruption.
RA Enable interrupt.
. Interrupts that occurred in the
. meantime are processed after the
. “RA” operation.
Use the “DO” operation to process STEP 5 statements as indexed operations. This allows you to
change the parameter of an operand during control program processing (see Table 8-19).
“DO” Statements
“DO flag word or data word x” is a two-word statement that is unaffected by the RLO. “DO”
consists of the following two statements:
• The first statement contains the “DO” operation and a flag word or data word.
• The second statement defines the operation and the operand identifier you want the control
program to process. You must enter 0 or 0.0 as the parameter.
The control program works with the parameter that is stored in the flag word or data word. This
parameter is the one called up in the first statement. If you want to index binary operations, inputs,
outputs, or flags, you input the bit address in the high byte of this word. You input the byte address
in the low byte. In any other instance, the high byte must be “0”.
You can combine the following operations with the “DO” statement:
Operations Explanations
! Caution
Damage to the system.
Performing operations that are not listed in Table 8-20 will damage your system.
Perform only those operations that are listed in Table 8-20.
Figure 8-6 shows how the contents of a data word determine the parameter of the next statement.
The following example illustrates how new parameters are generated in every program scan.
Table 8.20 provides an overview of the jump operations. An example follows the table.
JO = Jump on overflow
The jump is executed if an overflow occurs. Otherwise the jump is
not executed. The RLO is not changed.
ID
Jump label (up
to 4 characters)
If no bit of input word IW1 is AN0 :L IW 1 Load input word IW1 into
set, program scanning jumps to :L KH 0000 ACCU 1. If the contents of
the label “AN 1”. If input word :+F ACCU 1 equal zero1, jump to
IW1 and output word QW3 do :JZ= AN 1 the label “AN 1”. Otherwise
not agree, program processing :A I 0.0 process the next statement
jumps back to the label “AN 0”. . (I 0.0).
Otherwise input word IW1 and .
data word DW12 are compared. .
If input word IW1 is greater than .
or less than data word DW12, .
program scanning jumps to the .
“DEST” label. AN1 :L IW 1 Compare input word IW1 and
:L QW 3 output word QW3. If they are
:XOW not equal, set individual bits in
ACCU 1.
:JN = AN 0 If the contents of ACCU 1 are
:L IW 1 not zero, jump to the label
:L DW12 “AN 0”. Otherwise process the
:>< F next statements.
Compare input word IW1 and
data word DW12. If they are
not equal, set RLO to “1”.
:JC = DEST If the RLO = “1”, jump to the
. “DEST” label. If the RLO =
. “0”, process the next
. statement.
.
.
DEST :A I 0.1
.
.
1 The “L...” statement does not affect the condition codes. An addition (+F) is executed with the constant
0000H so that the “JZ” operation can evaluate the contents of the accumulator.
If you plan to process a program with various operands and without a lot of changes, it is advisable
to assign parameters to individual operands (see section 7.3.4). If you have to change the ope-
rands, you only need to reassign the parameters in the function block call.
O = OR operation
Scan a formal operand for “1”.
ON = OR operation
Scan a formal operand for “0”.
Set/Reset Operations
Table 8-22 provides an overview of the set/reset operations. An example follows the table.
= = Assign
The RLO is assigned to a formal operand.
Parameter Data
Formal operand Actual operands permitted
type type
:A =I 0 :A I 0.0
:JU FB 34 :L =L1 :L FW 10
NAME :LOAD/TRAN :S C 6 :S C 6
I0 : I 0.0 :A =I 1 :A I 0.1
I1 : I 0.1 :LW =LW1 :L KC 140
L1 : FW 10 :S C 7 :S C 7
LW1 : : KC 140 :A I 0.2 :A I 0.2
LC1 : C 7 :CU C 6 :CU C 6
T1 : QW 4 :CU C 7 :CU C 7
LW2 : : KC 160 :LD =LC1 :LD C 7
:BE :T =T1 :T QW 4
:A I 0.3 :A I 0.3
:R C 6 :R C 6
:R C 7 :R C 7
:LW =LW2 :L KC 160
:LD =LC1 :LD C 7
:!=F :!=F
:R C 7 :R C 7
:BE :BE
The following examples show how to work with timer and counter operations:
Example 1:
Example 2:
“DO” Operation
Table 8-25 and the example that follows explain the processing operation.
Example:
Since system operations access system data, only users with system knowledge should use them.
If you want to program system operations, you must select “SYS: OPS. Y” in the programmer
presets menu.
Like the supplementary bit operations, these set operations can change individual bits. Table 8-26
provides an overview of the set operations.
Use these load and transfer operations to address the entire program memory of the programmable
controller. They are used mainly for data exchange between the accumulator and memory locations
that cannot be addressed by operands. Table 8-27 provides an overview of the load and transfer
operations.
Parameter
0 (for ACCU 1), 2 (for ACCU 2)
T Transfer
A word is transferred to the system data area.
ID Parameter
RS 0 to 255
STL Explanation
.
.
LIR 0 Load the information from the memory location with the address 6100H into
ACCU 1.
A field transfer is processed independently of the RLO. The parameter indicates the length of the
data field (in bytes) that is to be transferred. The field can be up to 255 bytes long.
The address of the source field is in ACCU 2. The address of the destination field is in ACCU 1.
The higher address of each field must be specified because a field transfer takes place by
decrementing. The bytes in the destination field are overwritten during the transfer.
Example Representation
Transfer a 12-byte
data field from EE85
address F0A2H to Destination
address EE90H.
EE90
. .
. . TNB
. .
F097
Source
F0A2
STL Explanation
:L KH F0A2 Load the end address of the source field into ACCU 1.
:L KH EE90 Load the end adress of the destination field into ACCU 1. The
source address is shifted to ACCU 2.
STL Explanation
FB 11 Block number and type
BE
! Caution
The TIR, TRS and TNB operations are memory-changing operations with which you can
access the user memory and the system data area. These accesses are not monitored
by the operating system. Improper use of the operations can lead to changes in the
program and to a programmable controller crash.
ID Parameter
BF -128 to +127
KF -32768 to +32767
Processing
An arithmetic operation is executed independently of the RLO. It does not affect the RLO or the
condition codes.
You can subtract by entering a negative parameter.
Even if the result cannot be represented by 16 bits, no carry is made to ACCU 2, i.e., the contents
of ACCU 2 are not changed.
Decrement the constant 1020H by 33 L KH 1020 The constant 1020H is loaded into
and store the result in flag word ACCU 1.
FW28. Afterwards add the constant ADD BF -33 The constant -330D is added to
256 to the result and store the sum in the ACCU contents.
flag word FW30. T FW 28 The new ACCU contents (0FFFH)
are stored in flag word FW28.
ADD KF 256 The constant 2560D is added to
the last result.
T FW 30 The new ACCU contents (10FFH)
are stored in flag word FW30.
- 32768 to - 1 0 1 0 JN, JM
0 0 0 0 JZ
+1 to +32767 1 0 0 JN, JP
> +32767 0 1 1 JN, JM, JO
“1” 1 0 JN, JP
- 32767 to - 1 0 1 0 JN, JM
0 0 0 0 JZ
+1 to +32767 1 0 0 JN, JP
* This number is the result of the conversion of KH = 8000.
Sections 8.5.1 through 8.5.3 provide a few sample programs that you can enter and test in all three
methods of representation on a programmer.
A I 0.0
AN F 64.0 I 0.0 & I 0.0 F 64.0 F 2.0 F 64.0
= F 2.0 F 2.0 F 64.0 (#) S
S F 64.0
F 64.0 (#) S I 0.0
AN I 0.0
R F 64.0 R Q
NOP 0 I 0.0 R Q
Example: The binary scaler (output Q 1.0) changes its state each time I 0.0 changes its signal
state from “0” to “1” (leading edge). Therefore, half the input frequency appears at the
output of the flip-flop.
Signal states
I 0.0
0 I 0.0
1 Q 1.0
0 Q 1.0
Time
aa
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaa
a
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
I 0.0 F 1.0 F 1.1
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
AN F 1.0
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
= F 1.1 F 1.0 F 1.1 ( )
***
A F 1.1 F 1.0
S F 1.0 F 1.1 F 1.0
F 1.1 S
AN I 0.0 S
R F 1.0
aa
a
aa
a
a
a
a
a
aaaaa
a
R Q
aa
aa
a
a
a
a
a
I 0.0 I 0.0
aa
aa
a
a
a
NOP 0 a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
***
R Q
A F 1.1
A Q 1.0 F 1.1 &
= F 2.0 F 1.1 Q 1.0 F 2.0
***
Q 1.0 F 2.0 ( )
A F 1.1
AN Q 1.0
aa
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaa
a
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
AN F 2.0
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
S Q 1.0 &
Q 1.0 S
A F 2.0 Q 1.0
R Q 1.0 F 2.0 S F 2.0
NOP 0
R Q
*** F 2.0 R Q
Note
Output in CSF or LAD is possible only if you enter the segment boundaries “***” when
programming in STL.
Signal states
1 G F 2.0
0 F 2.0
F 3.0
1
Q 1.0
0
Q 1.0
Time
T T
AN F 2.0
L KT 010.1
F 2.0
SD T 7 T 7 T 7
NOP 0 F 2.0 T 0 T 0
NOP 0
KT 10.1 TV TV BI
NOP 0 BI KT 10.1 DE
A T 7 DE
R Q F 2.0 F 2.0
= F 2.0
*** R Q ( )
Q 1.0
A F 2.0 F 2.0 &
S F 2.0 F 3.0 Q 1.0
AN F 3.0
F 3.0 S
S Q 1.0
A F 2.0
F 2.0 &
A F 3.0 R Q F 2.0 F 3.0
R Q 1.0 F 3.0 R Q
NOP 0 F 3.0
*** F 2.0 &
S F 2.0 Q 1.0
AN F 2.0 F 3.0
Q 1.0
A Q 1.0 S
S F 3.0 F 2.0 &
AN F 2.0 R Q
Q 1.0 F 2.0 Q 1.0
AN Q 1.0 R Q
R F 3.0
NOP 0
Tables
9.1 Assigning Internal Functions to DB1, for CPU 103 Version 8MA03 and
Higher
To assign parameters to these functions, you must configure data block 1 (DB1).
To make it easier for you to assign parameters, data block 1 is already integrated in the CPU with
default parameters. After performing an overall reset, you can load the default DB1 from the
programmable controller into your programmer and display it on the screen (see Figure 9-1). The
character string “DB1” must remain before the parameter blocks and be followed by at least one
filler (such as a blank space or a comma).
a
a
a
aa
a
aaaa
a
a
a
a
a
aa
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
This preset DB1 has one parameter block for each function. Each parameter block begins with a
block ID (shown in Figure 9-1 in the shaded background). The block ID is followed by a colon. The
individual parameters for each function are contained in these parameter blocks.
Each parameter block begins with a block ID followed by a colon. This colon must be followed by
at least one filler (such as a blank space or a comma). A semicolon must be at the end of each
parameter block with at least one filler between the semicolon and the next block ID.
The parameter blocks listed in Table 9-1 are used for the S5-100U.
'TFB: '; Timer Function Blocks: Parameter block for time-controlled program
processing: OB13 is called up every 100 ms. (see chapter 7)
'ERT: '; Error ReTurn: Address for parameter error code / no default setting (see
section 9.1.2)
The sequence of the parameters in DB1 is not fixed. A semicolon must be at the end of each
parameter block with at least one filler between the semicolon and the next block ID.
The parameter blocks that are not discussed here are explained in the chapters that describe their
functions.
9.1.2 Setting the Address for the Parameter Error Code in DB1
For the following reasons, we recommend that you use this example when you start setting your
parameters:
• Parameter block “ERT:” is the only block with no default parameters in DB1. You must there-
fore enter all the parameters. We will explain the rules for assigning parameters step by step,
so that you can learn the rules quickly.
• The correctly input “ERT:” parameter block makes it easy for you to correct parameter setting
errors; therefore, you should complete this block in DB1 before you change or add other
parameters.
The error parameter block is only important during the start-up phase. You should erase it
during “normal” operation because it takes up a lot of memory space.
To help find parameter errors more easily and to help correct them, you can ask the programmable
controller to output error messages in a coded form. All you have to do is to tell the programmable
controller where it should store the error code. Make this input in parameter block “ERT:” of DB1.
How to Proceed:
DB1 Explanation
Figure 9-2. Inputting the Address for the Parameter Error Code
5. Use the following check list to make sure your entries are correct.
- Is the block ID “ERT:” terminated by a colon? ............................
- Is at least 1 filler (a blank space in Figure 9-2) added after the colon? . . . . . . . . . . . .
- Is the parameter name (ERR) entered correctly? . . . . . . . . . . . . . . . . . . . . . . . . . . .
- Does at least 1 filler (a blank space) follow the parameter name? . . . . . . . . . . . . . . .
- Is the argument (MW1) entered correctly? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- Does at least 1 filler (a blank space) follow the argument? . . . . . . . . . . . . . . . . . . . .
- Does a semicolon (;) indicate the block end? . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- Does DB1 end with the end ID “END” followed by a space? ..................
6. Transfer the changed DB1 to the programmable controller.
7. Switch the programmable controller from STOP to RUN.
- The programmable controller accepts the changed DB1.
If you did not store the parameter block “ERT:” in DB1, you can localize the error in the ISTACK if
there was an incorrect parameter setting. However, you will not know what type of error is present.
The same applies if you made an error when you input the parameter block “ERT:”
9.1.4
aaaaaaaaaa a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
aaaaaaaaaaaaa
Note
aaaaaaaaaa aaaaaaaaaaaaa
aaaaaaaaaa a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
aaaaaaaaaa a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
aaaaaaaaaa a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aaaaaaaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa a
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
a aa
aaa
aa
aa
aa
aa
aa
aa
aa
aaaa
aaa
a
aaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa a
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
aaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa a
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
aaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa a
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa a
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
a aa
aaa
aa
aa
aa
aa
aa
aa
aa
aaaa
aaa
a
aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa a
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
A start ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
aaaaa aaaaaaaaaa aa
aaa
aa
aa
aa
aa
aa
aa
aa
aa
aaa
A block ID . . . . . . . . . . . . . . . . . . . . . . . . .
aaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaa aaaaaaaaaa aaaaaaaaaaaaa
aaaaa aaaaaaaaaa aaaaaaaaaaaaa
..............
aaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaa aaaaaaaaaa aaaaaaaaaaaaa
A parameter name . . . . . . . . . . .
aaaaa aaaaaaaaaa aaaaaaaaaaaaa
..............................
(for an explanation and possible parameter values see section 9.1.7)
A block end ID . . . . . . . . . . . . . . . . . . . . . . . . .
aaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aa
aaaa
aa
a aaaaaaaaa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
aaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaa a
a
aa
a
aa
aaa
a
aa
a
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
aaa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
aaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa a
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
aaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa a
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
e.g.:
e.g.:
e.g.:
e.g.:
e.g.:
aaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa aaaa aaaaaaaaa aaaaaaaaaaaa
DB1
aa
a aa
a aa
a
1. Display the default DB1, with its parameter block “ERT:” on the programmer.
: END
STW
CLP:
aaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa aaaaa aaaaaaaaaa aa
a
aaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa a
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
aa
a
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
aaa
a
aaaaa aaaaaaaaaa aaaaaaaaaaaaa
FW 102
aaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa aaaaa aaaaaaaaaa aaaaaaaaaaaaa
aaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa a
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
aaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa aa
aaaa
aa
a aaaaaaaaa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
aaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa a
a
aa
a
aa
aaa
a
aa
a
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
a
aa
aaa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
: ; (Semicolon)
STW FW 102
aaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa a
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
aaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa a
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
aaaa aaaaaaaaa aaaaaaaaaaaa
As discussed in section 9.1.2, you use the following steps to change or expand the preset values of
If the CPU recognizes an error in DB1, then it remains in the STOP mode (red LED
CLP:STW FW102
aaaaa
a aaaaaaaa
S5-100U Integrated Blocks and Their Functions
In the following section are the rules for changing or expanding entire parameter blocks. Follow
these steps or the CPU will not understand what you have entered.
4. Enter the argument that is attached to the parameter name, followed by a filler.
- At least one argument is attached to each parameter name. An argument is either a
number or a STEP 5 operand that you must enter. If several arguments belong to a
parameter name, then every argument must be followed by at least one filler (even the last
one).
The preceding steps present the minimal requirements for setting the parameters. Beyond that,
there are additional rules that make it easier for you to assign parameters.
For example:
• You have the ability to add comments.
• You can expand the German mnemonics used as parameter names by using plain English text.
Comments can be added anywhere a filler is allowed. The comment symbol is the pound (#) sign.
The comment symbol must be placed at the beginning and at the end of your comment. The text
between two comment symbols may not contain an additional #.
Example: #Comment# .
At least one filler must follow the comment.
If you wish to change the default settings in parameter blocks SL1: or CLP:, you must first of all
overwrite the two comment characters (#) with blanks. If you fail to do this, the changes are
ignored.
If you wish to retain the default settings for one of the two parameter blocks, you must place it
between comment characters (overwrite blanks with “#”).
In order to make it easier to read parameter names, you can add as many characters as you wish if
you add an underscore (_) after the abbreviated parameter name.
Example: SF becomes SF_SENDMAILBOX.
At the end of the input, you must add at least one filler.
There is a rule of thumb that will help you check DB1. You should include at least one filler in the
following instances:
• After the start ID
• Before and after the block ID, parameter name, argument, and semicolon
If an error occurs while assigning parameters and the programmable controller does not go to the
“RUN” mode, you have two possibilities for recognizing errors:
• By using a parameter error code
• By using the analysis function “ISTACK”
Both possibilities are described below.
The entire error code occupies 10 data words or 20 flag bytes. In the following examples and
tables, we assume that the error code is stored in a data block starting with data word 0. The error
code occupies DW0 through DW9. In the “Flag” operand area, this corresponds to FW0 through
FW19.
No error
aaaaaaaaa aaaaaaa
S5-100U
Example:
a
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaa aaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Not defined
Not defined
aaaaaaaaa aaaaaaa
10:
9:
8:
7:
6:
5:
4:
3:
2:
1:
0:
a
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaa aaaaaaa
in an argument
Range exceeded
DB is not present
a
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
a
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaa aaaaaaa aaaaaaaaaaaaaaaaaaaaaaa
KH=
KH=
KH=
KH=
KH=
KH=
KH=
KH=
KH=
KH=
15
14
13
12
11
10
09
08
07
06
05
04
03
02
01
00
DL
aa
a aa
aaa a
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaa
a a
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
a
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaa a
aa
aa
aa
aa a
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a aaaaaaaaaaaaaaaaaaaaaaa
aaaaa aa
a
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 6 0 3
aaaaa aa
aaa
aaa aa
aaa
aa
aa
aa
aa
aa
aa
aaaa
aa
aa
aa
aa
aa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
CO DE
.
.
.
aaaaa aaaa aaaaaaaaa aaaaaaa
99
11
09
06
03
02
01
00
F0
FF
aaaaa aaaaa
a aaaaaaaaa aaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
DR
aaaa
aaaaa
a a
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
a
aa
aa
aa
aa
aa
aa
aa
aa
aaaa
aa
aa
aa
aa
aa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
SL1:
TFB:
CLP:
ERT:
SDP:
to any block
to any block
SINEC L1
Error return
occur?)
Clock parameter
the screen display is a complete list of parameter error codes and their meanings.
continue to set parameters in DB1. While attempting to transfer the changed DB1
contents of DB3 appear on the screen. DW0 through DW9 contain the code for the
set in DB1 have already been transferred to the programmable controller. Then you
You entered the start address DB3 DW0 in parameter block “ERT:”. The parameters
parameter error. In the following figure, you see how your screen could look. Below
9-7
•
•
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aaaa
aa
aa
aa
aa
aa
a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
9-8
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaa aaaaaaa
132:
120:
108:
96:
84:
72:
60:
48:
36:
24:
12:
0:
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaa aaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
000CH
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaa aaaaaaa
addresses.
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
KS
KS
KS
KS
KS
KS
KS
KS
KS
KS
KS
KS
byte address
aaaaaaaaaaaaaaaaa aaaaaaa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aaa
Decimal
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
byte address
= '01.04. 13:00:00
= 'DB1 SL1: SLN 40
aa
aaa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aaaa
aa
aa
aa
aa
aa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaa aaaaaaa
Integrated Blocks and Their Functions
TIS 4
STW
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
= 'PGN 1 ; #CLP: CF 0
aa
aaa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aaaa
aa
aa
aa
aa
aa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Locating Parameter Errors in “ISTACK”
aaaaaaaaaaaaaaaaa aaaaaaa
DW0
SF
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaa aaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
';
= ' 500 ; TFB: OB13 100 ';
= '000000:00:00 # ; SDP: WD';
OHS ';
';
SET 4 01.04.92 ';
STP Y SAV Y ';
';
';
';
';
';
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaa aaaaaaa
12D
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
82F2H
000CH
:
The error causes ISTACK to display the following addresses.
2D =
6D
(relative SAC)
(absolute SAC)
contains the absolute error address as well as the relative error address.
characters (2 bytes).
Decimal
Figure 9-4. Erroneous Parameter Assignment in DB1
word address
Example: Your inputs into DB1 are as follows. The position shaded contains an error.
incorrect input or in front of the address that contains the incorrect input. These are byte
The information displayed in the chart above shows that the error occurred after address 0 and
respective line. Each word consists of two
mode and stores a message in “ISTACK” describing where the error happened. The “ISTACK”
The STEP Address Counter (SAC) in the ISTACK points either to the address that contains the
So that you can locate the error in DB1 exactly, you must convert the relative byte address that is
before address 12. In Figure 9-4, argument 40 occupies address 6; the “40” is an incorrect entry.
displayed in hexadecimal format into a decimal word address. Decimal format is required because
The decimal numbers in front of each input line
One such special function is the assignment of parameters in the programmable controller with the
help of DB1. Setting parameters means that you enter parameters in DB1 for those internal
functions that your programmable controller should work with.
The programmable controller's operating system accepts these inputs into DB1 only when there is a
cold restart. You must perform a cold restart anytime you make changes to DB1. You can perform a
cold restart by switching from Power OFF to Power ON or from STOP to RUN.
The programmable controller accepts the parameters from DB1 and stores them in the system data
area.
Note
The CPU remains in the STOP mode if a parameter assignment error is found during
start-up. The red LED lights up on the operator panel and ISTACK displays a DB1
addressing error.
1 If an argument such as seconds, for example, is not to be entered, input XX. The clock continues to run
with the updated data. The TIS parameter block does not acknowledge this argument..
2 If you input AM or PM after the clock time, the clock runs in the 12-hour mode. If you omit this
argument, the clock runs in the 24-hour mode. You must use the same time mode in the SET and TIS
parameter blocks.
Example: You wish to increase the monitoring time to 700 ms since your user program is very
large.
How to Proceed:
1. Display DB1 on the programmer.
2. Change the parameter block “SDP” as shown in Figure 9.5.
- Position the cursor on the arguments for the parameter
- Overwrite the arguments
3. Transfer the changed DB1 to the programmable controller.
4. Switch the programmable controller from STOP to RUN. The programmable controller now
accepts the changed parameters.
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
You can also set the cycle monitoring time in OB31 (see section 9.3.1).
9.2 Integrated Function Blocks, for CPU 102 Version 8MA02 and Higher
Some standard function blocks are integrated in your S5-100U. You can call up these blocks in
your control program with the commands “JU FB” or “JC FB x”. The character “x” stands for the
block number.
Overview:
You must change a two-tetrad number to a four-tetrad number before you convert it.
• If a tetrad is not in the BCD defined range, then FB240 displays the value “0”. An error bit
message does not follow.
Use function block FB 243 to divide one fixed-point binary number (16 bits) by another. The result
(quotient and remainder) is represented by two fixed-point binary numbers (16 bits each).
The divisor and the result are also scanned for zero. An eight-bit number must be transferred to a
16-bit word prior to division.
Function block FB251 allows you to output analog values to analog output modules. Values from the
range between the “UGR” (lower limit) parameters and the “OGR” (upper limit) parameters are
converted to the nominal range of the selected module.
You will find more information on the following topics in section 11.6:
• Calling up and setting parameters in FB250.
• Calling up and setting parameters in FB251.
• An example of analog value processing with FB250 and FB251.
9.3.1 Scan Time Triggering OB31, for CPU 103 and Higher
A scan time monitor monitors the program scan time. If program scanning takes longer than the
specified scan monitoring time, the CPU goes into the STOP mode. This can happen when one of
the following errors occurs:
• The control program is too long.
• The program enters a continuous loop.
You can retrigger the scan time monitor at any point in the control program by calling up OB31.
Calling up this block restarts the scan time monitor.
Call up OB31
• Prerequisite: SYSTEM COMMANDS “YES” has been specified on the programmer.
• JU OB31 can be programmed at any point in the control program.
Programming
One statement in OB31 is sufficient, e.g. “BE” to make the retriggering effective. Other
statements are also possible.
The CPU constantly checks the status of the battery in the power supply. If a battery fails (BAU),
OB34 is processed before every cycle until the battery is replaced. You can program the reaction of
the programmable controller to battery failure in OB34. If OB34 is not programmed, there is no
reaction.
9.3.3 OB251 PID Algorithm, for CPU 103 Version 8MA02 and Higher
A PID algorithm is integrated in the operating system of the S5-100U. OB251 helps you use this
algorithm to meet your needs.
Before calling up OB251, you must first open a data block called the controller DB. It contains the
controller parameters and other controller specific data. The PID algorithm must be called up peri-
odically to generate the manipulated variable. The more closely the scan time is maintained, the
more accurately the controller fulfills its task. The control parameters specified in the controller DB
must be adapted to the scan time.
You should always call OB251 from the time OB (OB13). You can set time OBs at a call up interval
ranging between 10 ms and 655,350 ms. The PID algorithm requires no more than 1.7 ms to
process.
OB13 DBN
Time-Controlled Controller
Processing Data Block
C DB N OB251 DW 1
JU OB 251 PID Control .
. Algorithm .
. .
. .
. .
. .
BE DW 49
The continuous action controller is designed for controlled systems such as those present in
process engineering for controlling pressure, temperature, or flow rate.
The “R” variable sets the proportional element of the PID controller. If proportional action is
required, most controller designs use the value R = 1.
The individual Proportional action, Integral action, and Derivative action elements can be deactivated
via their parameters (R, TI, and TD) by presetting the pertinent data words to zero. This enables
you to implement all required controller structures without difficulty, e.g., PI, PD, or PID controllers.
You can forward the system deviation XW or, using the XZ input, any disturbance variable or the
inverted actual value X to the derivative action element. Specify a negative K value for a reverse
acting controller.
When the manipulated information (dY or Y) is at a limit, the integral action component is
automatically deactivated in order not to impair the dynamic response of the controller.
The switch settings in the block diagram are implemented by setting the respective bits in control
word “STEU”.
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaa
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
Z STEU BGOG STEU
Bit 5 Bit 2
aaaaaaaa
aaaa
aaaaaaaa
aaaa
1 0
0
R Zk-Zk-1
aaaaaaaa
aaaa
Y OG
Sum-
ming
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaa
aaaaaaaaaaaa aaaaaaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
- + unit
aaaaaa
aaaaaa
aaaaaaaa
aaaa
+ dY + 0 +
X TI K
Limiter
aaaaaaaaaa
aaaaaaaa
aaaa
aaaaaaaa
aaaa
aaaaaaaa
aaaaaaaa
aaaaaaaaaaaaaa
aaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaa aaaaaaaa
aaa aaaa
XW + + + 1 + 0 YA,
aaaaaaaa
aaaaaaaa
aaaa
aaaaaaaa
aaaaaaaa
0 1 dY dYA
TD 1
UG
aaaaaaaa
aaaa
XZ 1 Manual 0
function
aa
aa
a
aaaa
aa
aa
a
aaaaaaaa
aa
aa
a
aaaaaaaa
aa
a
aaaa
aa
STEU STEU STEU STEU
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
Bit 1 Bit 0 Bit 3 Bit 4
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
aa
YH, dYH BGUG
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
Figure 9-7. Block Diagram of the PID Controller
Table 9-6. Legend for the Block Diagram of the PID Controller
Designation Explanation
K Proportional coefficient: K>0 direct acting
K<0 reverse acting
R R parameter (usually 1000)
TA Scan time
TN Integral-action time
TV Derivative-action time
TI Constant TI TI=Scan time TA/Integral action time TN
TD Constant TD TD=Derivative action time TV/Scan time TA
W Setpoint
STEU Control word
YH, dYH Output value: YH Control Word Bit 3=0
dYH Control Word Bit 3=1
Z Disturbance variable
XW System deviation
X Actual value
XZ Substitute value for system deviation
Y, dY Manipulated variable, manipulated increments
BGOG Upper limit of the manipulated variable
BGUG Lower limit of the manipulated variable
YA, dYA Output word : YA Control Word Bit 3=1
dYA Control Word Bit 3=0
Control Signal
Name Description
Bit State
1 Automatic mode
1 When GESCHW=0:
The manipulated variable last output is retained.
When GESCHW=1:
Correction increment dYK is set to zero.
The control program can be supplied with fixed values or parameters. Parameters are input via the
assigned data words. The controller is based on a PID algorithm. Its output signal can be either a
manipulated variable (positioning algorithm) or a manipulated variable modification (correction rate
algorithm).
Positioning Algorithm
The formula used to compute the correction rate algorithm is also used to compute the positioning
algorithm.
In contrast to the correction rate algorithm, however, the sum of all correction increments computed
(in DW 48), rather than the correction increment dYk is output at sampling instant tk.
Y k= dYm
m=0
! Caution
Make sure that the right controller DB is open before calling control algorithm OB251.
5 TI Constant TI (0 to 9999)
Sampling interval TA
TI=
Integral-action time
3 Constant TD (0 to 999)
Derivative-action time TV
TD=
Sampling interval TA
* It is possible to have larger gains, if sudden incremental changes to the system deviation are small
enough. This is the reason you have to divide larger deviations into smaller ones such as adding
the setpoint via a ramp function.
** The factor 0.001 is an approximate value. The exact value of the factor is 1/1024 or 0.000976.
Data
Name Comments
Word
All parameters (with the exception of the control word STEU) must be specified as 16-bit fixed point
numbers.
! Caution
The PID algorithm uses the data words that are not listed in Table 9-8 as auxiliary flags.
Note
Important controller data are stored in the high-order byte of control word DW11 (DL11).
Therefore make sure that only T DR 11/SU D11.0 to D11.7 or RU D 11.0 to D11.7
operations are used to modify user-specific bits in the control word.
Experience has shown that a TA sampling interval of approximately 1/10 of the time constant
TRK, dom* produces a control result comparable to the equivalent analog result. Dominant system
time constant TRK, dom determines the step response of the closed control loop.
In order to ensure the constancy of the sampling interval, OB251 must always be called up in the
service routine for time interrupts (OB13).
x = Control variable
x
t = Time
TA = Sampling interval
TRK,dom TRK,dom= Dominant system
time constant of
the closed control
loop
xd w = Reference
variable / Setpoint
xd = Control deviation
w
t
aaaaaaaaaa
aaaaaaaaaa
TA
* TRK, dom = dominant system time constant of the closed control loop
The controller mode is set in input byte 0 (see control word DW11 in the controller DB).
You must use the well-known controller design procedure to determine how to tune the controller
for each controlled system.
Controlled
Actual system
value
= Temperature sensor
=
Annealing furnace Final control
Transducer element
The analog signals of the setpoint and actual values are converted into corresponding digital values
in each sampling interval (set in OB13). OB251 uses these values to compute the new digital
manipulated variable, from which, in turn, the analog output module generates a corresponding
analog signal. This signal is then forwarded to the controlled system.
OB 13 STL Description
:
: JU FB 10 PROCESS CONTROLLER
NAME : CONTROLLER 1
: THE CONTROLLER'S SAMPLING INTERVAL
: DEPENDS ON THE TIME BASE USED
: TO CALL OB13 (SET IN DB1).
: THE DECODING TIME OF THE ONBOARD
: ANALOG INPUTS MUST BE TAKEN
: INTO ACCOUNT WHEN SELECTING
THE SAMPLING INTERVAL.
:
:
: BE
NAME :CONTROLLER 1
:
:C DB 30 SELECT CONTROLLER'S DB
:
: **********************************
: READ CONTROLLER'S CONTROL BITS
: **********************************
:
:L PY 0 READ CONTROLLER'S
:T FY 10 CONTROL BITS
:T DR 11 AND STORE IN DR11
: NOTE CAREFULLY:
: DR11 CONTAINS IMPORTANT CONTROL
: DATA FOR OB251
: THE CONTROL BITS MUST
: THEREFORE BE TRANSFERRED WITH
: T DR11 TO PREVENT
: CORRUPTING DL11
:
: ********************************
: READ ACTUAL VALUE AND SETPOINT
: ********************************
:
:A F 12.0 FLAG 0 (FOR UNUSED FUNCTIONS
:R F 12.0 IN FB 250)
: AN F 12.1 FLAG 1
:S F 12.1
:
: JU FB250 READ ACTUAL VALUE
NAME : RLG: AI
BG : KF +8 MODULE ADDRESS
KNKT : KY 0,6 CHANNEL NO. 0, FIXED-POINT BIPOLAR
OGR : KF +2047 UPPER LIMIT FOR ACTUAL VALUE
UGR : KF - 2047 LOWER LIMIT FOR ACTUAL VALUE
EINZ : F 12.0 NO SELECTIVE SAMPLING
XA : DW 22 STORE SCALED ACTUAL VAL. IN CONTR. DB
FB : F 12.2 ERROR BIT
BU : F 12.3 RANGE VIOLATION
:
:
: JU FB250 READ SETPOINT
NAME : RLG: AI
BG : KF +8 MODULE ADDRESS
KNKT : KY 1,6 CHANNEL NO. 1, FIXED-POINT BIPOLAR
OGR : KF +2047 UPPER LIMIT FOR SETPOINT
UGR : KF - 2047 LOWER LIMIT FOR SETPOINT
EINZ : F 12.0 NO SELECTIVE SAMPLING
XA : DW 9 STORE SCALED SETPOINT IN CONTR. DB
FB : F 13.1 ERROR BIT
BU : F 13.2 RANGE VIOLATION
:
:A F 10.0 IN MANUAL MODE, THE SETPOINT IS
: JC =WEIT SET TO THE ACTUAL VALUE TO FORCE
:L DW 22 THE CONTROLLER TO REACT
:T DW 9 TO A SYSTEM DEVIATION, IF ANY,
: WITH A P STEP
: ON TRANSFER
: TO AUTOMATIC
: MODE
WEIT :
: ********************
: JU OB251 CALL CONTROLLER
: ********************
:
: **********************************
: OUTPUT MANIPULATED VALUE
: **********************************
: JU FB251
NAME : RLG:AQ
XE : DW 48
BG : KF +8 MODULE ADDRESS
KNKT : KY 0,1 CHANNEL 0, FIXED-POINT BIPOLAR
OGR : KF +2047 UPPER LIMIT FOR ACTUATING SIGNAL
UGR : KF - 2047 LOWER LIMIT FOR ACTUATING SIGNAL
FEH : F 13.5 ERROR BIT WHEN LIMITING VAL. DEFINED
BU : F 13.6 MANIPULATED VARIABLE Y TO ANALOG
: OUTPUT
: BE RANGE VIOLATION
DB 30 STL Explanation
0: KH = 0000;
1: KF = +01000; K PARAMETER (HERE=1), FACTOR 0.001
2: KH = 0000; (VALUE RANGE: - 32768 TO 32767)
3: KF = +01000; R PARAMETER (HERE=1), FACTOR 0.001
4: KH = 0000; (VALUE RANGE: - 32768 TO 32767)
5: KF = +00010; TI=TA/TN (HERE=0.01), FACTOR 0.001
6: KH = 0000; (VALUE RANGE: 0 TO 9999)
7: KF = +00010; TD=TV/TA (HERE=10), FACTOR 1
8: KH = 0000; (VALUE RANGE: 0 TO 999)
9: KF = +00000; SETPOINT W, FACTOR 1
10: KH = 0000; (VALUE RANGE: - 2047 TO 2047)
11: KM = 00000000 00100000; CONTROL WORD
12: KF = +00500; MANUAL VALUE YH, FACTOR 1
13: KH = 0000; (VALUE RANGE: - 2047 TO 2047)
14: KF = +02000; UPPER CONT. LIMIT BGOG, FACTOR 1
15: KH = 0000; (VALUE RANGE: - 2047 TO 2047)
16: KF = -02000; LOWER CONT. LIMIT BGUG, FACTOR 1
17: KH = 0000; (VALUE RANGE: - 2047 TO 2047)
18: KH = 0000;
19: KH = 0000;
20: KH = 0000;
21: KH = 0000;
22: KF = +00000; ACTUAL VALUE X, FACTOR 1
23: KH = 0000; (VALUE RANGE: - 2047 TO 2047)
24: KF = +00000; DISTURBANCE VARIABLE Z, FACTOR 1
25: KH = 0000; (VALUE RANGE: - 2047 TO 2047)
26: KH = 0000;
27: KH = 0000;
28: KH = 0000;
29: KF = +00000; FEEDFORWARD XZ FOR DIFF.,
30: KH = 0000; FACTOR 1, (- 2047 TO 2047)
31: KH = 0000;
32: KH = 0000;
33: KH = 0000;
34: KH = 0000;
35: KH = 0000;
36: KH = 0000;
37: KH = 0000;
38: KH = 0000;
39: KH = 0000;
40: KH = 0000;
41: KH = 0000;
42: KH = 0000;
43: KH = 0000;
44: KH = 0000;
45: KH = 0000;
46: KH = 0000;
47: KH = 0000;
48: KF = +00000; CONTROLLER OUTPUT Y, FACTOR 1
49: KH = 0000; (VALUE RANGE: - 2047 TO 2047)
50:
Tables
Interrupt-driven program processing starts when a signal from the CPU causes the programmable
controller to interrupt cyclic or time-controlled program scanning in order to process a specific
program. Once this program has been scanned, the CPU returns to the point of interruption in the
cyclic or time-controlled program and resumes processing at that point.
• The programmable controller is in the Power ON state and in the RUN operating mode.
• Interrupt processing is not disabled by an IA operation in your program. See section 8.2.8.
• OB2 has been programmed.
Slot 0 1 2 3
° ° ° °
° ° ° °
° ° ° °
° ° ° °
CPU ° °
° °
° °
° °
4 8 4 8
DI DI DI DI
Bus unit with interrupt capability (but
acts only like a “normal” bus unit)
Interrupts are handled
only by this module
Bus unit with interrupt capability
Figure 10-1. Possible Configuration of the Programmable Controller with Bus Units
Having Interrupt Capability
10.1 Interrupt Processing with OB2, for CPU 103 Version 8MA02 and
Higher
For interrupt-driven processing, OB2 must have been programmed. OB2 is called up by a process
interrupt and interrupts in turn the cyclic or time-controlled program scanning. Other blocks can be
called from OB2. After the interrupt-driven program has been processed, the CPU resumes cyclic
or time-controlled program scanning.
Triggering an Interrupt
Interrupts can only be triggered by four-channel digital input modules and comparator modules that
are plugged into slots 0 and 1 on a bus unit with interrupt capability.
Interrupts are triggered by a change in the signal state (0 1=positive edge; 1 0=negative edge)
at the respective interrupt input. Then the programmable controller automatically branches to OB2.
If you have not programmed OB2, either the cyclic or time-controlled program resumes immediately
after the interrupt.
The cyclically processed program can be interrupted after every STEP 5 statement.
The processing of integral FBs can be interrupted at certain points (see section 9.2). The data cycle
(see section 2.2.2) can be interrupted after each data packet consisting of four data bits and a check
bit.
. . . Interrupt PII
A I 0.2 OB2
S Q 14.0 L PY2
INTERRUPT!
. . . .
.
BE .
BE
Interrupt PIQ
Figure 10-2. Program Interruptions by Process Interrupts
Use the IA command to disable interrupt processing. Use the RA command to enable interrupt
processing. The default setting is RA (see section 8.2.8).
Note
Even for interrupt processing, you may not exceed the general block nesting depth of 16
levels.
Interrupt Priorities
If a second interrupt is triggered during an interrupt processing, the second interrupts is processed
at the end of the first interrupt processing.
Note
If both a positive and negative pulse edge occur at an interrupt input while the IA
operation is valid (disable interrupt), it is no longer possible to determine the channel that
has triggered the interrupt.
But after an RA operation, OB2 is still called up.
If a process interrupt occurs, only the signal states of the interrupt inputs in slots 0 and 1 are read
out to the interrupt PII.
This data in the interrupt PII is the only data provided to the interrupt-driven program for evaluation.
The interrupt PII can be scanned in OB2 by means of the following load operations:
Overview:
If you enter other parameters, the CPU goes into the STOP mode and enters the “NNN” error
message in the ISTACK (see section 5.2). When data is read into the interrupt PII, the normal PII is
not written to simultaneously.
Data from time-controlled or interrupt-driven programs to I/O modules are written to the interrupt PIQ
and simultaneously to the “normal” PIQ.
After OB2 is finished, the data that has been transferred to the interrupt PIQ is output to the
peripheral I/Os in an interrupt output data cycle (before “normal” program processing).
After the OB1 program cycle, the PIQ is copied to the interrupt PIQ.
The interrupt output data cycle is executed only if the interrupt PIQ has been written to. Use
transfer statements to write data for I/O modules to the interrupt PIQ. When data is written to the
interrupt PIQ, data is written simultaneously to the normal PIQ.
Overview:
Interrupt
PII PII
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaa
T IBX/T IW X L IBX/L IW X L PYX/L PY1/L PW0
ACCU 1
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
T QBX/T QW X
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaa
T PYX/T PW X
Interrupt
PIQ PIQ
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
aaaaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
Two sensors are L PY 0 Load byte 0 of the interrupt PII into ACCU 1 and
connected on channels 0 T FY 0 transfer it to flag byte 0.
and 1 on a four-channel A F 0.0 Did a positive edge occur on channel 0?
digital input module on AN I 0.0 OR
slot 0. O
Branch to FB12 if sensor 1 AN F 0.0 Did a negative edge occur on channel 0?
(channel 0) triggers an A I 0.0
interrupt. JC FB 12 If a pulse edge has occurred, a branch is made
... to FB12.
Caution
Be sure to save the flags (in a data block, for example) if these flags are to be
overwritten during interrupt processing and are needed again in the cycle.
The additional reaction times are variable. They are listed in Table 10-1.
Programmer functions:
Compress
• If no blocks are moved • Depending on the number of blocks
present (after overall reset 31 ms)
11-1 Operating Mode Switch Settings for Analog Input Modules 464-8 to 11 .... 11 - 7
11-2 Operating Mode Switch Settings for Analog Input
Module 464-8MA21 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 - 8
11-3 Operating Mode Switch Settings for Analog Input
Module 464-8MF21 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 - 10
11-4 Representation of an Analog Input Value as Bit Pattern . . . . . . . . . . . . . . . . 11 - 11
11-5 Analog Input Module 464-8MA11, -8MF11, -8MB11
(Bipolar Fixed-Point Number) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 - 11
11-6 Analog Input Module 464-8MC11, -8MD11
(Bipolar Fixed-Point Number) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 - 12
11-7 Analog Input Module 464-8ME11, 4x4 to20 mA
(Absolute Value Representation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 - 12
11-8 Analog Input Module 464-8MF11, 2x PT 100 (Unipolar)
Analog Input Module 464-8MF21, 2x PT 100 “No Linearization”
(Unipolar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 - 12
11-9 Analog Input Module 464-8MF21, 2x PT 100 “with Linearization”
(Bipolar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 - 13
11-10 Analog Input Module 464-8MA21, 4x±50 mV “with Linearization” and
“with Temperature Compensation” (Bipolar); Thermoelement Type K
(Nickel-Chromium/Nickel-Aluminium, according to IEC 584) . . . . . . . . . . . . . 11 - 14
11-11 Analog Input Module 464-8MA21, 4x±50 mV “with Linearization” and
“with Temperature Compensation” (Bipolar); Thermoelement Type J
(Iron/Copper-Nickel (Konstantan), according to IEC 584) . . . . . . . . . . . . . . . 11 - 15
11-12 Analog Input Module 464-8MA21, 4x±50 mV “with Linearization” and
“with Temperature Compensation” (Bipolar); Thermoelement Type L
(Iron/Copper-Nickel (Konstantan) according to DIN 43710) . . . . . . . . . . . . . 11 - 16
11-13 Analog Input Module 466-8MC11, 4x 0 to10 V . . . . . . . . . . . . . . . . . . . . . . 11 - 16
11-14 Representation of an Analog Output Value as a Bit Pattern ............ 11 - 20
11-15 Output Voltages and Currents for Analog Output Modules
(Fixed-Point Number Bipolar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 - 21
11-16 Output Voltages and Currents for Analog Output Modules (Unipolar) . . . . . . 11 - 21
11-17 Call and Parameter Assignments of FB250 . . . . . . . . . . . . . . . . . . . . . . . . 11 - 22
11-18 Call and Parameter Assignments of FB251 . . . . . . . . . . . . . . . . . . . . . . . . 11 - 25
Analog input modules convert analog process signals to digital values that the CPU can process (via
the process image input table, PII). In the following sections, you will find information about the
operating principle, wiring methods, and start-up and programming of analog input modules.
Observe the following rules to connect current and voltage sensors to analog input modules:
• When you have multi-channel operations, assign the channels in ascending order. This shortens
the data cycle.
• Use terminals 1 and 2 for the connection of a compensating box (464-8MA11 ) or for the supply
of two-wire transducers (464-8ME11).
- Terminals 1 and 2 cannot be used with the remaining analog input modules.
• Short-circuit the terminals of unused inputs.
• Set the reference potentials of the sensors to a common reference potential. Do this to prevent
the potential difference between the common references from exceeding 1 V.
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
1 3 5 7 9
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
aaaaaa
aa
a
aa
a
aaaa
aa
a
aaaa
aaaaa
aa
aa
a
aa
a
aa
a
aa
aa
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
aa
aa
aa
aa
aa
aa
aa
aa
Reference junction 2 4 6 8 10
aaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
aaa
aa
aa
a
aa
aaa
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
aa
a
a
a
aa
a
a
a
aa
+ -+
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
aa
a
aa
a
a
a
a
aa
a
a
a
a
aa
aa
aa
aa
a
a
a
a
-
aa
aa
aa
a
a
a
aa
a
a
a
a
aa
aaaa
+ -
aa
aa
aa
a
a
a
aa
a
a
a
a
aa
aa
a
a
a
aa
aa
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
Compen- a
a
a
a
a
a
a
a
a
a
a
a
a
aaaaaaaaaa
a
sating box
a
a
a
a
a
a
a
a
a
a
a
a
Thermal
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
coupling
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
Figure 11-1. Voltage Measuring with Isolated Thermocouples (6ES5 464-8MA11/8MA21)
With non-floating sensors (e. g., non-isolated thermocouples), the permissible potential difference
VCM must not be exceeded (see maximum values of the individual modules).
aaaaaaa
aaaaaaa
a
a
aaaaaaa
aaaaaaa
a
a
aaaaaaa
aaaaaaa
a
a
aaaaaaa
aaaaaaa
a
a
aaaaaaa
aaaaaaa
a
a
1 3 5 7 9
aaaaaaaa
aaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaa
Reference junction 2 4 6 8 10
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
+ -+ -
aaaaaaaaaa
aaaaaaaaaa
aaaaa
aaaaaaaaaa
aaaaa
VCM
+ -
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaa
aaaaaaaaa
Compen-
Thermal
sating box
coupling
The influence of the temperature on the reference junction (e. g., terminal box) can be compensated
for with a compensation box. Observe the following rules:
• The compensation box must have a floating supply.
• The power supply must have a grounded shielding winding.
• The compensation box must be connected to terminals 1 and 2 of the terminal block.
You can use the following three modules for the connection of voltage sensors:
• Analog Input Module 464-8MB11 for voltages of±1 V
• Analog Input Module 464-8MC11 for voltages of±10 V
• Analog Input Module 466-8MC11 for voltages from 0 to 10 V
a
aa
a
a
aa
a
aa
a
aa
a
a
aa
a
5 7 9
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
1 3
aa
aa
aa
a
aa
aa
a
a
a
a
a
a
a
a
a
a
a
aa
aa
a
aa
a
aa
a
aa
aa
a
aa
aa
a
a
a
a
aaaa
a
2 4 6 8 10
aa
a
aa
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
aa
a
aa
a
aa
a
aa
a
a
aaaaa
a
a
a
a
a
a
a
a
aaaaa
a
+ -+ -+ -+
a
a
a
a
a
a
aa
aaaa
a
aa
a
a
a
a
a
a
a
a
a
a
-
a
a
a
a
a
a
aa
aa
a
a
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aaaa
a
a
a
a
aaaa
a
a
a
a
aaaa
a
a
a
a
a
aaaa
a
a
a
a
a
a
a
a
V V V V
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
You can use module 464-8MD11 for the two-wire connection of current sensors.
Figure 11-4 shows the two-wire connections of current sensors.
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaa
aaaaaaaa
aaaa
aaaaaaaa
aaaa
aaaaaaaa
aaaa
1 3 5 7 9
aaaaaaaa
aaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaa
aaaaaaaa
aaaa
aaaaaaaa
aaaaaaaa
aaaa
2 4 6 8 10
aa
a
aa
a
a
a
a
a
aa
a
aaaaa
a
aa
a
aa
a
a
aaaaa
a
a
a
a
a
a
a
aaaaa
a
a
aaaaa
a
aa
aa
a
a
a
a
a
aa
a
aa
a
a
a
a
a
a
a
a
a
a
a
+ -+ -+ -+ -
aa
aa
a
a
a
a
a
aa
a
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
aa
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
Figure 11-4. Two-Wire Connection for Current Sensors (6ES5 464-8MD11)
Use the 24-V inputs 1 and 2 of analog input module 464-8ME11 to supply the two-wire transducers.
The two-wire transducer converts the supplied voltage to a current of 4 to 20 mA.
For wiring connections, see Figure 11-5.
aa
a
aa
a
a
aa
a
a
aa
a
aa
a
aa
a
a
aa
a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
1 3 5 7 9
a
aa
aa
aa
a
aa
aa
a
a
a
a
a
a
a
a
a
a
a
a
aaaaaaaa
aaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaa
aaaaaaaa
aaaaaaaa
aaaa
2 4 6 8 10
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaa
aaaaaaaaaa
+ - + -
Two-wire Two-wire
aaaaaaaa
aaaaaaaa
aaaa
aaaaaaaa
aaaaaaaa
L+ M trans- trans-
ducer ducer
aaaaaaaa
aaaa
aaaaaaaa
aaaa
aaaaaaaa
aaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaa
1 3 5 7 9
aaaaaaaa
aaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaa
aaaaaaaa
aaaaaaaa
aaaa
2 4 6 8 10
aaaaaa
aaaaaa
aaa
aaaaaaaaaa
- +
a
aaa
U Four-wire transducer
aa
aa
a
a
a
a
a
a
aa
aa
a
a
a
a
a
a
a
a
a
Four-wire transducers require their own power supply. Connect the “+” pole of the four-wire
transducer to the corresponding “-” pole of the terminal block (a connection technique that is the
opposite of the two-wire transducer). Connect negative terminals of the four-wire transducer to
terminal two of the terminal block.
Inputs 4, 6, 8, and 10 of the analog input module 464-8ME11 are connected internally via shunt
resistors. Because of the internal shunt resistors, broken wire signaling is not possible.
circuits.
(e.g., PT 100).
1
aaaaaaaa
aaaa
aaaa
2
a
aa
aa
aa
a
Analog Value Processing
3
aaaaaaaa aaaaaaaa
aaaa
M0+
aaaaaaaa
aaaa
4
a aaaaaaaa
1
5
aaaaaaaa aaaaaaaa aaaaaaaa
aaaa a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
aa
aa
aaaaaaaaaa
a
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a aaaaaa
a
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a aaaaaa
Figure 11-7. Wiring Method for PT 100 (6ES5 464-8MF11/8MF21)
a
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a aaa
aaaaaaaa aaaaaaa
Measuring circuit M0
channel for voltage measurement (± 500 mV). In this case, use terminals M+/M- for the signal
aaaaaaaa aaaaaaa
drops in these “constant current circuits” do not affect the measurement results. The measuring
The resistance of the PT 100 is measured in a four-wire circuit. A constant current is supplied to
a
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
aa
a aaaaaa
If you use only one channel for PT 100 measurement (e.g., channel 0), then you can use the other
the resistance thermometer via terminals 7 and 8 as well as via terminals 9 and 10, so that voltage
aa
aaaaaaaa aaaaaaa
aaa
aa
aa
aa
aa
aa
aaaa
aa
aa
aa
aa
aa
aaaaaaaaaa
Operation: Set the number of channels you wish to assign on the input module. If there are
fewer than four channels, less address space will be assigned and measured
values will be updated faster.
Broken wire: Once the broken wire signal has been activated, a break on one of the lines to
the sensor (thermocouple or PT 100) or of the sensor itself causes the red LED
above the function selection switch to light up. At the same time, the broken wire
error bit F (bit 1, byte 1) for the faulty channel is set.
Table 11-1. Operating Mode Switch Settings for Analog Input Modules 464-8 to 11
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
aa
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
aaaaaaaa
a
a
a
a
a
a
a
a
a
a
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a
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
a
aaaaaaaaaaaa aa
aaa
aa
aa
aa
aaa aa
aaa
aa
aaa
aaaaaaaaaaaa a
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
a
aaaaaaaaaaaa a
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
a
aaaaaaaaaaaa a
aa
aa
aa
aa
aa
aa
aa a
aa
aa
aa
aa
aa
a
aa
a aaaaaa
1
2
3
4
5
6
7
8
aa
aaa
aa
aa
aa
aaa aaaaaa
1 channel
aaaaaaaaaaaa aaaaaaaa aaaaa aaaaaa
(channel 0)
aaaaaaaaaaaa a
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
a
aaaaaaaaaaaa a
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
a
aaaaaaaa aaaa aaaaa
1
2
3
4
5
6
7
8
aaaaaaaaaaaa aaaaaaaa aa
a aa
a
Type L: - 199° C to + 900° C
Type K: - 200° C to +1369° C
Type J: - 200° C to +1200° C
50 Hz
aaaaaaaa aa
aaa
aa aa
aaa
aa
aaa
1
2
3
4
5
6
7
8
aaaaaaaaaaaa aaaaaaa aaaaa
a aaaaaa
aaaaaaaaaaaa aaaaaaaa
a a
aa
aa
aa
aa
aa
a
1
2
3
4
5
6
7
8
aaaaaaaaaaaa aa
aaa
aa
aa
aa
aaa aa
aaa
aa
aaa
a
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
a
and channel 1)
aaaaaaaaaaaa aaaaaaaa aaaaaa
aaaaaaaa aaaaaa
(-328° F to 2497° F)
(-328° F to 2192° F)
2 channels (channel 0
aaaaaaaaaaaa a
aa
aa
aa
aa
aa
aa
aa
a
aa
a
a
aa
a
aa
a
aa
aaa
a
aaaaaaaaaaaa a
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
aa
a
aaaaaaaa aaaaaa
directly to the module, i.e., without a copper extension cable.
1
2
3
4
5
6
7
8
60 Hz
aaaaaaaaaaaa aa
a aa
a aa
a
1
2
3
4
5
6
7
8
aa
aaa
aa
aa
aa
aaa aa
aaa
aaa aa
aaa
aa
aaa
Table 11-2. Operating Mode Switch Settings for Analog Input Module 464-8MA21
aaaaaaaaaaaa aaaaaaaa aa
a
1
2
3
4
5
6
7
8
With this function, you can obtain a characteristic linearization of the thermo-
aaaaaaaa aa
aaa
aa
aaa
- channel 3)
When thermocouples are directly connected, an internal circuit on the module
aaaaaaaa aaaaaa
the terminal when the temperature at the measuring junction is 0° C (32° F). In
causes the digital value “0” to be displayed independently of the temperature of
4 channels (channel 0
(See Figure 11-1). On the other hand, it is possible to move the reference point to
couples of type J, K, and L or of the resistance thermometer PT 100. With module
aa
aaa
aa
aa
aaaa
aaa a
aa
aa
aa
aa
aa
played.
aaaaaaaaaaaaaaaa
S5-100U
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
input offset.
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
Function
Table 11-2.
aaaaaaaaaaaaaaaa
Temperature
Characteristic
compensation
linearization of
thermocouples
aaaaaaaaaaaaaaaa
1
2
3
4
5
6
7
8
1
2
3
4
5
6
7
8 aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa
compensation
1
2
3
4
5
6
7
8
1
2
3
4
5
6
7
8
type L
is 0° C (32° F). This means that with 0° C (32° F) at the measuring junction, the value “0” is dis-
box if you use the thermostat temperature in the application software to adjust the thermocouple
If you have set “Characteristic linearization” and “Temperature compensation” with the operating
When you set the switches to “no linearization” and “no temperature compensation”, then module
designed only for a certain type of thermocouple. It is possible to use a thermostat in the terminal
mode switches on module 464-8MA21 for the thermocouple used, then the reference temperature
Linearization
Compensation is then not possible even with a compensating box because the compensating box is
If you equip several channels with thermocouples, use the same type of thermocouple. If you select
sation for types J and L
11-9
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
11-10
aaaaaaaaaaaaaaaa
PT 100:
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
Function
frequency
Operation
Wire break
aaaaaaaaaaaaaaaa
linearization
for the PT 100
Power supply
Characteristic
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaa
Analog Value Processing
a
aa
aa
aa
aa
aa
aa
aa
aa
a aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa
a
aa
aa
aa
aa
aa
aa
aa
aa
a aaaaaaaaaaaaaaaa
a
aa
aa
aa
aa
aa
aa
aa
aa
a aaaaa aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaa
1
2
3
4
5
6
7
8
1
2
3
4
5
6
7
8
1
2
3
4
5
6
7
8
aaaaaaaaa aa
a aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa
50 Hz
aaaaaaaaa aa
aaa
aaa
1 channel
1
2
3
4
5
6
7
8
a
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
a aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa
No linearization
a
aa
aa
aa
aa
aa
aa
aa
aa a
aa
aa
aa
aa
a
aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa
aa
aaa
aa
aa
aa
aaaa
aaa
a a
aa
aa
aa
aa
a
aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa
a
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa
a
aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa
a
aa
aa
aa
aa
aa
aa
a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aaaaaa
2 channels (channel 0 and
a
aa
aa
aa
aa
aa
aa
aa
aa
a a
aa
aa
aa
aa aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa
If you set the switch to “no linearization” and “no temperature compensation”, module 464-8MF21
a
aa
aa
aa
aa
aa
aa
aa
aa
a aaaaa
a aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa
aa
aaaaaaaa
aa
a aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa
aaa
aa
aa
aa
aa
aa
Each bit position has a fixed value in powers of two (see Tables 11-4 and 11-14). Analog values
are represented in two's complement.
The following tables show the analog value representations of the different analog inputs in 2-byte
format. You will need this information to program FB250 and FB251 (see section 11.6).
Bit Number 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
aaaaaa
Table 11-6. Analog Input Module 464-8MC11, -8MD11 (Bipolar Fixed-Point Number)
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
aaaaa
aaaaa
aaaaa a
a
aaaaa a
aaaaa
aaaaa a
aaaaa a
aaaaa a
aaaaa
aaaaa a
a
aaaaa a
aaaaa a
aaaaa
aaaaa a
aaaaa a
aaaaa a
aaaaa
aaaaa a
aaaaa a
aaaaa a
aaaaa
aaaaa a
a
aaaaa a
aaaaa a
aaaaa
aaaaa a
aaaaa a
aaaaa a
aaaaa
aaaaa a
aaaaa a
aaaaa a
aaaaa
aaaaa a
a
aaaaa a
aaaaa a
aaaaa
aaaaa a
aaaaa a
aaaaa a
aaaaa
aaaaa a
aaaaa a
aaaaa a
aaaaa
aaaaa a
a
aaaaa a
aaaaa a
aaaaa
aaaaa a
aaaaa a
aaaaa a
aaaaa
aaaaa a
aaaaa a
aaaaa a
aaaaa
aaaaa a
a
aaaaa a
aaaaa a
aaaaa
aaaaa
a
Measured Value
Units High Byte Low Byte Range
in V in mA
464-8MC11 (4x±10 V)
464-8MD11 (4x±20 mA)
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
aaaaa
a
Table 11-7. Analog Input Module 464-8ME11, 4x4 to 20 mA (Absolute Value Representation)
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
aa
a
a
a
a
a
a
aa
a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 0 Transducer
-1 -0.008 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 failure?
<-4095 <-32.769 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1
* Because of tolerances of components used in the module, the converted value can also be negative
(e.g. FFF8H Unit: -1).
Table 11-9. Analog Input Module 464-8MF21, 2x PT 100 “with Linearization” (Bipolar)
Resis- Temperature in
Units High Byte Low Byte Range
tance in °C °F
>1766 >400 >883 >1531 0 0 1 1 0 1 1 1 0 0 1 1 0 0 0 1 Overflow
1766 883 1531 0 0 1 1 0 1 1 1 0 0 1 1 0 0 0 1 Overrange*
1702 851 1564 0 0 1 1 0 1 0 1 0 0 1 1 0 0 0 1
1700 390.26 850 1562 0 0 1 1 0 1 0 1 0 0 1 0 0 0 0 0
1400 345.13 700 1292 0 0 1 0 1 0 1 1 1 1 0 0 0 0 0 0
1000 280.90 500 932 0 0 0 1 1 1 1 1 0 1 0 0 0 0 0 0
600 212.02 300 572 0 0 0 1 0 0 1 0 1 1 0 0 0 0 0 0
300 157.31 150 302 0 0 0 0 1 0 0 1 0 1 1 0 0 0 0 0
200 138.50 100 212 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 Nominal range
2 100.39 1 34 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
0 100.00 0 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-40 92.16 -20 -4 1 1 1 1 1 1 1 0 1 1 0 0 0 0 0 0
-80 84.27 -40 -40 1 1 1 1 1 1 0 1 1 0 0 0 0 0 0 0
-200 60.25 -100 -148 1 1 1 1 1 0 0 1 1 1 0 0 0 0 0 0
-202 -101 -150 1 1 1 1 1 0 0 1 1 0 1 1 0 0 0 1 Overrange*
-494 -247 -413 1 1 1 1 0 0 0 0 1 0 0 1 0 0 0 1
<-494 <-247 <-403 1 1 1 1 0 0 0 0 1 0 0 1 0 0 0 1 Overflow
* In the overrange area, the current slope of the characteristic curve is maintained when leaving the linearized nominal range.
The 466-8MC11 analog input module stores each analog value in a single byte. The other analog
input modules store the analog values in words (see Table 11-4).
255 9961 1 1 1 1 1 1 1 1
254 9922 1 1 1 1 1 1 1 0
. . .
128 5000 1 0 0 0 0 0 0 0
. . .
1 39 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 0
If you want to read in the analog value with function block FB250 (analog value reading), you have to
pre-process the analog value before calling up FB250.
Example 1:
Analog input module 466-8MC11 is inserted in slot 1, which means that the module's start address
is 72.
Function block FB72, pictured below, reads in the analog values and pre-processes them for
function block FB250 (analog value reading).
FB72 Explanation
Example 2:
Analog input module 466-8MC11 is inserted in slot 0, which means that the module’s start address
is 64.
The analog values that are read in are stored in four consecutive bytes:
1st analog value (channel 0) in IB64
2nd analog value (channel 1) in IB65
3rd analog value (channel 2) in IB66
4th analog value (channel 3) in IB67
Function block 73, pictured below, reads in the analog values and pre-processes them for FB250.
The additional processing with FB250 is done just like module 464, however without an overflow bit.
FB73 Explanation
NAME :READ AI
:
:
000A :L IB 67 Read in channel 3
000C :SLW 6
000E :T IW 70
0010 :
0012 :L IB 66 Read in channel 2
0014 :SLW 6
0016 :T IW 68
0018 :
001A :L IB 65 Read in channel 1
001C :SLW 6
001E :T IW 66
0020 :
0022 :L IB 64 Read in channel 0
0024 :SLW 6
0026 :T IW 64
0028 :
002A :
002C :JU FB 250
002E NAME :RLG:AI
0030 BG : KF +0 Module on slot 0
0032 KNKT : KY 0,4 Channel/No. 0, unipolar representation
0034 OGR : KF +1000 Upper limit 1000 (1000 mV)
0036 UGR : KF +0 Lower limit 0
0038 EINZ : F 0.0 No meaning
003A XA : FW 100 Output, 0 to 1000 mV in KF
003C FB : F 102.0 Error bit for parameter assignment
003E BU : F 102.1 Range overflow
0040 : (always 0 with this module)
0042 :BE
aaaaaaaaaa
aaaaaaaaaa aaaaaaaaaa
QV
aaaaaaaaaa
aaaaa aaaaaaaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaa
S+
voltages or currents.
be compensated for.
(4/8) (3/7)
L+
aaaaa aaaaaaaaaa
aaaaa
aaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaa aa
1
aaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaa aaa
aa
a
a
RL
aaaaaaaaaa aa
aa
aa
a
470-8MA12 (2x±10 V)
24 V DC
aaaaa aaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaa a
2
aaaaaaaaaa aaaaa aaaaa
aaaaa
a
470-8MD12 (2x+1 to 5 V)
aaaaaaaaaa aaaaaaaaaa aaaa aaaaa
S+
aaaaaaaaaa aaaaaaaaaa aa
aa
aa
a aaaaa
aaaaaaaaaa aaaaaaaaaa aaaa aaaa
aaaaa
a
a aaaaa
a
4
aaaaaaaaaa aaaaa aaaaa
QV
(5/9) (6/10)
aaaaaaaaaaaaaaa aaaaaaaaaa aaaaa
a a
aa
aa
aa
aa
S- MANA
aaaaaaaaaa aaaaa aa
5
aaaaa aaaa aaa
aa
aa
a
S-
a a
Analog Output Modules
aaaaaaaaaa aa
aa
aa
a aa
aa
aa
aa
a
a aaaaa
6
aaaaaaaaaaaaaaa aaaaaaaaaa aaaaa aaaaa
aaaaaaaaaa aaaaaaaaaa aaaaa
a a
aa
aa
aa
aa
a aaaaa
aaaaa aaaaa
MANA
7
aaaaaaaaaa aaaaaaaaaa aaaaaa
aa
aa
aa
a aaaaa
S+
aaaa aaaa
Unused outputs must be left open-circuited.
aaaaaaaaaa aaaaaaaaaa aa aa
aa
aa
aa
aa
a aa
a
aaaaaaaaaa aaaaaaaaaa a a
a
aa
a
aa
aaa
a
aa
aaa
aaa
Terminals
8
aaaaa aaaaa
Check the following items before connecting loads:
QV
aaaaaaaaaa aaaaaaaaaa aaaaa
a aaaaa
aaaaaaaaaa aaaaaaaaa a
aa
aa
aa
aa
a
9
S-
aaaaaaaaaa a
aa
aa
aa
a a
aa
aa
aa
aa
a
aaaaaaaaaa aaaaa a aaaaa
a aaaaa
10
aaaaaaaaaa a
aaaaaa aaaaa
a aaaaa
Terminal assignment
aaaaaaaaaa aaaaa aaaaa
aaaaa
MANA
aaaaaaaaaa aaaaa
aaaaaaaaaa aaaa
aaaaa
a
aaaaaaaaaa
aaaaaaaaaa
aaaaa
aaaaaaaaaaaaaaaaaaa a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
aaaaaaaaaaaaa
11.5.1 Connection of Loads to Analog Output Modules
aaaaaaaaaaaaaaaaaaa
RL:
aaaaaaaaaaaaa
The load voltage 24 V DC must be connected to terminals 1 and 2.
S±:
QV:
aaaaaaaaaaaa
Key:
aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaa
aaaaaaaaaaa
MANA:
aaaaaaaaaaaaaaaaaaa aa
aa
aa
aa
aa
aa
aa
aa
aa
aaaa
aaa
aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaa
a
aaaaaaaaaaaaaaaaaaa aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
aaaaaaaaaaaaaaaaaaa aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
aaaaaaaaaaaaaaaaaaa a
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aaa
aa
aaa
a
No adjustments are necessary if you want to connect loads to the analog outputs.
aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaa
aaaaaaaaaaaa
The maximum permissible potential difference between the outputs is 60 V AC.
aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaa aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
Sensor line
aaaaaaaaaaaaaaaaaaa a
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
aa
a
Load resistor
aaaaaaaaaaaaa
Figure 11-9 shows how to connect loads to the voltage outputs of the following modules:
aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaa
aaaaaaaaaaaa
The sensor lines (S+ and S-) must be directly connected to the load, so that the voltage is
aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaa
aaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaa aa
aa
aa
aa
aa
aa
aa
aa
aa
aaaa
aaa
aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaa
a
aaaaaaaaaaaa
the load resistance. In such a case, connect terminal S+to terminal QV, and terminal S- to MANA.
aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaa
Analog output "Voltage" aaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaa
a
Figure 11-9. Load Connection via a Four-Wire Circuit (6ES5 470-8MA12 or 6ES5 470-8MD12)
Analog Value Processing
11-19
•
•
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
Key:
11-20
(PIQ).
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa
Bit number
aaaaaaaaaaaaaa aa aa
aaa
aa
aa
aa
aa
aa
aa
aa
a aaa
aa
aa
aa
aa
aa
aa
aa
a
L+
aaaaaaaaaaaaaa a a
QI
aa
aa
aa
aa
aa
aa
aa
aa
aa
a aa
aa
aa
aa
aa
aa
aa
aa
aa
a
(4/8)
aaaaaaaaaaaaaaaaaaaaa aaaaaa
aa
aa
aa
aa a
aa
aa
aa
aa
aaaaaa
1
aaaaa
a aaaaaaaaa aaaaaaaa
M
aaaaaaaaaaaaaa aaaaaaaaa aaaa
X
S
aaaaaaaaa
24 V DC
aaaaaaaaaaaaaa a
aa
aa
aa
aa
a aaaaaaaa
2
aaaaaaaaaaaaaa aaaaaaaa
aaaaaaaaaaaaaa
aaaaa
3
aaaaaaaaaaaaaa aaaaa aaaaaaaa
aaaaa aaaa
RL
aaaaaaaaaaaaaa aaaa
aaaaa
a
470-8MB12 (2x±20 mA)
4
aaaaaaaaaaaaaa aaaaaaaa
aaaa
sign bit
aaaaaaaaaaaaaa
aaaaaaaaaaaaaa aaa
aa
aa
aa
aa
aa
aa
aa
a aaaa
a
6
aaaaaaaaaaaaaa aa
aa
aa
aa
aa
aa
aa
aa
aa
a
irrelevant bits
210