S5 - S7 For Windows V4.0
S5 - S7 For Windows V4.0
S5 for Windows
User's Guide
Version 4.0x
S5 / S7 for Windows User’s Guide
Information in this document is subject to change without notice and does not
represent a commitment on the part of IBH softec GmbH. The software and/or
databases, described in this doc ument, are furnished under a license agreement or
non-disclosure agreement. The software and/or databases may be used or copied
only in accordance with the terms of the agreement. It is against the law to copy
the software on any medium except as specifically allowed in the license or non-
disclosure agreement. The purchaser may make one copy of the software for
backup purposes. No part of this manual and/or databases may be reproduced or
transmitted in any form or by any means, (electronic or mechanical, including
photocopying, recording, or information storage and retrieval systems), for any
purpose other than the purchaser's personal use, without the express written
permission of IBH softec GmbH.
Windows™, Windows NT™ are trademarks of the Micros oft® Corporation in the USA and/or other countries.
Simatic® S5, Step® 5, Step® 7 and GRAPH® 5 are registered trademarks of Siemens AG, München and
Berlin.
Contents
Part 1 ............................................................................................ 1
2 Introduction......................................................................... 14
2.1 Notation and Conventions .............................................................15
3 PC Block List....................................................................... 16
3.1 PC Block List Window....................................................................16
3.1.1 Marking Blocks...........................................................................20
3.2 File (File Menu - PC Block List) ...................................................21
3.2.1 New (New Project).....................................................................21
3.2.2 Open (Open Project)..................................................................23
3.2.2.1 Converting PLC programs into Projects..........................24
3.2.3 Save (Save Project)...................................................................25
3.2.4 Save As (Save Project As).........................................................26
3.2.5 Name (Project File Names)........................................................28
3.2.5.1 Assigning Files to a Project ...........................................28
3.2.5.2 Assigning a Hardware Configuration File to a Project ......30
3.2.6 Import (Import a PLC Program) ..................................................31
3.2.6.1 S5 for Windows Import Filter .........................................32
3.2.6.2 S7 for Windows Import Filter .........................................33
3.2.7 Export (Export a PLC Program) ..................................................38
3.2.7.1 Export S5 for Windows ? S5 PU Files (*s5d)................39
3.2.7.2 Export S7 for Windows ? S7 PU Files (*awl) ................40
3.2.8 Program File ..............................................................................41
3.2.8.1 New (New Program File) ..............................................41
Index......................................................................................... 457
S5 for Windows
S7 for Windows
Technical Details
This Chapter will explain how to install S5 / S7 for Windows on the hard disk of your
personal computer. Beginning with Version 4.0, S5 / S7 for Windows is a 32 Bit
Application and requires a 32 bit operating system from Microsoft such as Microsoft®
Windows 95, Microsoft® Windows 98 or Microsoft® Windows NT (with Service
Release #3 or higher).
To unlock S5 / S7 for Windows and the selected options, a serial number and a PIN
code is required for each option. You will also need an authorization code that will be
sent to you by IBH softec. The authorization code is based on the S5 / S7 for Windows
plus the selected options installed and an identification number generated by your PC.
This unique number ensures that S5 / S7 for Windows cannot be installed on any other
PC.
You can work with the S5 / S7 for Windows software even though you have not
installed the authorization code. During the operation of S5 / S7 for Windows,
periodically the system checks for the existence of an authorization code and if you
have not entered the code, this search takes a few seconds; the result of the search
will be displayed on your CRT. The overall performance will be somewhat slower due
to the search function but the full performance will be available as soon as you enter
the code.
This manual will describe the procedures required to install S5 / S7 for Windows if you
have a Windows NT operating system installed on your PC. For Windows 95 or
Windows 98, the installation procedure is very similar to the one described in this
manual. Just follow the instruction on the screen.
7 u Press R ETURN.
The install program is now started.
After displaying the Setup Window (Figure 1-1) the Welcome information box is
momentarily opened.
Please follow the instructions displayed in the Welcome information box and close all
programs.
8 u Click Next
7 u Press R ETURN
The Software License Agreement is displayed.
Please read the Software License Agreement carefully. If you agree with the Software
License click the Yes button.
If you don't agree with the Software License click the No button. The installation will be
aborted. Only if you agree with the Software License will the installation continue.
8 u Click Yes
7 u Press R ETURN
A window is opened with additional information. To install S5 / S7 for Windows
software and any selected software options, serial numbers and the corresponding PIN
(Personal Identification Number) codes are required.
You will find the serial numbers and the corresponding PIN codes on the "Product ID
Card" attached to the registration card. Both cards are enclosed with the S5 / S7 for
Windows software package.
8 u Click Next
7 u Press R ETURN
A window to enter information about the user is opened.
Please enter your name and the name of your company. Both information fields must
be filed in to enable the Next button to continue the installation.
8 u Click Next
7 u Press R ETURN
A dialog box where you select the destination folder is opened.
8 u Click Next
7 u Press R ETURN
A dialog box is opened where you select the S5 / S7 for Windows components you
would like to install. Select only the options that you have purchased and want to
install. Please have your serial numbers and PIN codes available that will enable those
options.
A serial number and PIN code is required for each of the components you want to
install. Any attempt to install an option without a serial number and a PIN code will
result in an incomplete installation and you will not be able to start S5 / S7 for
Windows .
Check all the options you want to install. Some of the components are made up of
several sub -components. Clicking the Change button will open an additional dialog
box to select (deselect) the sub-components of an option.
8 u Click Next
7 u Press R ETURN
Figure 1-11 Dialog box to insert the Serial Number and PIN Code
The PIN code and the serial number can be found on the "Product ID Card" attached
to the registration card. Both cards are shipped with the S5 / S7 for Windows CD.
Product ID Card
Gesellschaft für Your personal identification number
Automatisierungstechnik mbH (PIN) entitles you to unlock one copy
of the software.
Turmstraße 77 123456789
D-64743 Beerfelden/Odw. Please keep this card in a safe place.
Telefon 06068/3001 und 3002
Telefax 06068/3074 It is illegal to distribute this
http://www.ibhsoftec.de PIN code to any other party.
S7 for Windows
Version 4.06
Serial-No.: S7W-071299-0200
8 u Click Next
7 u Press R ETURN
If you have selected more than one S5 / S7 for Windows option for installation (see
figure 1-10), a dialog box (see figure 1-11) will be opened for each option selected
where you will enter the serial number and the PIN code.
When you have entered the requested serial numbers and PIN codes correctly the
dialog box to select a Program Folder is opened.
The installation program provides you the ability to add program icons to a program
folder. The icons in the program folder can be reached via the Start, Program menu to
start S5 / S7 for Windows and/or any additional options installed. The default folder is
S5 for Windows. You may type in a new folder name or select an existing folder from
the folder list.
8 u Click Next
7 u Press R ETURN
8 u Click Next
7 u Press R ETURN
The installation program indicates which file is being copied to the selected directory
and the progress of the installation. With the indication, 100%, all the S5 / S7 for
Windows files and the selected options have been installed. The installation will take a
few minutes.
The successful setup is indicated with the Setup Complete information window.
8 u Click Finish
7 u Press R ETURN
The S5 / S7 for Windows software installation is now completed.
Confirm with the OK button. A text box is opened which provides the information on
how to request the Authorization Code from IBH softec (see figure 1-17).
You may request the Authorization Code via
e-mail, fax or phone. The request form may
be printed out to send a fax or may be
save d on disk as a text file. The default file
name of the request form is IBH.TXT. The text file may be opened with any text editor
(e.g. notepad) or any word processing program.
Open the IBH.TXT text file and fill in the requested information. You may than send the
authorization request form as an E-mail attachment to IBH softec.
When using the phone to request the Authorization Code make sure that you have the
installed Serial Numbers, the PIN Codes, and the Code provided on the Authorization
Request Form ready to give to the IBH softec hotline.
After you receive the Authorization Code, to enter the code start S5 / S7 for Windows
in the normal way. A dialog box requesting the Authorization Code is opened (see
figure 1-16 and 1-17).
The Request Authorization Code dialog box provides a button to open the Enter
Authorization Code dialog box.
7 u Press E.
In the Authorization Code text field enter the code provided by IBHsoftec.
The Authorization Code always starts
with the name SOFTEC (must be in
upper case letters) followed by a
hyphen (-) a ten (10) digit number,
another hyphen (-), and a five (5) digit
number. Confirm the Authorization Code entered with the OK button. S5 / S7 for
Windows is now authorized and ready to use.
Note:
If you are personally using a PC and a Notebook and you are the only user for
both, the PC and the Notebook, IBH softec will issue an additional authorization
code on request.
INFORMATION:
To install S5 / S7 for Windows and any selected options, each
option requires a serial number and its corresponding PIN code.
The serial number and the PIN code can be found on the
"Product ID Card" attached to the registration card. Both cards
are shipped with the S5 / S7 for Windows CD.
To make full use of S5 / S7 for Windows and any selected
options, you have to authorize the installation (see chapter 1.3).
The Authorization Code will be issued by fax, phone, or e-mail.
If the Authorization Code is not entered, S5 / S7 for Windows
reminds you frequently that you are working with a non-
authorized version. This "Reminder" is displayed after S5 / S7 for
Windows searches for the Authorization Code. This search will
take some time otherwise there are no limitations.
2 Introduction
Two software packages are available. With S5 for Windows you can program the
complete S5 PLC series and use the on-line functions when connecting the PC (serial
port COM1 – 4), via a current loop converter cable, with an S5 PLC
With the S7 for Windows software you can program the S7 300 / 400 series of PLC’s
from Siemens. When the PC is connected (serial port COM1 – 4), via a PC-MPI cable,
with an S7-300 / 400 PLC's, you will have full use of the on-line functions.
With the software package S7 for Windows and S5 for Windows installed on one PC,
you may program the S7 300 / 400 series of PLC’s from Siemens as well as the S5
series of PLC's, using the same editor. Also the on-line functions are provided when
the PC is connected (serial port) with the PLC via an adapter (S7 PC-MPI cable or S5
Current loop converter) with a S7-300 / 400 or a S5 series PLC.
Of course if only one of the software packages (S7 for Windows or S5 for Windows ) is
installed on your PC you will only be able to program either the Siemens S7-300 / 400
series of PLC or the S5 series of PLC and make use of the on-line functions.
S5 for Windows provides an editor that understands the STEP® 5 PLC language for
programming the S5 series of PLC's. S7 for Windows uses an editor that understands
the STEP® 7 PLC language and can generate PLC programs for the S7-300 / 400
series of PLC's. If both software packages, S7 for Windows and S5 for Windows, are
installed on one PC you may also use the STEP® 5 PLC language to generate PLC
blocks for an S7-300 / 400 PLC. These Blocks may be converted into STEP® 7 PLC
language and back into STEP® 5 code. Some restrictions apply when converting a
PLC program from the STEP® 5 code into STEP® 7 code (see chapter 3.3.6).
It is also possible to download a PLC program, written in the STEP® 5 PLC language,
to an S7-300 / 400 PLC. During the transfer of the programmed data to the S7 PLC,
the S7 for Windows software package translates the program so the S7 CPU can
understand the data.
If data is transferred from an S7 PLC to S7 for Windows the data is displayed in the
STEP® 7 PLC language. In case the PLC program opened with S7 for Windows has
the STEP® 5 PLC language format, the PLC Blocks are converted back to display it in
the STEP® 5 PLC language format. In other words, you can program and test (on-line)
an S7 for Windows PLC without changing to the S7 programming language. In this
mode only the instructions provided by the STEP® 5 PLC language may be used.
Additional STEP® 7 functions can only be used in conjunction with the STEP® 7 PLC
language editor.
The following chapters explain how to handle S5 / S7 for Windows . Also the
conversion functions used to convert S5 code to S7 code and S7 code to S5 code are
explained.
K EY1+KEY2 When two keys are connected with a plus sign (+), press
and hold down the first key, and then press the second
key.
K EY1, K EY2 When two keys are separated by a comma (,), press
down the first key, release it, and then press the second
key.
K EY1+ K EY2, KEY3 The Key 1 and the Key 2 are pressed simultaneously.
Then they are released and Key 3 is pressed.
Bold type indicates important terms.
È or R ETURN These symbols are used to indicate the R ETURN key.
É or S HIFT These symbols are used to indicate the S HIFT key.
These symbols represent the A RROW keys.
Bold Command from a menu (e.g. "New Block…").
Bold Italic Names of dialog boxes, windows, buttons etc.(e.g. Run
dialog box).
3 PC Block List
The PC block list window will be opened when ever you start S5 / S7 for Windows. If
S5 / S7 for Windows displays another window you may open the PC block list window
as followed.
7 u Press ALT + W, 1.
Title Bar
The title bar displays S5 / S7 for Windows and the name of the open window.
Menu Bar
The menu bar contains a list of menus. You open a menu by clicking the name of the
menu or by pressing the keys ALT and than the underlined character from the menu
name. All the commands from the PC Block List menus are described in this chapter.
Tool Bar
The tool bar provides instant access to frequently used S5 / S7 for Windows
commands. This tool bar is the same for all S5 / S7 for Windows application windows.
Click an icon with the mouse and the command is executed. With the keyboard you
can reach these functions via the window menu and/or the function keys.
Block Edit.
The block selected in the block listing will be displayed in the block editor and is ready
for any changes. The keyboard shortcut F10 provides the same function.
Preferences
This icon opens dialog boxes to customize the appearance of S5 / S7 for Windows .
The settings of the serial port, the editors, the indexes, the display font and other
(miscellaneous) settings are saved and are reloaded whenever a new PLC project is
opened.
Help Function.
An integrated, subject related help file with an index and a list of keyboard shortcuts for
easy operation is available. The keyboard shortcut F1 provides the same function.
Tool Bar II
The tool bar II provides instant access to frequently used PC block list commands.
Click an icon with the mouse and the command is executed. With the keyboard you
can reach these functions via the file menu and the Block menu. Also the total length
and the length of the selected blocks are displayed.
Open Project.
A project file management system is integrated in S5 / S7 for Windows. For more
details see chapter 3.2.2.
The keyboard shortcut F11 provides the same function.
Save Project.
A project file management system is integrated in S5 for Windows . For more details
see chapter 3.2.3.
The keyboard shortcut F12 provides the same function.
Print Block.
The marked block is printed. For more details see chapter 3.3.7.
The keyboard shortcut ALT+B, R provides the same function.
Cut Block.
The marked blocks are transferred to a temporary buffer and are removed from the
Block List. For more details see chapter 3.3.18.
The keyboard shortcut CTRL +X or Shift+ BACKSPACE provides the same function.
Copy Block.
The marked block are transferred to a temporary buffer and are remained in the Block
List. For more details see chapter 3.3.16.
The keyboard shortcut CTRL +C or CTRL +I NSERT provi des the same function.
Paste Block.
The blocks currently in the temporary buffer are transferred to the PC block list. The
blocks remain in the temporary buffer. For more details see chapter 3.3.17.
The keyboard shortcut CTRL +V or Shift+I NSERT provides the same function.
The Workplace Column Title Bar can be customized by selecting the items to be
displayed from the Preferences dialog box. For more details see chapter 3.2.11.3
Note:
Double Clicking the title of a column will sort the PC Block List information
displayed by this column in an ascending order. Double Clicking the title an other
time will sort the information in a descending order.
Workplace
In the PC block List all the blocks of an open PLC program file are listed. The
information listed depends on the settings in the Preferences dialog box.
Status Bar
The status bar may displays one ore more of the following information :
l The name and the path of the active PLC program or the opened PLC project.
l Information about the active command.
Note:
The right mouse button may be used within the PC Block List Workplace.
If the right mouse button is clicked, the menu with the commands to manipulate
the selected (marked) Block is opened.
Marked blocks in the PC block list have a blue background. You can mark one or
several blocks. A marked block may be “unmarked” by marking the block again.
8 u Click the block. The background of the marked block changes to blue.
7 u Select the block using the keys. The background of the marked block changes
to blue.
8 u Click the first block and drag (hold down the left mouse button while you move the
mouse). Release the mouse button when the desired blocks are marked.
7 u Select the first block using the keys. Press and hold the SHIFT key while using
the keys to mark the desired blocks. Release SHIFT .
8 u Press and hold the CTRL key. Click the first block and then all the other desired blocks.
Release the CTRL key.
7 u Select the first block using the keys. Press the key combination S HIFT +F8. The
marked block starts to blink. Using the keys to move to the next Block. Mark the
block with the SPACE key. Repeat the last two steps. Press the key combination
S HIFT+F8 to finish the operation.
Note:
You may print, transfer, cut, copy, past, delete, or convert (S5 óS7) selected
(marked) Blocks.
A marked Block (Line) is indicated by white writing on a blue background.
If a command to manipulate a Block is called, the marked Block is selected for the
manipulation.
Double clicking a Block opens the editor window and the first segment is ready for
modifications.
7 u Press ALT + F.
7 u Press ALT + F, N.
The PC block list workplace is cleared. You may non start to program a new project.
A S7 for Windows project is made out of four (4) files and a S5 for Windows project is
made out of three (3) files.
Note:
Program, Symbolic, and / or Hardware Configuration files may be assigned to one or
more project files.
Special care must be taken when modifying a file (Program, Symbolic, Hardware
Configuration) being assigned to more than one (1) project. Any modification will
effect all projects.
The command Open Project opens the dialog box Open File. With this dialog box you
may select a project file out of a list. With this command you may only open files in the
S5 / S7 for Windows project file format. The program file (*.s5 ) and the symbolic file
(*.seq) specified in the project file are opened automatically. If a Hardware
Configuration file (*.cf7) is specified in the project (S7 for Windows projects only), the
corresponding SDB's are displayed in the PC Block List.
8 u Click the Open Project icon in the tool bar or Open in the file menu.
7 u Press F11.
The Open File dialog box opens (Figure 3-3).
File name
You may enter the name of the project file to be opened in the file name text filed. You
may also select a file from the file name list by marking the file name. S5 / S7 for
Windows supports long file names with up to eighty (80) characters including the file
name extension.
Files of type
The file name extension is defined by the file type field. S5 / S7 for Windows project
files have the file extension .s5p.
Note:
S5 for Windows version 2.1x or earlier could only handle PLC program files (*.s5)
and the corresponding symbolic file (*.seq). The preset preferences (serial port
settings, header, footer, document and display settings, preferences, etc.) has been
saved in the initialization file (S5W.INI )
You may convert a PLC program saved with an earlier version of S5 for Windows
(version 2.1x or earlier) or any other S5 / S7 for Windows PLC program file and its
corresponding symbolic table file into a project. To do so you must open the s5w.ini
file belonging to the program file.
u Open the program file (and its symbolic table file) you want to convert into a project by
using the Open command from the Program File menu (see chapter 3.2.8.2).
Figure 3-4 Drop down list box Files of type (Old INI Files (s5w.ini)
u Mark the s5w.ini file belonging to the program file and activate the Open button.
S5 / S7 for Windows prompts you to save the project file.
Figure 3-6 Save File As dialog box to save the new project
u Enter the name of the project file to be saved in the file name text filed.
When saving the project, the settings from the S5W.INI file are transferred into the new
generated project file ([project name].s5p).
The S5 / S7 for Windows project from your system’s RAM are saved on disk under
there names current file names.
The project file is saved with the file name extension .s5p. The program file is saved
with the file name extension .s5. An existing symbolic table is also saved under its file
name with the file name extension .seq. Also the S7 hardware configuration file is
saved under its current file name with the file name extension .cf7.
8 u Click the Save Project File icon in the tool bar or Save in the file
menu.
7 u Press F12.
The project and its corresponding files are saved.
Note:
Starting with S5 / S7 for Windows version 4.0 additional information (PLC Block
Properties) are saved in the program file (*.s5).
The S5 / S7 for Windows project files from your system’s RAM are saved on disk. You
have to select the project file name.
The project file is saved with the file name extension .s5p. The program file is saved
with the file name extension .s5. An existing symbolic table is also saved under its file
name with the file name extension .seq. Also the S7 hardware configuration file is
saved under its current file name with the file name extension .cf7.
File name
You may enter the name of the project file to be saved in the file name text filed. You
may also select a file from the file name list by marking the file name. This will
overwrite the selected file.
Save as type
The file name extension is defined by the file type field. S5 / S7 for Windows project
files have the file extension .s5p.
u Activating the Save button will start the saving process. The project file is saved
immediately.
You are prompted prior saving all the other files belonging to the project.
The command Name opens the dialog box Project Files. The dialog box lists the
existing files of the project. The Select buttons may be used to open dialog boxes to
select different files for the open project.
To open the dialog box Project Files do one of the following steps.
8 u Click the open project names icon in the tool bar or Name in the file
menu.
With S5 / S7 for Windows you may select already existing files to built a new project
and save it under a new name. Also it is possible to assign a different program file,
symbolic file, and / or S7 hardware configuration file to an existing project.
With the different Select command buttons from the project file
selection dialog box you can open dialog boxes to select a file to
be assigned to the open project.
Example:
An existing Symbolic Table File file should be assigned to an already built project.
1. Open the project file selection dialog box (see chapter 3.2.5).
2. Activate the Select command button in the Symbolic Table File display box
3. Mark the Symbolic Table file (*.seq) you want to insert into the project and
activate the Open command button (R ETURN key).
The inserted Symbolic Table file (Pc_blS7.seq) is listed in the project file
selection dialog box.
l Saving the Project with the newly assigned Symbolic Table file
Note:
If a project saved using different names for the files within the project, it is possible
that these files are assigned to other projects as well.
Files assigned to more than one project can be modified from any of the projects
they are assigned to.
Note:
A double click on one of the System Data Blocks containing hardware configuration
parameters will open the S7 for Windows Hardware Configuration Window.
The S5 / S7 for Windows has an integrated import filter to read files generated with a
Siemens programming unit (PU). PLC programs created with the basic PLC
programming package STEP® 5 from SIEMENS with a DOS operating system (or S5-
DOS) as well as PLC programs and libraries created with the programming package
STEP® 7 from SIEMENS may be imported.
7 u Press ALT+ F, I.
S5 for Windows has an integrated import filter. PLC programs created with the basic
PLC programming package STEP® 5 from SIEMENS with a DOS operating system (or
S5-DOS) may directly be imported.
The import function converts a *.S5D program file into the S5 for Windows file format
by reading the data from the disk into the memory of your personal computer.
Files created with the SIEMENS STEP® 5 software have a file name with six (6) freely
selected characters plus the characters ST. The characters .S5D are used as the file
name extension.
Example: DEMO12ST.S5D
At the same time the PLC program file is converted, the symbolic table file is read into
the memory of your personal computer. This file has the same name than the PLC
program file (the first six characters), followed by the characters Z0 and the file name
extension .SEQ.
Example: DEMO12Z0.SEQ
The original files on disk are not touched by the conversion program. They remain in
their original format.
Note:
If your PLC programs have been created with one of the following SIEMENS
programming units (PU), PG-685, PG-675 or PG-635 in CPM, they must be
converted in DOS disk format. The converted files may be imported by S5 for
Windows .
During conversion, each blocks a creation date and time is assigned. This is the date
and time the original program was last saved (DOS file date).
Note:
S5 / S7 for Windows (version 4.0 and higher) supports long file names up to 80
characters including the file name extension.
The dialog box gives you the possibility to select a PLC program file in the SIEMENS
S5D format (PU format) out of a list for opening. The corresponding symbolic file is
loaded automatically.
Files of type
The file name extension is defined by the Files of type text box. The SIEMENS
programming devices using the file type .s5d. If S5 Files (*.s5d) is selected in the Files
of type text box only files created with a SIEMENS programming device are listed.
S7 for Windows has an integrated import filter. S7 PLC projects (*.s7p), S7 source
code programs saves as a Statement List text file (*.awl) and S7 libraries (*.s7l)
created with the basic PLC programming package STEP® 7 from SIEMENS can be
imported.
The import function converts the S7 data into the S7 for Windows file format by reading
the data from the disk into the memory of your personal computer. To import a S7
Project (*.s7p) or a S7 library (*.s7l) the file and the folders belonging to the project or
library must be present in their unpacked form. The number of folders belonging to a
project or library depends of the number of objects belonging to the project or library.
Import a S7 Project
If a project is archived using the Siemens STEP® 7 PLC programming software all the
files and folders belonging to a project are packed into one file (*.arj). When unpacking
the archive file, the folders and files must be put into its original order on a hard disk.
ARJ Packing / Unpacking programs are available as shareware and freeware
programs from the internet.
7 u Press ALT+ F, I.
Files of type
The file name extension is defined by the Files of type text box. To import a S7
project select S7 Projects / Libraries (*.s7p / *.s7l ) from the Files of type pull down
text box. A S7 project If is made out of the actual project file and a number of folders
associated to the project. All these folders must be present to allow S7 for Windows to
import the project.
7 u Press ALT+ O.
The Project Selection dialog box opens.
Note:
A S7 project may contain several PLC programs for different CPU's and / or PLC's.
S7 for Windows projects are always made out of a single PLC program with the
associated hardware configuration.
The Project Selection dialog box lists the PLC programs (objects) stored in a project
container. S5 / S7 for Windows will generate out of each object a separate project
containing a single PLC program.
Mark the program you would like to open and click the command button OK.
The dialog box Block Select opens.
Figure 3-22 Open dialog box to select a S7 Library (*.s7p) to import objects from
Files of type
The file name extension is defined by the Files of type text box. To import an object
from a S7 library select S7 Projects / Libraries (*.s7p / *.s7l) from the Files of type pull
down text box. A S7 library If is made out of the actual library file and a number of
folders associated to the library. All these folders must be present to allow S7 for
Windows to import from the p library.
7 u Press ALT+ O.
The Library Selection (Project Selection) dialog box opens.
Note:
A S7 library may contain several objects (PLC blocks, PLC projects etc.). S7 for
Windows understands S7 projects and handles S7 libraries in the same matter.
The Library Selection dialog box lists the objects stored in a library container. S5 / S7
for Windows has the capability to import single or multiple items out of each object.
Mark the object you would like to open and click the command button OK.
The dialog box Block Select opens.
Click the corresponding command button to overwrite one or all Blocks. You may also
keep the existing Block (click command button No) or terminate (click command button
Abort) the import procedure.
You may import a selection of Blocks into the PC Block
List. To do so mark one or several Blocks at the Block
Select dialog box. Clicking the Enter Selection command
button will transfer the selected Blocks into the PC Block list. These Blocks are added
to the Blocks already present in the PC Block List. A dialog box
(see figure 3-21) is opened incase a Block with the same name already exists in the
PC Block List.
In addition you may import the Symbolic Table with
selected Blocks or just by itself into S7 for Windows . If the
check box Symbolic Table is marked the Symbolic Table
is transferred into S7 for Windows whenever the Enter Selection command button is
clicked.
S5 / S7 for Windows has an integrated Export filter. The filter converts S5 / S7 for
Windows project files into the file format the Siemens programming units (PU) can read
(import).
7 u Press ALT + F, X.
The export filter converts S5 for Windows PLC projects in the Siemens Programming
Unit (PU) format .S5D.
The file to be exported should have a file name following the Siemens programming
unit (PU) name format. A name has up to six (6) freely selected characters plus the
characters ST. The characters .S5D are used as the file name extension.
Figure 3-27 Export a S5 for Windows PLC Project (Save As dialog box)
The symbolic table relating to the PLC program is also stored on disk during the export
process. The symbolic table file gets the same file name as the program file (the first
six characters) followed by Z0 and the file name extension .SEQ. The file format of the
symbolic table are for S5 for Windows and the Siemens programming unit (PU)
identical.
If you select a filename with less than six (6) characters, the missing characters must
be replaced with @ .
Example: TEST@@ST.S5D
File Name
You may enter the name of the file to be exported in the file name text filed. You may
also select a file from the file name list by marking the file name.
The file name may have up to six (6) freely selected characters plus the characters ST.
The characters .S5D are used as the file name extension. The file name extension is
defined by the file type field. Siemens programming unit (PU) files have the file
extension .s5d
Do not enter the file name extension while entering the file name. The file name
extension is inserted automatically when exporting the file.
An existing symbolic table is also saved under the same file name with the file name
extension .seq. The file format of the symbolic table are for S5 for Windows and the
Siemens programming unit (PU) files identical.
The export filter converts S7 for Windows PLC projects into an ASCII text format (Block
Statement List – STL). This file format defined in compliances with IE CE 1131 is also
supported by the Siemens programming units (PU) for the S7-300/400 PLC series. The
ASCII files to exchange S7 PLC programs must have the file extension *.awl. The
Siemens PU software (starting with version 3) can insert the ASCII text in an already
opened project.
The symbolic table relating to the PLC program is also stored on disk during the export
process. The format stays the same (ASCII text). The symbolic table file gets the same
file name as the program file and the file name extension *.seq. The file format of the
symbolic table of S7 for Windows can be imported by the Siemens programming unit
(PU).
To open a project generated with the S7 for Windows programming system with the
Siemens programming units (PU) for the S7-300/400 PLC series, the program file
(*.awl) must be inserted as an external source and the symbolic table file (*.seq) must
be imported by the symbolic editor. This procedure has to be done into two steps (see
appendix). This procedure even allows the PLC program exchange with PU software
versions having a not downward compatible project file structure.
Figure 3-28 Export a S7 for Windows PLC Project (Save As dialog box)
File Name
You may enter the name of the file to be exported in the file name text filed. You may
also select a file from the file name list by marking the file name.
The file name may have up to seventy six (76) freely selected character. The
characters .awl are used as the file name extension. The file name extension is
defined by the file type field. Siemens S7-300/400 programming unit (PU) can open
files with the extension .awl.
Do not enter the file name extension while entering the file name. The file name
extension is inserted automatically when exporting the file.
Example: S7W_PLC_Program
An existing symbolic table is also saved under the same file name with the file name
extension .seq. This file format of the symbolic table can be imported by the Siemens
programming unit (PU) symbolic editor.
To manage the S5 / S7 for Windows PLC program files (*.s5) independently from a
project commands in a separate menu are provided. The commands from this menu
allow you to generate, modify, open, and save S5 / S7 for Windows PLC programs.
Note:
The commands from the menu Program File bypassing the S5 / S7 for Windows
project management. Project depending settings (e.g. fonts, headers, footers,
presentations, etc) are not saved due to the missing Project -File.
Only when you have a special reason you should use the commands from the
Program File menu. We recommend that you always use the S5 / S7 for Windows
Project Management.
7 u Press ALT + F, F
The New command clears the workplace. If a modified file has been in the workplace,
S5 / S7 for Windows prompts you to save the file. S5 / S7 for Windows is ready to
create a new PLC program.
7 u Press ALT + F, F, N.
The dialog box Open gives you the possibility to select a PLC program file out of a list
for opening. With this command you may only open files in the S5 / S7 for Windows
program file format (*.s5). The corresponding symbolic file is opened automatically.
7 u Press ALT + F, F, O.
File name
You may enter the name of the program file to be opened in the file name text filed.
You may also select a file from the file name list by marking the file name. S5 / S7 for
Windows supports long file names with up to eighty (80) characters including the file
name extension.
Files of type
The file name extension is defined by the file type field. S5 / S7 for Windows program
files have the file extension .s5. S5 / S7 for Windows does not have different file
extension names for a S5 program file or a S7 program file.
The S5 / S7 for Windo ws program from your PC workplace is saved on disk under its
current file name.
The program file is saved with the file name extension .s5. An existing symbolic table
is also saved under its file name with the file name extension .seq.
7 u Press ALT + F, F, S.
The program and its corresponding symbolic table are saved.
The S5 / S7 for Windows program from your PC workplace is saved on disk. . You
have to select the file name.
The program file is saved with the file name extension .s5. An existing symbolic table
is also saved under the same file name with the file name extension .seq. S5 / S7 for
Windows supports long file names with up to eighty (80) characters including the file
name extension. The following characters are not permitted in a file name: / \ : * ? " >
<|
7 u Press ALT + F, F, A.
File Name
You may enter the name of the program file to be saved in the file name text filed. You
may also select a file from the file name list by marking the file name. This will
overwrite the selected file.
The file to overwrite and its path is displayed in the title bar of the dialog box.
You do not have to enter the file name extension while entering the file name. The file
name extension is inserted automatically when saving the file.
Save as type
The file name extension is defined by the file type field. S5 / S7 for Windows program
files have the file extension .s5.
u Activating the Save button will start the saving process. The project file is saved
immediately. An existing symbolic table is also saved under its file name with the file
name extension .seq.
The saving process is displayed in the Status Bar.
An additional menu to manage the symbolic table files are available. These commands
allow you to create, modify, open, and save symbolic tables separately from PLC
project or program files.
S5 for Windows uses the same file format than Siemens S5 programming units (PG). If
you maintain the Siemens PU file names format you can work on these files without
conversion. A Siemens PU symbolic table file has six (6) freely selected characters
plus the characters Z0 as a file name. The characters .SEQ are used as the file name
extension.
S7 for Windows uses the same file format and the same file extension name (*.seq)
than S5 for Windows to save the symbolic table. This file format of the symbolic table
can be imported by the Siemens S7-300/400 programming unit (PU) symbolic editor.
S5 / S7 for Windows supports long file names with up to eighty (80) characters
including the file name extension. The following characters are not permitted in a file
name: / \ : * ? " > < |
7 u Press ALT + F, Y.
The New command clears the workplace. If a modified file has been in the workplace,
S5 / S7 for Windows prompts you to save the file. S5 / S7 for Windows is ready to
create a new symbolic table.
7 u Press ALT + F, Y, N.
The command Open from the Symbolic Table File menu gives you the possibility to
select a symbolic table file out of a list for opening. With this command you may only
open files in the S5 / S7 for Windows symbolic table file format (*.seq).
7 u Press ALT + F, Y, O.
File name
You may enter the name of the symbolic table file to be opened in the file name text
filed. You may also select a file from the file name list by marking the file name. S5 / S7
for Windows supports long file names with up to eighty (80) characters including the
file name extension.
Files of type
The file name extension is defined by the file type field. S5 / S7 for Windows symbolic
table files have the file extension .seq. S5 / S7 for Windows does not have different file
extension names for a S5 symbolic table file or a S7 symbolic table file.
7 u Press ALT + F, Y, S.
The symbolic table is saved.
The S5 / S7 for Windo ws symbolic table from your PC workplace is saved on disk. .
You have to select the file name.
The symbolic table file is saved with the file name extension .seq.
S5 / S7 for Windows supports long file names with up to eighty (80) characters
including the file name extension. The following characters are not permitted in a file
name: / \ : * ? " > < |
7 u Press ALT + F, Y, A.
The Save As dialog box opens.
File Name
You may enter the name of symbolic table file to be saved in the file name text filed.
You may also select a file from the file name list by marking the file name. This will
overwrite the selected file.
The file to overwrite and its path is displayed in the title bar of the dialog box. You do
not have to enter the file name extension while entering the file name. The file name
extension is inserted automatically when saving the file.
Save as type
The file name extension is defined by the file type field. S5 / S7 for Windows symbolic
table files have the file extension .s5.
u Activating the Save button will start the saving process. The symbolic table file is
saved immediately. The saving process is displayed in the Status Bar.
Note:
The saving process does not generate or modify any Project File.
3.2.11 Preferences
The command Preferences opens the dialog box Preferences. The dialog box is
designed as a card file with taps to separate the different subjects. Each dialog box
card offers buttons and command fields to setup the appearance of S5 / S7 for
Windows and the communication with a PLC connected via a serial link.
7 u Press ALT + F, C.
The following buttons are assigned to all the cards of the preferences dialog box.
Clicking the Reload button will load the last saved default
settings into the preference dialog box. The current changes are
canceled.
Clicking the Save button will save the current settings to be the
new preference dialog box default settings.
The settings from the fields Serial Port and MPI Conve rter are saved in the S5 / S7
for Windows initialization file S5WG.INI .
The location (file) the settings from the field Preferences from are saved in depends
on your selection. If PC is marked the settings are saved in the S5 / S7 for Windows
initialization file S5WG.INI. If Project File is marked the settings are saved in the
project file [project name].s5p.
l Preferences from:
PC
The settings from the fields PLC Type and Protocol are saved in the
S5 / S7 for Windows initialization file S5WG.INI.
Project File
The settings from the fields PLC Type and Protocol are saved in the project file
[project name].s5p. The default setting is Project File marked.
l PLC Type:
S5
If S5 is marked all the settings of the dialog box card Interface refer to the
communication with a PLC executing a PLC program using the Step® 5 instruction set.
The actual PLC to communicate with and/or the communication link are selected with
the settings from the Protocol field. You can only select S5 if the S5 for Windows
software package is installed on your PC.
S7
If S7 is marked all the settings of the dialog box card Interface refer to the
communication with a PLC executing a PLC program using the Step® 7 instruction set.
The actual PLC to communicate with and/or the communication link are selected with
the settings from the Protocol field. You can only select S7 if the S7 for Windows
software package is installed on your PC.
l Protocol:
S5 / S7 for Windows only allows you to select the protocol the PLC type you selected
can handle.
AS511 (Simatic-S5)
If a Simatic S5 PLC is connected to one of the serial ports (COM 1 – COM 4) of your
PC via a 20mA current loop converter you must select the AS511 (Simatic-S5)
protocol for the communication. The Simatic S5 can only handle a Baud Rate of 9600
Baud. S5 / S7 for Windows allows you to select higher baud rates for the
communication with compatible PLC's. You can only select the AS511 (Simatic-S5)
protocol if the S5 for Windows software package is installed on your PC.
Note:
It is also possible to run the S5 Extended Simulation PLC on an external PC. If you
want to communicate with the external S5 Extended Simulation PLC you must
select S5 'PLC in a PC' external to be the communication protocol. Baud Rates up
to 38,400 baud are possible.
Note:
It is also possible to run the S5 Extended Simulation PLC or the S7 Simulation
PLC on the same PC than S5 / S7 for Windows . If you want to communicate with
one of these Simulation PLC's you must also select S5 / S7 'PLC in a PC' internal
to be the communication protocol.
INAT TCP/IP
S5 / S7 for Windows opens up the possibility to communicate with an external PLC
(software PLC or hardware PLC) via the TCP/IP (Internet, Intranet) protocol. The PC
running S5 / S7 for Windows must have an Ethernet network capable to handle the
TCP/IP protocol. If one of the following PLC's is connected to your PC, running S5 / S7
for Windows , via an Ethernet connection you have to select INAT TCP/IP to be the
communication protocol:
• PLC in a PC (PLC S5-943, PLC S5-945) (direct, via Ethernet controller at the
external PC)
• LAN-PLC (PLC S5-943, PLC S5-945) (direct)
• Siemens S5 (via INAT TCP/IP - H1 module)
The actual communication is started (selecting the IP address) with the settings from
the dialog box opened with the command Building an TCP/IP connection from the
Options menu (see chapter 3.4.4). It is also possible to build the connection
automatically. To do so the button Automatic Connection must be marked.
INAT H1
With S5 / S7 for Windows and an optional H1 software driver it is possible to
communicate with an external PLC (software PLC or hardware PLC) via the Siemens
H1 (Industrial Ethernet) protocol. The PC running S5 / S7 for Windows must have the
Ethernet network capability and the additional H1 driver installed. If one of the following
PLC's is connected to your PC, running S5 / S7 for Windows , via an H1 (Industrial
Ethernet) connection you have to select INAT H1 to be the communication protocol:
• PLC in a PC (PLC S5-943, PLC S5-945) (direct, via Ethernet controller and
the H1 driver installed at the
external PC)
• LAN-PLC (PLC S5-943, PLC S5-945) (direct)
• Siemens S5 (via INAT TCP/IP - H1 module)
The actual communication is started with the settings from the dialog box opened with
the command Building an H1 connection from the Options menu (see chapter 3.4.3).
It is also possible to build the connection automatically. To do so the button Automatic
Connection must be marked.
Automatic Connection
If INAT TCP/IP or INAT H1 you may select Automatic Connection. With this button
marked, the TCP/IP or H1 connection is automatically established whenever you open
a project.
l Serial Port:
The Serial Ports have two settings. First the Port itself is selected and secondly the
data exchange rate has to be set.
COM 1 … COM 4
S5 / S7 for Windows supports the serial communication ports COM 1 up to COM 4.
Select the port the external PLC is connected to.
Baud Rate
S5 / S7 for Windows supports the Baud rates between 9,600 baud up to 115,200 baud
for the serial communication. Make sure that the selected baud rate does not exceed
the maximum baud rate the external PLC can handle for communication. The MPI
Converter may limit the maximum baud rate.
l MPI Converter:
Note:
The command S7 CPU Selection from the Options menu opens a dialog box to
display all the devices with their MPI address connected to the bus. You may also
select a device (CPU) to communicate with from the dialog box.
Note:
Make sure that all devices connected to one MPI Bus having the same Max. MPI
Address setting. If devices with different Max. MPI Address setting are connected
on one bus. the devices are not recognized and communication can not take place.
l Operands:
The operands may be displayed on the CRT in the symbolic or the absolute form.
Selecting the appearance of the operands in the printed documentation see chapter
3.2.13.2.
Symbolic
If the Symbolic button is marked all the operands in the PLC Blocks, Segments,
Steps, Transitions, etc. are displayed in their symbolic form. To display an operand in
its symbolic form, the symbol must be defined in the symbolic table.
S5 for Windows:
A symbolic operand may have up to twenty-four (24) characters. S5 for Windows can
display up to 24 characters (without a hyphen) in all presentations. The column width
to display the entire symbolic operand is adjustable. The Siemens PU can handle up to
24 characters. In CSF and LAD only the first eight (8) characters are displayed.
Note:
When entering a symbolic operand into a segment a leading hyphen must be
entered to identify the input to be a symbolic operand. In the symbolic table the
symbolic operands are entered without a leading hyphen.
S7 for Windows:
A symbolic operand may have up to twenty-four (24) characters.
Symbols defined in the symbolic table are shown in quotation marks "…" if used in the
Statement List (STL), Ladder Diagram (LAD), or Control System Flowchart (CSF)
presentation.
Symbols defined in the variable declaration are shown with the "#" character in front of
name if used in the Statement List (STL), Ladder Diagram (LAD), or Control System
Flowchart (CSF) presentation.
Usually the quotation marks and the # character need to be entered if the symbol is
entered into the logic (the symbol must be present in and clearly identifiable in the
symbolic table or the variable declaration.
Absolute
If the Absolute button is marked all the operands in the PLC Blocks, Segments, Steps,
Transitions, etc. are displayed in their absolute form.
S5 for Windows:
Absolute operands have an identifier, a byte or word number, and if addressing a bit,
the bit number separated by a period. The numbering of bytes and words start with
zero (0). The maximum number depends on the CPU. Bits are numbered from zero (0)
to seven (7).
S7 for Windows:
Absolute operands have an address identifier, a byte or word number, and if
addressing a bit, the bit number separated by a period. The address numbering of
bytes and words start with zero (0). The maximum address depends on the CPU. Bits
are numbered from zero (0) to seven (7).
l Display:
An additional window may be opened in the editor and status window to display the
symbolic table or the extended segment com ment.
Symbolic Table
In the workplace of the block editors and the status displays, the Symbolic Table may
be displayed simultaneously with the selected Segment (Network) or Block (STL, CSF,
LAD, Block-STL or step sequence presentation). The symbolic table may be edited
while the block editor is active. A marked operand in the segment (Block) display is
also highlighted in the symbolic table.
Comments
If the button Comments is marked, the Extended Segment Comment will be displayed
in a separate window below the segment logic. The comment display window has all
the functions of a standard text editor. The windows clipboard is fully supported. You
may use the cut, copy, and paste commands to exchange text within the S5 / S7 for
Windows or any other windows application.
Note:
S5 for Windows In the Block-STL presentation the extended segment comment is
displayed in front of the segment in the editor workplace. The comment may be
edited directly in the workplace.
S7 for Windows In the Block-STL (Source Text) presentation the extended
comment is displayed to be line comments (starting with // ) directly below the
segment (Network) title. The comment may be edited directly in the workplace.
l Presentation:
The default presentation of the PLC logic can be selected. Whenever an editor or
status window is opened the PLC logic is displayed in the preset form. The
presentation may be changed anytime directly out of the editor or status window.
Block STL
S5 for Windows In a Block Statement List (Block STL ), the control task is
described with mnemonic abbreviations in the form of a list (same as STL). The
programming language is based on DIN 19239. If an editor window is newly opened a
complete block is displayed using statement list presentation. Each segment is
displayed with the segment number and if entered with the segment comment. The
start of the segment is indicated with a bracket [ followed by the segment number. The
end of a segment is indicated with a closing bracket ] .
An extended segment comment is displayed after the closing bracket of the previous
segment and the opening bracket of the segment the comment is assigned to. In the
Block-STL the search and replace functions may be used to search an entire block.
Block STL is not available for step sequence programming (G5 for Windows option).
With this option a graphical display is provided. The status window always displays one
segment.
l Mnemonics:
The language of the mnemonics you want to use can be set. The selection changes
the mnemonics of the instructions (key words) and the operands in the logic and the
symbolic table. The selection will not change the language of the program (menu
commands, symbols, comments, etc.). The mnemonic selection for S5 for Windows
and S7 for Windows works in the same way.
German
The mnemonics to identify Bit-Memory, Timers, Counters, Inputs, Outputs, and the
instruction set used for Statement List (STL) programming are identified with their
German syntax.
English
The mnemonics to identify Bit-Memory, Timers, Counters, Inputs, Outputs, and the
instruction set used for Statement List (STL) programming are identified with their
English (International mnemonics) syntax.
Example: Mnemonics
Name English German
S7 S5 S7 S5
Input I I E E
Output Q Q A A
Flag --- F M ---
Memory M --- --- M
Timer T T T T
Counter C C Z Z
AND A A U U
OR O O O O
NOT NOT --- NOT ---
Count Down CD CD ZR ZR
l STL Editor :
Format Automatically
If the button Format Automatically is marked, the syntax is automatically checked
when the return key is pressed at the end of an edited line. The entered line is put into
the correct format of the statement list only if the syntax is correct. The next line may
be edited regardless if the privies line fulfills the syntax.
If the button is not marked the syntax check and the formatting is only done with the
format command (key F9, command format from the modify menu).
The automatic format works in the same way for S5 for Windows and S7 for Windows .
Emphasize S7 Syntax
If the Emphasize S7 Syntax button is marked the differences between the STEP® 5
syntax and the STEP® 7 syntax is displayed in blue color on the screen. This mode
works in S7 for Windows only.
l Save Blocks:
S5 / S7 for Windows allows you to select different possibilities on how to save modified
blocks. Editing takes place in the RAM of your PC. Depending on the selected buttons
the modified data is saved.
Immediately on Disk
A modified block is saved on disk whenever you select the Save command from the
editor window or by closing the editor window. The setting works in the same way for
S5 for Windows and S7 for Windows .
On PC and PLC
A modified block is saved on disk in the PC and the modified Block is transferred to the
PLC whenever you select the Save command from the editor window or by closing the
editor window. You are prompted prior the Block is transferred into the PLC The setting
works in the same way for S5 for Windows and S7 for Windows .
S7 for Windows can display a symbolic operand with up to 24 characters (without the
periods). To display symbolic operands with their full length name, the column width is
adjustable. It is insured, that the operand is correctly identified even when the symbolic
name is truncated in the display.
The column definition of S7 for Windows and S5 for Windows otherwise are equal.
l PC Block List:
The PC Block List selection field is divided into two section. One section is used to
select the data to be displayed in the PC Block List. The other section defines the
source of the comment displayed in the PC Block List.
The Block Comment displayed in the PC block list may be selected. The settings are
saved in the project file. If a comment is assigned to an S5 Block via the Block
Properties dialog box the settings of the S5 Block Comments from section are ignored
and the comment from the Block Properties is displayed.
1. Segment
st
The comment of the 1 Segment of an block may be displayed in the PC Block List as
a comment. This selection applies to S5 for Windows only.
In S7 for Windows the comment displayed in the PC Block List is assigned to a Block
in the Block Properties dialog box. If a S5 Block is converted in an S7 Block the
st
comment of the 1 Segment is assigned to be the comment of the S7 Block.
Symbolic Table
With S5 for Windows it is possible to assign in the Symbolic Table a comment to a
Block. If the Symbolic Table button is marked the comment to a block in the Symbolic
Table is displayed as a Block comment in the PC block list window.
Note:
To display the Block Comment the button Comment in the PC Block List Display
selection field must be marked.
S5 Name
The name of a PLC Block is displayed in the STEP® 5 syntax. The S5 name of a PLC
Block can only be displayed when the S5 for Windows option is installed.
S7 Name
The name of a PLC Block is displayed in the STEP® 7 syntax. The S7 name of a PLC
Block can only be displayed when the S5 for Windows option is installed.
Format
The editor integrated in the S5 / S7 for Windows package "understands" the syntax of
STEP® 7 and STEP® 5 PLC Blocks. The current syntax format of a PLC Block (S5 or
S7) is displayed in the column Format. This column should always be activated when
both options S5 for Windows and S7 for Windows are installed.
Length
The column displays the length of the PLC Block in byte. This information is in S7 for
Windows and S5 for Windows available.
Date
The column displays the date and time the PLC Block was created or modified.
S7 for Windows
The date information is saved in each individual Block. PLC blocks and by PLC
programs (libraries) imported into S7 for Windows also have this information available.
S5 for Windows
The date information is available in a PLC Block stored in the *.s5 file format. If a PLC
program is imported into S5 for Windows the date of the PLC program file (DOS date)
is inserted to be the PLC Block date (all Blocks have the same date). When exporting
an S5 PLC program the Block date information are lost.
Comment
The column displays the PLC Block comment.
S7 for Windows
The comment displayed in the PC Block List is assigned to a Block in the Block
Properties dialog box. PLC blocks and by PLC programs (libraries) imported into S7
for Windows may also have this information available (when entered). The information
is not lost during the export.
S5 for Windows
The comment of the 1st Segment or the comment assign to a block in the Symbolic
Table of a block may be displayed in the PC Block List as a comment. The selection
which comment will be displayed depends on the selection from the
"S5 Block Comment from" field. to a Block. PLC blocks and by PLC programs
imported into S5 for Windows may also have this information available (when entered).
The information is not lost during the export.
Note:
If a comment is assigned to an S5 Block via the Block Properties dialog box the
settings of the S5 Block Comments from the "S5 Block Comment from" field
section are ignored and the comment from the Block Properties is displayed.
Library Number
A library number to the assign block may be displayed. The library number is a five (5)
digit identification number and can be saved in the PLC. Original SIEMENS blocks
usually have library number assigned. The library number is assigned to an S5 Block
via the Block Properties dialog box. Only S5 Blocks can have library numbers.
Function Name
The column displays the name of the Function Blocks (FB, FX) being present in the
S5 format. Function names are not available with S7 Blocks.
Name
The column displays the name of an S7 Block when entered in the Block Properties
dialog box. The name function is not available with S5 Blocks.
Family
The column displays the family name of an S7 Block when entered in the Block
Properties dialog box. Family names are not available with S5 Blocks.
Author
The column displays the name of author who created the S7 Block when entered in the
Block Properties dialog box. Author names are not available with S5 Blocks.
Version
The column displays the version number of an S7 Block when entered in the Block
Properties dialog box. Version numbers are not available with S5 Blocks.
Note:
The more information you want to display in the PLC Block List the longer it takes
to build up the PLC Block List window. All information being displayed have to be
transferred from the PLC to the PC.
S5 Name
The PLC Block being recognized in the online PLC is displayed in the STEP® 5 name.
The S5 name of a PLC Block can only be displayed online when the S5 for Windows
option is installed.
S7 Name
The PLC Block being recognized in the online PLC is displayed with its STEP® 7
name. The S7 name of a PLC Block can only be displayed online when the S7 for
Windows option is installed.
Format
This column indicates in which format the corresponding PLC Block is currently
present in the PC Block List. Blocks being present in the S5 format may be displayed
in the status display in their S5 syntax even being online with an S7-300/400 PLC. This
column should always be activated when both options S5 for Windows and S7 for
Windows are installed.
Length
The column displays the amount of memory the PLC Block occupies in the PLC in
byte. This information is online available with an S7-300/400 as well as with an S5
PLC.
Date
The column displays the date and time the PLC Block was created or modified online.
This information is only in conjunction with S7 Blocks online available.
Address
The column displays the PLC Block addresses.
S7 for Windows
The address displayed in the PLC Block List online is the relative address within the
Block. The S7-300/400 PLC does not support absolute addresses .
S5 for Windows
The address displayed in the PLC Block List online is the absolute address within the
PLC Memory. The addresses change whenever additional Blocks are loaded into the
PLC.
Library Number
The library number is a five (5) digit identification number saved in the PLC. Only S5
PLC's know library numbers.
Function Na me
The column displays the name of the Function Blocks (FB, FX) being present in the
S5 PLC if an identical Function Block (FB, FX) is present in the PC Block List.
Function names are not available with S7 Blocks.
Name
The column displays the name of S7 Block online when the name is saved in the S7-
300/400 PLC. The name function is not available with S5 Blocks.
Family
This column displays the family name of S7 Block online when the family name is
saved in the S7-300/400 PLC. Family names are not available with S5 Blocks.
Author
The column displays the name of author who created the S7 Block online when the
author name is saved in the S7-300/400 PLC. Author names are not available with S5
Blocks.
Version
The column displays the version number of an S7 Block online when the author name
is saved in the S7-300/400 PLC. Version numbers are not available with S5 Blocks.
STL
The font selected with Select Font button sets the font for the Statement List (STL,
Block STL) presentation for the editors, the status window, and when G5 for Windows
is installed the Step Sequence detail window.
Symbols
The font selected with Select Font button sets the font for the text displayed in the
Symbolic Table.
Comments
The font selected with Select Font button sets the font for the text displayed in the
Comment editor window and the Comments displayed in other editor windows (STL,
CFS, LAD, etc.).
Step Sequence
The font selected with Select Font button sets the font for the text displayed in the
graphical Step Sequence overview window when G5 for Windows is installed.
Listings
The font selected with Select Font button sets the font for the text displayed in the PC
Block List and the PLC Block List.
Note:
The font selection done via the Presentation Fonts settings is for the CRT display
only. The fonts for the documentation printout are selected with the settings from the
Font Type card of the Documentation Layout dialog box (see chapter 3.2.13.2).
l Font selection
Font :
Select the font from the list field. All the fonts offered by windows may be selected. If
you want to enlarge or reduce the logic displayed you must select a scaleable font
(true type). The width of a character depends on the font selected. You may have to
adjust the column width (see chapter 3.2.11.2) for an optimized CRT display.
Font style:
The selection of the font style depends on the CRT resolution. If your monitor has a
high resolution, a bold font style may improve the readability of the text.
Size:
The selection of the font size depends on the CRT resolution. If you increase the size
of the font you may have to adjust the column width (see chapter 3.2.11.2) for an
optimized CRT display.
Additional settings are put together on the Miscellaneous setting card of the
Preference dialog box.
l Preferred Syntax:
If S5 for Windows and S 7 for Windows are installed on one system you can select the
syntax you want the system to start with as a default setting.
Whenever you want to create a new Block the Enter new Block dialog box opens with
the default setting from the Preferred Syntax setting field. The syntax you want to use
to program the new Block can always be selected directly from the Enter new Block
dialog box when you enter the name of the new Block..
l Compatibility:
The compatibility setting field is used with S5 for Windows only. The different versions
of the Siemens S5 programming unit (PU) are not completely downward compatible.
S5 for Windows gives you the possibility to adjust the system to be compatible with a
specific PU version. This is only important when exporting S5 for Windows PLC
programs to be opened with a Siemens PU.
l Cross Reference:
l Block Status:
To optimize the status display to the speed of your PC the refresh timing and the type
of STL presentation are adjustable. These functions of this section are available in
S5 for Windows and S7 for Windows .
Note:
The more information you want to display in the STL Status window the longer it
takes to build up the STL Status window. All informatio n being displayed have to be
transferred from the PLC to the PC.
Address
In this column the memory addresses of the S7 instruction is displayed. The address
displayed in the STL Status window online is the relative address within the Block. The
S7-300/400 PLC does not support absolute addresses .
RLO
In this column the Result of a Logical Instruction (ROL) of the instruction in that
specific line is displayed.
Index
In this column the contents of the Index Register is displayed.
ACCU1, ACCU2
In these columns the contents of the Accumulators are displayed. The accumulators
are 32 bit general purpose registers and are used to process bytes, words, and double
words.
Status Word
In this column the contents of the Status Word is displayed. The nine (9) lower bits of
the 16 bit Status Word Register are showing detailed information about the instruction.
DB Register 1, DB Register 2
The contents of the Data Block Registers are displayed in these columns. These
registers give you information about the shared Data Block and the Instance Data
Block in use.
Indirect Address
In this column the information about the indirect addressing in use are displayed.
The command Printer Setup opens the dialog box Page Setup.
7 u Press ALT + F, T.
The dialog box page setup allows you to select the size, the source and the orientation
of the paper you want to print on. The settings of the margins are not used with S5 / S7
for Windows . A dialog box Documentation Setup provides a more powerful margin
setting than the Windows standard page setup dialog box which are saved in the S5 /
S7 for Windows project file (*.s5p).
The Printer button of the page setup dialog box opens up a dialog box to select a
printer from the list of the printers you have installed under Windows. Additional
buttons are provided to setup the printer options. The setup possibilities depend on the
selected printer.
Note:
The settings of the Page Setup dialog box and the Printer selection as well as all
the printer option selections are standard windows settings. These settings are
saved only Windows internally. They are not saved with the project.
The settings from the Documentation Layout dialog box (see chapter xxx) are saved
in the in the S5 / S7 for Windows project file (*.s5p ).
All the selections from the Page Setup dialog box can be overwritten fo r the current
print job with the settings from the Print dialog box opened (see chapter xxx) to start
the actual print process.
The Documentation Layout dialog box An additional menu to manage the appearance
of the documentation is available. There are commands to open dialog boxes to setup
the printers, select fonts, set margins, fill out the header and footer, and select the
appearance of the PLC logic.
7 u Press ALT + F, D.
The settings from the documentation layout dialog box related to a project are saved in
the project file [project name].s5p.
Whenever S5 / S7 for Windows is started the settings from the project file are used to
set the documentation layout settings for this project.
The following buttons are assigned to all the cards of the documentation layout dialog
box.
When clicking the button Abort all the not saved settings are
canceled and the dialog box is closed.
Figure 3-60 Presentation tab from the Documentation Layout dialog box
The appearance of the PLC logic in the printed documentation is setup with the
Presentation Tab from the documentation layout dialog box.
l Presentation:
The S5 / S7 for Windows PLC Blocks may be printed in the following forms:
• STL Statement List
• CSF Control System Flowchart
• LAD Ladder Diagram (Ladder Logic)
l Operands:
l Column Width:
S5 / S7 for Windows provides the ability to size the column width for operands in the
LAD and CSF presentation for printing. For each presentation the column width may
be set separately. This option allows the adjustment to the selected font and the
number of characters used for a symbolic operand.
The number entered as the column width is the number of characters spaces possible
to print. The width of a character space varies with the font selected and does not
always match the width of the other characters. Usually the number of character
spaces is slightly higher than the number of characters possible to print in a given
column width.
With the statement list you can printout the operands in a symbolic and absolute form
(see chapter 3.2.13.5). The first operand to be printed will depend on the button
marked in the Operands field of this dialog box.
Print
To print the operands in both forms select the print button (absolute and symbolic).
Example:
The following buttons are marked:
With the statement list you can printout the Comment of an operand from the
Symbolic Table. If a Line Comment was edited in that particular line, that comment is
printed after the comment from the symbolic table.
Print
Select the print button to print the comment, from the symbolic table, in the same line
with the operand.
Example:
When the print button is marked and a comment was edited in a STL line, the
statement list printout provides following information:
Figure 3-64 Statement list printout with symbolic table and STL line comments
When the print button is marked and no comment was edited in a STL line, the
statement list printout provides following information:
When the print button is not marked and a comment was edited in a STL line, the
statement list printout provides following information:
l Symbolic Table
A network (segment) may be printed with a list of the operands (part of the symbolic
table) used in the network (segment).
Print
To print the symbolic table for the operands used in the network (segment) in addition
to the logic, select the print button.
The settings, from the Font Type Tab, are saved in the project file [project
name].s5p. The settings are used to select the fonts for the documentation printout.
Different fonts may be assigned to various subjects, for separation and more
comfortable reading. Also the font size and its style may be set.
Each Select Font button command opens the Font dialog box. The dialog for the
different text presentations are identical.
Figure 3-67 Font Type tab from the Documentation Layout dialog box
STL:
The font selected for STL determines the font, font style, size of the instructions, the
operands (absolute and symbolic), the symbolic comments, and the STL line comment
in the Statement List (STL) printout.
Symbols:
The font selected for Symbols determines the font, font style, and size of the symbolic
table portion printed out with a network (segment).
The symbolic table portion printed, as an appendix to the network, is a list of the
operands (absolute and symbolic) used in the network (segment) and the symbolic
comments.
Comments:
The font selected for Comments determines the font, font style, and size of the
extended network (segment) comment printed in front of the network the comment is
assigned to.
Step Sequence:
The font selected for Step Sequence determines the font, font style, and size of the
graphical Step Sequence overview printout (G5 for Windows option must be installed).
Footers / Headers:
The font selected for Footers / Headers determines the font, font style, and size of the
footer and header printed on each page of the printout.
Headings:
The font selected for Headings determines the font, font style, and size of the
headings within the networks (segments), and the cross-reference list as well as any
other heading in the printout.
Symbolic Table:
The font selected for Symbolic Table determines the font, font style, and size of the
text within the symbolic table printout.
Cross Reference :
The font selected for Cross Reference determines the font, font style, and size of the
of the text within the cross-reference list printout.
Block List:
The font selected for Block List determines the font, font style, and size of the text
within the PC Block List printout.
Note:
The font selections made in the Fonts Type settings box, are used for printing only.
The fonts for the CRT display are selected with the settings from the Presentation
Fonts tab
Font:
Select the font from the list field. All the fonts offered by windows may be selected. The
width of a character depends on the font selected. You may have to adjust the column
width (see chapter 3.2.13.1) for an optimized printout.
Font style:
The selection of the font style depends on the type of text to be printed (headings,
body text, etc.).
Size:
The selection of the font size depends on the size of the paper used for the printout.
You may have to decrease the size of the font to fit a complete network (segment) on a
single sheet when printing.
If a network exceeds the horizontal or the vertical margin of a page, a list box is
opened prior to printing that lists the segments (networks) that cannot be printed on a
single sheet of paper.
When clicking the Print List button the contents of the dialog
box are printed out to enable you to manipulate the segments
(networks), so when you print the segments (networks) at a later
date, they will be printed completely.
When clicking the Start Printing button the documentation is
printed. The segments (networks) listed may be truncated.
When clicking the Abort button the printing is aborted. You may
now change the settings (page orientation, font size, margins) to
fit the segments (networks) onto a single page.
The settings from the Margins Tab are saved in the project file [project name].s5p.
Select the set margins dialog box to customize the page layout. The margins of the
Main Body (area where the PLC logic is printed) and the Header / Footer are set
independently. The dimensions are in centimeters (cm).
Figure 3-70 Margins tab from the Documentation Layout dialog box
Header / Footer
Top
Left
Main Body Right
Botton
Left Right
Header / Footer
Botton
The settings from the Margins Tab are saved in the project file [project name].s5p.
The tab provides fields to customize the appearance of the page of documentation for
the PLC program.
You may type any text in the text fields. There are field abbreviations available to assist
you when entering PLC program information and date and time information to the
header and footer. Buttons are available to disable the footer or header. The font for
the header and footer may also be set.
Figure 3-72 Header / Footer tab from the Documentation Layout dialog box
l Field abbreviations:
The column positions and their width may be set individually in the STL Columns tab
of the documentation layout dialog box to control the layout of a STL printout. The
settings from the STL Columns tab are saved in the project file [project name].s5p.
Figure 3-73 STL Columns tab from the Documentation Layout dialog box
The column position defines the distance, relative to the left margin of the main body
(see chapter 3.2.13.3). The fields Additional Symbol and Additional Absolute
Operand are only active if the corresponding buttons in the Presentation tab
(Documentation Layout dialog box) logic printout dialog box are marked (see chapter
3.2.13.1).
The number, entered as the column position, is the distance represented by the
number of character spaces. The actual distance, in inches, depends on the font
selected.
l Symbolic Table
Activating the Default button will insert the default column values as shown in
figure 3-73.
Note:
The width of the characters in a proportional font (e.g. Arial, Times New Roman
etc.), vary with the type of letter. Spaces do not necessarily have the same width as
an equal number of other characters.
If the Symbolic button in the Pre sentation tab of the Documentation Layout dialog
box is marked, then the field Additional Absolute Operand is used to define the
additional column position.
If the Absolute button in the Presentation tab of the Documentation Layout dialog
box is marked, then the field Additional Symbolic Operand is used to define the
additional column position.
Example 1:
Margin of the Main Body (Program)
Column 4
Column 2
Column 3
Column 1
Comment
Figure 3-76 Symbolic operands and print symbol comments buttons marked
Example 2:
Column 4
Column 3
Column 2
Column 1
Comment from the STL
Symbolic Table Comment
Additional Symbol
Comment
Figure 3-77 Absolute operands and print symbol comments buttons marked
Column Definition
1 S7 / S5 code
2 Operand
3 Additional absolute operand or additional symbolic operand
4 Comment (Symbolic table and / or STL comment)
The comment, printed in an STL line can be made out of the following parts:
l S7- STL - comment, defined with two slash characters (//) in front of the comment,
entered in the STL line.
l S5- STL - comment, defined with a semicolon ( ; ) in front of the comment, entered in
the STL line.
l The comment from the symbolic table (operand comment).
The STL comment will be printed at the next Tab position following the comment from
the symbolic table. If no symbolic table comment is printed, the STL comment is
printed in column 4.
The page layout for printing step sequence documentation is setup with the Ste p
Sequences tab from the documentation layout dialog box. The settings from the STL
Columns tab are saved in the project file [project name].s5p.
Column Width:
In the text field you can enter the number of characters that will define the width of the
comment field (steps and transitions) for the printout. An automatic line wrap is
provided to move the text that exceeds the column width, onto the next line. Up to 35
characters (space characters) are possible.
Note:
The number entered in the column width text field defines the size of the comment
field for the printout. The number represents the number of space characters. The
actual size (inches) depends on the font selected.
The width of the characters in a proportional font (e.g. Arial, Times New Roman
etc.), will vary with the type of letter. Spaces do not necessarily have the same width
as the same number of other characters.
Figure 3-78 Step Sequence tab from the Documentation Layout dialog box
Comment lines:
You can enter the number of lines in the text field that the comment field can hold. The
additional lines are automatically filled with text if the comment exceeds the column
width. Up to three (3) lines are possible.
With Comments
If this button is marked the step and transition comments are printed.
With Details
If this button is marked the PLC logic, displayed in the step sequence detail display
window, is printed out.
The appearance of the PLC logic in the printed documentation is controlled with
settings from the Presentation tab of the Documentation Layout dialog box. The
PLC logic may be printed as control system flowchart (CSF), ladder diagram (LAD), or
statement list (STL). See chapter 3.2.13.1 for details.
3.2.14 Print
The Print command opens a dialog box where you can select the portions of the PLC
program to be printed. The appearance of the PLC logic is controlled via the
documentation layout dialog box (see chapter 3.2.13).
7 u Press ALT + F, P.
Printing dialog box opens (figure 3-79). The dialog box gives you the ability to select
the items to be printed.
l Block List
If the block list button is marked, a list is printed with the information displayed in the
PC Block List window with the names of the blocks, their length, date and time of the
last modification, and the comments that will be printed out.
l Blocks:
l Symbolic Table
If the symbolic table button is marked, the symbolic table will be printed out.
l Cross Reference
If the cross-reference button is marked, the whole cross-reference list or portions of the
cross-reference list are printed.
The portions of the cross-reference list to be printed can be
selected with the Print Cross Reference dialog box. Activate
the Subdivision button to open the dialog box Print Cross
Reference.
l Selection
You may mark one, several, or all operand groups to be printed the cross- reference
list. The cross-reference list is printed showing the selected operands and where they
are used (block and segment number) within the PLC program.
This dialog box provides buttons for printing a single page, selected pages or all
pages. The number of copies may also be selected or the documentation may be
printed to a file.
The button Properties opens another dialog box to setup the currently active printer.
From the drop down list Name you may select another printer.
The appearance of the dialog box Print, and the other dialog boxes that can be
opened from the Print dialog box, depend on the printers installed under Windows.
Activating the OK button starts the actual printing process.
7 u Press ALT + B.
Note:
Commands and icons that are displayed in light gray are not available. These
functions may be part to an additional software option or another mode must be
selected to execute these commands.
The New Block command opens a dialog box to establish the name of the new block.
The drop down list shows you the existing blocks. Modifying the segment number is
not necessary as a new block always starts with the network (segment) number one
(1).
7 u Press ALT + B, N.
l Block
Enter the block name in the text field. A block name is made up of a two (2) character
identifier and a counting number. A drop down list is provided to display the existing
blocks. S5 and S7 use different Block types and different Block names (see tables
below).
l Segment (Network)
In S5 terminology a PLC Block is divided into Segments. The S7 literature uses the
term Network for the same portion of a Block. Because this manual describes S5 and
S7 subjects, you will find both terms and they have the same meaning.
A new block always starts with the segment (network) number one (1). Entering the
segment number is not required.
l Format
A new Block can be created in the Step® 5 (S5) or the Step® 7 (S7) syntax. The
default Block format is set in the Miscellaneous tab (Preferred Syntax) of the
Prefer ence dialog box (see chapter 3.2.11.5).
After entering the new Block name and selecting the Block format confirm with OK.
The Block Editor window is opened and ready for creating a new Block.
Note:
Programs generated with G5 for Windows can be converted into S7 code and may
be executed on an S7-300/400 PLC.
S7-300/400
CPU used
FB Function Block
SFC System Function
SFB System Function Block
DB Data Block
SDB System Data Block
Function (FC)
FC’s are made up of STEP® 7 instructions. The PLC program, or part of the program,
is stored in PB’s. Comments may be added. The instructions may be edited and
displayed in STL, CSF, and LAD (optional).
FC's have no memory area associated with it. These Blocks may be called anytime
from any other PLC Block. Different variables may be passed to the FC whenever the
Block is called. The local temporary data used by the FC is relocated after the FC is
processed.
variables for the FB are stored in the Instance DB. The local temporary data used by
the FB is relocated after the FB is processed.
FB's can be called with different Instance DB that are assigned to it.
7 u Press ALT + B, S.
l Block
Enter the block name in the text field. A block name is made up of a two (2) character
identifier and a counting number. A drop down list is provided to display the existing
blocks. Only S5 Block names may be used.
Note:
G5 for Windows not only provides a mode to program step sequences in Sequence
Blocks (SB), but also in OB’s, PB’s, and FB’s.
These step sequences can only be executed if jump instructions are permitted in the
selected block (CPU dependent). To do so, the Jumps in FB's only button in the
Miscellaneous tab of the Preference dialog box (see chapter 3.2.11.5) must be
marked.
If graphical step sequences are programmed outside of Step Blocks (SB), errors
may occur when these Blocks are edited with a Siemens PU.
l Segment (Network)
A new block always starts with the segment number one (1). Entering the segment
number is not required.
l Format
The new Block can only be created in the Step® 5 (S5) syntax. The default Block
format is set in the Miscellaneous tab (Preferred Syntax) of the Preference dialog box
(see chapter 3.2.11.5).
After entering the new Block name and selecting the Block format confirm with OK.
The Modify command opens the Block Editor window. The selected block from the
PC block list window for is ready for modifications.
If a block was selected (marked) in the PC block list window, the Block Editor window
is opened and the first segment of the marked block is ready for modifications.
If no block was selected (marked) in the PC block list window, the Modify Block dialog
box opens.
l Block
Select the block name to be modified from the drop down list. S5 and S7 use different
Block types and different Block names (see tables 3-2, 3-3).
l Segment (Network)
l Format
Select the format of the block to be modified. The default block format is set in the
Miscellaneous tab (Preferred Syntax) of the Preference dialog box (see chapter
3.2.11.5).
Confirm the selection with the OK button. The Block Editor window is opened and the
block is ready for modifications.
With the Rename command you can give an existing block another number and/or
convert the block into another format. The old block is deleted.
l The existing block and the renamed block have the same format:
The name identifier (OB, DB, FB, FC; PB, SB et c.) must stay the same. The format
selection (From:, To:) is the same.
l The existing block and the renamed block have different formats:
If the format of the renamed block is different from the original block, a rename and a
conversion take place. It is only possible to convert and rename a block into a
corresponding block type.
7 u Press ALT + B, R.
l From :
Format:
Select the block to be renamed from the drop down list. S5 and S7 are using different
Block types and different Block names (see tables 3-2, 3-3).
l To :
Format:
Enter the new block name. The drop down list gives you an overview of the blocks
already used. Confirm the rename with the OK button.
With the Copy to command you may make a copy of an existing block and/or convert
the block into another format. The original block remains untouched.
l The existing block and the copied block have the same format:
The name identifier (OB, DB, FB, FC; PB, SB etc.) must stay the same. The copied
block will have a new counting number. The format selection (From:, To:) are the
same.
l The existing block and the copied block have different formats:
If the format of the copied block is different from the original block, the copying and the
conversion take place. It is only possible to convert and copy a block into a
corresponding block type.
7 u Press ALT + B, Y.
l From :
Format:
Select the block to be copied and/or converted from the drop down list. S5 and S7 use
different Block types and different Block names (see tables 3-2, 3-3).
l To :
Format:
Enter the new block name. The drop down list gives you an overview of the blocks
already used. Confirm the copying and/or conversion with the OK button.
The Convert S5 ó S7 is used to convert a block from the S5 format into a block with
the S7 format. The command may also be used to convert an S7 block back into its S5
format.
The block being converted must be selected (marked) in the PC block list window prior
executing the Convert S5 ó S7 command.
7 u Press ALT + B, V.
Note:
Not all S5 instructions can be converted into S7 code (see chapter 3.3.6.1)
The Step® 7 syntax understands more instructions than the Step® 5 syntax. It is
almost impossible to convert a block programmed in the S7 format into the S5
format, but a PLC Block, original written in the S5 syntax and converted into the S7
format, can be converted back, as long as no instructions not understood by the S5
syntax, have been added to the PLC block.
Not all of the S5 instructions can be converted into the S7-300/400 format. These are
mainly the instructions to access the system memory areas (e.g. LIR, TIR, etc.) of a S5
CPU. These instructions cannot be used with a S7 CPU.
The S7-300 / 400 series PLC’s does not rec ognize Program Blocks (PBxx), Step
Sequence Blocks (SBxx), Extended Function Blocks (FXxx), or Extended Data Blocks
(DXxx).
To organize a S7 PLC program the following block types are available for the program
code:
l Organization Blocks (OB)
l Function Blocks (FB)
l Functions (FC)
l System Functions (SFC)
l System Function Blocks (SFB)
l Data Blocks (DB)
l System Data Blocks (SDB)
The number of code blocks available depends on the type of CPU used.
[BLOCKNAMES]
<S5-Name>=<S7-Name>
<S5-Name>=<S7-Name>
Example:
You want to convert code block SFB 12 into FB 12. You want to convert code block FX
10, FX 11, and FX 12 into functions FC 300, FC 301, and FC 302:
[BLOCKNAMES]
FB12=SFB12
FX10=FC300
FX11=FC301
FX12=FC302
Only code blocks of the same type may be converted:
The Print command is used to printout the documentation of existing blocks. The
documentation layout will be in accordance to the settings selected with the dialog
boxes Documentation Layout (see chapter 3.2.13). The Print command only works if
one or more blocks are marked.
7 u Press ALT + B, P.
If one block or several blocks have been selected (marked) in the PC block list window,
the Print dialog box is opened (see chapter 3.2.12, figure 3-57).
To begin the printing process you can also click the Print icon from the
tool bar
The Properties command opens up a dialog box that displays information about the
block marked in the PLC Block List. Fields are provided to enter additional information
about the block.
7 u Press ALT + B, O.
l Comment:
S7 for Windows The text entered in the Comment field can be displayed in the PC
Block List. The information that is displayed in the PC Block List depends on the
settings in the Listings tab of the Preference dialog box (see chapter 3.2.11.3). The
text is stored in the Block Header under the key word "Title". The comment can have
up to 60 characters.
S5 for Windows The text entered in the Comment field has the highest priority of all
the comments to be displayed in the PC Block List. The other comments to be
displayed in the PC Block List are selected in the Listings tab of the Preference
dialog box (see chapter 3.2.11.3). The text is saved in the project file (*.s5p). The
comment can have up to 60 characters. If the PLC program is exported the comment
will be lost.
l Library Number:
You may as sign a library number to a block. The library number is a five (5) digit
identification number. If you are using original SIEMENS block this number has been
assigned. If you programmed the block yourself you can assign a library number to that
block. The library number is saved in the PLC when you transfer the block to the PLC.
Only S5 for Windows understands Library Numbers.
l Name:
S7 for Windows The text entered in the Name field can be displayed in the PC
Block List and the PLC Block List. The information that is displayed in the PC Block
List (PLC Block List) depends on the settings in the Listings tab of the Preference
dialog box (see chapter 3.2.11.3). The text is stored in the Block Header under the key
word "Name" (see figure 3-92). The comment can have up to 8 characters.
S5 for Windows The text entered in the Name field can be displayed in the PC
Block List. The information that is displayed in the PC Block List depends on the
settings in the Listings tab of the Preference dialog box (see chapter 3.2.11.3). The
name can have up to 8 characters. The text is saved in the project file (*.s5p). If the
PLC program is exported the comment will be lost.
l Family:
S7 for Windows The text entered in the Family field can be displayed in the PC
Block List and the PLC Block List. The information that is displayed in the PC Block
List (PLC Block List) depends on the settings in the Listings tab of the Preference
dialog box (see chapter 3.2.11.3). The text is stored in the Block Header under the key
word "Family" (see figure 3-92). The comment can have up to 8 characters.
S5 for Windows The text entered in the Family field can be displayed in the PC
Block List. The information that is displayed in the PC Block List depends on the
settings in the Listings tab of the Preference dialog box (see chapter 3.2.11.3). The
name can have up to 8 characters. The text is saved in the project file (*.s5p). If the
PLC program is exported the comment will be lost.
l Author:
S7 for Windows The text entered in the Author field can be displayed in the PC
Block List and the PLC Block List. The information that is displayed in the PC Block
List (PLC Block List) depends on the settings in the Listings tab of the Preference
dialog box (see chapter 3.2.11.3). The text is stored in the Block Header under the key
word "Author" (see figure 3-92). The comment can have up to 8 characters.
S5 for Windows The text entered in the Author field can be displayed in the PC
Block List. The information that is displayed in the PC Block List depends on the
settings in the Listings tab of the Preference dialog box (see chapter 3.2.11.3). The
name can have up to 8 characters. The text is saved in the project file (*.s5p). If the
PLC program is exported the comment will be lost.
l Version:
S7 for Windows The number entered in the Version field can be displayed in the
PC Block List and the PLC Block List. The information that is displayed in the PC Block
List (PLC Block List) depends on the settings in the Listings tab of the Preference
dialog box (see chapter 3.2.11.3). The number is stored in the Block Header under the
key word "Version" (see figure 3-92).
A version number can be used. If you elect to use a version number it must have at
least one number before and one number after the period (1.0) and can have a
maximum of two numbers before and two numbers after the period (15.15).
S5 for Windows The number entered in the Version field can be displayed in the
PC Block List. The information that is displayed in the PC Block List depends on the
settings in the Listings tab of the Preference dialog box (see chapter 3.2.11.3).
A version number can be used. If you elect to use a version number it must have at
least one number before and one number after the period (1.0) and can have a
maximum of two numbers before and two numbers after the period (15.15). The
number is saved in the project file (*.s5p). If the PLC program is exported the comment
will be lost.
Format:
Format displays the current code format of the block. This can be S7 or S5. The
information displayed is generated from the actual code of the block and is the same
information displayed in the PC Block List (if selected see chapter 3.2.11.3).
Created in presentation:
Created in presentation displays the presentation used (STL, LAD, CSF, etc.) to
create the block. This information is used by the S7 CPU in case the program was
programmed using another programming language (e.g. SCL etc.).
The information is saved in the S7 block and remains valid if the block is exported.
(reserved for S7 for Windows versions above 4.05).
Created:
Created displays the date and time the block was created.
S7 for Windows The information is saved in the S7 block and remains valid
if the block is exported.
S5 for Windows The information is saved in the project file (*.s5p). If the
PLC program is exported the date will be lost.
Last modified:
Last modified displays the date and time the block was modified the last time.
S7 for Windows The information is saved in the S7 block and remains valid
if the block is exported.
S5 for Windows The information is saved in the project file (*.s5p). If the
PLC program is exported the date will be lost.
Interface last modified displays the last date and time the local variables (interface to
the program) have been modified.
The information is saved in the S7 block and remains valid if the block is exported
(reserved for S7 for Windows versions above 4.05). S5 does not understand this
information.
Total length:
Total length displays the memory area the block would use if transferred into the PLC
(S7 load memory). The length is displayed in bytes. The information displayed is
generated from the actual code of the block and is the same information displayed in
the PC Block List (if selected see chapter 3.2.11.3).
This information is not saved but recalculated whenever a S7 or S5 block is created,
modified or opened.
Code length:
A PLC block is made up of the actual code and the block header. When transferring a
block into an S7-300/400 CPU, the total block (with its block header) is loaded into the
Load Memory. The actual code (the block without its header) is than passed into the
CPU RAM. Therefore, an S7 block will need more space in the load memory than in
the CPU RAM. Code length displays the length of the code of a block (total block
length minus header).
S5 does not use this technique; the total block is always saved in the CPU RAM.
The information is not saved but recalculated whenever a S7 or S5 block is created,
modified or opened.
Number of Segments:
Number of Jumps:
Number of Jumps displays the current number of jumps within the block.
The information is not saved but recalculated whenever a S7 or S5 block is created,
modified or opened.
Number of Jump Tags displays the current number of Jump Tags (destination of a
jump) within the block. The number of Jumps and the number of Jump Tags must be
equal because jumps are only allowed within the block.
The information is not saved but recalculated whenever a S7 or S5 block is created,
modified or opened.
An S7 block may have local data (Local Variables) assigned to. The memory area
occupied by the local data in the S7-300/400 CPU memory is displayed in bytes. Local
Data needs the same amount of space in the Load Memory and the CPU RAM.
S5 blocks do not understand local data.
The information is not saved but recalculated whenever a S7 block is created, modified
or opened.
Attributes:
Block Attributes are currently not supported by S7 for Windows. S5 does not
understand local data.
Statement Comments:
Segment Comments:
S5 for Windows provides special masks as dialog boxes to generate the data blocks
DB1 and DX for the PLC 135U, 155U and 155H.
7 u Press ALT + B, K.
The PLC 135 U may be used as a multi-proc essor PLC system. Since all CPU’s use
the same I/O bus, each digital input and output module must be allocated to a specific
CPU. Also, the inter-processor communication (IPC), input and output flags, and the
length of the timer field (area) must be assigned to specific CPU.
8 u Click DB - Masks in the block menu and DB 1 for Peripheral assignments in the DB
- Masks menu.
7 u Press ALT + B, K, 1.
The definition of the values to be entered can be found in the manual for the particular
CPU.
The data block DB1 is generated and will be displayed in the PC block list window.
Confirm the entered values by activating the OK button.
Figure 3-94 DB 1 for Peripheral assignments for PLC 135 U dialog box
S5 for Windows provides a dialog box DX0 Parameter (PLC 135 U: CPU 928B, CPU
928, CPU 922) that allows you to easily enter system data and presets.
8 u Click DB - Masks in the block menu and DX 0 for PLC 135 U in the DB - Masks menu.
7 u Press ALT + B, K, 0.
Which buttons you mark and the values you have to enter will depend on the project
and the CPU you are using. The definition of the buttons and the values to be entered
can be found in the manual for the particular CPU.
Figure 3-95 DX0 Parameter (PLC 135 U: CPU 928B, CPU 928, CPU 922) dialog box
Confirm the entered values and the marked buttons by activating the OK button.
The data block DX0 is generated and will be displayed in the PC block list window.
S5 for Windows provides a dialog box DX0 Parameter (PLC 155 U: CPU
946/947/948) that allows you to easily enter system data and presets
8 u Click DB - Masks in the block menu and DX 0 for 155 U in the DB - Masks menu.
7 u Press ALT + B, K, 5.
Which buttons you mark and the values you have to enter will depend on the project
and the CPU you are using. The definition of the buttons and the values to be entered
can be found in the manual for the particular CPU.
Figure 3-96 DX0 Parameter (PLC 155 U: CPU 946/947/948) dialog box
Confirm the entered values and the marked buttons by activating the OK button.
The data block DX0 is generated and will be displayed in the PC block list window.
S5 for Windows provides a dialog box DX0 Parameter (PLC 155 H: CPU 948R) that
allows you to easily enter system data and presets.
8 u Click DB - Masks in the block menu and DX 0 for 155 H in the DB - Masks menu.
7 u Press ALT + B, K, H.
Which buttons you mark and the values you have to enter will depend on the project
and the CPU you are using. The definition of the buttons and the values to be entered
can be found in the manual for the particular CPU.
Figure 3-97 DX0 Parameter (PLC 155 H: CPU 948R) dialog box
Confirm the entered values and the marked buttons by activating the OK button.
The data block DX0 is generated and will be displayed in the PC block list window.
The Transfer to PLC command is used to transfer blocks to the PLC via the serial link.
The selected (marked) blocks from the PC block list window are transferred to the S7-
300/400 or the S5 PLC. This can be a single block or multiple blocks.
The transfer is done via the serial link defined with the settings in the interface tab in
the Preferences dialog box (see chapter 3.2.11.1). If the block to be transferred already
exists in the PLC, a dialog box will open to allow you to override the block or to cancel
the transfer (see chapter 3.3.11, figure 3-98).
Note:
If you want to transfer several blocks to the PLC, mark these blocks in the PC block
list. For details on how to mark several blocks see chapter 3.1.1. The transfer
command starts the block transfer to the PLC.
To start the transfer to the PLC you may also click the Block Transfer
icon from the tool bar
The command Transfer all Blocks to PLC from the block menu is used to transfer all
blocks listed in the PC block list window to the PLC (transferring a complete PLC
program).
7 u Press ALT + B, A.
If a block is already stored in the PLC, a dialog box will open to allow you to overwrite
the block or to abort the transfer.
Activating the Yes button will only overwrite the PLC block
mentioned in the dialog box. If another block is stored in the
PLC, the dialog box will be opened again.
Activating the Abort button will cancel the block transfer to the
PLC. No further blocks are transferred.
Activating the All button will restart the block transfer. The PLC
block mentioned in the dialog box will be overwritten. Any other
block stored in the PLC will also be overwritten. The dialog box
will not be opened again.
Note:
The EPROMMER must be initialized and the module must be selected prior starting
the programming process.
7 u Press ALT + B, E.
If one block or several blocks have been selected (marked) in the PC block list window,
the programming of the EPROM / EEPROM / FLASH module will start immediately. If
no block has been selected (marked) in the PC block list window the command shows
no reaction.
If a block already exists in the EPROM / EEPROM / FLASH module the programming
procedure is aborted and the following error message will be displayed.
Figure 3-99 Error message Block already exists in the EPROM / EEPROM / FLASH module
Note:
If you want to program an EPROM / EEPROM / FLASH module with several blocks,
mark these blocks in the PC block list. For details on how to mark several blocks see
chapter 3.1.1. The Transfer to EPROM command starts the EPROM / EEPROM /
FLASH module programming.
The Transfer all Blocks to EPROM command from the block menu is used to
program an EPROM / EEPROM / FLASH module with the EPROMMER (programming
device). All blocks from the PC block list window are programmed into the EPROM /
EEPROM / FLASH module (programming a complete PLC program).
The EPROMMER must be initialized and the module must be selected prior starting
the programming process.
7 u Press ALT + B, B.
The programming of the EPROM / EEPROM / FLASH module starts immediately. The
progress of the programming process is displayed. After the erase check the blocks
are prepared for transfer.
If a block currently exists in the EPROM / EEPROM / FLASH module, the programming
procedure is aborted and an error message (see figure 3-99) will be displayed.
During the burning process, the EPROM address being programmed is displayed.
The Compare with File command from the block menu is used to compare the
marked block (one block or several blocks) with the corresponding blocks of a PLC
program file located at one of the PC drives. This command requires the additional
BlockDiff option. S5 / S7 for Windows offers BlockDiff , a powerful software package
used to compare PLC Blocks and PLC Programs. You will find detailed information on
how to use the BlockDiff software option in the BlockDiff user's guide.
The Compare all Blocks with File command from the block menu is used to compare
all block listed in the PC Block List with the corresponding blocks of a PLC program file
located at one of the PC drives. This command requires the additional BlockDiff
option. S5 / S7 for Windows offers BlockDiff , a powerful software package used to
compare PLC Blocks and PLC Programs. You will find detailed information on how to
use the BlockDiff software option in the BlockDiff user's guide.
The command Copy from the block menu copies the selected blocks (one or several
blocks may be marked) into a temporary file on the hard disk. The copied blocks may
be inserted into another PLC program (PC block list window) at a later time.
The temporary file is not deleted if S5 / S7 for Windows is closed or the PC is switched
off. Another copy command will overwrite the blocks in the temporary file. The S5 for
Windows copy command is similar to the windows Copy to Clipboard command.
The marked blocks in the PC block list window remain untouched by the copy
command.
8 u Click Copy in the block menu or click the Copy Block icon in the tool
bar.
Note:
If you would like to paste those blocks back into the same PC block list, you must
rename the original blocks prior to using the paste command.
The Paste command from the block menu, pastes the previously copied or cut blocks
into the PC block list. The blocks in the temporary file remain untouched. To paste
blocks into a PC block list it you must insure that blocks to are going to paste have
different names than the existing blocks in the PC block list.
The S5 / S7 for Windows paste command is similar to the windows Paste from
Clipboard command.
8 u Click Paste in the block menu or click the Paste Block icon in the tool
bar.
The command Cut from the block menu copies the selected blocks (one or several
blocks may be marked) into a temporary file on the hard disk. The cut blocks may be
inserted into another PLC program (PC block list window) at a later date.
The temporary file is not deleted if S5 / S7 for Windows is closed or the PC is switched
off. Another cut command will overwrite the blocks in the temporary file. The S5 / S7
for Windows cut command is similar to the windows Cut to Clipboard command.
The marked blocks are deleted from the PC block list window by the cut command.
8 u Click Cut in the block menu or click the Cut Block icon in the tool bar.
S5 / S7 for Windows provides the tools to export and import one or more blocks in a
statement list (STL) presentation. The files are in an ASCII (text) format.
Due to the export and import functions it is possible to manipulate blocks in a
Statement List format (Block STL, Source Text) outside of S5 / S7 for Windows with a
text editor.
Note:
The name of a Block File to be imported by the S5 / S7 for Windows ASCII format
import function must have the following syntax:
S7 for Windows [Block identifier][number].aw7
[Block identifier] OB, FB, FC, etc.
[number]. 0 up to 4095 (depending on the CPU and block type)
Example: FC33.aw7
S5 for Windows [Block identifier][number].awl
[Block identifier] OB, PB, FB, SB, etc.
[number]. 0 up to 255 (depending on the CPU and block type)
Example: PB12.awl
When exporting a block the file name (Block name) and the correct file name
extension (*.aw7, *.awl) is generated automatically. No input is required.
To do so you must export the block and change the file name. With a text editor (e.g.
Notepad) you must then insert the correct header. Now you may import the converted
file. You can edit the converted file with the S5 / S7 for Windows block editor.
Example:
format old block name old file name new file name new block name
S7 FB12 FB12.aw7 FC14.aw7 FC14
S5 PB10 PB10.awl OB12.awl OB12
You may use absolute or symbolic operands. If you use symbolic operands a symbolic
table, used with the symbolic operands, must be present in S5 for Windows when
importing the file.
Note:
The name of the text file (Block List) to be read by S5 / S7 for Windows, using the
Import Several Blocks command, must have the following syntax:
[Project name].s5a
[Project name] up to eight (60) characters
Example: Machine Project 5.s5a
Save the block list file S7Example.s5a in the library folder (directory). If you save the
text file in another folder you must include the path in the text file.
e.g. c:\ s7w\library\OB1.aw7
The command Import Several Blocks opens the Open file dialog box (see chapter
3.3.19.2).
Select the file S7Example.s5a.
You may have to open a different folder to have the file S7Example.s5a listed in the
file name field. The default file type is Block List (*.s5a).
Save the block list file S5Example.s5a in the library folder (directory). If you save the
text file in another folder you must include the path in the text file.
With the command Import a Block you may import a single Block File. The block
must be saved as a text file in an ASCII format. The text must represent the PLC logic
using the Statement List (Source Text, Block-STL) syntax.
S7 for Windows [Block identifier][number].aw7
[Block identifier] OB, FB, FC, etc.
[number]. 0 up to 4095 (depending on the CPU and block type)
Example: FC33.aw7
S5 for Windows [Block identifier][number].awl
[Block identifier] OB, PB, FB, SB, etc.
[number]. 0 up to 255 (depending on the CPU and block type)
Example: PB12.awl
8 u Click ASCII Format in the block menu and Import a Block in the ASCII format menu.
7 u Press ALT + B, F, I.
Note:
If symbolic operands are used in the ASCII text file, a symbolic table defining the
symbols must be present within S5 / S7 for Windows, prior to importing the file.
Text files that do not follow the Step® 7 Source Text or the Step® 5 Block
Statement List syntax, can not be imported. An error message will be displayed
and the import process is aborted.
Each block file to be imported is listed in a separate line of the block list. For more
details on how to write a text file, listing the ASCII blocks to be imported, see chapter
3.3.19.
8 u Click ASCII Format in the block menu and Import Several Blocks in the ASCII format
menu.
7 u Press ALT + B, F, S.
Figure 3-108 Import Several Blocks in the ASCII, Open File dialog box
Note:
If symbolic operands are used in the ASCII text file, a symbolic table defining the
symbols must be present within S5 / S7 for Windows prior to importing the file.
Text files that do not follow the Step® 7 Source Text or the Step® 5 Block
Statement List syntax, can not be imported. An error message will be displayed
and the import process is aborted.
With the command Export Marked Blocks (Absolute Identifiers) you may export one
or more blocks selected (marked) from the PC block list. Each block marked will be
exported as a separate file (Block File). The operands and any other variables are
exported in their absolute form regardless of the setting in the preference dialog box.
The block must be saved as a text file in an ASCII format. The text represents the PLC
logic using the Statement List (Source Text, Block-STL) syntax. The block name is
used for the file name. The file name extension depends on the block format (S7, S5).
S7 for Windows [Block identifier][number].aw7
[Block identifier] OB, FB, FC, etc.
[number] 0 up to 4095 (depending on the CPU and block type)
Example: FC33.aw7
S5 for Windows [Block identifier][number].awl
[Block identifier] OB, PB, FB, SB, etc.
[number]. 0 up to 255 (depending on the CPU and block type)
Example: PB12.awl
These files may be used to build a block file library with absolute identifiers. No
symbolic table is needed to import these block files
8 u Click ASCII Format in the block menu and Exp ort Marked Blocks (Absolute
Identifiers) in the ASCII format menu.
7 u Press ALT + B, F, A.
Figure 3-109 Export Block(s) as Block Files (ASCII Format) dialog box
Path name
As a default, S5 / S7 for Windows offers the path of the open project to save the Block
Files. The file names are assigned by S5 / S7 for Windows.
The blocks selected (marked) from the PC block list may be saved in any other path
you enter in the path name text field. The path must include the drive and the folder
where you want to save the block files.
8 u Click ASCII Format in the block menu and Export Marked Blocks (Symbolic
Identifiers) in the ASCII format menu.
7 u Press ALT + B, F, E.
Figure 3-111 Export Block(s) as Block Files (ASCII Format) dialog box
Path name
As a default, S5 / S7 for Windows offers the path of the open project to save the Block
Files. The file names are assigned by S5 / S7 for Windows.
The blocks selected (marked) from the PC block list may be saved in any other path
you enter in the path name text field. The path must include the drive and the folder
you want to save the block files in.
3.3.19.5 Export all Blocks (Absolute Identifiers) and generate an .S5A File
With the command Export all Blocks (Absolute Identifiers) and generate an .S5A
File you may export all the blocks from the PC block list. Each block will be exported
as a separate file (Block File).
In addition, a Block List file (*.S5A) will be generated and saved. The Block List file is
an ASCII text file listing all the files from the PC block list. S5 / S7 for Windows
automatically assigns a project name to the Block List file.
You may import all block files listed in the Block List file using the Import Several
Blocks command.
The blocks are saved as a text file in ASCII format. The text represents the PLC logic
using the Statement List (Source Text, Block-STL) syntax. The block name is used for
the file name. The file name extension depends on the block format (S7, S5).
S7 for Windows [Block identifier][number].aw7
[Block identifier] OB, FB, FC, etc.
[number]. 0 up to 4095 (depending on the CPU and block type)
Example: FC33.aw7
S5 for Windows [Block identifier][number].awl
[Block identifier] OB, PB, FB, SB, etc.
[number]. 0 up to 255 (depending on the CPU and block type)
Example: PB12.awl
These files may be used to build a block file library with absolute identifiers.
Note:
No symbolic table is needed to import these block files.
8 u Click ASCII Format in the block menu and Export all Blocks (Absolute Identifiers)
and generate a .S5A File in the ASCII format menu.
7 u Press ALT + B, F, X.
The Export Block(s) as Block Files (ASCII Format) dialog box is opened (see figure
3-109).
Path name
As a default, S5 / S7 for Windows offers the path of the open project to save the Block
Files. The file names are assigned by S5 / S7 for Windows.
The blocks selected (marked) from the PC block list may be saved in any other path
you enter in the path name text field. The path must include the drive and the folder
you want to save the block files in.
3.3.19.6 Export all Blocks (Symbolic Identifiers) and generate an .S5A File
With the command Export all Blocks (Symbolic Identifiers) and generate a .S5A
File you may export all the blocks from the PC block list. Each block will be exported
as a separate file (Block File).
In addition, a Block List file (*.S5A) will be generated and saved. The Block List file is
an ASCII text file listing all the files from the PC block list. S5 / S7 for Windows
automatically assigns the project name to the Block List file.
You may import all block files listed in the Block List file using the Import Several
Blocks command.
The blocks are saved as a text file in ASCII format. The text represents the PLC logic
using the Statement List (Source Text, Block-STL) syntax. The block name is used for
the file name. The file name extension depends on the block format (S7, S5).
S7 for Windows [Block identifier][number].aw7
[Block identifier] OB, FB, FC, etc.
[number]. 0 up to 4095 (depending on the CPU and block type)
Example: FC33.aw7
S5 for Windows [Block identifier][number].awl
[Block identifier] OB, PB, FB, SB, etc.
[number]. 0 up to 255 (depending on the CPU and block type)
Example: PB12.awl
These files may be used to build a block file library with symbolic identifiers.
Note:
A symbolic table must be present in S5 / S7 for Windows prior to importing these
block files.
An error message will be displayed if an undefined symbolic operand is found and the
import process is aborted.
8 u Click ASCII Format in the block menu and Export all Blocks (Symbolic Identifiers)
and generate an .S5A File in the ASCII format menu.
7 u Press ALT + B, F, X.
The Export Block(s) as Block Files (ASCII Format) dialog box is opened (see figure
3-109).
Path name
As a default, S5 / S7 for Windows offers the path of the open project to save the Block
Files. The file names are assigned by S5 / S7 for Windows.
The blocks selected (marked) from the PC block list may be saved in any other path
you enter in the path name text field. The path must include the drive and the folder
you want to save the block files in.
7 u Press ALT + O.
The Rewire dialog box allows you to rewire operands. With this command you can give
an existing operand a new name. The rewired operands must be of the same type. The
rewire function is currently only available with S5 Blocks and S5 operands. An
extended rewire function for S5 and S7 blocks is under development.
7 u Press ALT + O, R.
The Rewire dialog box provides the ability to rena me absolute operands. The rewire
function searches the complete PLC for the operand name that is entered in the text
field Old Operand. The name of the old operand is replaced with the name you have
entered in the New Operand text field.
If a symbol has been assigned to the operand (old operand), in the symbolic table, the
new operand will be assigned to the symbol.
Example 1:
The symbolic table has the following entries:
I 32.1 BOTTOM Punch Press at Bottom
The following Operands are entered into the Rewire dialog box:
Old Operand: I 32.1 New Operand: I 42.1
The new Cross reference lists after the rewiring is shown in figure 3-119.
Example 2:
The symbolic table has the following entries:
I 32.1 BOTTOM Punch Press at Bottom
The following Operands are entered into the Rewire dialog box:
If you do not abort the rewiring process (activating the Yes button), the operand you
defined in the New Operand text field will have a symbol assigned to it and an
additional warning will be displayed.
If you activate the Yes button the symbol assigned to the operand from the Old
Operand text field will be assigned to the operand entered in the New Operand text
field.
The symbolic table will have the following entries after the rewire process.
I 32.2 BOTTOM Punch Press at Bottom
I 32.1 not used
Figure 3-124 Cross reference lists after the rewiring (Example 2, override symbolic table)
If you activate the No button the symbol assigned to the operand in the New Operand
text field remains untouched.
The symbolic table will have the following entries after the rewire process.
I 32.2 TOP Punch Press at Top
I 32.1 not used
Figure 3-125 Cross reference lists after the rewiring (Example 2, symbolic table remains the
same)
You may also use the Search / Replace function to rename operands.
With the Configuration List command a window is opened to display the operands
used in the PLC program.
7 u Press ALT + O, L
8 u Click Configuration List in the configuration list menu or click the icon.
The Building an H1 Connection command from the option menu gives you the ability
to go online with any of the PLC’s connected to the H1 bus. The H1 connection is only
available with S5 CPU's.
7 u Press ALT + O, B.
There are two possibilities available to connect S5 for Windows via the H1 bus to an
external S5 PLC.
Standard H1 connection
Your PC must have a serial link to a Master PLC. The master PLC is one of the PLC’s
connected with the H1 bus. Via the master PLC you have access to any other PLC on
the H1 bus. To do so, a serial link between the PLC CPU and its CP (H1
communication processor) must be established at all Host PLC’s. The host PLC’s are
all the PLC’s you want to go online with via the H1 bus.
A special telegram is sent from S5 for Windows to the host PLC’s. As a result a certain
host PLC will have an online connection with S5 for Windows (via the master PLC).
Destination Address
Each PLC connected to the H1 bus has its own destination address. The destination
address (hex number) must be unique for every PLC connected to the H1 bus. To
connect a PLC online via the H1 bus, enter its unique destination in the text field. All
the online functions provided by S5 for Windows are available with the PLC connected
to the H1 bus
u Activating the OK button will connect the PLC online with S5 for Windows .
Advanced H1 connection
S5 for Windows also provides the ability to use a standard Ethernet network board to
connect to the H1 bus directly. In conjunction with the INAT Company, an additional
software driver is provided to allow the use of a standard Ethernet network board to
connect to the H1 bus. In addition, the INAT H1 button in the interface tab of the
preference dialog box must be marked.
The Building an TCP/IP Connection command from the option menu gives you the
ability to go online with any of the PLC’s connected to the bus. In conjunction with the
INAT Company's special hardware you can connect S5 CPU's to a network using the
TCP/IP protocol. A standard Ethernet network board can be used in the PC to connect
to the bus. The driver is built into the S5 for Windows software. In addition the button
INAT TCP/IP in the interfac e tab of the preference dialog box must be marked. The
PLC's TCP/IP connection is currently only available with S5 CPU's.
7 u Press ALT + O, B.
An established communication link with a PLC, connected via the H1 bus, can be
disconnected with the Terminate the H1 connection command from the option menu.
How to establish a connection to a PLC connected to the H1 bus is described in
chapter 3.4.3.
7 u Press ALT + O, T.
An established communication link with a PLC connected via the H1 bus can be
disconnected with the Terminate the TCP/IP connection command from the option
menu. How to establish a connection to a PLC connected to a bus using the TCP/IP is
described in chapter 3.4.4.
7 u Press ALT + O, T.
S5 / S7 for Windows User’s Guide
Chapter 3 PC Block List Page 144
With the Step Sequence Diagnostics command from the option menu, you can open
the step sequence diagnostic window. This window provides you with information
concerning the execution of step sequence within the PLC (S 5 for Windows must be
online with the PLC). The command is only available in conjunction with the optional
G5 for Windows software (S5 for Windows) and the Graph® 5 modes.
7 u Press ALT + O, D.
With the command Diagnostics from the step sequence diagnostic window you can
close the window.
Diagnostic Menu
S5 / S7 for Windows provides the ability to insert write protection into the PLC. With
active write protection you may go online with a PLC and display the status. Data
transfer to the PLC is prohibited. Accidental alteration of a PLC program is not possible
as long as the write protection is active.
The write protection may only be canceled with a predefined password.
7 u Press ALT + O, O.
u To confirm the password entry, activate the OK button. The write protection is active.
If you enter an incorrect password, a warning will be displayed and the write protection
stays inactive.
u Confirm the warning and enter the correct password to activate the PLC write
protection.
With the command PLC Write Protection OFF from the option menu you may cancel
the PLC write protection. The default setting for PLC write protection is off.
7 u Press ALT + O, W .
u To confirm the password entry, activate the OK button. The write protection is turned
off. Now you may transfer data to the online PLC.
If you entered an incorrect password a warning will be displayed and the write
protection stays active.
Prior to activating the PLC write protection you have to define a password to turn the
protection on and off. The password may have up to 27 characters. The password may
be changed at any time as long as you know the old password. As a default no
password is assigned.
7 u Press ALT + O, P.
In the text field Old Password enter the password you defined the last time. If no
password was yet assigned (default setting) it is not possible to enter a password.
In the text field New Password enter the password you want to use to turn the PLC
write protection on. The same password is needed to turn the PLC write protection off.
To avoid entering an incorrect password due to a typing error, you have to type the
new password again in the text field Reenter Password.
Via the MPI (multi point interface) several S7-300/400 CPU’s and/or programmable
modules may be connected to a PC running S7 for Windows . The CPU’s and the
modules that are connected together must each have unique MPI addresses.
The command S7 CPU Selection allows you to select the CPU (module) you want to
communicate with.
Note:
If additional CPU communication processors (CP’s) or other programmable modules
(FM’s) are located in the S7 300/400 PLC, these modules (CP, FM) will have an MPI
address automatically assigned.
The firmware assigns the MPI address of the CPU +1 to the first module. The
second module will get the CPU MPI address +2 etc.
The communication rate is dependent on the setting of the PC-MPI cable and can
be between 19.2 to 115,2 kBaud (187.5 kBaud between the modules). The
maximum cable length of the complete network (without additional amplifiers) is
limited to 50 meters (160 ft.).
MPI addresses between 0 and 126 may be assigned to the devices connected to the
MPI network.
Table 3-1 shows the default MPI address settings. Unique MPI addresses must be
assigned to the devices prior to connecting the devices to the MPI network.
7 u Press ALT+ O, S.
Note:
Make sure that all the devices connected to one MPI Bus have the same Max. MPI
Address setting. If devices with different Max. MPI Address settings are connected
on one bus, the devices will not recognized and communication can not take place.
For more details see chapter 3.2.11.1 (interface tab, preference dialog box)
Some of the CPU’s of the S7-300/400 series (e.g. CPU 312) do not provide a memory
card slot. To save the CPU RAM contents in the integrated ROM (EEPROM) area and
prevent the loss of the data in case of a power failure or shut down, S7 for Windows
provides a Copy from RAM to ROM command. To execute the command the S7-
300/400 CPU must be connected online (via the PC-MPI cable) with the PC.
To copy the contents of the RAM into the integrated ROM area follow the steps
outlined below:
7 u Press ALT+ O, C.
To transfer the contents of the RAM into the EEPROM (ROM), the key switch of the
CPU must be in its Stop position. If the key switch is not in the Stop position, an error
message is displayed and the transfer process is aborted.
The successful transfer from RAM into the EEPROM (ROM) is indicated with the
following message:
Figure 3-141 Successful transfer from the RAM into the EEPROM (ROM) message
Note:
To delete the data in the integrated EEPROM module, the module must be
programmed with "null" data.
If there is no PLC Program located in the RAM area and the Copy from RAM to
ROM command is executed all the data in the EEPROM module is erased.
S7 for Windows provides a separate window to configure the hardware and set the
parameters.
7 u Press ALT + O, 7.
The S7 Hardware Configuration program has all the tools integrated, for an easy
hardware configuration. The built in Hardware Catalog lets you select the hardware
used in specific applications.
The functions of the Hardware configuration window are explained in detail in chapter
13.
Note:
If a project has a hardware configuration file assigned to it, the command
S7 Hardware Configuration opens this file and is ready for modifications (see
chapter 3.2.5.2).
If there is no hardware configuration file assigned to the project, a new S7 hardware
configuration file may be generated and assigned to the project.
The hardware configuration file is saved using the project name with the file name
extension *.CF7.
7 u Press ALT + W.
The Cascade command causes the open windows in S5 / S7 for Windows to overlap
so that each title bar is visible.
7 u Press ALT + W, D.
The Tile command arranges the open windows in S5 / S7 for Windows in smaller sizes
to fit next to each other on the basic window workplace.
7 u Press ALT + W, T.
When you minimize a window in S5 / S7 for Windows , it becomes an icon. You can
move these icons around in the basic window workplace by dragging them with the
mouse. If you have several icons in the basic window you can arrange them so that
they are evenly spaced and do not overlap.
7 u Press ALT + W, I.
After working for some time with S5 / S7 for Windows you may have opened many
windows. It is a good habit to close all the unnecessary windows. An excess of open
windows could reduce the performance of Windows drastically.
7 u Press ALT + W, A.
This command closes all the windows except the PC block list window.
This command opens the Cross Reference window. For more details about the cross-
reference window, see chapter 7.
8 u Click Cross Reference in the window menu, or click the icon in the
tool bar.
7 u Press F4.
This command opens the PLC Status window. For more details about the block status
window, see chapter 10.
8 u Click PLC Status in the window menu, or click the icon in the tool bar.
This command opens the Symbolic Table window. For more details about the
symbolic table window, see chapter 8.
8 u Click Symbolic Table in the window menu, or click the icon in the
tool bar
7 u Press ALT + W Y.
This command opens the PLC Block List window. For more details about the PLC
block list window, see chapter 9.
8 u Click PLC Block List in the window menu, or click the icon in the
tool bar.
7 u Press ALT + W, L.
This command opens the PLC Inputs, Outputs, etc. window (External PLC Status).
For more details about the PLC inputs, outputs, etc. window, see chapter 11.
8 u Click PLC Inputs, Outputs, etc. in the window menu, or click the icon
in the tool bar.
7 u Press ALT + W, X.
This command opens the PLC Interrupt Stack window. For more details about the
PLC interrupt stack window, see chapter 12.
8 u Click PLC Interrupt Stack in the window menu, or click the icon in the
tool bar.
7 u Press ALT + W, S.
This command opens the S5 Simulation PLC window. For more details about the
simulation PLC window, see chapter 14.
8 u Click S5 Simulation PLC in the window menu, or click the icon in the
tool bar.
7 u Press ALT + W, M.
This command opens the EPROMMER window. The EPROMMER window provides
the commands to burn EPROMS and EEPROMS. For more details about the
EPROMMER window, see the EPROMMER User' s manual.
8 u Click EPROMMER in the window menu, or click the icon in the tool bar.
7 u ALT + W , E.
This command opens the PC Block List window. For more details about the PC block
list window, see chapter 3.
8 u Click 1 PC Block List in the window menu, or click the icon in the tool
bar.
7 u Press ALT + W, 1.
7 u Press ALT + H.
The Index command from the help menu gives you a list of all help topics from S5 / S7
for Windows .
7 u Press ALT + H, I.
7 u Press ALT + H, K.
This command opens the How to use Help file displaying instructions how to use the
Windows help files.
7 u Press Alt + H, H.
The About S5 / S7 for Windows opens a display field that provides you information
such as serial number, version, copyright, etc.
7 u Press ALT+ H, A.
4 PC Block Editor
S5 / S7 for Windows provides two block editors. With the PC Block Editor you can
create and/or modify blocks stored in your PC (Personal Computer). The operation and
the tools provided in the PLC Block Editor are basically the same as the PC editor.
The differences are:
The PC block editor allows you to work with blocks stored in the PC.
The PLC block editor allows you to work with blocks stored in the PLC.
There are some differences in the way you save modified Blocks in the PLC.
Therefore, we recommend that you use the PC block editor to create new blocks and
to modify existing blocks.
Dependant on the set -up of your programming system, the software options, the two
editors "understand" the STEP® 5 syntax and/or the STEP® 7 syntax.
The S5 for Windows software, allows you to create and modify PLC programs using
the STEP® 5 syntax. The PLC logic may be displayed in Statement List (STL, Source
Text), Ladder Diagram (LAD), or Control System Flowchart (CSF) presentation.
The S7 for Windows software allows you to create and modify PLC programs using
the STEP® 7 syntax. The PLC logic may be displayed in Statement List (STL, Source
Text), Ladder Diagram (LAD) , or Control System Flowchart (CSF) presentation.
If only one of the software packages, S5 for Windows or S7 for Windows , has been
installed, the Block Editors will only understand the syntax that is used with that
software package.
Special features required to "understand" both the STEP® 5 syntax and the STEP® 7
syntax such as e.g. converting blocks from one syntax format into the other syntax
form are not available.
In this chapter we will explain how to use the Block Editor. These explanations will be
based on the PC block editor. Differences in how to manipulate the PLC Block Editor
are specifically explained.
8 u Double click a block (block name in the block list) or if you marked a
block prior clicking the icon, the block editor window opens
immediately.
u Activate the New Block command from the block menu.
7 u Press F10. If you marked a block prior clicking the icon the block editor window opens
immediately.
u Press ALT + B, M to activate the Modify command from the block menu
You may also open the PC block editor from the S5 Simulation PLC Status window
by clicking the block editor icon or pressing the F10 key
Note:
When calling the editor from the PLC Block List, the Editor is open and ready to
modify the Blocks stored in the PC.
If you are trying to open a block with the PLC Editor and the same block is already
open in the PC Editor, a warning will be displayed. Editing the same Block with two
editors
You may may
useend
the up withprocedures
same unwanted results.
as described above to open PLC block editor from
the PLC block list.
Figure 4-1 Block editor window (PC block editor, S7 ladder diagram presentation)
Title Bar
S7 Editor Title Bar (Editor – PC source)
The title bar informs you that the S7 Editor has opened the Function Block FB 1 from
the project example.
S5 Editor Title Bar (Editor – PC source).
The Title Bar of the S5 Editor window displays the project name (example), S5 Editor,
and the name of the open block (PB1).
The title bar informs you that the S7 PLC Editor has opened the Function Block FB 1.
S5 Editor Title Bar (Editor – PLC source).
The Title Bar of the S5 Editor window displays S5 PLC Editor and the name of the
open block (PB1).
The three stars (***) after the block name indicat e that the block has been modified
and has not yet been saved.
Menu Bar
The menu bar displays a list of menus. The Menu Names are identical for the S7 and
the S5 Editors. The menu commands vary between the editors. You can open a menu
by clicking on the name of the menu or by pressing the keys ALT and then the
underlined character from the menu name. All the commands from these menus are
described in this chapter.
Tool Bar
The tool bar provides instant access to frequently used S5 / S7 for Windows
commands. This tool bar is the same for all S5 / S7 for Windows application windows.
Click an icon with the mouse and the command is executed. With the keyboard you
can reach these functions via the window menu and/or the function keys.
Tool Bar II
The tool bar II provides instant access to frequently used Editor commands. Click an
icon with the mouse and the command is executed. With the keyboard you can reach
these functions via the menu commands. Also, the segment (network) number and the
Workplace
This is the area where you may generate PLC logic and define the variables (S7 only).
Status Bar
The status bar displays the name and the path of the active PLC project, the progress
of a selected action, or information about the command where the mouse pointer is
located. Also it is indicated whether or not a block has been modified and not yet been
saved.
With commands from the Block menu you can save a block and close the block editor.
You can also save the symbolic table or Undo any modifications from the symbolic
table. The commands from the block menu are the same for all PLC logic
presentations. The block menu for the PC and PLC block editor are the same. Also the
commands for the S7 and the S5 editors are the same.
7 u Press ALT + B.
This command saves the open block. The location where the block is saved depends
on the following:
l The editor was opened from the PC Block List
l The editor was opened from the PLC Block List
l Immediately on Disk was marked on the editor tab of the preference dialog
box (see chapter 3.2.11.2).
l On PC and PLC was marked on the editor tab of the preference dialog box
(see chapter 3.2.11.2).
This command saves the Symbolic Table, currently in the PC RAM, under the same
file name as the PLC project file, with the file name extension .seq.
You should use this command only if you saved the project previously with the
command Save As (see chapter 3.2.4)
7 u Press ALT + B, Y.
This command cancels all the modifications to the symbolic table since the last time
the symbolic table was saved.
7 u Press ALT + B, O.
4.2.1.4 Exit
With the Exit command from the block menu in the editor window, you close the editor
window.
7 u Press ALT + B, E.
The commands from the Modify menu, in the editor window, are used to work with an
existing segment (network) and/or create a new segment (network). The variable table
may also be created or modified (S7 only). In this chapter all the commands from the
Modify menu are explained. Depending on the presentation selected (STL, CSF, LAD,
or Block STL [Source Text]) some commands may not be available. These commands
are displayed in light gray. Only commands displayed in bold black may be used.
7 u Press ALT + M.
S5 / S7 for Windows keeps track of the edits you have made. If you change your mind
or make a mistake, you can usually reverse the last action you have taken.
S5 / S7 for Windows supports the Windows clipboard to move or copy text (STL and
Block STL [Source Text] presentation - segments, steps, transitions, SUL’s -,
comments, symbolic table) within S5 / S7 for Windows or to and from other windows
applications.
l Moving means to remove (Cut) the selected text from one location and insert it in
another location. This could be within the same segment, another segment or block,
comments, symbolic tables, another PLC program or a windows application (e.g. Word
Processor).
l Copying means to make a copy of the selected text and insert it in another
location. This could be within the same segment, another segment or block,
comments, symbolic tables, another PLC program or a windows application
(e.g. Word Processor).
To: Press:
Copy selected text to the clipboard CTRL + INSERT, or CTRL + C, or
ALT + M, C
Move (Cut) selected text to the clipboard + DELETE or CTRL + X, or
ALT + M, T
Paste Clipboard contents into a new location + INSERT, or CTRL + V, or
ALT + M, A
The Delete command from the modify menu is used to delete marked (selected) text.
The Windows clipboard contents are not modified by this command. Deleted text may
only be returned to its original location by executing the Undo command directly after
the deleting the text.
The Add New Segment command from the modify menu adds a new segment
(network) at the end of the block. The new segment is assigned a segment number -
the last segment number in the block plus (1) one.
The Insert Segment (network) command from the modify menu inserts a new
segment directly behind the displayed segment. The new segment is assigned the
segment number of the displayed segment plus (1) one. All segments after the inserted
segment are assigned a new segment number (the old segment number plus (1) one).
7 u Press ALT + M, I.
The segment is deleted.
The Insert Segment command is also used to insert a segment in a step, transition or
SUL.
The Negate command, from the modify menu, changes the selected input from a
normal input to an inverted input or vice versa (inverted input to normal input).
The Negate / Invert command is also used to invert a normally open contact (NO) into
a normally closed contact (NC) or vice versa. To do so the operand must be marked.
l S7 Editor
LAD presentation
Contacts may be negated to use them as normally open (NO) or normally closed (NC)
contacts. Intermediate flags may also be negated.
Figure 4-4 NO (M1.0) and NC (M1.2) contacts and negated intermediate memory bit (M1.1)
CSF presentation
Inputs and outputs from logical connections (AND, OR) with the displayed operand
may be negated.
l S5 Editor
LAD presentation
Contacts may be negated to use them as normally open (NO) or normally closed (NC)
contacts. Intermediate flags may also be negated.
Figure 4-6 NO (F1.0) and NC (F1.1) contacts and negated intermediate flag (F1.2)
CSF presentation
Only inputs from logical connections (AND, OR) with the displayed operand may be
negated.
The Delete Input command is used to delete contacts in the Ladder Diagram
presentation and inputs in the Control System Flowchart presentation. Other logical
elements cannot be deleted by using this command.
LAD presentation
The Delete Input command, from the modify menu, deletes the selected contact to the
right of the insertion point (blue cross). Only contacts may be deleted.
CSF presentation
The Delete Input (Contact) command, from the modify menu, deletes the selected
input or the selected logical connection. A selected input or logical connection is
displayed in dark blue. Only inputs from AND’s and OR’s may be deleted.
The Format command, from the modify menu, formats the created PLC logic (LAD,
STL, and Block-STL [Source Text]) and performs a syntax check. If S5 / S7 for
Windows detects an error, an error message is displayed indicating the incorrect
syntax.
In STL (Block-STL [Source Text]) presentation prompting the error message will
highlight the incorrect syntax.
Note:
STL, Block-STL [Source Text] programming
If the button Format Automatically is marked (Editor tab, Preference dialog box
chapter 3.2.11.2) the syntax is automatically checked when the R ETURN key is
pressed at the end of an edited line. The line is only formatted if the syntax is
correct.
The next line may be edited whether or not the previous line fulfills the syntax.
The Next Window command, from the modify menu, allows you to move the insertion
point (cursor) between the workplaces displayed. This could be a segment (network)
and the displayed symbolic table, a segment and the displayed extended segment
comment, the step sequence overview and a displayed step (transition), etc..
8 u Position the mouse pointer in the display you want to be active (segment / network,
Overview Display, Detail Display, symbolic table or extended segment comment
display) and click the left mouse button.
The Change Type command, from the modify menu, allows you to modify the type of
logical function. This command also changes the type of assignment (coil, output) to an
S (set) or R (reset) type and inverts the intermediate results. You may have to activate
the change type command several times to make the desired element out of an
existing logical element (e.g. change a pulse timer into a stored on-delay timer).
The commands from the Search menu are used to search and replace text strings and
operands in a segment or block. Also, another segment may be opened. In this chapter
all the commands from the Search menu are explained. Depending on the
presentation selected (STL, CSF, LAD, or Block STL [Source Text]) some commands
may not be available. These commands are displayed in light gray. Only commands
displayed in bold black may be used.
7 u Press ALT + S.
The search menu for the PC and PLC block editor are the same. Also, the commands
for the S7 and the S5 editors are the same.
You may restart the search after a text string is found by pressing the F3 key, until the
segment end (STL) or block end (STL-Block [Source Text]) is reached.
7 u Press ALT + S, S.
l Find What:
In the text field Find What enter the text string you want to search for. The text field is
supported by the Clipboard copy function. It is wise to copy the string to search for into
the text field to avoid spelling mistakes.
l Options
The search function allows you to select options on how to handle the search string.
Match Case
If the Match Case button is marked the search function will only find text strings having
the same pattern of uppercase and lowercase letters as the search string.
If the Match Whole Word Only button is marked the search function will only find text
strings having the same length as the search string.
Ignore Spaces
Text strings to search for may have space characters included. To ensure that
differences in the number of spaces will not influence the search function you may
mark the Ignore Spaces button.
l Direction
l Search Area
The search may be performed in the text (Segment/ Network or Block) opened with the
editor or only in the marked portion of the text
l Start Search
The search may start at the beginning of the Segment/ Network or Block or it may start
from the position of the insertion mark (Cursor).
The Replace command opens a dialog box to enter a text string to be searched for
and another text string to replace the located text string.
7 u Press ALT + S, R.
In the STL presentation, the active segment (network) is searched. In Block-STL
(Source Text) the active block is searched.
l Find What:
In the text field Find What enter the text string you want to search for. The text field is
supported by the Clipboard copy function. Make sure that all the required spaces are
included in the search string. Spaces are handled as characters during the search
operation. It is wise to copy the string to search for into the text field to avoid spelling
mistakes.
l Replace With:
In the text field Replace With enter the replacement text string. The text field is
supported by the Clipboard copy function.
l Options
The search and replace function allows you to select options on how to handle the
search string.
Match Case
If the Match Case button is marked the search function will only find text strings having
the same pattern of uppercase and lowercase letters as the search string.
If the Match Whole Word Only button is marked the search function will only find text
strings having the same length as the search string.
With Confirmation
If you mark With Confirmation, and S5 / S7 for Windows finds a match of the text
string, a dialog box will open.
Replace All
Mark the Replace All button if you want to automatically replace all the matching text
strings.
l Direction
The search and replace function may be performed in the upward or downward
direction.
l Search Area
The search and replace function may be performed in the text (Segment/ Network or
Block) opened with the editor or only in the marked portion of the text
l Start Search
The search and replace function may start at the beginning of the Segment/ Network or
Block or it may start from the position of the insertion mark (Cursor).
Use the Search Again command to restart a search after a matching text string was
found (see chapter 4.2.3.1, 4.2.3.2). S5 / S7 for Windows starts the searches for the
next matching text string.
7 u Press F3.
7 u Press ALT + S, O.
l Search for:
In the text field Search for, enter the operand you want to search for. The operand
must be entered in its absolute form. The operand identifier may be entered in lower
case. Spaces are ignored.
l Syntax:
S5 / S7 for Windows allows you to have Blocks in the S5 and the S7 syntax, to be
present in one program. You have to select the syntax of the blocks you want to
search. Mark the corresponding button.
l In all Blocks:
If the button In all Blocks is marked, all the blocks in the selected syntax of the open
project will be searched for the next matching operand.
If the button In all Blocks is not marked only the open block is searched.
If the button In overlaid Operands also is marked, the specified bit is not only found
as a bit but also in a byte or word (etc.). A specified byte is also found in a word.
The block or the total PLC program is searched from its beginning to its end. If an
operand is found, the operand is marked (blue background) and the search is abort ed.
By pressing the F5 key you may restart the search after an operand is found, until the
complete block or the complete PLC program has been searched.
If no matching operand is found, a message box is opened.
Use the Search Operand Again command to restart a search after a matching
operand is found (see chapter 4.2.3.4). The same parameters as the last search are
used and S5 / S7 for Windows searches for the specified operand in the forward
direction.
With the command Next Segment you may open the next segment (network) of the
same block. If you have reached the last segment, the command is deactivated and
the command (icon) changes to a light gray color.
In a step sequence block you may use the command Next Segment to open the next
step, transition or SUL.
In an S7 block you may use the command to go from the Variable Table to the first
Network.
8 u Click Next Segment in the search menu or the Next Segment icon in
the tool bar.
7 u Press F8.
The next segment (network), step, transition or SUL is opened.
The command Next Segment is also used to open the next segment within a step,
transition, or SUL.
With the command Previous Segment you may open the previous segments
(network) of the same block until the first segment of that block is displayed. When you
have reached the first segment (S7 – Variable Table) the command is deactivated and
the command (icon) changes to a light gray color.
In an S7 block you may use the command to go from the first Network to the Variable
Table.
In a step sequence block you may use the command Previous Segment to open the
previous step, transition or SUL.
7 u Press F7.
The previous segment (network), step, transition, SUL, or the S7 – Variable Table, is
opened.
The command Previous Segment is also used to open the previous segment within a
step, transition, or SUL.
With the command Go to you may open any existing segment (network) of the same
Block. If you choose a segment number higher than the last segment number in this
block, the last segment is opened. This command opens a dialog box to enter the
segment number. In a step sequence block you may use the command Go to
Segment to open specific step, transition or SUL.
The commands from the Insert menu are used to insert logical functions in the
workplace. Depending on the presentation selected (STL, CSF, LAD, Block-STL
[Source Text] or step sequence display) not all commands may be available in the
editor. These commands are displayed in light gray. Also some of the commands are
only available with S7 blocks and others only in S5 blocks.
Figure 4-16 Insert menus with the maximum number of possible commands (without / with
graphical Step Sequence programming
7 u Press ALT + I.
Only commands displayed in bold black may be used.
The commands from the Insert menu are described in the chapter describing the
special editor functions concerning the different logic presentations (STL, LAD, CSF,
Block-STL [Source Text] or step sequence display).
The search menu for the PC and PLC block editor is the same.
Figure 4-17 Presentation menu with the maximum number of possible commands (without
graphical Step Sequence programming)
Figure 4-18 Presentation menu with the maximum number of possible commands (with
graphical Step Sequence programming)
The commands from the Presentation menu are used to select the logic presentation
(STL, CSF, LAD, etc.) additional commands are available to configure the appearance
of the presentations. Not all commands may always be available.
Only commands displayed in bold black may be used.
The commands from the Presentation menu are described in this chapter. Two
different Presentation menus are available, one for the STL, LAD, CSF, Block-STL
[Source Text] presentation, and the other for the step sequence editor.
The presentation menu for the PC and PLC block editor are the same.
7 u Press ALT + P.
Note:
All these adjustments are only for the active Editor window. As soon as this window
is closed the default presets are valid (see chapter 3.2.11.2).
In a Statement List, the control task is described with mnemonic abbreviations in the
form of a list. For more details see chapter 3.2.11.2.
l S7 for Windows
In a Statement List (STL), the control task is described with mnemonic abbreviations
in the form of a list. The programming language is based on IEC 1131. When selected,
the editor window displays the network (segment) as a statement list.
l S5 for Windows
In a Statement List (STL), the control task is described with mnemonic abbreviations
in the form of a list. The programming language is based on DIN 19239. When
selected, the editor window displays the segment (step, transition, or SUL in the Detail
Display) as a statement list.
In a Control System Flowchart, the control task is described with symbols. For more
details see chapter 3.2.11.2.
l S7 for Windows
In a Control System Flowchart (CSF), the control task is described with symbols
identical to the symbols used with S5 for Windows . This ensures a smooth transition
from S5 for Windows to S7 for Windows. When selected, the editor window displays
the network (segment) as a control system flowchart.
l S5 for Windows
In a Control System Flowchart (CSF), the control task is described with symbols
based on DIN 40700. When selected, the editor window displays the segment (step,
transition, or SUL in the Detail Display) as a control system flowchart.
In a Ladder Diagram, the control task is described with symbols similar to those used
in circuit diagrams. For more details see chapter 3.2.11.2.
l S7 for Windows
In a Ladder Diagram (LAD), the control task is described with symbols identical to the
symbols used with S5 for Windows . This ensures a smooth transition from S5 for
Windows to S7 for Windows . When selected, the editor window displays the network
(segment) as a ladder diagram.
l S5 for Windows
In a Ladder Diagram (LAD), the control task is described with symbols similar to those
used in circuit diagrams. The symbols are basically NO and NC contacts. Complex
functions are displayed with symbols based on DIN 40700. When selected, the editor
window displays the segment (step, transition, or SUL in the Detail Display) as a ladder
diagram.
A complete block is displayed in the editor window. In the Block-STL, the search and
replace functions may be used to search within an entire block.
7 u Press ALT + P, B.
l S7 for Windows
The Block STL presentation is often preferred to Source Text presentation. If the
editor window is open, a complete block is displayed using statement list presentation.
In front of the actual logic, the Block Header and the Variable Declaration are
displayed.
The structure of the Source Text is based on the IEC 1131 standard. Files saved in
the Source Text format with the file extension *.awl are used to exchange programs
between S7 for Windows and the Siemens S7 programming unit (PU).
In S7 for Windows the Source Text is automatically compiled into the Statement List
whenever the program or blocks are saved, transferred to the PLC, or displayed as a
Statement List.
l S5 for Windows
In a Block Statement List (Block STL ), the control task is described with mnemonic
abbreviations in the form of a list (same as STL). The programming language is based
on DIN 19239. In the editor window a complete block is displayed using statement list
presentation. Each segment is displayed with the segment number, and if entered, with
the segment comment. The start of the segment is indicated with a bracket [ followed
by the segment number. The end of a segment is indicated with a closing bracket ].
An extended segment comment is displayed after the closing bracket of the previous
segment and the opening bracket of the segment the comment is assigned to.
Block STL is not available for step sequence programming (G5 for Windows option).
With this option a graphical display is provided.
7 u Press ALT + P, O.
The operands will be displayed in the active editor window in their symbolic form.
l S7 for Windows
Symbolic Operands
A symbolic operand may have up to twenty-four (24) characters.
Example: Symbolic Operands Form to enter Displayed Symbol
INPUT-Byte-1 #INPUT-Byte-1
OUTPUT-2 "OUTPUT-2"
Flag-Word "Flag-Word"
Symbols defined in the symbolic table are shown in quotation marks "…" , if used in
Statement List (STL), Ladder Diagram (LAD), or Control System Flowchart (CSF)
presentation.
Symbols defined in the variable declaration are shown with the "#" character in front of
the name, if used in Statement List (STL), Ladder Diagram (LAD), or Control System
Flowchart (CSF) presentation.
Usually the quotation marks and the # character must be entered if the symbol is
inserted into the logic. The symbol must be present and clearly identifiable in the
symbolic table or the variable declaration.
Absolute Operands
Absolute operands have an address identifier, a byte or word number, and if
addressing a bit, the bit number is separated by a period. The address numbering of
bytes and words start with zero (0). The maximum number is dependant on the type of
CPU. Bits are numbered from zero (0) to seven (7).
l S5 for Windows
Symbolic Operands
A symbolic operand may have up to twenty-four (24) characters. S5 for Windows can
display up to 24 characters (without a hyphen) in all presentations. The column width is
adjustable to display the entire symbolic operand. The Siemens PU can handle up to
24 characters. In CSF and LAD only the first eight (8) characters are displayed.
Note:
When inserting a symbolic operand into a segment, a leading hyphen must be
entered to identify the input as a symbolic operand. In the symbolic table the
symbolic operands are entered without a leading hyphen.
Absolute Operands
Absolute operands have an identifier, a byte or word number, and if addressing a bit,
the bit number is separated by a period. The numbering scheme of bytes and words
start with zero (0). The maximum number is dependant on the type of CPU. Bits are
numbered from zero (0) to seven (7).
When editing or displaying a PLC program in the statement list editor, it is possible to
display the operand and the symbolic comments, of the operands from the symbolic
table, in the same line. The symbolic comments are displayed in green. If an STL line
comment is inserted, the symbolic comment of that line is automatically removed. The
display of symbolic comments works in the same way for S5 for Windows and S7 for
Windows .
7 u Press ALT + P, Y.
The Symbolic Table may be displayed simultaneously with the selected segment
(STL, CSF, LAD, Block-STL [Source Text] or step sequence presentation). The
symbolic table may also be edited. A marked operand in the segment display is also
highlighted in the symbolic table.
All editor windows display the Symbolic Table in the same form.
7 u Press ALT + P, T.
7 u Press ALT + P, D.
Note:
S5 for Windows In Block-STL presentation, the extended comment is displayed in
front of the segment in the editor workplace. The comment may be edited directly in
the workplace.
S7 for Windows In Block-STL (Source Text) presentation, the extended comment
is displayed as a line comment (starting with // ) directly below the segment
(Network) title. The comment may be edited directly in the workplace.
The automatic format works the same way for S5 for Windows and S7 for Windows .
If the command is not marked, the syntax check and formatting is only done with the
format command (key F9, command format from the modify menu).
7 u Press ALT + P, A.
This command allows you to adjust the size of the displayed PLC logic (CSF and LAD).
Each time you use the Enlarge command, the logic will be displayed in a larger scale.
The Enlarge and the Reduce command provide the tools to momentarily scale the
display of the logic.
8 u Click Enlarge in the presentation menu or click the icon in the tool bar.
Note:
Only scaleable fonts may be enlarged or reduced. All True Type fonts are scaleable.
The default System font is not scaleable
The Reduce and Enlarge function works in the same way for S5 for Windows and
S7 for Windows.
The Reduce and Enlarge function is also available in the Status window.
This command allows you to adjust the size of the displayed PLC logic (CSF and LAD).
Each time you use the Reduce command, the logic will be displayed in a smaller
scale. The Enlarge and the Reduce command provide the tools to momentarily scale
the display of the logic.
8 u Click Reduce in the presentation menu or click the icon in the tool bar.
This command enlarges the lower window, displaying a portion of the symbolic table or
the extended segment (network) comment, to fill the complete editor workspace for
easier editing.
If the command is activated again, the window is reduced to its normal size.
8 u Click Enlarges the Lower Window to Full Screen in the presentation menu
This command opens up the variable table assigned to the block opened with the
editor.
This command can only be used in conjunction with S7 Blocks having a variable table
assigned to.
You can select the fonts for the selected PLC logic presentation (CSF and LAD) within
the step sequence programming detail window. This allows you to momentarily adjust
the fonts. As soon as the editor window is closed the preset font (chapter 3.2.11.4) will
be active again. To enlarge or reduce the displayed PLC logic, a scaleable font (true
type) must be selected. A dialog box will open to select the desired font
7 u Press ALT + P, N.
This command can only be used when an S5 graphical step sequence block is open in
the editor window.
This command allows you to adjust the column width (CSF and LAD) to accommodate
the length of the symbolic operands and the selected font, to be displayed within the
step sequence programming detail window. A dialog box will open to select the desired
column width. As soon as the editor window is closed the preset column width (chapter
3.2.11.2) will be active again. A dialog box will open to select the desired font.
7 u Press ALT + P, C.
Figure 4-19 Column width dialog box (S5 graphical step sequence programming)
G5 for Windows (S5 Graphical Step Sequence Programming) can display a symbolic
operand with up to 24 characters (without a hyphen). To display symbolic operands
with their full-length name, the column width is adjustable. It is insured that the operand
is correctly identified even when the symbolic name is truncated in the display.
The dialog box displays the limits of the column width setting. You can select a column
width between 10 and 26 characters (including the leading hyphen) for the CSF
display. LAD display allows a column width between 12 and 28 characters (including
the leading hyphen).
The number, entered as the column width, is the number of characters spaces it is
possible to display. The width of a character space varies with the font selected and
does not always match the width of other characters. Usually the number of space
characters is slightly higher than the number of characters possible to be displayed in
any given column width.
Figure 4-20 Column width example G5 for Windows (S5 graphical step sequence programming)
7 u Press ALT + P, I.
Figure 4-21 The steps S4, S5, and the transitions T4, T5, T6 are shown in the Overview Display
without comments.
The size of the comment area may be adjusted. The command Comment Area from
the presentation menu opens the Comment Display dialog box.
In the text field Column Width you can define the length of a line to display the
comment. An automatic line wrap is provided.
In the text field Comment Rowsyou can define the number of lines to be displayed in
the comment field.
7 u Press ALT + P, M.
S5 / S7 for Windows User’s Guide
Chapter 4 PC Block Editor Page 190
This dialog box can only be opened when an S5 graphical step sequence block is
open in the editor window.
This command enlarges the Detail Display that displays the logic of a step or transition
in the selected presentation (STL, LAD, CSF) to fill the complete editor workspace for
easier editing.
If the command is activated again, Detail Display is reduced to its normal size.
The Window menu from the editor window is identical with the window menu from the
PC block list window. For more details see chapter 3.5.
The Help menu from the editor window is identical with the help menu from the PC
block list window. For more details see chapter 3.6.
5 S7 Block Editor
In this chapter the methodology on how to create or modify a block, using the Step® 7
syntax, is described.
S7 STL Statement
Symbolic Address
l Jump Label
The destination of a jump instruction is indicated with a label. The label may have up to
four (4) characters. The first character must be an alpha character. The destination
label itself is terminated with a colon (:) (e.g. TEST:).
l Instruction
In the instruction field of a statement what the CPU should execute is defined (e.g. A
for AND, O for OR, XOR for an excusive OR, T for a transfer, etc.).
The S7 for Windows Format (F9) command converts all typed characters into capital
letters and puts them into the instruction field column.
S7 for Windows supports all the instructions available in the Siemens S7-300 / 400
PLC series. A list of the instructions that your particular CPU can support will be found
in the instruction list manual for that CPU.
l Operand Field
In the operand field of a statement who should participate, when the instruction is
executed by the CPU, is defined. This could be an addressed absolute operand (e.g.
QB47), a defined symbolic variable (e.g. Limit_Switch), or a constant (e.g.
DW#16#87000000), etc. Some instructions do not require an operand.
l Absolute Operands
Identifiers:
S7 for Windows supports all the instructions available in the Siemens S7-300 / 400
PLC series.
The S7 for Windows command Format (F9) converts all identifier characters into
capital letters and puts inserts them into the appropriate column.
Parameters:
A parameter is an address made up of numbers. The S7 for Windows Format (F9)
command does not change the address but inserts it into the appropriate column.
l Symbolic Addresses
The S7 programming syntax differentiates bet ween global and local symbols. These
symbols are referred to in the literature as a Global Variable or a Local Variable,
respectively. Symbolic Addresses (global and local variables must be typed in the
statement in the same form as they are declared, with regard to lower and upper case
letters. The S7 for Windows Format (F9) command does not change the variable but
inserts them into the appropriate column.
Global Variable:
Global symbols (symbolic operands) are defined in the symbolic table. A symbolic
operand is assigned to an absolute operand. This declaration must be done prior to
using the symbolic operands in the STL editor. A Global variable must be clearly
defined for all blocks and may be used throughout the whole PLC program.
Local Variable:
A Local variable is defined in the variable table assigned to a specific block and can
only be used during the execution of that block. An exception to this rule is local
variables may be transferred to another block. A Local variable must be clearly defined
for the assigned block and the block the variable may be transferred to.
l Comments
Each statement line may have a comment assigned to it. The optional comment starts
with two (2) slash characters (//) and is valid up to the end of the line. The comment
may have up to 160 printable characters.
A comment may also be entered into a separate line. This line must starts with two (2)
slash characters (//).
The S7 for Windows Format (F9) command does not change the comment but inserts
it into the appropriate column.
Note:
The maximum length of an STL line may not exceed 200 characters (including the
command and any spaces).
The editor may be called from the PC Block List or the PLC Block List window using
the same commands.
8 u Double click a block (block name in the block list) or, if you have
marked a block prior clicking the icon, the block editor window opens
immediately.
u Activate the New Block command from the block menu.
7 u Press F10. If you have marked a block prior clicking the icon the block editor window
opens immediately.
u Press ALT + B, M to activate the Modify command from the block menu
If a block is open in the status display you may click the editor icon or press F10 to
open the corresponding network in the editor.
Select the tools with a mouse or with the function keys (see S5 / S7 for Windows
function - key template). The tool bar II displays the number of the open network
(Segment) and the total number of networks. If tool bar II displays "Variables Table",
the table is opened in the STL editor workplace and is ready to except local variable
declarations. A dialog box is provided to enter local variable decla rations (see chapter
5.4.2)
Within the workplace you can enter text at any position by moving the insertion point to
that position.
With the I NSERT key you can switch in and out the type over mode. By default, S7 for
Window makes room for new characters that you type by moving existing characters to
the right. You can change the insert mode and have S7 for Windows replace existing
characters with new characters. This is called type over and is indicated by the
insertion point cursor.
l Insert mode The cursor appears as a small, blinking, vertical line. The
insertion cursor fits between two characters.
l Type Over mode The cursor appears as a blinking black rectangle. The over type
cursor covers one character.
To move Press
Workplace one line up CTRL +
Workplace one line down CTRL +
To the end of a line E ND
To the beginning of a line HOME
Up one screen P AGE UP
Down one screen P AGE DOWN
To the end of the network CTRL + END
To beginning of the network CTRL + HOME
8 u Selecting text using the mouse
u Do one of the following:
To select Do this
Any amount of text Drag over the text you want to select.
A word Double-click the word.
Note:
The right mouse button may be used within the S7 STL Editor. If the right mouse
button is clicked, a menu with commands to be used in the S7 STL Editor is
opened.
Figure 5-4 Menu opened with the click of the right mouse button
With the commands from the Block menu you can save a block and close the block
editor. The block menu for the block editor S7 PC STL - presentation and S7 PLC
block editor STL - presentation, are the same. Also the commands for the STL and the
Block STL (source text) editors are the same.
For more details on the commands of the Block menu see chapter 4.2.1.
The commands from the Modify menu in the editor window are used to work with an
existing segment (network) and/or create a new segment (network).
In STL and the Block STL (source text), text may be displayed in bold black. The
commands for the STL and the Block STL (source text) editors are the same.
For more details on the commands of the Modify menu see chapter 4.2.2.
The commands from the Search menu are used to search and replace text strings and
operands in a segment or a block. Also another segment may be opened. The search
menu for the block editor S7 PC STL - presentation and S7 PLC block editor STL -
presentation, are the same. Also the commands for the STL and the Block STL (source
text) editors are the same.
For more details on the commands of the Block menu see chapter 4.2.1.
7 u Press ALT + I.
Figure 5-6 Insert menu, STL Editor and Block -STL (Source Text) Editor
The commands displayed in light gray are not available when the STL Editor or the
Block -STL (Source Text) Editor are open. They are reserved and are available with
the LAD or the CSF editor.
The command S7 Block call opens a dialog box displaying a list of the available
blocks that it is possible to call. These are not only the blocks displayed in the PC block
list but also all System Functions (SFC) and the System Function Blocks (SFB).
7 u Press ALT + I, 7.
The command can only be executed if a block or network has been opened with the
STL Editor. The command is not available if the Declaration Table is open.
Figure 5-7 The command S7 Block call opens an S7 System Functions dialog box
The CALL instruction is used for an absolute block call. With a CALL instruction,
Functions (FC), Function Blocks (FB), System Functions (SFC), and System Function
Blocks (SFB) can be opened for execution. The call is independent of any condition
and is always executed. Organization blocks (OB) cannot be opened with the CALL
instruction. Organization Blocks (OB) are only called for execution by the PLC
operating system. The CALL instruction is also used to open the Instance Data Block
assigned to a Function Block.
The insertion mark must be placed at the beginning of the line you want to place the
CALL instruction prior to the opening of the dialog box.
u Mark the block (blue background) that you want to call with the CALL instruction and
confirm with the OK button.
If a Function Bloc k (FB) is selected, an additional dialog box is opened to select the
Instance Data Block (DB). When calling a Function Block (FB) an Instance Data Block
must be assigned.
u Mark the Data Block that you want to assign to the Function Block (FB) as its Instance
Data Block and confirm with the OK button.
An example of the Select Instance Data Block (DB) is shown in figure 5-8. The figure
5-11 shows the STL presentation of an FB Call with an Instance DB.
The CALL instruction is inserted if a Function (FC) is called and the assigned block
By editing the Place Holders (M 0.0, MD 0) you can enter the actual variables that are
handling the assignment to the block parameters. Figure 5-10 shows an example of
the edited block CALL with the actual variables assigned to the block parameters.
Figure 5-10 Function CALL with the assignment of the actual variables
Table 5-1 Function CALL with the assignment of the actual variables
Figure 5-11 CALL of the Function Block (FB53) with Instance Data Block (DB33) and with the
assignment of the actual variables
The actual parameters (M0.0, Data_1, and Data_2) are supplying the data for the
formal parameter (Input_Value, Output_Sum, and Calc_Value).
The command Variable Declaration opens a dialog box to assign the variable name
and select the data type and its format.
The insertion mark must be placed at the beginning of a line prior to the opening of the
dialog box. The variables are automatically sorted by type when the format command
(key F9) is executed.
7 u Press ALT + I, D.
The command can only be executed if the Declaration Table is opened with the STL
Editor. The command is not available if the block or a network is open.
Name:
Type the name of the variable into the input field. The name can have up to 24
alphanumeric characters (ASCII 33 up to ASCI 126). The first character must be an
alpha character. Special characters (e.g. space) are not permitted.
Area
Formal Parameter Available with the following block type
(Declaration)
Temporary Data FB FC OB
The declaration (Area) defines how the block being called uses the variable.
Depending on the block type a variable may be used in five (5) different ways
IN Variable
The Input Parameter IN defines that the parameter is an input. The block called can
only read the input parameter.
OUT Variable
The Output Parameter OUT defines that the parameter is an output. The block called
can only write to the output parameter.
IN_OUT Variable
The In /Out Parameter IN_OUT defines that the parameter can be used as an input
and an output. The block called can read, modify and write back to the in / out
parameter.
STAT Variable
The static local variables STAT are used only within a Function Block. The static local
variable saves data by storing its value in the instance data block (retentive data).
TEMP Variable
The temporary variables TEMP are saved in the local L-Stack. They are only used
within the block and are valid as long as the block is executed. The date is cleared
after the execution of the block is terminated (non retentive data).
WORD 16 Bit
16 Bit hex W#16#0000 (min)
W#16#FFFF (max)
16 Bit bin 2#0000_0000_0000_ 0000 (min)
2#1111_1111_1111_ 1111 (max)
Counter value C#000 (min)
3 Decades. BCD C#999 (max)
2 x 8 Bit decimal B(0,0) (min)
without Sign B(255,255) (max)
DWORD 32 Bit
Double Word DW#16#0000_0000 (min)
32 Bit hex DW#16#FFFF_FFFF (max)
32 Bit bin 2#0000_0000_0000_ 0000_0000_
0000_0000_0000 (min)
2#1111_1111_1111_ 1111_1111
1111_1111_1111 (max)
4 x 8 Bit decimal B(0,0,0,0) (min)
without Sign B(255,255,255,255) (max)
INT 16 Bit -32 768 (min)
Integer +32 767 (max)
S5TIME 16 Bit
Time value in S5T#0MS (min)
S5 Format S5T#2H_46M_30S (max)
TIME 32 Bit
Time value in T#-24D_-20H_ -31M_-23S_-648MS (min)
IEC Format T#24D_20H_31M_23S_647MS (max)
TIME_OF_DAY
32 Bit TOD#00:00:00 (min)
Time of day TOD#23:59:59.999 (max)
BOOL
A variable of the data type BOOL (binary operand) is represented as a single bit value.
The variable may have the values TRUE (0) or FALSE (1).
BCD Numbers
BCD Numbers and the counting values of the counters are special forms of the dat a
type BYTE, WORD, DWORD. They also are comprised of 8, 16 or 32 Bits. The value
range available for a 16 bit BCD number is 0 to +/- 999 and
0 to +/- 9 999 999 for a 32 bit BCD number.
CHAR
A variable of the data type CHAR (digital operand) is a bit pattern of 8 bits and is used
to represent ASCII characters.
l Number Presentations:
INT
A variable of the data type INT is an integer number (fixed point value). The integer
number uses a 16 bit wide word. Numbers with a sign between -32 768 (min. value)
and +32 767 (max. value) can be represented.
DINT
A variable of the data type DINT is an integer (double integer) number (fixed point
value). The double integer number uses two (2) 16 bit wide words with a total of 32
bits. Numbers with a sign between -2 147 483 648 (min. value) and
+2 147 483 647 (max. value) can be represented. Values entered are automatically
converted when unequivocally defined in the presentation L#(value).
REAL
A variable of the data type REAL represents a fraction (number with a decimal point).
The variable is stored as a 32 bit floating point number with a 23 bit mantissa as an
exponent (to base 10) with 8 bits, and a sign with 1 bit.
The range value of the normalized floating point numbers are as followed:
+38 -38
-3,402 828 x 10 up to –1,175 494 x 10
±0
-38 +38
+1,175 494 x 10 up to +3,402 828 x 10
This value range can be used with all S7-300 / 400 CPU’s with the maximum accuracy.
S7-400 CPU’s also have an extended range of normalized floating point numbers with
reduced accuracy. The range value with the reduced accuracy of the normalized
floating point numbers are as followed:
-38 -45
-1,175 494 x 10 up to –1,401 298 x 10
and
-45 -38
+1,401 298 x 10 up to +1,175 494 x 10
In a PC the floating point numbers are represented in a different form than in the S7-
300/400 CPU's. Therefore, it is possible, because of rounding inaccuracies during the
conversion, the floating point numbers displayed are theoretically accurate. The
inaccuracy of the floating point number that is displayed has no influence in the S7-
300/400 CPU's. They always calculate internally with their maximum accuracy.
S5TIME
A variable of the data type S5TIME (S5T) enables the use of a time constant
presentation equal to the format used with Step® 5. The variable occupies a 16 bit
word divided into 1 + 3 decades.
The single decade represents the multiplication factor and the three (3) remaining
decades represent the time value in BCD (000 up to 999). The multiplication factor
may have the following values: 0 = 10ms, 1 = 100ms, 2 = 1s und 3 = 10s
The S5TIME (S5T) is always entered in the following presentation:
S5T#0MS (minimum) up to S5T#2H_46M_30S (maximum).
The accuracy can be 10ms, 100ms, 1s or 10s.
Internal
Value Range Accuracy Example
Presentation
L S5T#9S_990MS
10ms up to 9s 990ms 10ms 0 000 0 999
L W#16#0999
L S5T#1M_39S_900MS
100ms up to 1m 39s 900ms 100ms 1 000 1 999
L W#16#1999
L S5T#16M_39S
1s up to 16m 39s 1s 2 000 2 999
L W#16#2999
L S5T#2H_46M_30S
10s up to 2h 46m 30s 10s 3 000 3 999
L W#16#3999
DATE
A variable of the data type DATE is internally stored in a 16 bit word as an integer
(fixed point) value without a sign. The fixed point number represents the number of
days since the 01.01.1990.
The variable DATE is presented in the form; Year, Month, Day separated from each
other with a hyphen (-). S7 for Windows allows you to enter the character "D" or "d" to
identify the key word DATE. The characters "D" or "d" are automatically converted in
the key word DATE.
TIME
A variable of the data type TIME (time duration) is internally stored in a 32 bit double
word as an integer (fixed point) value with a sign.
The fixed point number represents the number of days (d), hours (h), minutes (m),
seconds (s), and milliseconds (ms) of the time duration. Single information may be
omitted.
S7 for Windows allows you to enter the character "T" or "t" to identify the key word
TIME.
The characters "T" or "t" are automatically converted in the key word TIME. Also the
underlined character ( _ ) separating the individual pieces of information may be
omitted. The characters (d, h, m, s, ms) define the information clearly.
TIME_OF_DAY
A variable of the data type TIME_OF_DAY (time of the day) is internally stored in a 16
bit word as an integer (fixed point) value without a sign. The fixed point number
represents the number of milliseconds (ms) since the beginning of the day (midnight
0:00 hour).
The variable TIME_OF_DAY is presented in the form; Hour, Minute, and Second
separated from each other with a colon (:) followed by the milliseconds separated with
a decimal point. The milliseconds information may be omitted.
S7 for Windows allows you to enter the short form "TOD" or "tod" to identify the key
word TIME_OF_DAY. The short form "TOD" or "tod" is automatically converted in the
key word TIME_OF_DAY.
Example: L TOD#17:37:11.120 L DW#16#03C7_E1D0
L TOD#08:22:14 L DW#16#01CB_CEF0
Variables with Complex Data Types can only be declared in Data Blocks (global or.
instance Data Blocks), in the local stack area (L-Stack) or as a block parameter.
DATE_AND_TIME
A variable of the data type DATE_AND_TIME (date and time) represents a specific
moment (time). The key word is structured from the information; Year, Month, Day,
Hour, Minute, Second, and Millisecond. The year, month, day, and hour are separated
with a hyphen (-).
Between the hour, the minute and second a colons (:) must be set followed by the
milliseconds separated by a decimal point. The millisecond information may be
omitted.
S7 for Windows allows you to enter the short form "DT" or "dt" to identify the key word
DATE_AND_TIME. The short form "DT" or "dt" is automatically converted in the key
word DATE_AND_TIME.
STRING
A variable of the data type STRING is a character string made up of ASCII characters.
STRING can reserve memory space for up to 254 characters.
With the variable declaration the number of characters can be set. If the numbers of
characters are not defined, the STRING sets the field length to 254 characters.
Within a Function (FC) STRING must always be set to a length of 254 characters. In
other words, within a Function the STRING may not have a length definition or the
length definition must be set to 254.
Example
ARRAY
A variable of the data type ARRAY is made up of variables having the same data type
that forms a field. The size of the field is set in the declaration. Multi dimensional fields
with up to six (6) dimensions are possible.
Declaration:
STRUCT
A variable of the data type STRUCT is made up of variables having different data types
to form a field. The size of the field is set in the declaration.
With the declaration, the keywords, STRUCT and END_STRUCT, are the limits of the
"Structured Field ".
Between the key words (limits) the single elements of the field are defined with their
data types.
Example:
Structured field name : STRUCT
Element_1 : Data type : = Preset
Element_2 : Data type : = Preset
Element_3 : Data type : = Preset
…...
Element_n : Data type : = Preset
END_STRUCT
Figure 5-13 Variable declarations in a Data Block with starting values (presets)
Address
The address column displays the relative starting address of the variable. The
difference between two addresses is the amount of bytes the variable occupies in
memory.
Name
The name is freely selectable. In the example, the variable type, with an underline
character ( _ ) in the front has been used for the name.
Type
In the Type column the type of declared variable is displayed.
Starting Value
In the example, a starting value (preset) has been assigned to the variables. The value
of the preset is shown in the column.
UDT
User defined data types (UDT) are used whenever a name should be assigned to a
"Data Structure ". This is required whenever Composite Data Types, having no name,
should be used several times in the declaration.
In the Symbolic Table, names are assigned to the user defined data types (UDT) (UDT
0 up to UDT 65 535). The UTD's are valid globally and may, after being declared, be
used in all blocks of the PLC program.
A UTD is programmed much like a Data Block that has. According to its structure the
UDT can only use the data type STRUCT.
l Parameter types
In addition to the Basic Data Types and the Composite Data Typesfor
parameterized Blocks, Formal Operands can be declared. The size (in bits) defines
the amount of memory the Block Parameter would use in a Function Block (FB). The
key words TIMER and COUNTER are also used as a data type in the symbolic table to
define timer functions and counter functions.
ANY 80 Bit ANY is used whenever the data type P#M40.0 BYTE 6
of the Actual Operand is defined to
be "any data type"
Timer, Counter
These parameter types are used to define the Formal Operand parameter of the timer
functions (TIMER) and the counter functions (COUNTER).
BLOCKxx
PLC Blocks (Code Blocks) can be transferred with the help of the parameter types
BLOCK_FC or BLOCK_FB as a parameter of the called Block. Only Blocks not having
a transfer parameter and / or static variables (BLOCK_FB), can be transferred (handed
over) as an Actual Operand (FCn; FBn).
From the Block that is called the formal PLC Blocks (Code Blocks) can only be called
by using the instructions UC or CC. It is not permitted to use the instruction "CALL" to
call the formal PLC Block (Code Block)
The transfer (hand over) of Data Blocks (DBn) and System Data Blocks (SDBn) and
the transfer of the related instructions has no limitations according to the formal
parameter.
POINTER
A pointer of the type POINTER is a variable containing the address of another variable.
If a formal parameter of the type POINTER is defined, the address is given by the
actual parameter.
Example: P#M20.0 The POINTER points to the memory bit M20.0. Starting
with this position the memory bit M20.0 the contents of
the memory is interpreted to be data.
ANY
In a pointer of the type ANY, the data type of the actual parameter can be "any data
type". An actual parameter transferred (handed over) as a pointer that has the type
ANY, defines the beginning and the size of a data area.
Example: P#M40.0 BYTE6 The pointer type ANY points to the memory bit
M40.0 and defines the data area size with six (6)
bytes. The contents of the memory bytes MB40 up
to MB45 are interpreted to be data.
Block Header
Information about the block is entered in the block header. The block header starts with
the identification of the block type (see table 5 – 7) followed by the block title (key word
TITLE). The title may be up to 64 characters long.
The optional block comment starts with to slash characters ( // ) and can be up to 18
kBytes long. If the Emphasize S7 Syntax has been marked all optional comments are
displayed in green color.
All the information in the block header, except the block type, is optional. If a block title
is entered the title must be entered in the line following the block type. All other
information may be entered without regard to any fixed order.
The format command (key F9) of S7 for Windows sorts all the additional information
into the required lines (see table 5 – 7). Special care must be taken when entering the
key word KNOW_HOW_PROTECTION. See chapter 5.5.1 for a detailed description.
VAR_INPUT VAR_INPUT
Input parameter Input parameter
END_VAR END_VAR
VAR_OUTPUT VAR_OUTPUT
Output parameter Output parameter
Variable Declaration
END_VAR END_VAR
VAR_IN_OUT VAR_IN_OUT
In / Out parameter In / Out parameter
END_VAR END_VAR
VAR VAR
Static local data Static local data
END_VAR END_VAR
Table 5-9 Structure and Key Words of Blocks in Source Text Presentation
Variable Declaration
In the Varia ble Declaration all the local variables of the block are defined. The variable
types must be defined in the order given in the table 5 – 7. No order within the variable
type is required. Unused variable types must be omitted. Not all variable types can be
used in all blocks.
A variable is declared as followed:
The Preset of the variable and the Comment can be omitted. Not all variables can
have a preset value. Specifically, temporary local variables cannot have a preset value.
Example of a Variable Declaration:
Sum : INT = +4711; //Calculated Sum
Spaces between the single components can be omitted. The format command (key F9)
of S7 for Windows puts additional spaces into the variable declaration for easier
reading and deletes spaces not required.
Block Global Data Block Global Data Block with UDT Instance Data Block
Declaration STRUCT
Name : Type: = Preset UDT name Input parameter
The Preset of the variable and the Comment can be omitted. All variables can have a
preset value.
Example of a Variable Declaration:
Sum : INT = +4711; //Calculated Sum
No order within the variable type is required. Spaces between the single components
can be omitted. The format command (key F9) of S7 for Windows puts additional
spaces into the variable declaration for ease of reading and deletes spaces not
required.
With STEP® 7 it is possible to set an attribute in the block header that will disable the
access to the instruction section of a block.
The attribute is entered in the source text with the key word KNOW_HOW_PROTECT.
As soon the block is compiled into STL format, the instruction section of a block is
hidden. Only the block header and the variable declaration section can be accessed
(opened and modified). The compilation of a block cannot be revered.
Attention
Make sure that the block you want to protect has been exported prior to the setting
the attribute KNOW_HOW_PROTECT in the block header.
To reverse the protection you may import the unprotected block, anytime, without
renaming the whole program. Only the protected block is overwritten.
Example:
Function FC 43 with full access. The attribute KNOW_HOW_PROTECT is not set. The
block header, the declaration, and the instruction section are displayed.
Note:
You may enter the attribute keyword KNOW_HOW_PROTECT in any separate line
of the block header as long as this line is after the TITLE line.
The format command (key F9) puts all the header attributes in the desired lines and
changes all lower case key word letters into upper case letters.
7 u Press F9
The editor will only display the block header and the declaration part. The attribute
key words
The commands from the Presentation menu are used to select the logic presentation.
Additional commands are available to configure the appearance of the presentations.
All commands are available in STL presentation. For details on the commands of the
presentation menu see chapter 4.2.5
The Window menu of the editor window is identical with the window menu of the PC
block list window. For more details see chapter 3.5.
The Help menu of the editor window is identical with the help menu of the PC block list
window. For more details see chapter 3.6.
In the CSF editor you can build PLC logic by moving the insertion point to a given
position and inserting function symbols.
The S7 for Windows CSF graphical editor works in the insertion mode only. The CSF
editor differentiates between the comment position (network comment), the operand
positions, and the function symbol positions.
The Network (Segment) Comment field starts in the upper left corner of the
workplace. The field is a single line and may be up to sixty (60) characters wide. The
width can currently be adjusted with the S5 for Windows selection; Maximum
Command Comment (see chapter 3.2.11.5).
The insertion mark may be moved freely within the comment field. In an empty
command field the insertion mark is always positioned at its beginning.
The Operand position fields are defined by the function symbols. The insertion mark
may be moved freely within the comment field. In an empty command field the
insertion mark is always positioned at its beginning.
The Function Symbol positions are defined as follows:
The first function symbol is positioned automatically. The position of the insertion mark
is ignored.
To add a function symbol the insertion mark must be positioned at the desired input or
output of the function symbol. To insert a function symbol in an existing segment the
insertion mark must be positioned at the output of the function symbol that the inserted
function should follow.
To move Press
One character to the left
One character to the right
To move Press
To move Press
From one operand to the next TAB or È
One position up (or left)
One position down (or right)
To the beginning of the segment comment HOME
Select the tools with the mouse or with the function keys (see S7 for Windows Function
- Key Template). The segment (network) number and the total number of segment
(network) are displayed.
7 Key F8.
Open the Previous Network. If Network one (1) is opened the variable
declaration table is opened
7 Key F7.
Activating this function will Enlarge the PLC logic displayed in CSF
presentation. The selected font must be scaleable.
7 Key CTRL + G.
Activating this function will Reduce the PLC logic displayed in CSF
presentation. The selected font must be scaleable.
7 Key CTRL + S.
7 Key + F3.
Invert the selected Input at the function symbol (AND, OR). The input to
be negated could be an output of another function (AND, OR). To negate
an intermediate result the command Change Type (Modify menu, Key
A LT + F9) must be used.
7 Key + F4.
7 Key + F1.
Insert an OR function.
7 Key + F2.
7 Key + F5.
7 Key + F6.
7 Key + F7.
7 Key + F10.
7 Key + F9.
7 Key ALT + I, X.
7 Key ALT + I, E.
7 Key ALT + I, N.
Note:
The right mouse button may be used with the S7 Control System Flowchart (CSF)
Editor. If the right mouse button is clicked, a menu of the commands available in
the S7 CSF Editor is opened.
The commands available are all the commands from the Insert menu plus some
commands from the Modify menu. These commands give you full control to
generate or change the PLC logic, displayed in the workspace, of the S7 Control
System Flowchart (CSF) Editor window.
With the commands from the Block menu you can save a block and close the block
editor. The block menu for the block editor, S7 PC CSF - presentation, and S7 PLC
block editor CSF - presentation, are the same.
For more details on the commands of the Block menu see chapter 4.2.1.
The commands from the Modify menu in the CSF presentation are used to work with
an existing network and/or create a new network.
7 u Press ALT + M.
The Negate command, from the modify menu, changes the selected input from a
normal input to an inverted input or vice versa (inverted input to normal input). Inputs
being connected to another logical device may also be negated.
u Mark the input (the name of the input) or the logic connected to the input of another
logical device. The selected logic connected to the input is displayed in dark blue (see
figure 5-19).
8 u Click the Negate icon in the tool bar or the Negate command in the
modify menu.
7 u Press + F4.
The Delete Input command, from the modify menu, deletes the selected input or the
selected logical connection. A selected input or logical connections (one or more
function symbols) are displayed in dark blue. Only inputs from an AND function symbol
or an OR function symbol may be deleted.
8 u Click the Delete icon in the tool bar or the Delete Input command in
the modify menu.
Examples:
A marked input may be deleted with the Delete Input command.
The Format command, from the modify menu, in the S7 CSF Editor is used to format
and to check the syntax of the variable declaration table. The variables are sorted into
their predefined order and the starting addresses are assigned.
The Change Type command, from the modify menu, allows you to modify the type of a
logical function. This command also changes the type of an assignment to an S (set) or
R (reset) type. You may activate the change type command several times to change,
for example, a pulse timer into a latched on-delay timer.
Figure 5-24 Change Type, Pulse Timer, Extended Pulse Timer, ON-Delay Timer, Latching ON-
Delay Timer, OFF-Delay Timer
Figure 5-26 Change Type, Equal, Not Equal, Bigger, Bigger or Equal, Less, Less or Equal
Figure 5-28 Change Type, Positive Edge Evaluation, Negative Edge Evaluation
The commands from the Search menu in the CSF presentation are used to review or
change text in the displayed segment and to move to another segment.
In CSF presentation the commands displayed in bold black may be used. The
commands displayed in light gray may be used in STL, LAD, and /or Block-STL
(Source Text) presentation.
7 u Press ALT + S.
The commands Search for, Replace, and Search again are not available in CSF
presentation. For detailed information on the commands from the modify menu see
chapter 4.2.5.4 – 4.2.58.
The commands from the Insert menu in the CSF Editor are used to insert logical
functions into the workplace to build a segment. The commands are identical with the
corresponding icons from the S7 - CSF Editor Toolbar (see chapter 5.6.2). The
commands Timer, Counter, Comparator, and FB Call, open dialog boxes. In CSF
presentation the commands displayed in bold black may be used. The commands
displayed in light gray may be used in STL, LAD and /or Block-STL (Source Text)
presentation.
7 u Press ALT + I.
Note:
The command Variable Declaration is available as soon as the variable declaration
table is displayed in the S7 Block Editor (CSF presentation) work place.
The command FB Call… opens a dialog box to select all types of blocks to call.
The command Input adds an additional input to an existing AND function symbol or an
OR function symbol.
To add an input mark one of the inputs of the function symbol. The operand
(placeholder) at this input is displayed with a blue background. If an input connected to
an output of the previous function symbol was marked, the entire function symbols
beyond the input are displayed in blue.
8 u Click the Input icon in the tool bar or the Input command in the insert
menu.
7 u Press + F3
Example:
An AND function symbol with an additional input. One input is marked to add an
additional input.
8 u Click the Input icon in the tool bar or the Input command in the insert
menu.
7 u Press +F1.
8 u Click the OR icon in the tool bar or the OR command in the insert
menu.
7 u Press + F2.
The command SR Flip Flop inserts a SR Flip Flop with a dominating reset input.
To add a SR Flip Flop function symbol, position the insertion mark at the required
position. For information on how to position the insertion mark see chapter 5.6.1
8 u Click the SR Flip Flop icon in the tool bar or the SR Flip Flop
command in the insert menu.
7 u Press + F5.
8 u Click the RS Flip Flop icon in the tool bar or the RS Flip Flop
command in the insert menu.
The command Timer opens a dialog box to select the timer function. Five different
timers are available.
To add a timer function symbol, position the insertion mark at the required position. For
information on how to position the insertion mark see chapter 5.6.1.
8 u Click the Timer icon in the tool bar or the Timer command in the insert
menu.
7 u Press + F6.
7 u Press P.
t 1 t 2
RLO at
Start input
Timer running
7 u Press E.
t 1 t 2 t 3
RLO at
Start input
Timer running
7 u Press R.
t 1 t 2
RLO at
Start input
Timer running
7 u Press S.
t 1 t 2 t 3
RLO at
Start input
t
Timer running
RLO at
Reset input
Scan for
one(1)
Scan for
zero(0)
7 u Press F.
t 1 t 2 t 3
RLO at
Start input
Timer running
Scan for
one(1)
Scan for
zero(0)
The command Counter opens a dialog box where you can select the counter function.
Two different counters are available, an up counter and a down counter.
Basically both counters are the same. Because of the arrangement of the function
symbol the first input must be used. For the up counter this is the input that increments
the counts. For the down counter this is the input that decrements the counts. Both
counters provide a second input (this input doesn’t have to be used) for the opposite
count direction.
8 u Click the Counter icon in the tool bar or the Coun ter command in the insert menu.
7 u Press + F7.
l Insert an Up Counter
7 u Press U.
7 u Press D.
The command Comparator opens a dialog box to select the compare functions. Six
(6) different comparators are available.
7 u Press ALT + I, P.
l Insert a Comparator
7 u Press F, D, or G.
u Press 1, 2, 3, 4, 5, or 6
A Comparator function symbol is inserted.
The command FB Call opens a dialog box displaying a list with all the blocks available
to be called. These are not only the blocks displayed in the PC block list but also all
System Functions (SFC) and the System Function Blocks (SFB).
The CALL function symbol is used for an absolute block call. With a CALL function
symbol; Functions (FC), Function Blocks (FB), System Functions (SFC), and System
Function Blocks (SFB) can be opened for execution. The call is independent of any
condition and is always executed. Organization blocks (OB) cannot be opened with the
CALL instruction. Organization Blocks (OB) are only called for execution by the PLC
operating system. The CALL function symbol may also be used to open the Instance
Data Block assigned to a Function Block.
8 u Click the FB Call icon in the tool bar or the FB Call command in the
insert menu.
Figure 5-51 The command FB Call opens a S7 System Functions dialog box
u Mark the block (blue background) you want to call with the CALL function symbol and
confirm with the OK button.
If a Function Block (FB) is selected, an additional dialog box is opened to select the
Instance Data Block (DB). When calling a Function Block (FB), an Instance Data Block
must be assigned. Mark the Data Block you want to assign to the Function Block (FB)
as its Instance Data Block and confirm with the OK button. An example of the Select
Instance Data Block (DB) is shown in figure 5-52. The figure 5-53 shows the function
symbol of an FB Call.
The CALL function symbol is inserted if a block with its assigned block parameters is
called (e.g. Function (FC), etc.). The name of the block and the assigned parameters
are displayed in the CALL function symbol. Input parameter are shown at the left side,
output parameter are shown on the right side. The names of the parameters
(operands) may not be displayed in their full length. Truncated names are indicated
with a colon after the truncated name.
Figure 5-54 CALL function symbol with the assignment of the actual variables
Table 5-17 Function CALL with the assignment of the actual variables
Figure 5-55 CALL of the Function Block (FB23) with instance Data Block (DB23)
By editing the Place Holders (W#16#0, MW0, MD0, M0.0) you can enter the actual
variables handling the assignment to the block parameters.
The actual parameters (W#16#0, MW0, MD0, M0.0) supplying the data for the formal
parameter (IN_V., OUT_., and IN_O.).
8 u Click the Assignment icon in the tool bar or the Assignment (Coil)
command in the insert menu.
7 u Press + F9.
8 u Click the XOR icon in the tool bar or the XOR command in the insert
menu.
7 u Press + F9.
8 u Click the FP icon in the tool bar or the Positive Edge command in the
insert menu.
7 u Press ALT + I, P.
To add an edge evaluation function symbol, position the insertion mark at the required
position. For information on how to position the insertion mark see chapter 5.6.1.
1 2 3 4 5
Input (M 1.0)
(RLO prior FP)
1 The Input signal (M1.0) and the Flange Memory (FP=M1.1) are low. The Pulse Memory
(M1.3) remains reset.
2 The Input signal (M1.0) changes to its high level. The CPU detects the "Positive
Flange" by comparing the current RLO (M1.0) with the Flange Memory (FP=M1.1). If
the current RLO (M1.0) is "1" and the Flange Memory (FP=M1.1) status low (0) the
Flange Memory (FP=M1.1) is set to high (1). Also the current RLO and the Pulse
Memory (M1.3) are set to high (1).
3 During the next cycle, the CPU detects whether or the levels of the Input signal (M1.0)
and the Flange Memory (FP=M1.1) are the same. Therefore, the current RLO and the
Pulse Memory (M1.3) are reset to low (0).
4 As long as the levels of the Input signal (M1.0) and the Flange Memory (FP=M1.1) are
the same the current RLO and the Pulse Memory (M1.3) levels are not changed.
5 If the Input signal (M1.0) changes its level back to low (0) the CPU will reset the Flange
Memory (FP=M1.1). The current RLO is not changed and therefore the conditions are
now the same as when the cycle started.
The command Negative Edge inserts a negative edge evaluation function symbol
(Flange Negative - FN). The edge evaluation function detects the change in a signal
state. The negative edge is detected if the signal is changing from "1" to "0".
To add an edge evaluation function symbol, position the insertion mark at the required
position. For information on how to position the insertion mark see chapter 5.6.1.
8 u Click the NP icon in the tool bar or the Negative Edge command in the insert menu.
7 u Press ALT + I, N.
1 2 3 4 5
Input (M 1.0)
(RLO prior FN)
1 The Input signal (M1.0) and the Flange Memory (FP=M1.1) are low. The Pulse Memory
(M1.3) remains reset.
2 The Input signal (M1.0) changes to its high level. The CPU detects the change in level
by comparing the current RLO (M1.0) with the Flange Memory (FP=M1.1). If the
current RLO (M1.0) is "1" and the Flange Memory (FP=M1.1) status low (0) the Flange
Memory (FP=M1.1) is set to high (1). The current RLO and the Pulse Memory (M1.3)
remain in its low (0) stage.
3 As long as the levels of the Input signal (M1.0) and the Flange Memory (FP=M1.1) are
the same the current RLO and the Pulse Memory (M1.3) levels are not changed.
4 During the next cycle, the CPU detects that the level of the Input signal (M1.0) is
changed to low (0) and will reset the Flange Memory (FP=M1.1) to low (0). The current
RLO and the Pulse Memory (M1.3) are set to high (1).
5 In the next cycle the Input signal (M1.0) and the Flange Memory (FP=M1.1) are low (0)
and the CPU will reset The current RLO and the Pulse Memory (M1.3) are reset to low
(0) and therefore the conditions are now the same as when the cycle started.
The commands from the Presentation menu are used to select the logic presentation.
Additional commands are available to configure the appearance of the presentations.
Not all commands are available in CSF presentation. For details on the commands
from the presentation menu see chapter 4.2.7
7 u Press ALT + P.
The Window menu from the editor window is identical with the window menu from the
PC block list window. For more details see chapter 3.6.
The Help menu from the editor window is identical with the help menu from the PC
block list window. For more details see chapter 3.7.
The arrow icons with the contact symbol operate the same way. Clicking the icon will
draw a contact (in the direction of the arrow). Drawing over an existing contact will
delete the contact. Drawing over a line will replace the line with a contact.
The icons from block four and five are used to delete and to insert function symbols
During the ladder diagram generation the segment may be in one of two different
stages. In one stage the segment is in a logically operational mode. The other stage of
the segment is a logically non-operational mode.
Figure 5-64 Example, logically operational mode and logically non operational mode
The edit functions that are available, depends on the functional stage of the segment.
Edit functions that are not operational in the current mode are indicated by light gray
icons.
The Graphical Elements from the third group in the toolbar may always be used to
insert, add, or overwrite contacts and lines. It is irrelevant if the segment is in a logical
operational mode or not.
Inserting function symbols from the fifth group is only possible in a logical operational
mode.
l Adding function symbols are always possible.
l Overwriting contacts is always possible. It is not possible to overwrite function
symbols.
l Deleting function symbols is not possible. You may change the type of the
function symbol using the Change Type command (ALT + F9) from the modify
menu (see chapter xxx).
In the LAD editor you can build PLC logic by moving the insertion point to given
positions and inserting contacts, connecting lines, and function symbols.
The S7 for Windows LAD graphical editor differentiates between the comment position
(segment [network] comment), the operand positions, and the function symbol
positions (contacts, timers, etc.).
The Network (Segment) Comment field starts in the upper left corner of the
workplace. The field is a single line and may be up to sixty (60) characters wide. The
S5 / S7 for Windows User’s Guide
Chapter 5 S7 Block Editor Page 250
width may currently be adjusted with the S5 for Windows selection Maximum
Command Comment (see chapter 3.2.11.5).
The insertion mark may be moved freely within the comment field. In an empty
command field the insertion mark is always positioned at its beginning.
8 u Click the vertical line below the network (segment) comment field.
7 u Press HOME, the insertion mark moves to the beginning of the segment field.
u Press the insertion mark moves on the vertical line below the comment field.
8 u Use the scroll bars (horizontal, vertical), until you reach the location you want.
u Click (press and release the left mouse button) the location where you want to position
the insertion point. The blue cross indicates the position of the insertion mark.
7 u Use the scroll bars (horizontal, vertical), until you reach the location you want. Use the
keys P AGE UP, P AGE DOWN, CTRL + , CTRL + , CTRL + , CTRL + to move the
scroll bars.
Within a network (segment), comment field, or an operand field
To move Press
One character to the left
One character to the right
To move Press
One position up
One position down
One position left
One position right
From one operand to the next TAB or È
To the beginning of the segment comment HOME
Select the tools with the mouse or with the function keys (see S7 for Windows Function
- Key Template). The segment (network) number and the total number of segment
(network) are displayed.
7 Key F8.
Open the Previous Network. If Network one (1) is opened the variable
declaration table is opened
7 Key F7.
Activating this function will Enlarge the PLC logic displayed in LAD
presentation. The selected font must be scaleable.
7 Key CTRL + G.
Activating this function will Reduce the PLC logic displayed in LAD
presentation. The selected font must be scaleable.
7 Key CTRL + S.
Draw a Line to the Right. Erase a line to the right of the marked position.
Overwrite a contact with a line to the right of the marked position.
7 Key + .
Draw a Line to the Left. Erase a line to the left of the marked position.
Overwrite a contact with a line to the left of the marked position.
7 Key + .
7 Key + .
7 Key + .
Add a Contact (NO) to the Right. Erase a contact (NO) to the right of the
marked position. Overwrite a line with a contact to the right of the marked
position.
7 Key ALT + .
Add a Contact (NO) to the Left. Erase a contact (NO) to the left of the
marked position. Overwrite a line with a contact to the left of the marked
position.
7 Key + .
7 Key + F4.
7 Key + F3.
7 Key + F5.
7 Key + F6.
7 Key + F7.
7 Key + F10.
Note:
The right mouse button may be used within the S7 Ladder Diagram (LAD) Editor. If
the right mouse button is clicked, a menu with commands available in the S7 LAD
Editor is opened.
The commands available are, all the comments from the Insert menu plus some of
the commands from the Modify menu. These commands give you full control to
generate or change the PLC logic displayed in the workspace of the S7 Ladder
Diagram (LAD) Editor window.
Figure 5-65 The right mouse menu (S7 Ladder Diagram (LAD) Editor)
With the commands from the Block menu you can save a block and close the block
editor. The block menu for the block editor, S7 PC LAD - presentation, and S7 PLC
block editor LAD - presentation, are the same.
For more details on the commands of the Block menu see chapter 4.2.1.
The commands from the Modify menu in the LAD presentation are used to work with
an existing segment and/or create a new segment.
7 u Press ALT + M.
Note:
Only contacts having an operand assigned, symbolic or absolute, may be changed
from a NO to a NC contact (normally open to a normally closed) or vice versa
(normally closed to a normally open).
u Mark the contact (the name of the contact) or position the insertion mark (blue cross to
the left of the contact.
8 u Click the Negate (Change) icon in the tool bar or the Negate command
in the modify menu.
7 u Press + F4.
The Delete Input (Contact) command, from the modify menu, deletes the selected
contact to the right of the insertion point (blue cross). Only contacts may be deleted.
8 u Click the Delete icon in the tool bar or the Delete Input (Contact ) command in the
modify menu.
The Format command, from the modify menu, is used to format and to check the
syntax of the variable declaration table. The variables are sorted into their predefined
order and the starting addresses are assigned.
The format command is also used to format the PLC logic created in LAD presentation.
The segment is redrawn and formatted. A syntax check of the construction of the
segment is performed. If S7 for Windows detects an error, an error message will be
displayed.
7 u Press F9.
u The Change Type command, from the modify menu, allows you to modify the type of
logical functions. This could be a result (Coil), a Flip Flop (RS / SR latch), a timer, a
counter, or a comparator. You may have to activate the change type command several
times to change, for example, a pulse timer into a latched on-delay timer.
Note:
Only logical functions having an operand assigned, symbolic or absolute, may be
changed by using the Change Type command.
The result (coil) may be changed from Normal to an S (set) or R (reset) type. The
intermediate result may be changed from Normal to Negated.
Figure 5-72 Change Type, Pulse Timer, Extended Pulse Timer, ON-Delay Timer, Latching ON-
Delay Timer, OFF-Delay Timer
Figure 5-74 Change Type, Equal, Not Equal, Bigger, Bigger or Equal, Less, Less or Equal
The commands, from the Search menu, in the LAD presentation, are used to review or
change text in the displayed segment and to move to another segment.
In LAD presentation the commands displayed in bold black may be used. The
commands displayed in light gray may be used in STL, CSF, and /or Block-STL
(Source Text) presentation.
The commands Search for, Replace, and Search again are not available in LAD
presentation. For detailed information on the commands from the modify menu see
chapter 4.2.5.4 – 4.2.58.
7 u Press ALT + S.
The commands from the Insert menu in the LAD Editor are used to insert logical
functions in the workplace to build a segment. The commands are identical with the
corresponding icons from the S7 - LAD Editor Toolbar (see chapter 5.7.2).
The commands Timer, Counter, Comparator, and FB Call, open dialog boxes. In LAD
presentation the commands displayed in bold black may be used.
The commands displayed in light gray may be used in STL, LAD and /or Block-STL
(Source Text) presentation. The commands Input, And, Or, FB / FX - Formal
Operands, and S7 Block Call are not available in LAD presentation.
7 u Press ALT + I.
Note:
The command Variable Declaration is available as soon as the variable declaration
table is displayed in the S7 Block Editor (LAD presentation) work place.
The command FB Call… opens a dialog box to select all types of blocks to call.
The command SR Flip Flop inserts a SR Flip Flop with a dominating reset input.
To add a SR Flip Flop function symbol, position the insertion mark at the required
position. For information on how to position the insertion mark see chapter 5.7.1
8 u Click the SR Flip Flop icon in the tool bar or the SR Flip Flop
command in the insert menu.
7 u Press + F5.
The command RS Flip Flop inserts a RS Flip Flop with a dominating set input.
To add a RS Flip Flop function symbol, position the insertion mark at the required
position. For information on how to position the insertion mark see chapter 5.7.1.
8 u Click the RS Flip Flop icon in the tool bar or the RS Flip Flop
command in the insert menu.
The command Timer opens a dialog box to select the timer function. Five different
timers are available.
To add a timer function symbol, position the insertion mark at the required position. For
information on how to position the insertion mark see chapter 5.7.1.
8 u Click the Timer icon in the tool bar or the Timer command in the insert
menu.
7 u Press + F6.
7 u Press P.
t 1 t 2
RLO at
Start input
Timer running
7 u Press E.
t 1 t 2 t 3
RLO at
Start input
Timer running
7 u Press R.
t 1 t 2
RLO at
Start input
Timer running
7 u Press S.
t 1 t 2 t 3
RLO at
Start input
t
Timer running
RLO at
Reset input
Scan for
one(1)
Scan for
zero(0)
7 u Press F.
t 1 t 2 t 3
RLO at
Start input
Timer running
Scan for
one(1)
Scan for
zero(0)
The command Counter opens a dialog box where you can select the counter function.
Two different counters are available, an up counter and a down counter.
Basically the both counters are the same. As a result of the arrangement of the
function symbol the first input must be used. For the up counter this is the input that
increments the counts. For the down counter this is the input that decrements the
counts. Both counters provide a second input (this input doesn’t have to be used) for
the opposite count direction.
8 u Click the Counter icon in the tool bar or the Counter command in the
insert menu.
7 u Press + F7.
l Insert an Up Counter
7 u Press U.
7 u Press D.
The command Comparator opens a dialog box to select the compare functions. Six
(6) different comparators are available.
7 u Press ALT + I, P.
l Insert a Comparator
7 u Press F, D, or G.
u Press 1, 2, 3, 4, 5, or 6
A Comparator function symbol is inserted.
operating system. The CALL function symbol may also be used to open the Instance
Data Block assigned to a Function Block.
8 u Click the FB Call icon in the tool bar or the FB Call command in the
insert menu.
Note:
When using the Block Call function, S7 for Windows switches into Control System
Flowchart Presentation for that single network. Therefore, the column width for the
operands is changed with the CSF setting (see Chapter 3.2.11.2).
The Block Call function is identical in LAD and CSF presentation.
Figure 5-94 The command FB Call opens a S7 System Functions dialog box
u Mark the block (blue background) that you want to call with the CALL function symbol
and confirm with the OK button.
If a Function Block (FB) is selected an additional dialog box is opened to select its
Instance Data Block (DB).
When calling a Function Block (FB) an Instance Data Block must be assigned. Mark
the Data Block you want to assign to the Function Block (FB) as its Instance Data
Block and confirm with the OK button.
An example of the Select Instance Data Block (DB) is shown in figure 5-95. The figure
5-96 shows the function symbol of an FB Call.
If a block, with assigned block parameters is called (e.g. Function (FC), etc.), the name
of the block and the assigned parameter are displayed in the CALL function symbol.
Input parameter are shown at the left side, output parameter are shown on the right
side.
The names of the parameters (operands) may not be displayed in their full length.
Truncated names are indicated with a colon after the truncated name.
Figure 5-97 shows an example of the edited block CALL with the actual variables
assigned to the block parameters. The parameters may be displayed or edited in there
symbolic or absolute form.
Figure 5-97 CALL function symbol with the assignment of the actual variables
Table 5-22 Function CALL with the assignment of the actual variables
Figure 5-98 CALL of the Function Block (FB23) with instance Data Block (DB23)
By editing the Place Holders (W#16#0, MW0, MD0, M0.0) you can enter the actual
variables handling the assignment of the block parameters.
The actual parameters (W#16#0, MW0, MD0, M0.0) are supplying the data for the
formal parameter (IN_V., OUT_., and IN_O.).
8 u Click the Assignment icon in the tool bar or the Assignment (Coil)
command in the insert menu.
7 u Press + F9.
The commands from the Presentation menu are used to select the logic presentation.
Additional commands are available to configure the appearance of the presentations.
Not all commands are available in LAD presentation. For details on the commands
from the presentation menu see chapter 4.2.7
7 u Press ALT + P.
The Window menu from the editor window is identical with the window menu from the
PC block list window. For more details see chapter 3.6.
The Help menu from the editor window is identical with the help menu from the PC
block list window. For more details see chapter 3.7.
6 S5 Block Editor
In this chapter the methodology on how to create or modify a block, using the Step® 5
syntax, is described.
Programming statement
Identifier Parameter
l Operation Code
S5 for Windows supports all operation code used by the Siemens Simatic® 5 line.
Certain CPUs are limited in the use of the operation code. Please refer to the manual
that came with your PLC. In statement list you can enter the operation code in capital
or small letters. The Format command converts the operation code to capital letters
and inserts the desired spaces.
l Operand Section
Symbolic Operand
The symbolic operand must be entered in the same form as is defined in the symbolic
table. A dash ( - ) must be entered in front of the name to identify the symbolic
operand. The Format command does not alter the writing (lower / upper case) of the
symbolic operand, it only inserts the desired spaces.
Absolute Operand
Identifier
S5 for Windows supports all identifiers used by the Siemens Simatic® 5 line. Certain
CPUs are limited in the use of identifiers. Please refer to the manual that came with
your PLC. The Format command converts the operation code to capital letters and
inserts the desired spaces.
Parameter
The parameter specifies the address of an operand. These are numbers and are not
affected by the Format command, Format only inserts the required spaces.
Comment
A comment may be entered as a separate line or after a PLC statement. A preceding
semicolon must separate the comment. The Format command puts the comment at
the end of a line.
A data block is not divided into segments. The icons to select the previous or next
segment are not active and no block end mark (BE) is shown.
u You may enter a comment in the segment comment field (see chapter 6.2.1).
Enter the text as shown in the figure 6-7 below.
The generate data block statement may also be used to create a data block. To do so
you must write a segment as shown in the following picture.
Select the tools with a mouse or with the function keys (see S5 / S7 for Windows
function - key template). The tool bar II displays the number of the open network
(Segment) and the total number of networks.
Open the Next Segment.
7 Key F8.
Within the workplace you can enter text at any position by moving the insertion point to
that position.
With the I NSERT key you can switch in and out of the type-over mode. By default, S5 for
Window makes room for new characters that you type by moving existing characters to
the right. You can change the insert mode and have S5 for Windows replace existing
characters with new characters. This is called type-over and is indicated by the
insertion point cursor.
l Insert mode
The cursor appears as a small, blinking, vertical line. The insertion cursor fits between
two characters.
l Type-Over mode
The cursor appears as a blinking black rectangle. The type-over cursor covers one
character.
The S5 for Windows STL editor differentiates between the comment position field
(segment comment) and the function field.
The Segment Comment field starts in the upper left corner of the workplace. The field
is a single line and may be up to sixty (60) characters wide. The width may be adjusted
(see chapter 3.2.11.5). The insertion mark may be moved freely within the comment
field. In an empty command field the insertion mark is always positioned at its
beginning.
The Function field is located below the comment field.
Note:
The right mouse button may be used within the S5 STL Editor. If the right mouse
button is clicked, a menu with commands used in the S5 STL Editor is opened.
Figure 6-13 Menu opened with the click of the right mouse button
With the commands from the Block menu you can save a block and close the block
editor. The block menu for the block editor S5 PC STL - presentation and S5 PLC
block editor STL - presentation, are the same. Also the commands for the STL and the
Block STL editors are the same. For more details see chapter 4.2.1.
The commands from the Modify menu in the editor window are used to work with an
existing segment and/or create a new segment.
In STL and the Block STL, text may be displayed in bold black. The commands for the
STL and the Block STL editors are the same.
For more details on the commands of the Modify menu see chapter 4.2.2.
The commands Negate, Delete Input, and Change Type are not available in S5 STL
presentation.
The commands from the Search menu are used to search and replace text strings and
operands in a segment or a block. Also another segment may be opened. The search
menu for the block editor S5 PC STL - presentation and S5 PLC block editor STL -
presentation, are the same. Also the commands for the STL and the Block STL editors
are the same.
For more details on the commands of the Search menu see chapter 4.2.3.
In STL presentation the insert menu provides FB /FX - Formal Operands command.
In STL presentation the commands displayed in bold black may be used. The
commands displayed in light gray can be used in S7, CSF, LAD and /or Block-STL
presentation.
7 u Press ALT + I.
The command FB / FX Formal Operands, from the insert menu, opens a dialog box.
Using the dialog box you can easily insert a formal operand parameter by name
(Declaration - DECL:), its type and its data configuration.
7 u Press ALT + I, B.
l Name
In the text field enter the name of the block parameter. The name may be up to four (4)
characters long and must start with a letter. The name is automatically entered in
capital letters. The block parameter name is identical to the formal operand specified in
the program in place of the actual operand.
l Type
A marked button identifies the block parameter type. Input parameter, output
parameter and parameters representing a constant, need further definitions.
l Type for D
A parameter representing a constant needs further definition. The value may be
presented in different forms. Mark the button to select the required form.
l Insert button
If you activate the Insert button the defined parameter will
be entered into the function block. The dialog box stays
open and is ready to define the next parameter. Up to forty block parameters may be
defined per function block.
l Done button
If you activate the Done button the defined parameter will
be entered into the function block and the dialog box will be closed.
Note:
Prior to opening the dialog box Insert Formal Operand you must position the
insertion mark in a separate line directly below the line defining the name.
The commands from the Presentation menu are used to select the logic presentation.
Additional commands are available to configure the appearance of the presentations.
All commands are available in STL presentation. For details on the commands of the
presentation menu see chapter 4.2.5
The Window menu of the editor window is identical with the window menu of the PC
block list window. For more details see chapter 3.5.
The Help menu of the editor window is identical with the help menu of the PC block list
window. For more details see chapter 3.6.
In the CSF editor you can build PLC logic by moving the insertion point to a given
position and inserting function symbols.
The S5 for Windows CSF graphical editor works in the insertion mode only. The CSF
editor differentiates between the comment position (network comment), the operand
positions, and the function symbol positions.
The Network (Segment) Comment field starts in the upper left corner of the
workplace. The field is a single line and may be up to sixty (60) characters wide. The
width can be adjusted with the Maximum Command Comment (see chapter 3.2.11.5).
The insertion mark may be moved freely within the comment field. In an empty
command field the insertion mark is always positioned at its beginning.
The Operand position fields are defined by the function symbols. The insertion mark
may be moved freely within the comment field. In an empty command field the
insertion mark is always positioned at its beginning.
The Function Symbol positions are defined as follows:
The first function symbol is positioned automatically. The position of the insertion mark
is ignored.
To add a function symbol the insertion mark must be positioned at the desired input or
output of the function symbol. To insert a function symbol in an existing segment the
insertion mark must be positioned at the output of the function symbol that the inserted
function should follow.
u Use the scroll bars (horizontal, vertical), until you reach the location you want. Use the
keys P AGE UP, P AGE DOWN, CTRL + , CTRL + , CTRL + , CTRL + to move the
scroll bars.
Within the segment comment field or an operand field
To move Press
One character to the left
One character to the right
To move Press
One position up (or left)
One position down (or right)
To move Press
From one operand to the next TAB or È
One position up (or left)
One position down (or right)
To the beginning of the segment comment HOME
Select the tools with the mouse or with the function keys (see S5 for Windows Function
- Key Template). The segment (network) number and the total number of segments
(network) are displayed.
7 Key F8.
7 Key F7.
Activating this function will Enlarge the PLC logic displayed in CSF
presentation. The selected font must be scaleable.
7 Key CTRL + G.
Activating this function will Reduce the PLC logic displayed in CSF
presentation. The selected font must be scaleable.
7 Key CTRL + S.
7 Key + F3.
Invert the selected Input at the function symbol (AND, OR). The input to
be negated could be an output of another function (AND, OR). To negate
an intermediate result the command Change Type (Modify menu, Key
ALT + F9) must be used.
7 Key + F4.
7 Key + F1.
Insert an OR function.
7 Key + F2.
7 Key + F5.
7 Key + F6.
7 Key + F7.
7 Key + F10.
7 Key + F9.
Note:
The right mouse button may be used with the S5 Control System Flowchart (CSF)
Editor. If the right mouse button is clicked, a menu of the commands available in
the S5 CSF Editor is opened.
The commands available are all the commands from the Insert menu plus some
commands from the Modify menu. These commands give you full control to
generate or change the PLC logic displayed in the workspace of the S5 Control
System Flowchart (CSF) Editor window.
With the commands from the Block menu you can save a block and close the block
editor. The block menu for the block editor, S5 PC CSF - presentation, and S5 PLC
block editor CSF - presentation, are the same.
For more details on the commands of the Block menu see chapter 4.2.1.
The commands from the Modify menu in the CSF presentation are used to work with
an existing network and/or create a new network.
7 u Press ALT + M.
The commands Cut, Copy, Paste, and Delete are not available in CSF presentation.
The commands Undo, Add New Segment, Insert Segment, Delete Segment, and
Next Window are commands that can also be used with other presentations. For
detailed information about these commands from the modify menu see chapter 4.2.2.
The commands Negate / Invert, Delete Input, Format and Change Type have
special functions in the S5 Control System Flowchart presentation and are described
below.
The Negate command, from the modify menu, changes the selected input from a
normal input to an inverted input or vice versa (inverted input to normal input). Inputs
being connected to another logical device may also be negated.
u Mark the input (the name of the input) or the logic connected to the input of another
logical device. The selected logic connected to the input is displayed in dark blue (see
figure 6-19).
8 u Click the Negate icon in the tool bar or the Negate command in the
modify menu.
7 u Press + F4.
The Delete Input command, from the modify menu, deletes the selected input or the
selected logical connection. A selected input or logical connection (one or more
function symbols) is displayed in dark blue. Only inputs from an AND function symbol
or an OR function symbol may be deleted.
8 u Click the Delete icon in the tool bar or the Delete Input command in
the modify menu.
Examples:
A marked input may be deleted with the Delete Input command.
A logical connection was marked (displayed in dark blue). The OR function symbol and
the AND function symbol with all its inputs will be deleted.
The Format command, from the modify menu, in the S5 CSF Editor does not have any
function.
The Change Type command, from the modify menu, allows you to modify the type of a
logical function. This command also changes the type of an assignment to an S (set) or
R (reset) type. You may activate the change type command several times to change,
for example, a pulse timer i nto a latched on-delay timer.
Figure 6-24 Change Type, Pulse Timer, Extended Pulse Timer, ON-Delay Timer, Latching ON-
Delay Timer, OFF-Delay Timer
Figure 6-26 Change Type, Equal, Not Equal, Bigger, Bigger or Equal, Less, Less or Equal
The commands from the Search menu in the CSF presentation are used to review or
change text in the displayed segment and to move to another segment.
In CSF presentation the commands displayed in bold black may be used. The
commands displayed in light gray may be used in STL, LAD, and /or Block-STL
(Source Text) presentation.
7 u Press ALT + S.
The commands from the Insert menu in the CSF Editor are used to insert logical
functions into the workplace to build a segment. The commands are identical with the
corresponding icons from the S5 - CSF Editor Toolbar (see chapter 6.3.2). The
commands Timer, Counter, Comparator, and FB Call, open dialog boxes. In CSF
presentation the commands displayed in bold black may be used. The commands
displayed in light gray may be used in STL, LAD and /or Block-STL presentation.
7 u Press ALT + I.
The commands XOR, Positive Edge, Negative Edge, Contact in Row, Contact in
Parallel, FB / FX - Formal Operands, S7 Block Call, and Variable Declaration are not
available in S5 CSF presentation.
The command Input adds an additional input to an existing AND function symbol or an
OR function symbol.
To add an input, mark one of the inputs of the function symbol. The operand
(placeholder) at this input is displayed with a blue background. If an input connected to
an output of a previous function symbol was marked, the entire function symbols
beyond the input are displayed in blue.
8 u Click the Input icon in the tool bar or the Input command in the insert
menu.
7 u Press + F3
Example:
An AND function symbol with an additional input. One input is marked to add an
additional input.
8 u Click the Input icon in the tool bar or the Input command in the insert
menu.
7 u Press +F1.
8 u Click the OR icon in the tool bar or the OR command in the insert
menu.
7 u Press + F2.
The command SR Flip Flop inserts a SR Flip Flop with a dominating reset input.
To add a SR Flip Flop function symbol, position the insertion mark at the required
position. For information on how to position the insertion mark see chapter 6.3.1.
8 u Click the SR Flip Flop icon in the tool bar or the SR Flip Flop
command in the insert menu.
7 u Press + F5.
The command RS Flip Flop inserts a RS Flip Flop with a dominating set input.
To add a RS Flip Flop function symbol, position the insertion mark at the required
position. For information on how to position the insertion mark see chapter 6.3.1.
8 u Click the RS Flip Flop icon in the tool bar or the RS Flip Flop
command in the insert menu.
The command Timer opens a dialog box to select the timer function. Five different
timers are available.
To add a timer function symbol, position the insertion mark at the required position. For
information on how to position the insertion mark see chapter 6.3.1.
8 u Click the Timer icon in the tool bar or the Timer command in the insert
menu.
7 u Press + F6.
l The Pulse timer outputs a pulse with the defined width but no longer than the input
pulse.
l The Extended Pulse timer outputs the input pulse plus the defined pulse width.
l The On-Delay timer outputs a pulse after the time has elapsed (the start pulse must
still be present).
l The Latched On-Delay timer outputs a pulse after the time has elapsed.
l The Off-Delay timer outputs a pulse with a fixed length after the starting pulse goes
to zero.
7 u Press P.
t 1 t 2
RLO at
Start input
Timer running
7 u Press E.
Timer running
7 u Press R.
t 1 t 2
RLO at
Start input
Timer running
7 u Press S.
t 1 t 2 t 3
RLO at
Start input
t
Timer running
RLO at
Reset input
Scan for
one(1)
Scan for
zero(0)
7 u Press F.
t 1 t 2 t 3
RLO at
Start input
Timer running
Scan for
one(1)
Scan for
zero(0)
The command Counter opens a dialog box where you can select the counter function.
Two different counters are available, an up counter and a down counter.
Basically the both counters are the same. As a result of the arrangement of the
function symbol the first input must be used. For the up counter this is the input that
increments the counts. For the down counter this is the input that decrements the
counts. Both counters provide a second input (this input doesn’t have to be used) for
the opposite count direction.
8 u Click the Counter icon in the tool bar or the Counter command in the
insert menu.
7 u Press + F7.
l Insert an Up Counter
7 u Press U.
7 u Press D.
The command Comparator opens a dialog box to select the compare functions. Six
(6) different comparators are available.
7 u Press ALT + I, P.
l Insert a Comparator
7 u Press F, D, or G.
u Press 1, 2, 3, 4, 5, or 6
A Comparator function symbol is inserted.
8 u Click the FB Call icon in the tool bar or the FB Call command in the
insert menu.
Figure 6-52 FB CALL function symbol with the assignment of the actual variables
u You may have to edit the parameters (operands) to meet the requirements of the PLC
program.
Note:
Data block (DB, DX) calls may only be program med in STL presentation. For details
on data block calls see chapter 6.2.1.1.
8 u Click the Assignment icon in the tool bar or the Assignment (Coil)
command in the insert menu.
7 u Press + F9.
The commands from the Presentation menu are used to select the logic presentation.
Additional commands are available to configure the appearance of the presentations.
Not all commands are available in CSF presentation. For details on the commands
from the presentation menu see chapter 4.2.5.
7 u Press ALT + P.
The Window menu from the editor window is identical with the window menu from the
PC block list window. For more details see chapter 3.5.
The Help menu from the editor window is identical with the help menu from the PC
block list window. For more details see chapter 3.6.
The arrow icons with the contact symbol operate the same way. Clicking the icon will
draw a contact (in the direction of the arrow). Drawing over an existing contact will
delete the contact. Drawing over a line will replace the line with a contact.
The icons from block four and five are used to delete and to insert function symbols
During the ladder diagram generation the segment may be in one of two different
stages. In one stage the segment is in a logically operational mode. The other stage of
the segment is a logically non-operational mode.
The edit functions that are available depend on the functional stage of the segment.
Edit functions that are not operational in the current mode are indicated by light gray
icons.
The Graphical Elements from the third group in the toolbar may always be used to
insert, add, or overwrite contacts and lines. It is irrelevant if the segment is in a logical
operational mode or not.
Inserting function symbols from the fifth group is only possible in a logical operational
mode.
l Adding function symbols are always possible.
l Overwriting contacts is always possible. It is not possible to overwrite function
symbols.
l Deleting function symbols is not possible. You may change the type of the
function symbol using the Change Type command (ALT + F9) from the modify
menu (see chapter 6.4.4.4).
Figure 6-56 Example, logically operational mode and logically non operational mode
In the LAD editor you can build PLC logic by moving the insertion point to given
positions and inserting contacts, connecting lines, and function symbols.
The S5 for Windows LAD graphical editor differentiates between the comment position
(segment [network] comment), the operand positions, and the function symbol
positions (contacts, timers, etc.).
The Network (Segment) Comment field starts in the upper left corner of the
workplace. The field is a single line and may be up to sixty (60) characters wide. The
width may be adjusted with the S5 for Windows Maximum Command Comment (see
chapter 3.2.11.5).
The insertion mark may be moved freely within the comment field. In an empty
command field the ins ertion mark is always positioned at its beginning.
8 u Click the vertical line below the network (segment) comment field.
7 u Press HOME, the insertion mark moves to the beginning of the segment field.
u Press the insertion mark moves on the vertical line below the comment field.
8 u Use the scroll bars (horizontal, vertical), until you reach the location you want.
u Click (press and release the left mouse button) the location where you want to position
the insertion point. The blue cross indicates the position of the insertion mark.
7 u Use the scroll bars (horizontal, vertical), until you reach the location you want. Use the
keys P AGE UP, P AGE DOWN, CTRL + , CTRL + , CTRL + , CTRL + to move the
scroll bars.
Within a network (segment), comment field, or an operand field
To move Press
One character to the left
One character to the right
To move Press
One position up
One position down
One position left
One position right
From one operand to the next TAB or È
To the beginning of the segment comment HOME
Select the tools with the mouse or with the function keys (see S5 for Windows Function
- Key Template). The segment number and the total number of segment are displayed.
7 Key F8.
7 Key F7.
Activating this function will Enlarge the PLC logic displayed in LAD
presentation. The selected font must be scaleable.
7 Key CTRL + G.
Activating this function will Reduce the PLC logic displayed in LAD
presentation. The selected font must be scaleable.
7 Key CTRL + S.
Draw a Line to the Right. Erase a line to the right of the marked position.
Overwrite a contact with a line to the right of the marked position.
7 Key + .
Draw a Line to the Left. Erase a line to the left of the marked position.
Overwrite a contact with a line to the left of the marked position.
7 Key + .
7 Key + .
7 Key + .
Add a Contact (NO) to the Right. Erase a contact (NO) to the right of the
marked position. Overwrite a line with a contact to the right of the marked
position.
7 Key ALT + .
Add a Contact (NO) to the Left. Erase a contact (NO) to the left of the
marked position. Overwrite a line with a contact to the left of the marked
position.
7 Key + .
7 Key + F4.
S5 / S7 for Windows User’s Guide
Chapter 6 S5 Block Editor Page 313
7 Key + F3.
7 Key + F5.
7 Key + F6.
7 Key + F7.
7 Key + F10.
Note:
The right mouse button may be used within the S5 Ladder Diagram (LAD) Editor. If
the right mouse button is clicked, a menu with commands available for the S5 LAD
Editor is opened.
The commands available are all the commands from the Insert menu plus some of
the commands from the Modify menu. These commands give you full control to
generate or change the PLC logic displayed in the workspace of the S5 Ladder
Diagram (LAD) Editor window.
Figure 6-57 The right mouse menu (S7 Ladder Diagram (LAD) Editor)
With the commands from the Block menu you can save a block and close the block
editor. The block menu for the block editor, S5 PC LAD - presentation, and S5 PLC
block editor LAD - presentation, are the same (see chapter 4.2.1).
The commands from the Modify menu in the LAD presentation are used to work with
an existing segment and/or create a new segment.
7 u Press ALT + M.
The commands Cut, Copy, Paste, and Delete are not available in LAD presentation.
The commands Undo, Add New Segment, Insert Segment, Delete Segment, and
Next Window are commands that can also be used with other presentations. For
detailed information on these commands from the modify menu see chapter 4.2.2.
The commands Negate / Invert, Delete Input, Format and Change Type have
special functions in the S7 Ladder Diagram (LAD) presentation and are described
below.
Note:
Only contacts having an operand assigned, symbolic or absolute, may be changed
from a NO to a NC contact (normally open to a normally closed) or vice versa
(normally closed to a normally open).
u Mark the contact (the name of the contact) or position the insertion mark (blue cross to
the left of the contact.
8 u Click the Negate (Change) icon in the tool bar or the Negate command
in the modify menu.
7 u Press + F4.
The Delete Input (Contact) command, from the modify menu, deletes the selected
contact to the right of the insertion point (blue cross). Only contacts may be deleted.
8 u Click the Delete icon in the tool bar or the Delete Input (Contact ) command in the
modify menu.
7 u Press F9.
u The Change Type command, from the modify menu, allows you to modify the type of
logical functions. This could be a result (Coil), a Flip Flop (RS / SR latch), a timer, a
counter, or a comparator. You may have to activate the change type command several
times to change, for example, a pulse timer into a latched on-delay timer.
Note:
Only logical functions having an operand assigned, symbolic or absolute, may be
changed by using the Change Type command.
The result (coil) may be changed from Normal to an S (set) or R (reset) type. The
intermediate result may be changed from Normal to Negated.
Figure 6-63 Change Type, Pulse Timer, Extended Pulse Timer, ON-Delay Timer, Latching ON-
Delay Timer, OFF-Delay Timer
Figure 6-65 Change Type, Equal, Not Equal, Bigger, Bigger or Equal, Less, Less or Equal
The commands, from the Search menu, in the LAD presentation, are used to review or
change text in the displayed segment and to move to another segment.
In LAD presentation the commands displayed in bold black may be used. The
commands displayed in light gray may be used in STL, CSF, and /or Block-STL
presentation.
The commands Search for, Replace, and Search again are not available in LAD
presentation. For detailed information on the commands from the Search menu see
chapter 4.2.3.
7 u Press ALT + S.
The commands from the Insert menu in the LAD Editor are used to insert logical
functions in the workplace to build a segment. The commands are identical with the
corresponding icons from the S5 - LAD Editor Toolbar (see chapter 6.4.2).
The commands Timer, Counter, Comparator, and FB Call, open dialog boxes. Those
functions and the functions of the R-S and S-R Flip Flops are identical to the functions
in CSF presentation (see chapter 6.3.6.4 – 6.3.6.9).
In LAD presentation the commands displayed in bold black may be used. The
commands displayed in light gray may be used in STL, CSF and /or Block-STL
presentation.
7 u Press ALT + I.
8 u Click the Assignment icon in the tool bar or the Assignment (Coil)
command in the insert menu.
7 u Press + F9.
The commands from the Presentation menu are used to select the logic presentation.
Additional commands are available to configure the appearance of the presentations.
Not all commands are available in LAD presentation. For details on the commands
from the presentation menu see chapter 4.2.5.
7 u Press ALT + P.
S5 / S7 for Windows User’s Guide
Chapter 6 S5 Block Editor Page 321
Each segment is displayed with the segment number and the segment comment (if
present). The segment start is indicated with a bracket [ followed by the segment
number and the segment comment. The end of a segment is indicated with a closing
bracket ] .
In the Block-STL the search and replace functions (chapter 4.2.3) may be used to
search an entire block.
The commands from the Modify menu in the Block-STL presentation are used to work
with an existing Block.
All the segment handling commands (add new-, insert-, delete segment) and the
commands Negate, Delete Input, and Change Type are not available in Block-STL
presentation. For detailed information on the commands from the modify menu see
chapter 4.2.2.
7 u Press ALT + M.
The commands from the Search menu in the Block-STL presentation are used to
review or change text in the displayed segment and to move to another segment.
7 u Press ALT + S.
For detailed information on the commands from the search menu see chapter 4.2.3.
7 u Press ALT + I.
The commands from the Presentation menu are used to select the logic presentation.
Additional commands are available to configure the appearance of the presentations.
Not all commands may be always available.
7 u Press ALT + P.
In Block-STL presentation the commands displayed in bold black may be used. The
commands displayed in light gray may be used in CSF, LAD and /or STL presentation.
The commands Display Comments, Enlarge, and Reduce are not available in S5 Block
STL presentation. For detailed information on the commands from the presentation
menu see chapter 4.2.5.
7 Cross Reference
S5 / S7 for Windows provides a tool to list the operands, their use, and origin. The
Internal cross-reference list is constantly updated. Whenever you search for the use of
an operand, the displayed (or printed) list provides the current state of the operand in
use.
u Mark the operand that you want cross-reference information about. A marked operand
is shown with a blue background. In STL or Block-STL presentation, position the
insertion mark within the operand. If an operand is marked in the status window the
whole line is displayed in white on a black background.
7 u Press F4.
The cross-reference window is opened and displays the list of locations where the
marked operand is used in the PLC program.
If you did not mark an operand, the cross-reference window will be opened and is
ready for a search operation.
7 u Press F4.
The cross-reference window will be opened. Commands are provided to start the
search operation.
The Title bar displays S5 / S7 for Windows, the name of the open project (Calculating a
Sum_US), and the name of the window (Cross Reference).
Menu Bar
The menu bar displays a list of menus. You may open a menu by clicking the name of
the menu or by pressing the ALT key and then the underlined character of the menu
name. All the commands from these menus are described in this chapter.
Tool Bar
The tool bar provides instant access to frequently used S5 / S7 for Windows
commands. This tool bar is the same for all S5 / S7 for Windows application windows.
Click an icon with the mouse and the command is executed. You can reach these
functions with the keyboard via the window menu and/or the function keys. For more
details see chapter 3.1.
Tool Bar II
The tool bar II provides an icon to print the contents of the cross-reference window.
Workplace - Cross-Reference -
The cross-reference list displays the operand in the absolute and also, if available, in
the symbolic form with a comment (as defined in the symbolic table). The block and the
segment where the operand is used is also displayed. A star ( * ) after the segment
number indicates the source of the operand.
Note:
You can jump between the network (block) and the cross-reference list by using the
Icon Open next Window and double clicking the network line that contains the
operand you are searching for.
7 u Press ALT + R.
The Search command opens the Cross-Reference dialog box. You have to enter the
name of the operand that you want to search for in the text field. The operand may be
in absolute or symbolic form.
7 u Press F4.
l Operand:
The name of the operand listed in the cross reference can be entered in the text field in
its symbolic or absolute form.
l Format:
If you have S5 / S7 for Windows installed on your PC you have to select the format of
the operand that you want to display in the cross-reference list. If only S7 for Windows
is installed, the S7 button is marked by default.
When the Recognize Overlaid Operands button is marked, the specified bit
displayed in the cross-reference is listed as a bit and if the bit is present in a byte,
word, or double word that will also listed. A byte will be found in a word or double word
and a word will be found in a double word.
If the button is not marked the specified operand will only be found in its specified
format.
u Enter the name of the operand that you want displayed in the cross-reference list in the
text field, Enter Operand. Mark the desired buttons and confirm by activating the OK
button.
S7 for Windows displays the list of locations where the operand is used. A star ( * )
indicates the source of the operand. You can open the block segment with a double
click on that particular line. You can view or edit this segment.
S7 for Windows can display a cross-reference list for the following operands
(the Range may be restricted by the CPU and / or the working memory size). Absolute
operand names can be entered in lower or uppercase letters. Spaces are ignored.
B all Blocks B
C all Counters C
Cn 0 to 255 the specified Counter C12
D all Data Words D
Ln.n 0.0 to 16383.7 the specified Local Data Bit, also from a L26.7
Local Data Byte or Local Data Word
Mn.n 0.0 to 2047.7 the specified Memory Bit, also from a M56.4
Memory Byte or Memory Word
Q all Outputs Q
Qn.n 0.0 to 511.7 the specified Output Bit, also from a Q411.7
Output Byte or Output Word
T T all Timers T
7 u Press ALT + R.
The Search command opens the Cross-Reference dialog box. You have to enter the
name of the operand that you want to search for in the text field. The operand may be
in absolute or symbolic form.
7 u Press F4.
l Operand:
The name of the operand can be entered in the text field in its symbolic or absolute
form.
l Format:
If you have S5 / S7 for Windows installed on your PC you have to select the format of
the operand that you want to display in the cross-reference list. If only S5 for Windows
is installed, the S5 button is marked by default.
When the Recognize Overlaid Operands button is marked, the specified bit will be
displayed in the cross reference is listed as a bit and if the bit is present in a byte,
word, or double word that will also listed. A byte will be found in a word or double word
and a word will be found in a double word.
If the button is not marked the specified operand will only be found in its specified
format.
u Enter the name of the operand that you want displayed in the cross-reference list in the
text field, Enter Operand. Mark the desired buttons and confirm by activating the OK
button.
S5 for Windows displays the list of locations where the operand is used. A star ( * )
indicates the source of the operand. You can open the block segment with a double
click on that particular line. You can view or edit this segment.
S5 for Windows can display a cross-reference list for the following operands
(the Range may vary by the CPU type).
Absolute operand names can be entered in lower or uppercase letters. Spaces are
ignored.
Input A list of
* the complete cross reference list
B all Blocks
BBn the specified Picture Block
C all Counters
Cn the specified Counter
D all Data Words
DBn the specified Data Block
DDn the specified Data Double Word
DLn the specified Data Word, left Byte
Dn.n the specified Bit in a Data Word
DRn the specified Data Word, right Byte
DWn the specified Data Word
DXn the specified Extended Data Block
F all Flags
FBn the specified Function Block
FDn the specified Flag Double Word
Fn.n the specified Flag (Bit), also from a Byte and Word
FWn the specified Flag Word
FXn the specified Extended Function Block
FYn the specified Flag Byte
I all Inputs
IBn the specified Input Byte
IDn the specified Input Double Word
In.n the specified Input (Bit), also from a Byte and Word
IWn the specified Input Word
Executing the print command starts the printing of the cross-reference list displayed in
the workplace of the cross-reference window.
8 u Click the Print icon in the tool bar or click Print Window in the block
menu.
7 u Press CTRL + P
With the Exit command from the Cross Reference menu, you can close the cross-
reference window.
7 u Press ALT + R, E.
7 u Press ALT + B.
This command opens the editor for the block network selected (marked in the cross-
reference window workplace). If you did not select a block network (marked) in the
cross-reference window workplace, the command is not active.
7 u Press F10.
Executing the print command starts the printing of the selected block. One or more
blocks may be marked in the cross-reference window workplace for printing.
7 u Press ALT + B, P
The marked blocks will be printed using the presets from the documentation layout
dialog box (see chapter 3.2.13.1).
8 Symbolic Table
S5 / S7 for Windows provides a symbolic table editor to create and edit a Symbolic
Table (Assignment List). This list must be generated before symbolic operands can be
used within the PLC program. The symbolic names of global variables are assigned in
the symbolic table (S7 for Windows only).
7 u Press ALT + W, Y.
The Title bar displays S5 / S7 for Windows, the name of the open project
(Data_Block_Test_US), and the name of the window (Symbolic Table Editor).
Menu Bar
The menu bar displays a list of menus. You may open a menu by clicking on the name
of the menu or by pressing the ALT key and then the underlined character from the
menu name. All the commands from these menus are described in this chapter.
Tool Bar
The tool bar provides instant access to frequently used S5 / S7 for Windows
commands. This tool bar is the same for all S5 / S7 for Windows application windows.
Click an icon with the mouse and the command is executed. You can reach these
functions with the keyboard via the window menu and/or the function keys. For more
details see chapter 3.1.
By holding the left mouse button and dragging the column limit, you can adjust the
width of the columns in the symbolic table workplace. The width of the columns can be
adjusted to accommodate the font selected (see chapter 3.2.11.4).
Mn.n 0.0 to 2047.7 the specified Memory Bit, also from a M56.4
Memory Byte or Memory Word
Qn.n 0.0 to 511.7 the specifie d Output Bit, also from a Q411.7
Output Byte or Output Word
l Absolute Addresse s
The left column (Column 1) of the symbolic table is reserved for the absolute address.
Any address identifier (alpha character) entered in a lower case letter will be changed
into a upper case letter during format, save, or sort operations.
The alphabetic sorting of the symbolic table is using the ASCII value. Alpha characters
follow numbers.
l Symbolic Addresse s
The second column (column 2) is reserved for symbolic addresses. The symbol may
be up to 24 characters (alpha and numeric characters). The actual number of
characters displayed on the screen in the LAD and CSF presentation is dependent on
the selection from the preferences dialog box (see chapter 3.2.11.2). In STL and Block-
STL (source text) presentation, the symbolic address is always displayed with up to 24
characters.
Note:
For compatibility considerations we strongly recommend that you use only letters
and numbers. Do not use any "special characters".
l Comment Field
The third column (column 3) in the symbolic table is used for the comment. The
comment may be up to 80 characters (alpha and numeric characters). Upper and lower
case are permitted.
You may enter separate comment lines in the symbolic table. A comment line must
start with a semicolon ( ; ) character. These comment lines are only displayed in the
symbolic table and are not assigned to an absolute address.
Page Break
The characters .PA at the beginning of a line will force a page break at this point.
These characters are saved with the symbolic table.
Additional comment
;
The semicolon character ( ) at the beginning of a line defines that line as a comment
line. Comment lines are not assigned to any absolute address.
l Absolute Operands
The left column (Column 1) of the symbolic table is reserved for the absolute operands.
Any operand identifier (alpha character) entered with a small letter will be changed to a
capital letter during the format, save, or sort operation.
The alphabetic sorting of the symbolic table is using the ASCII value. Alpha characters
follow numbers.
The following operands may have a symbolic assignment. The list is sorted following
the ASCII value.
l Symbolic Addresse s
The second column (column 2) is reserved for symbolic addresses. The symbol may
be up to 24 characters (alph a and numeric characters). The actual number of
characters displayed on the screen in the LAD and CSF presentation, is dependent on
the selection from the preferences dialog box (see chapter 3.2.11.2). In STL and Block-
STL (source text) presentation, the symbolic address is always displayed with up to 24
characters.
Note:
For compatibility considerations we strongly recommend that you use only letters
and numbers. Do not use any "special characters".
l Comment Field
The third column (column 3) in the symbolic table is used for the comment. The
comment may be up to 80 characters (alpha and numeric characters ). Upper and lower
case are permitted.
You may enter separate comment lines in the symbolic table. A comment line must
start with a semicolon ( ; ) character. These comment lines are only displayed in the
symbolic table and are not assigned to an absolute address.
Page Break
The characters .PA at the beginning of a line will force a page break at that point.
These characters are saved with the symbolic table.
Additional comment
The semicolon character ( ; ) at the beginning of a line defines that line as a comment
line. Comment lines are not assigned to any absolute address.
With the I NSERT key you can switch in and out the type-over mode. By default, S5 / S7
for Windows makes room for any new characters you type in by moving existing
characters to the right.
You can change the insert mode and have S5 / S7 for Windows replace existing
characters with new characters. This is called type-over. This momentary mode is
indicated by the insertion point cursor.
l Insert mode. The cursor appears as a small, blinking, vertical line.
l Type -over mode. The cursor appears as a blinking black rectangle.
8 u Use the scroll bars until you reach the location to enter text.
u Click (press and release the left mouse button) the location where you want to position
the insertion point.
Positioning of the insertion point within the columns depends on the column.
Comment Column
The insertion point may be placed at any position in the comment column.
To move Press
Table 8-5 Moving the insertion point using the keyboard (symbolic table)
Note:
Always use the TAB key to move to the next column when you enter a new
Absolute Address, a new Symbolic Address, or a Comment in an empty line.
Use È only after entering the comment to move to the next line to enter the
next absolute address.
To select Do this
Any amount of text Drag over the text you want to select
A word Double-click the word
(within column)
To select Press
One character to the left +
One character to the right +
One line up +
One line down +
The line +END
The line +HOME
7 u Press ALT + Y.
The symbolic table file in your system's RAM is saved under the current file name
(symbolic table file name specified in the project file, see chapter 3.2.5).
7 u Press ALT + Y, S.
Note:
S5 / S7 for Windows provides different possibilities to save a new or modified
symbolic table. Editing takes place in the RAM of your PC. See chapter 3.2.11.2,
Save Blocks.
Immediately on Disk
The modified symbolic table is saved on disk whenever you select the Save
command from the editor window or by closing the editor window.
If the button is not marked, the modified data is stored in an intermediate buffer
whenever you execute a Save command from one of the editor windows. To store
the data on disk you have to execute the Save command from the Block menu in the
PC block list windows.
Executing the print command starts the printing of the symbolic table window.
7 u Press ALT + Y, P
The symbolic table will be printed using the presets from the documentation layout
dialog box (see chapter 3.2.13.1).
In the symbolic table you cannot assign an absolute address or a symbol twice. The
command Test for Double use checks the symbolic table for any match of absolute
addresses and symbols. If S5 / S7 for Windows finds a double use, an error message
will be displayed and the faulty line will be marked. After correcting the fault, run Test
for Double use again.
Absolute addresses entered with lower case characters are modified into upper case
characters.
7 u Press ALT + Y, D.
The Complete command, from the symbolic table menu, searches the PLC program
for addresses not defined in the symbolic table. These addresses will be listed at the
end of the symbolic table. The absolute address is used as the symbolic name. This is
an easy way to create a symbolic table.
7 u Press ALT + Y, M.
S5 /S7 for Windows provides tools to arrange (sort) the symbolic table.
Note:
Sorting may be done even if the Test for Double use has found absolute addresses
and symbols have been used more than once. Absolute addresses entered without
a symbol will get the same absolute address assigned as a symbolic name.
Use the Sort by Absolute Operands command to sort the symbolic table in the
alphabetically ascending order of the absolute addresses. This sort is done using
ASCII values (numbers are listed prior to alpha characters).
7 u Press ALT + Y, A, A.
7 u Press ALT + Y, A, Y.
7 u Press ALT + Y, A, S.
S5 / S7 for Windows User’s Guide
Chapter 8 Symbolic Table Page 346
7 u Press ALT + Y, E.
7 u Press ALT + M.
S5 / S7 for Windows keeps track of the edits you make. If you change your mind or
make a mistake, you can usually reverse the last action you took.
The S5 / S7 for Windows symbolic table editor fully supports the windows clipboard.
You may copy or move any marked text within the symbolic table or to another
application, using the windows clipboard.
l Moving
Moving means to remove (Cut) the selected text from one location and insert it in
another location. This can be within the same symbolic table, another symbolic table
from a different PLC program, or another windows application (e.g. Word Processor).
l Copying
Copying means to make a copy of the selected text and insert it in another location.
This could be within the same symbolic table, another symbolic table from a different
PLC program, or another windows application (e.g. Word Processor).
Table 8-8 Move or copy text using the keyboard (Symbolic Table)
The Delete command from the modify menu is used to delete marked (selected) text.
The Windows clipboard contents are not modified by this command.
Deleted text may only be returned to its original location by executing the Undo
command directly after deleting the text.
The Format command, from the modify menu, formats the symbolic table and
performs a syntax check. If S5 / S7 for Windows detects an error, an error message is
displayed indicating the incorrect syntax. Addresses defined in an absolute form that
have no symbol assigned will get the same name assigned as a symbol.
7 u Press F9.
7 u Press ALT, S.
The Search for command opens a dialog box where you can enter a text string that
you want to search for. The search function looks for identical ASCII strings and can
only be used in the STL presentations.
7 u Press ALT + S, S.
If an identical string is found the search is canceled and the identified string is marked
(blue background). If no match is found the search is canceled and a corresponding
message will be displayed.
You may restart the search after a text string has been found by pressing the F3 key.
You can repeat this process until you reach the end of the text.
l Find What:
In the text field Find What enter the text string you want to search for. The text field is
supported by the Clipboard copy function. It is wise to copy the string you want to
search for into the text field to avoid spelling mistakes.
l Options
The search function allows you to select options on how you want to handle the search
string.
Match Case
If the Match Case button is marked the search function will only find text strings that
have the same pattern of upper and lower case letters as the search string.
If the Match Whole Word Only button is marked the search function will only find
words having the same length as the search words.
Ignore Spaces
Text strings may have space characters included. To ensure that differences in the
number of spaces will not influence the search function you can mark the Ignore
Spaces button.
l Direction
l Search Area
The search may be performed in the text opened with the editor or only in the marked
portion of the text
l Start Search
The search may start at the beginning of the symbolic table or it may start from the
position of the insertion mark (Cursor).
The Replace command opens a dialog box where you can enter a text string that you
want to search for and another text string you want to replace it with.
7 u Press ALT + S, R.
l Find What:
In the text field Find What enter the text string you want to search for. The text field is
supported by the Clipboard copy function. Make sure that all the required spaces are
included in the search string. Spaces are handled as characters during the search
operation. It is wise to copy the string to search for into the text field to avoid spelling
mistakes.
l Replace With:
In the text field Replace With enter the replacement text string. The text field is
supported by the Clipboard copy function.
l Options
The search and replace function allows you to select options on how to handle the
search string.
Match Case
If the Match Case button is marked the search function will find only text strings that
have the same pattern of upper and lower case letters as the search string.
If the Match Whole Word Only button is marked the search function will only find
words having the same length as the search words.
With Confirmation
If you mark With Confirmation and S5 / S7 for Windows finds a match of the text
string, a dialog box will open.
Replace All
Mark the Replace All button if you want automatically replace all the matching text
strings.
l Direction
l Search Area
The search and replace may be performed in the text (Segment/ Network or Block)
opened with the editor or only in the marked portion of the text.
l Start Search
The search and replace may start at the beginning of the Segment/ Network or Block
or it may start from the position of the insertion mark (Cursor).
Use the Search Again command to restart a search after a matching text string was
found (see chapter 8.7.1, 8.7.2). S5 / S7 for Windows starts the searches for the next
matching text string.
7 u Press F3.
The PLC window can be opened whenever an external PLC is connected on-line with
a PC running S5 / S7 for Windows . The external PLC must be connected via a special
cable. For additional details on how to connect to an external PLC see chapter
3.2.11.1.
7 u Press ALT + W, L.
The Title bar displays S5 / S7 for Windows, the name of the open project (Calulating a
Sum_US), and the name of the window (PLC Block List).
Menu Bar
The menu bar contains a list of menus. You can open a menu by clicking the name of
the menu or by pressing the ALT key and then the underlined character of the menu
name. All the commands from the PLC Block List menus are described in this chapter.
Tool Bar
The tool bar provides instant access to frequently used S5 / S7 for Windows
commands. This tool bar is the same for all S5 / S7 for Windows application windows.
Click an icon with the mouse and the command is executed. You can reach these
functions with the keyboard via the window menu and/or the function keys.
The tool bar II provides icons to manipulate marked blocks in the PLC block list
window. The type of external PLC (S7 - CPU part number; S5 – CPU type) to be
connected online is displayed.
Transfer to PC. The blocks marked in the PLC block list are transferred from
the PLC to the PC.
Delete. The blocks marked in the PLC block list are deleted in the PLC.
7 Press + DELETE.
Compare Blocks. The block marked in the PLC block list (PLC block
contents) is compared with the same block stored in the PC RAM.
7 Press + DELETE.
You can customize the Workplace Column Title Bar by selecting the items you want to
display from the Preferences dialog box. For additional information see chapter
3.2.11.3. By holding the left mouse button and dragging the column limit, you can
adjust the width of the columns in the symbolic table workplace. The width of the
columns can be adjusted to accommodate the font selected (see chapt er 3.2.11.4).
Note:
Double Clicking the title of a column will sort the PLC Block List information in an
ascending order. Double Clicking the title a second time will sort the information in
a descending order.
S5 / S7 Workplace
In the PLC block List displays all the blocks that are stored in the PLC memory. These
are the blocks that belong to the PLC program and its system blocks (S7 - SFC, SFB;
SDB; S5 – special FB's). The way the information is listed depends on the settings in
the Preferences dialog box.
Workplace S5
Picture blocks (BB) that are displayed are not stored in the PLC (no starting address is
displayed). You can open the status display of a picture block to see the status
information of the defined operands. The picture blocks are only saved with the PLC
program in the PC. For more details see chapter 3.3.1 and 10.6.
Status Bar
The status bar can display one ore more of the following information :
l The name and the path of the active PLC program or the open PLC project.
l Information about the active command.
l Name and organization of the registered user.
l Status of the project (modified).
l Information about the command the mouse is pointing to.
S5 / S7 for Windows User’s Guide
Chapter 9 PLC Block List Page 357
Note:
The right mouse button may be used within the PLC Block List Workplace .
If the right mouse button is clicked, a menu with the commands to manipulate
the selected (marked) Block is opened.
Figure 9-3 Menu that is opened with the right mouse button with the commands for
manipulation of the selected (marked) Block
7 u Press ALT + P.
With the command Refresh PLC Block List from the PLC menu, the contents of the
PLC are read again. An updated list of all the PLC blocks stored in the PLC is
displayed in the PLC block list workplace.
7 u Press ALT + P, R.
Deleting blocks in the PLC does not remove these blocks from the PLC memory. The
deleted blocks still occupy space in the memory. If blocks with the same name are
transferred to the PLC, the old block remains in the PLC and occupies space in the
PLC memory. The command Compress, from the PLC menu, reorganizes the PLC
memory. All the unused blocks are deleted. After executing this command, only usable
blocks remain in the PLC memory
7 u Press ALT + P, O.
With the command CPU Start, from the PLC menu, the PLC starts to execute the
program. This command can only be executed if the CPU RUN switch is in the RUN
position and the program execution has previously been halted.
7 u Press ALT + P, S.
With the command CPU Stop, from the PLC menu, the PLC is put in the halt condition.
This command can only be executed if the CPU has been previously put in the RUN
condition.
7 u Press ALT + P, P.
7 u Press ALT + P, L.
With the Exit command, from the PLC menu, you may close the PLC block list window.
7 u Press ALT + P, E.
The PLC block list window is closed.
7 u Press ALT + B.
Note:
Commands and icons displayed in light gray are currently not available. These
functions may belong to an option or another mode must be selected to execute
these commands.
With the New Block command the PLC Block Editor Window is opened. The PLC
block editor and the PC block editor have basically the same functions. The PC block
editor is explained in detail in chapter 4. The PLC block editor allows you to work with
blocks stored in the PLC.
There are some differences in saving the modified Blocks in the PLC. We recommend
that you use the PC block editor to create new blocks and to modify existing blocks.
Note:
The PLC Block Editor allows you to add and modify blocks, segments (networks),
comments and labels. This data will only be saved in the PC if:
l the button On PC and PLC in the Preferences dialog box is marked (see
chapter 3.2.11.2) and
l the block in the PC RAM and the PLC memory are identical when the PLC
block editor is opened.
If the PLC block and the PC block are not identical (or new), no comment and no
labels (jump) will be displayed. Instead of labels, substitute labels (M001 etc.) will be
displayed.
We recommend, that you use the PLC block editor only for small modifications and
direct tests of a PLC program. In all other cases you should use the PC block editor
to modify and/or create a block and then transfer the block to the PLC.
The New Block command opens a dialog box. A text field is provided for the new
block name. The drop down list shows you the existing blocks. Modifying the segment
number is irrelevant. A new block always starts with the segment number one (1).
7 u Press ALT + B, N.
l Block
Enter the block name in the text field. A block name is made up of two character
identifiers and a counting number. A drop down list is provided to display the existing
blocks. S5 and S7 use different Block types and different Block names (see tables
below).
l Segment (Network)
In S5 terminology a PLC Block is divided into Segments. The S7 literature uses the
term Network to describe a portion of a Block. Because this manual describes both S5
and S7 subjects, you will find both terms have the same meaning.
A new block always starts with the segment (network) number one (1). Entering the
segment number is not required.
l Format
A new Block can be created in the Step® 5 (S5) or the Step® 7 (S7) syntax. The
default Block format is set in the Miscellaneous tab (Preferred Syntax) of the
Preference dialog box (see chapter 3.2.11.5). If only S5 for Windows or
S7 for Windows is installed only the corresponding button is active.
After entering the new Block name and selecting the Block format confirm with OK.
The Block Editor window is opened and ready to create a new Block.
FC Function
S7-300/400
CPU used
FB Function Block
SFC System Function
SFB System Function Block
DB Data Block
SDB System Data Block
The New Step Sequence Block command opens a dialog box to name the new block
name. The drop down list shows you the existing blocks. Modifying the segment
number is not necessary. A new block always starts with the network (segment)
number one (1). This command is only available with the G5 for Windows option.
Detailed information on how to use the graphical step sequence programming can be
found in the S5 for Windows User's Guide. Currently you can only select a Block in the
S5 format.
7 u Press ALT + B, S.
Figure 9-7 Enter new Block (Step Sequence Block) dialog box
The Modify command opens the PLC Block Editor window. The selected block from
the PLC block list window for is ready for modifications.
If a block has been selected (marked) in the PLC block list window, the PLC Block
Editor window is opened and the first segment of the marked block is ready for
modifications.
If no block was selected (marked) in the PLC block list window, the Modify Block
dialog box opens.
l Block
Select the block name to be modified from the drop down list. S5 and S7 use different
Block types and different Block names (see tables 9-1, 9-2).
l Segment (Network)
l Format
Select the format of the block to be modified. The default block format is set in the
Miscellaneous tab (Preferred Syntax) of the Preference dialog box (see chapter
3.2.11.5).
Confirm the selection with the OK button. The PLC Block Editor window is opened and
ready to modify the block.
S5 for Windows provides special masks as dialog boxes to generate the data blocks
DB1 and DX for the PLC 135U, 155U and 155H. These commands are not available
with S7 for Windows . For more details see chapter 3.3.9.
7 u Press ALT + B, K.
The Transfer to PC command is used to transfer blocks to the PC via the serial link.
The selected (marked) blocks in the PLC block list window are transferred to the PC.
This can be a single block or multiple blocks.
The transfer is done via the serial link defined in the preferences (interface tab) dialog
box (see chapter 3.2.11.1). If a block to be transferred already exists in the PC, a
dialog box (figure 9.10) will open to allow you to override the block or to cancel the
transfer.
Note:
If you want to transfer several blocks to the PC, mark these blocks in the PLC block
list. For details on how to mark several blocks see chapter 3.1.1. The transfer
command starts the block transfer to the PC.
The command Transfer all Blocks to PC, from the block menu, is used to transfer all
blocks listed in the PLC block list window to the PC (transferring a complete PLC
program).
7 u Press ALT + B, A.
If a block is already stored in the PC, a dialog box (figure 9.10) will open to allow you to
overwrite the block or to abort the transfer.
If the No button is activated, the block listed in the dialog box will not be
transferred to the PC. The original block stored in the PC remains in the
PC. If another block is already stored in the PC, the dialog box will be
opened again.
Activating the Abort button will cancel the block transfer to the PC. No
further blocks are transferred.
Activating the All button will restart the block transfer. The PC block listed
in the dialog box will be overwritten. Any other block already stored in the
PC will also be overwritten. The dialog box will not be opened again.
Note:
You should only transfer blocks from the PLC to the PC if the selected blocks do not
exist in the PC RAM. If a block in the PC is overwritten by a PLC block, it is possible
that comments will be shifted and labels may not be valid anymore (labels are
exchanged with substitute labels (M001 etc.).
When transferring a Data Block (DB) from the PLC to the PC the Data Word formats
are changed. All data words will be displayed in the KH (hexadecimal) format because
the S5 PLC does not store the original data word format.
If you transferred a Data Block (DB) from the PLC to the PC and the data block did not
exist in the PC RAM, the following dialog box will open as soon as you try to edit the
data block:
The command Delete from the block menu deletes the marked blocks (one or several
blocks may be marked) in the PLC.
The marked blocks are deleted from the PLC block list window by the delete
command.
8 u Click Delete in the block menu or click the Delete icon in the tool bar.
7 u Press + DELETE
Prior to deleting the block(s) in the PLC, a warning dialog box will be displayed.
If the No button is activated, the block listed in the dialog box will not be
deleted in the PLC. If another block is marked in the PLC block list to be
deleted, the dialog box will be opened again prior to deleting the next
block.
Activating the Abort button will cancel the block delete to the PLC. No
further blocks are deleted
Activating the All button will delete all the marked blocks from the PLC
block list in the PLC. The dialog box will not be opened again.
The Delete All Blocks, command from the block menu, deletes all blocks shown in the
PLC block list in the PLC.
7 u Press ALT B, B
The following warning is displayed prior to deleting all blocks in the PLC.
You may only delete all blocks if the PLC is on halt. If the PLC is in the run mode the
following message will be displayed.
The Compare Blocks command, from the block menu, compares the blocks (marked
in the PLC block list) from the PLC with the blocks stored in the PC RAM (listed in the
PC block list).
7 u Press ALT + B, C.
If you want to Compare several blocks from the PLC, mark these blocks in the PLC
block list.
The Block compare window is opened to display the result of the compare (see chapter
9.4).
The Compare All Blocks command, from the block menu, compares all blocks (listed
in the PLC block list) from the PLC with the blocks stored in the PC RAM.
7 u Press ALT + B, P.
The Block compare window (chapter 9.4) is opened to display the result of the
compare
The Extended Comparison command from the Block menu is used to compare the
marked block (block from the PLC) with the corresponding block of the PC Block List.
This command requires the additional BlockDiff option. S5 / S7 for Windows offers
this powerful software package, BlockDiff, to compare PLC Blocks and PLC Programs.
You can find detailed information on how to use the BlockDiff software option in the
BlockDiff user's guide.
The Compare with File command from the block menu is used to compare the
marked block from the PLC Block List (one block or several blocks) with the
corresponding blocks of a PLC program file located at one of the PC drives. This
command requires the additional BlockDiff option. S5 / S7 for Windows offers this
powerful software package, BlockDiff, to compare PLC Blocks and PLC Programs. You
can find detailed information on how to use the BlockDiff software option in the
BlockDiff user's guide.
The Compare all Blocks with File command from the block menu is used to compare
all block listed in the PLC Block List with the corresponding blocks of a PLC program
file located at one of the PC drives. This command requires the additional BlockDiff
option. S5 / S7 for Windows offers this powerful software package, BlockDiff, to
compare PLC Blocks and PLC Programs. You can find detailed information on how to
use the BlockDiff software option in the BlockDiff user's guide.
The Window menu from the PLC Block List Window is identical with the window menu
from the PC block list window. For more details see chapter 3.5.
The Help menu from the PLC Block List Window is identical with the help menu from
the PC block list window. For more details see chapter 3.6.
The Title bar displays S5 / S7 for Windows, the name of the open project (Calulating a
Sum_US) and the name of the window (Block compare).
Menu Bar
The menu bar contains a list of menus. You open a menu by clicking the name of the
menu or by pressing the ALT key and then the underlined character of the menu name.
All the commands of the PC Block List menus are described in this chapter.
Tool Bar
The tool bar provides instant access to frequently used S5 / S7 for Windows
commands. This tool bar is the same for all S5 / S7 for Windows application windows.
Click an icon with the mouse and the command is executed. You can reach these
functions with the keyboard via the window menu and/or the function keys.
Display Field
In the display field the results of the block compare is listed. The following Information
is provided:
Status Bar
The status bar may displays one or more of the following pieces of information :
l The name and the path of the active PLC program or the opened PLC project.
l Information about the active command.
l Name and organization of the registered user.
l Information about the command the mouse is pointing to.
With the command from the block compare menu you can open the extended block
comparison (S5-S7 BlockDiff option), print the contents of the Block Compare Window,
or close the block compare window.
7 u Press ALT + B.
7 u Press CTRL + P
With the Exit command, from the Block Compare menu, you can close the Block
Compare Window.
7 u Press ALT + B, E.
The Window menu from the block compare window is identical with the window menu
from the PC block list window. For more details see chapter 3.5
The Help menu from the block compare window is identical with the help menu from
the PC block list window. For more details see chapter 3.6.
10 PLC Status
Commands from the PLC Status menus are used to perform online functions. These
functions are available with an external Hardware PLC, S5 / S7 for Windows PLC in a
PC (Software PLC) and the S5 / S7 Simulation PLC.
l Software PLC, the S7 for Windows, PLC in a PC, installed on the PC running S7 for
Windows
The PLC status window is called from the PLC block list window.
To open the PLC status window the Software PLC must be running and a PLC
program must be present in the Software PLC. No external connection is needed. This
could also be the S7 Simulation PLC.
To open the PLC status window the PC executing the Software PLC must be
connected via a null modem (see a appendix) with the PC executing S5 for Windows .
The PC must be powered up, the Software PLC must be running, and a PLC program
must be present .
l Software PLC, the S5 for Windows, PLC in a PC, installed on the PC running
S5 for Windows
The PLC status window is called from the PLC block list window.
To open the PLC status window the Software PLC must be running and a PLC
program must be present in the Software PLC. No external connection is needed.
The S5 PLC Status Window displays the same information as the S7 PLC Status
Window. The addresses displayed in the S5 PLC Status Window are absolute for the
whole PLC program.
The addresses displayed are in the S7 PLC Status Window are relative to the
beginning of the PLC Block (each PLC Block starts with the address 0000 hex.
The Title bar displays S5 / S7 for Windows, the name of the open project (Example),
the name of the window (S7 PLC Block status; / S7 PLC Block status) and the block
name (FB1).
Menu Bar
The menu bar contains a list of menus. You can open a menu by clicking the name of
the menu or by pressing the ALT key and then the underlined character of the menu
name. All the commands from the PLC Block List menus are described in this chapter.
Tool Bar
The tool bar provides instant access to frequently used S5 / S7 for Windows
commands. This tool bar is the same for all S5 / S7 for Windows application windows.
Click an icon with the mouse and the command is executed. You can reach these
functions with the keyboard via the window menu and/or the function keys.
The tool bar II provides the icons to open another network (segment) and to modify
operands. The number of the displayed network (segment) is also displayed.
7 Press F8.
7 Press F7.
Activating this function will Enlarge the PLC logic displayed in LAD and
CSF presentation or the font in STL presentation. The selected font must
be scaleable.
7 Press CTRL + G.
Activating this function will Reduce the PLC logic displayed in LAD and
CSF presentation. The selected font must be scaleable.
7 Press CTRL + S.
The Change Value dialog box will be opened to display and modify
process variables.
7 Press ALT + F6.
You can customize the Workplace Column Title Bar by selecting the items to be
displayed from the Preferences dialog box (miscellaneous tab). For additional
information see chapter 3.2.11.5. Holding the left mouse button and dragging the
column limit will adjust the width of the columns in the symbolic table workplace. The
width of the columns may be adjusted to compensate for the font selected (see chapter
3.2.11.4).
Workplace
The PLC logic with the status of the signals is displayed in the PLC status workplace.
When the entire segment doesn’t fit into the workplace, by using the scroll bars you
can move parts of the segment into view.
l A thin black vertical base line indicates that the segment is not executed. If the
segment is executed, the vertical base line is displayed as a bold red line.
Status Bar
Note:
The right mouse button may be used within the PLC Block List Workplace .
If the right mouse button is clicked, the menu that provides the commands to
manipulate the selected (marked) operand is opened.
Figure 10-2 Menu opened with the right mouse button click (PLC Status Window)
7 u Press ALT + D.
With the Set Operand command you can Set a previously marked operand (Bit). The
value of the corresponding byte is displayed in the tool bar II.
8 u Click the Set Operand icon in the tool bar or click Set Operand in the
status display menu.
Note:
The S5 PLC does not allow Forcing. An input or output is always overwritten by the
process image. Therefore, setting or resetting an operand may only be valid for one
CPU cycle.
The S5 Simulation PLC allows Forcing. A set or reset operand stays in the forced
stage until you change its stage again or it is overwritten by the PLC program.
Currently the S7-300/400 PLC also does not allow Forcing. An input or output is
always overwritten by the process image. Therefore, setting or resetting an operand
may only be valid for one CPU cycle.
With the Reset Operand command you can Reset an operand that was previously
marked and set operand (bit). The value of the corresponding byte is displayed in the
tool bar II.
8 u Click the Reset Operand icon in the tool bar or click Reset Operand in
the status display menu.
The Change Value command is used to modify and display process variables. A
dialog box will be opened. The content of the previously marked variable is displayed
in the value text field.
8 u Click the Change Value icon in the tool bar or click Change Value in
the status display menu.
l Name
The marked variable (operand) is displayed in the text field. You may also enter the
name of a variable (operand) you want to display or modify.
l Value
The value of the previously marked variable (operand) or the variable entered in the
name field is displayed in the text field. To modify the value enter the new value in the
text field. The value may be displayed and entered in different forms.
l S7 Values (Example)
l S5 Values (Example)
Name Dec Hex Bin ASCII Time Counter Floating Comment
Point
FB 50 84 54 01010100 “ T “ 84 decimal
T 25 123.1 KT 123.1
C 33 234 KC 234
6
FD 55 2E+06 2 * 10
With the Exit command from the status display menu, you can close the block status
window.
7 u Press ALT + D, E.
7 u Press ALT + B.
The Modify Block command will open the editor window and will display the block and
segment previously displayed in the status window.
7 u Press F10.
Special care must be taken when editing a PLC program with the PLC editor. For more
details see chapter 4.
The Called Block command will open a dialog box where you can select the block that
called the block displayed in the status display.
A block, with parameters to be exchanged, may be called from different blocks with
different parameters. If the called Block is defined, the status display will only display
the status with the parameters provided from the defined block.
7 u Press ALT + B, B.
Example:
The Block FB33 is called with parameters from the Blocks OB1, FB1, FB24, etc.
If FB1 is selected in the Inse rt Name of Called Block dialog box, the status display
shows FB33 with the parameters provided by FB1 when calling FB33. The status of
FB33 with the parameters provided by OB1, FB24, etc. is not displayed. If no block has
been selected the status display will show FB33 with the parameters provided by the
blocks OB1, FB1, FB24, etc. There is no differentiation as to who called block FB33.
l Block
From the drop-down list select the block that called the block and provided the
parameters being displayed in the status display workplace.
l Format
The block that called the block shown in the status display can be in an S5 or the S7
syntax. The format of the block calling the displayed block must be defined. If
S7 for Windows or S5 for Windows only is installed, the format is set to whichever is
installed by default.
Click the OK button to confirm the selection and to close the dialog box.
7 u Press ALT + S.
With the command Next Segment you may open the next segment (network) of the
same block. If you continue this process and the last segment is reached, the
command is deactivated and the command (icon) changes to a light gray color.
8 u Click Next Segment in the search menu or the Next Segment icon in the
tool bar.
7 u Press F8.
The next segment (network) is opened.
With the command Previous Segment you may open the previous segment (network)
of the same block and continue this process until the first segment of a block is
displayed. When the first segment is reached, the command is deactivated and the
command (icon) changes to a light gray color.
7 u Press F7.
The previous segment (network) is opened.
With the command Go to you may open any existing segment (network) of the same
Block. If you choose a segment number higher than the last segment number in this
block, the last segment is opened. This command opens a dialog box to enter the
segment number.
7 u Press ALT + S, G.
7 u Press ALT + P.
Note:
The settings (Symbolic Operands, Display Symbolic Table, Enlarge, and Reduce)
are valid only in the active status window. As soon as this window is closed the
selected preferences are valid (see chapter 3.2.11).
In Statement List the control task is described with mnemonic abbreviations in the
form of a list. S5 and S7 use different mnemonic abbreviations. For more details see
chapter 3.2.11.2.
In the example (Figure 10-10) of a statement list presentation, the RLO, the contents
(bit commands), the accumulator 1 and 2, and the status word are displayed. The
Workplace Column Title Bar can be customized by selecting the items from the
Preferences dialog box (miscellaneous tab) that are to be displayed. For additional
details see chapter 3.2.11.5. By holding the left mouse button and dragging the column
limit, you can adjust the width of the columns in the symbolic table workplace. The
operands can be displayed in absolute or as a symbol. The symbol table can be
displayed simultaneously.
The width of the columns may be adjusted to compensate for the font selected (see
chapter 3.2.11.4).
The S5 PLC Status Window displays the same information than the S7 PLC Status
Window. S5 for Windows uses the STEP® 5 mnemonic abbreviations and
S7 for Windows uses the STEP® 7 mnemonic abbreviations. The addresses displayed
in the S5 PLC Status Window are absolute for the whole PLC program.
The addresses displayed are in the S7 PLC Status Window are relative to the
beginning of the PLC Block (each PLC Block starts with the address 0000 hex.
S5 for Windows
In the S5 Status Display, statement list presentation, the absolute address, the RLO,
the contents (bit commands), the accumulator 1 and 2, and the status of the result
display are displayed. The information columns and their width are fixed.
In S5 / S7 for Windows the operands may be displayed in absolute or as a symbol. The
symbol table may be displayed simultaneously.
When the entire network (segment) doesn’t fit in the workplace, by using the scroll bars
you can move parts of the segment into view.
Light gray parts of a statement list indicate that that part is not executed (jump or
network not called) by the PLC.
If an operand was marked, the absolute name (operand), its symbolic name, and the
comment are displayed in the symbolic table. Also the use of the marked operand can
be directly shown in the cross-reference list (click the cross-reference icon or press the
key F4).
In a Control System Flowchart, the control task is described with symbols. For
additional details see chapter 3.2.11.2.
The operands may be displayed in absolute or as a symbol. The symbol table may be
displayed simultaneously.
The width of the columns may be adjusted to compensate for the font selected (see
chapter 3.2.11.4).
When the entire network (segment) doesn’t fit in the workplace, by using the scroll bars
you can move parts of the segment into view.
If an operand was marked, the absolute address, its symbolic name, and the comment
are displayed in the symbolic table. Also the use of the marked operand can be directly
shown in the cross-reference list (click the cross reference icon or press the key F4).
l Thin black dotted lines indicate a logical Low (0).
l Bold red (black) solid lines indicate a logical High (1).
l No lines indicate that the segment is not executed.
l S5 for Windows
With S5 for Windows in the Status display Control System Flowchart (CSF)
presentation, the control task is described with symbols based on DIN 40700. The
segment (G5 for Windows - step, transition, or SUL in the Detail Display) is displayed
in the status window as a control system flowchart (CSF).
In a Ladder Diagram the control task is described with symbols similar to those used
in circuit diagrams. The symbols are basically NO and NC contacts. Complex functions
are displayed with symbols based on DIN 40700.
The operands may be displayed in absolute or as a symbol. The symbol table may be
displayed simultaneously.
The width of the columns may be adjusted to compensate for the font selected (see
chapter 3.2.11.4).
When the entire network (segment) doesn’t fit in the workplace, by using the scroll bars
you can move parts of the segment into view.
If an operand was marked, the absolute address, its symbolic name, and the comment
are displayed in the symbolic table. Also the use of the marked operand can be directly
shown in the cross-reference list (click the cross-reference icon or press the key F4).
l Thin black dotted lines indicate a logical Low (0).
l Bold red (black) solid lines indicate a logical High (1).
l A thin black vertical base line indicates that the network (segment) is not
executed. If the segment is executed, the vertical base line is displayed as a
bold red line.
8 u Click Print Window in the presentation menu or the Print icon in the
tool bar.
7 u Press Ctrl + P.
A dialog box to setup the printer and start the printing process is opened.
7 u Press ALT + P, O.
Figure 10-17 Example of a status window displaying absolute and symbolic names (operands).
l S7 for Windows
Symbols defined in the symbolic table are shown in quotation marks "…" if used in the
Statement List (STL), Ladder Diagram (LAD), or Control System Flowchart (CSF)
presentation.
Symbols defined in the variable declaration are shown with the "#" character in front of
name.
l S5 for Windows
Symbols defined in the symbolic table are shown with a hyphen ( - ) in front of the
symbolic name if used in the Statement List (STL), Ladder Diagram (LAD), or Control
System Flowchart (CSF) presentation.
The Symbolic Table may be shown simultaneously with the network (segment)
displayed in the S7 Status Window workplace. A marked operand in the network is
also highlighted in the symbolic table showing the absolute address, its symbolic
name, and the symbol comment.
7 u Press ALT + P, T.
Figure 10-18 Example of a status window (LAD presentation) displaying a symbolic table.
This command allows you to adjust the size of the PLC logic displayed (CSF and LAD).
Each time you use the Enlarge command, the logic will be displayed in a larger scale.
The Enlarge and the Reduce command provide the tools to scale the display of the
logic for the momentary needs.
8 u Click Enlarge in the presentation menu or click the icon in the tool bar.
This command allows you to adjust the size of the PLC logic displayed (CSF and LAD).
Each time you use the Reduce command, the logic will be displayed in a smaller
scale. The Enlarge and the Reduce command provide the tools to scale the display of
the logic for the momentary needs.
8 u Click Reduc e in the presentation menu or click the icon in the tool bar.
Note:
Only scaleable fonts may be enlarged or reduced. All True Type fonts are scaleable.
The default System font is not scaleable
You may change the value of a process variable or display the value in another form
using the change value dialog box.
u Mark the process variable you want to modify or display. The line with the marked
process variable is shown with a black background.
Figure 10-20 Modify value of the DW2 of DB17 (from Picture Block BB1)
You may alter the value in the text field. For more information on how to enter the
value see chapter 11.2.3.
The commands from the external PLC status window are used to set and reset inputs,
outputs, and memory bits, and to display and change values (Online functions).
These functions are available with an external Hardware PLC, our Software PLC, the
PLC in a PC, the S7 Simulation PLC, and the S5 Extended Simulation PLC.
l S7 for Windows
l S5 for Windows
The External PLC Status Window is identical for S5 for Windows and S7 for Windows .
Note:
You may use this window to test the hardware wiring of a PLC. With no program
being executed on the PLC but having the PLC in its RUN mode you may click an
output bit in the Memory Bit Field and the corresponding output and the
connected device (e.g. relay) will be energized.
Activating an input device (e.g. limit switch) will mark the corresponding bit in the
Memory Bit Field.
The Title bar displays S5 / S7 for Windows, the name of the open project (Calculating a
sum), and the name of the window (External PLC Status.
Menu Bar
The menu bar contains a list of menus. You can open a menu by clicking the name of
the menu or by pressing the ALT key and then the underlined character of the menu
name. All the commands from the External PLC Status menus are described in this
chapter.
Tool Bar
The tool bar provides instant access to frequently used S5 / S7 for Windows
commands. This tool bar is the same for all S5 / S7 for Windows application windows.
Click an icon with the mouse and the command is executed. You can reach these
functions with the keyboard via the window menu and/or the function keys.
Ten (10) fields to define input, output, and memory bits (one byte) is
provided. To define a byte, enter the desired byte number in the
text field. An I for an input byte, a Q for an output byte, or an M for a
memory byte must be entered in front of the byte number. The PLC
program will put a mark in the corresponding bit position if the bit is
a logical one (high). You may set (or reset) a bit by clicking the
corresponding bit position.
Note:
The S5 PLC does not allow Forcing. An input or output is always overwritten by the
process image. Therefore, setting or resetting an operand may only be valid for one
CPU cycle.
The S5 Simulation PLC allows Forcing. A set or reset operand stays in the forced
stage until you change its stage again or it is overwritten by the PLC program.
Currently the S7-300/400 PLC also does not allow Forcing. An input or output is
always overwritten by the process image. Therefore, setting or resetting an operand
may only be valid for one CPU cycle.
View Field
Six (6) fields are provided to display variables. The value of the variable (Operand)
entered in the name field is displayed in Decimal, Hex , and Binary form. The decimal
value shown for the timers and counters are the decimal decoded values. The value
shown in the Hex and Bin fields are the momentary time or counter values.
7 u Press ALT + P.
The Change Value command opens a dialog box to enter a process variable. The
value of the process variable displayed may be changed.
l Name
The marked variable (operand) is displayed in the text field. You may also enter the
name of a variable (operand) you want to display or modify.
l Value
The value of the previously marked variable (operand) or the variable entered in the
name field is displayed in the text field. To modify the value enter the new value in the
text field. The value may be displayed and entered in different forms.
l S7 Values (Example)
Displayed Example Name Example Value
Format
Decimal QB1 0 - 255;
Decimal QW4 -32 768 - +32 767
Decimal QD6 -2 147 483 648 - +2 147 483 647
Hexadecimal IB1 00 – FF
Hexadecimal IW4 0000 – FFFF
Hexadecimal ID6 0000 0000 – FFFF FFFF
Binary M1.1 0-1
Binary MB1 0000 0000 – 1111 1111
Binary MW4 0000 0000 0000 0000 – 1111 1111 1111 1111
Binary MD6 0000 0000 0000 0000 0000 0000 0000 0000 (min)
1111 1111 1111 1111 1111 1111 1111 1111 (max)
Floating Point QD6 the number is presented with a decimal point (e.g.
44.11) or in the exponential form (e.g. 4.711E-36)
ASCII IB1 one (1) ASCII character
ASCII IW4 two (2) ASCII character
ASCII ID6 four (4) ASCII characters
Counter MW4 0 - 999
S5 Time MW6 0MS – 2H_46M_30S
S7 Time MD66 -24D_-20H_-31M_-23S_-648MS
24D_20H_31M_23S_647MS
Date MW4 1990-01-01 - 2168-12-31
Time of Day MD16 00:00:00 - 23:59:59.999
Pointer MD65
l S5 Values (Example)
Name Dec Hex Bin ASCII Time Counter Floating Comment
Point
FB 50 84 54 01010100 “ T “ 84 decimal
T 25 123.1 KT 123.1
C 33 234 KC 234
FD 55 2E+06 2 * 10 6
The process variable (operand) entered in the name field and the arrangement of the
input, output, and memory bit fields may be saved for future use. The settings are
saved in the project file and are available whenever you call the project.
7 u Click ALT + P, S.
With the Exit command of the PLC menu, you can close the External PLC Status
window.
8 u Click Close.
7 u Press ALT + P, E.
12 Interrupt Stack
If the PLC is in a stop condition, the Interrupt Stack (I-Stack) will display the reasons
for the stop condition. S7 for Windows and S5 for Windows have different stack
displays for diagnostics.
8 u Click the Interrupt Stack icon in the tool bar or click PLC Interrupt
Stack in the windows menu.
7 u Press ALT + W, S.
RUN
The PLC is in a the RUN condition. Clicking the button puts the PLC into a RUN
condition.
STOP
The PLC is in a STOP condition. Clicking the button puts the PLC into a STOP
condition
Register (ACCU's)
Status
The relevant bits (bit 9 … 15 unassigned) of the Status Word are displayed.
/FC 0 First Check Bit The value of the FC bit is used to control
(negated) chained logical and compare instruction.
Block
The block where the PLC program was interrupted (stop condition) is displayed.
Segment (Network)
The segment (network) number where the PLC program was interrupted (stop
condition) is displayed.
Data Block
If a data block (DB) was active when the PLC program was interrupted, the data block
number will be displayed.
A pull down list field is provided to display the portion of the PLC where the fault
occurred. The statement where the PLC went in a STOP condition is displayed with a
blue background.
Diagnostics
A button is provided to open the block address stack (see chapter 12.3).
7 u Press D.
The diagnostic buffer is designed as a cyclical first in first out buffer. If a new diagnostic
event occurs, all the information in the buffer is shifted down and the new event is
saved at the top of the buffer. If the buffer overflows, the oldest event is deleted. The
maximum size of the buffer depends on the S7-300/400 CPU in use.
The events are displayed with the date and time that they occurred.
7 u Press B.
8 u Click the Interrupt Stack icon in the tool bar or click PLC Interrupt
Stack in the windows menu.
7 u Press ALT + W, S.
RUN
The PLC is in a RUN condition. Clicking the button puts the PLC into a RUN condition.
STOP
The PLC is in a STOP condition. Clicking the button puts the PLC into a STOP
condition.
Register (ACCU's)
The contents of accumulators 1 and 2 are displayed in hexadecimal form. The contents
of the additional accumulators, 3 and 4 (certain S5 CPU's only) are displayed in the
Extended Interrupt Stack display.
Depth
Depending on the fault and the CPU type, several levels of I-Stack information may be
supplied. Additional information will be shown in the next display level. With the Next
button you may open the next level of I-Stack display.
Control Bits
A pull down list field is provided to display the control bits in a man-readable form.
Cause of Faults
A pull down list field is provided to display the faults in a man -readable form.
Block
The block where the PLC program was interrupted (stop condition) is displayed.
Segment (Network)
The segment (network) number where the PLC program was interrupted (stop
condition) is displayed.
Data Block
If a data block (DB) was active when the PLC program was interrupted, the data block
number will be displayed.
A pull down list field is provided to display the portion of the PLC where the fault
occurred. The statement where the PLC went into a STOP condition is displayed with a
blue background.
A button is provided to switch to the next level of the I-Stack (see Depth).
A button is provided to open the block address stack (see chapter 12.6).
7 u Press E.
Mnemonics Explanation
Depth The nesting level is shown
BEF-REG Statement register
SAZ (new) Step address counter (new)
DB-ADR Data block address
Mnemonics Explanation
BA-ADR Block address
BST-STP Block stack pointer
Block Block type and number
Level Number of nesting levels
REL-SAZ Relative step address counter
DBL-REG Data block register
BS-REG Block register
Tile No. Number of tiles
SAZ (old) Step address counter (old)
UAMK Interrupt display high word
UALW Interrupt display low word
Brackets Nesting stack entry 1 to 6 entered for A( and O(
anz1 0 0 1
anz0 0 1 0
Accu 1=0 or 0 is shifted Accu 1>0 or 1 is shifted Accu 1<0
ovfl Arithmetic overflow
ovfls Arithmetic overflow latched
or OR memory
erab First scan (negated signal)
stat Status of the operand of the last binary statement executed
ROL Result of logical operation
ACCU 1-4 Contents of the accumulators 1 -4
7 u Press B.
A button is provided to display details about the selected block (segment). Mark the
Block that you want details on.
7 u Press D.
13 S7 Hardware Configuration
S7 for Windows provides an integrated program to configure and set the parameters
and addresses of the S7-300/400 hardware CPU’s and modules.
With the S7 for Windows hardware configuration program it is possible to build a S7-
300/400 PLC configuration off-line by using the integrated hardware catalog. It is also
possible to read in a configuration of an existing S7-300/400 PLC (on-line).
The newly generated or existing PLC hardware configuration may be transferred to an
S7-300/400 PLC via a serial link (MPI cable).
The configuration data is saved in the System Data Blocks and may be transferred to a
PLC as part of the PLC program.
8 u Click Open S7 Hardware Configuration in the Options menu (see chapter 3.4.13.
u You may also double click an existing System Data Block, containing hardware
configuration data, to open the S7 hardware configuration window. The workplace will
display the current hardware configuration.
7 u Press ALT + O, 7.
If a project has a hardware configuration file already assigned the command S7
Hardware Configuration opens this file and is ready for modifications (see chapter
3.2.5.2).
If no hardware configuration file is assigned to the project a new S7 hardware
configuration file can be generated and assigned to the project.
The hardware configuration file is saved using the project name with the file name
extension *.CF7.
The title bar displays the name of the window and the card rack of the PLC.
The menu bar contains a list of menus. You open a menu by clicking the name of the
menu or by pressing the ALT key and than the underlined character from the menu
name. All the commands from the External PLC Status menus are described in this
chapter.
The tool bar provides instant access to frequently used commands. Click an icon with
the mouse and the command is executed. With the keyboard you can reach these
functions vi a the window menu and/or the function keys.
7 Press ALT + C, T
7 Press ALT + C, T
7 Press ALT + C, T
Delete. The module selected (marked) in the PLC module rack (slot) is
deleted.
7 Press ALT + C, T
7 Press ALT + C, T
7 Press ALT + C, T
By holding the left mouse button and dragging the column limit the width of the
columns in the Workplace Column Title Bar can be adjusted. The width of the columns
may be adjusted to accommodate the font selected (see chapter 3.2.11.4).
Description Example
Slot The S7-300/400 PLC’s has slot 4
orientated addressing for modules
(default addressing). The slot number
where the module is located is displayed.
Name The short name of the module is SM334 AI4 / AO2
displayed. x 8 / 8Bit
Identification No. The number identifying the module (with 6ES7 334-0CE00-
the revision number) is displayed. 0AB0
Input The input address area occupied by the IB 256 .. 263
module is displayed.
Output The output address area occupied by the QB 256 .. 259
module is displayed.
MPI Address The MPI address occupied by the 2
module is displayed.
7 u Press Alt, C.
7 u Press Alt + C, S.
7 u Press Alt + C, N.
If an existing hardware configuration is displayed in the workplace, S7 for Windows
prompts you to save the open S7 hardware configuration.
The New Profibus command is used to create a new S7-300/400 Profibus hardware
configuration. An additional window (Profibus(1)) is opened in the S7 Hardware
Configuration workplace to generate a new Profibus structure.
7 u Press Alt + C, N.
If an existing Profibus configuration is displayed in the workplace, S7 for Windows will
open an additional Profibus window to layout an additional Profibus structure
(additional coupling module).
7 u Press ALT + C, T.
The S7 hardware configuration is shown in the S7 Hardware Configuration workplace.
8 u Click the Transfer to PLC icon in the tool bar or click Transfer to PLC
in the configuration menu.
7 u Press ALT + C, L.
The S7 hardware configuration is transferred to the S7-300/400 PLC. The configuration
data is saved in System Data Blocks on the CPU.
The Open Hardware Catalog command opens the integrated S7-300/400 Hardware
Catalog. In this catalog S7-300/400 components are listed in a tree structure to build
up an S7-300/400 PLC offline. Profibus components are also listed to build a Profibus
hardware structure.
8 u Click the Open Hardware Catalog icon in the tool bar or click Open
Hardware Catalog in the configuration menu.
7 u Press ALT + C, O.
The size of the hardware catalog window may be changed any time. The catalog is
built up in the explorer like a tree structure.
The hardware catalog may be extended any time. To update and to add additional
modules to the S7-300/400 hardware catalog an update service has been set up.
Via the homepage www.IBHsoftec.de you may download additional and updated
*.CFB files.
Just copy the downloaded files into the CFB folder located in the S5 / S7 for Windows
system folder (usually S5W). The next time S7 for Windows is started the new or
updated *.CFB files are automatically integrated into the hardware catalog.
A *.CFB file holds all the necessary information to configure an S7-300/400 hardware
module (CPU, Input Module, Output Module, etc.) when using the S7 for Windows
hardware configuration software.
It is also possible to update and to extend the Profibus components of the
S7 for Windows hardware catalog. The manufactures of Profibus components supply
GSD files describing the hardware and the required configuration settings.
S7 for Windows can read the standardized GSD files. Copy the GSD files into the GSD
folder located in the S5 / S7 for Windows system folder (usually S5W). The next time
S7 for Windows is started the new or updated *.GSD files are automatically integrated
into the Profibus portion of the hardware catalog.
Some CPU's (e.g. CPU 312) have the ability to transfer the contents of the PLC work
memory (RAM = volatile memory ) into non-volatile memory (ROM). The ROM area is
physically made up of EEPROM modules.
7 u Press ALT + C, R.
To initiate the PLC program transfer from the RAM area into the non-volatile ROM
area, the CPU key switch must be in the STOP position. If the Transfer from RAM to
ROM command was initiated without having the key switch in the STOP position, a
warning will be displayed and the command is aborted. Confirm the warning, place the
key switch in the STOP position and repeat the Transfer from RAM to ROM
command.
The successful transfer of the PLC program from RAM to the ROM is indicated.
Note:
In the CPU (e.g. CPU 312) the integrated EEPROM (ROM) modules can only be
overwritten. It is not possible to delete the contents directly. The EEPROM module
must be overwritten with "null" data.
If there is no PLC Program located in the RAM area of the CPU and the Transfer
from RAM to ROM command is executed all data in the EEPROM module is
erased.
With the Modify command, the Parameter dialog box of the S7-300/400 module,
marked in the S7 hardware configuration workplace window, is opened. The
Parameter dialog box lists all the parameter of the module.
Double click the parameter for modification. A dialog box regarding this parameter is
opened. The limits are displayed regarding the changes in the parameter. The
integrated help may directly be open by activating the Help button of the Modify
Parameter dialog box and explains the use of the parameter and provides some
background information.
7 u Press ALT + C, M.
The Module Parameter dialog box has a vertical scroll bar to display very large
parameter list. All parameter are preset.
l Modify
u Mark the parameter you want to modify.
l Print
Activating the Print button will print the contents of the
Module Parameter dialog box. The printout is done using the
settings from the dialog boxes, Page Setup and Printer Fonts, which can be opened
from the Configuration menu (see chapter 13.2.11, 13.2.12).
The Print command from the Configuration menu is used to print the complete S7
Hardware Configuration. The printout is done using the settings from the dialog boxes,
Page Setup and Printer Fonts, which can be opened from the Configuration menu
(see chapter 13.2.11, 13.2.12)..
8 u Click the Print icon in the tool bar or click Print in the configuration
menu.
7 u Press ALT + C, P.
With the dialog box you may select the number of copies to be printed. The
documentation can also be printed to a file.
The button Properties opens another dialog box to setup the active printer. From the
drop down list Name you can select another printer.
The appearance of the dialog box, Print, and the other dialog boxes, which can be
opened from the Print dialog box, is dependant on the printers installed under
Windows.
Activating the OK button starts the actual printing process.
The Print command from the Configuration menu is used to print an overview of the
S7 Hardware Configuration. This overview lists the S7-300/400 hardware modules of
the project defined in the S7 Hardware Configuration Window. The printout is done
using the settings from the dialog boxes, Page Setup and Printer Fonts, which can be
opened from the Configuration menu (see chapter 13.2.11, 13.2.12)..
7 u Press ALT + C, V.
The command opens the print dialog box (see figure 13-10) where you can select a
printer and to start the actual printing process.
7 u Press ALT + C, U.
The standard Windows page setup dialog box allows you to select the size, the source,
the orientation, and the margins of the paper you want to print on.
The Printer button of the page setup dialog box opens up a dialog box to select a
printer from the list of the printers you have installed under Windows. Additional
buttons are provided to setup the printer options. The setup possibilities depend on the
selected printer.
Note:
The settings of the Page Setup dialog box and the Printer selection as well as all
the printer option selections are standard windows settings. These settings are only
saved in Windows. They are not saved with the project.
All the selections from the Page Setup dialog box can be overwritten for the current
print job with the settings from the Print dialog box (see chapter 13.2.9, 13.2.10).
The Printer Fonts command from the Configuration menu is used to select the font
to be used for the printouts initiated from the S7 Hardware Configuration window.
7 u Press ALT + C, F.
l Font:
Select the font from the list field. All the fonts offered by windows may be selected.
l Font style:
The font style may also be selected.
l Size:
The selection of the font size depends on the size of the paper (landscape, portrait)
used for the printout. You may have to decrease the size of the font to fit the Overview
Printing on a single sheet without line breaking.
Note:
The font selection done via the Fonts Type settings are used for printing only.
With the Exit command, from the configuration menu, you can close the S7 Hardware
Configuration window.
7 u Press ALT + C, E.
7 u Press Alt, M.
With the command Insert, the module marked in the S7-300/400 hardware Catalog is
inserted into the marked slot in the Module Rack shown in the S7 Hardware
Configuration window workplace.
8 u Click the Insert icon in the tool bar or click Insert in the module menu.
7 u Press ALT + M, I.
Some modules require a particular slot location other modules may occupy more than
one (1) slot.
With the command Delete, the marked module is deleted from the Module Rack
shown in the S7 Hardware Configuration window workplace.
8 u Click the Delete icon in the tool bar or click Delete in the module menu.
7 u Press ALT + M, D.
With the command Specify, the marked module is from the Module Rack shown in
the S7 Hardware Configuration window workplace can be specified. A corresponding
dialog box is opened.
8 u Click the Insert icon in the tool bar or click Insert in the module menu.
7 u Press ALT + M, I.
Only certain modules have the capability of further specification. If the command is
executed and the module does not have the capability of a further specification a
warning is displayed.
7 u Press Alt, P.
Via the MPI (multi point interface) several S7-300/400 CPU’s and/or programmable
modules may be connected with the PC running the S7 hardware configuration
program. Each of the CPU’s and modules connected together must have unique MPI
addresses.
The command MPI Address allows you to select the CPU (module) you want to
communicate with.
Note:
If, in addition to the CPU, communication processors (CP’s) and other
programmable modules (FM’s) are located in the S7-300/400 PLC, these modules
(CP, FM) will have an MPI address automatically assigned.
The firmware assigns the MPI address of the CPU +1 to the first module. The
second module will get the CPU MPI address +2 etc..
The communication rate is dependent on the setting of the PC-MPI cable and may
be between 19.2 and 115.2 kBaud (187.5 kBaud between the modules). See
chapter 3.2.11.1 for information on the interface settings.
The maximum cable length of the complete network (without additional amplifiers) is
limited to 50 meters (160 ft.).
The table shows some default MPI address settings. Unique MPI addresses must be
assigned to the devices prior to connecting the devi ces to the MPI network.
7 u Press ALT+ P, M.
Not all the devices in the S7-300/400 PLC series can be set to the same maximum
MPI address. It is very important to limit the maximum MPI address of all devices being
connected to a bus to the same value (see chapter 3.2.11.1). All devices of the S7-
300/400 PLC series allow the setting of 15 to be the maximum MPI address. The
default setting of the maximum MPI address of S5 / S7 for Windows is 15.
MPI addresses between 0 and 126 may be assigned to the devices connected to the
MPI network.
Note:
Make sure that all devices connected to one MPI Bus have the same Max. MPI
Address setting. If devices with different Max. MPI Address settings are connected
on one bus the devices will not be recognized and communication cannot take
place.
The S7 CPU Selection dialog box displays the MPI addresses of all the devices
connected via the MPI network. The device you want to communicate with can be
selected.
The PLC Date and Time command from the preference menu opens the PLC Date
and Time dialog box to set the date and time of the S7-300/400 PLC CPU. The PLC
internal clock has a battery backup and can be used by the PLC program by calling the
corresponding SFC system function.
7 u Press ALT + P, P.
u Enter the date and time in the text field to set the internal PLC clock.
Confirm with the OK button and the new date and time is transferred to the internal
CPU clock of the S7-300/400 PLC connected on-line with the PC.
S5 / S7 for Windows offers the ability to display the Input and Output addresses of
modules in the Module Rack shown in the S7 Hardware Configuration window
workplace in an S5 format.
7 u Press ALT + P, A.
7 u Press ALT+ W .
The Cascade command causes the open windows to resize and overlap so that each
title bar is visible in the S7 Hardware Configuration window.
7 u Press ALT + W, C.
The Tile Horizontal command arranges the open windows in the S7 Hardware
Configuration window in smaller sizes to fit under each other in the basic window
workplace.
7 u Press ALT + W, H.
The Tile command arranges the open windows in the S7 Hardware Configuration
window in smaller sizes to fit next to each other on the basic window workplace.
7 u Press ALT + W, T.
7 u Press ALT + W, A.
7 u Press ALT + H.
The Index command from the help menu gives you a list of all help topics for S7
hardware configuration.
7 u Press ALT + H, I.
7 u Press ALT + H, K.
This command opens the How to use Help file that displays instructions on how to use
the Windows help files.
7 u Press ALT + H, H.
The About Hardware Configuration opens a display field to provide you information
such as serial number, version, copyright, etc.
7 u Press ALT + H, A.
1. Start the S5 / S7 for Windows software and execute the command New from the
File menu (see chapter 3.2.1). The workplace of the PC Block List is cleared.
2. Execute the command Save As from the File menu (see chapter 3.2.4).
3. The dialog box Save As is opened.
6. You may use the dialog box Project Files to check the files that belong to a
project (see chapter 3.2.5).
7. Use the command Open S7 Hardware Configuration from the Options menu to
open the S7 Hardware Configuration window.
Figure 13-27 Hardware Catalog, S7-400 Central (Module) Rack selected (marked)
Note:
In the S7-300/400 Hardware Catalog several modules are listed more than once.
These are modules that have the same name but different revision numbers or
different option numbers. Make sure that the module you select has the identical
part identification number (shown in the information field below the catalog) as the
hardware module you are using in the S7-300/400 PLC.
11. Mark the first Slot in the in the Central Rack to place the Power Supply Module.
Figure 13-28 S7 Hardware Configuration window showing the Central Rack CR1 (rack number 0)
12. Double click the S7-400 Power Supply PS407 10A. The module is placed into the
rack slot 1. Due to the width of the module slot number 2 is also occupied. You
must mark the slot number 3 to insert the CPU.
13. Double click the S7-400 CPU 416-2 DP. Make sure that the slot 3 is marked in the
rack and select the CPU with the correct identification number. The hardware
catalog currently lists six (6) different versions of the CPU 416-2 DP. The module
is placed into the rack slot 3. Due to the width of the module the slot number 4 is
also occupied. You must mark the slot number 5 to insert additional hardware
modules.
14. Insert additional modules from the hardware catalog into the rack by double
clicking the module in the hardware catalog to build up a PLC configuration.
17. After marking slot 1 in the Profibus window double click DB-Gateway in the
hardware catalog (Profibus section). The DB-Gateway module is inserted the slot
1 of the Profibus window.
18. Double click the slot 1 in the Profibus window showing the DB-Gateway with the
Profibus address 1. The window Profibus (1) – Slot: 1 - DB-Gateway is opened
and ready to accept DB-Gateway Profibus modules.
19. After marking the slot 1 in the Profibus (1) – Slot: 1 - DB-Gateway window, you
may double click the modules listed in the hardware catalog beneath the DB-
Gateway (Profibus section). The I/O modules are inserted in the slots of the DB-
Gateway module.
Figure 13-35 Hardware catalog, I/O module for the DB-Gateway base module selected.
20. Figure 12-36 shows an example of I/O modules entered in the DB-Gateway base
module (Profibus (1) – Slot: 1 - DB-Gateway window).
S5 / S7 for Windows User’s Guide
Chapter 13 S7 Hardware Configuration Page 425
21. You may enter additional base modules into the Profibus (see figure 12-32). This
could be additional DB-Gateway module or any other base module from the
hardware catalog.
Note:
Information about the Profibus base module and the modules to be connected with
this base module comes from the GSD files supplied by the manufacturer of the
Profibus components.
22. The button Profibus Parameter (see figure 12-32) opens a dialog box listing the
parameter. The Profibus Parameter dialog box has a vertical scroll bar to display
the parameter list which is often very large.
All parameter are preset. For a modification mark a
parameter and activate the Modify button or just double
click the parameter.
The dialog box Modify Parameter is opened.
Depending on the type of parameter the dialog box may give you a choice of
parameters to select from or you may have to enter a value. The limits and the
dimension of the parameter are displaced.
The valid parameter is shown (value or marked choice). The integrated help may
be called by activating the help button to give you some background information
on the parameter
Figure 13-37 Profibus parameter dialog box with the modify parameter dialog box opened.
23. The button Module Parameter (see figure 13 -36) opens a dialog box listing the
parameter.
All parameter are preset.
For a modification mark a parameter and activate the
Modify button or just double click the parameter. The
dialog box Modify Parameter is opened.
Depending on the type of parameter the dialog box may give you a choice of
parameters to select from or you may have to enter a value. The limits and the
dimension of the parameter are displayed. The valid parameter is shown (value or
marked choice).
The integrated help may be called by activating the help button to give you some
background information on the parameter.
Figure 13-38 Parameter Profibus Module dialog box with the opened modify parameter dialog
box.
S5 / S7 for Windows User’s Guide
Chapter 13 S7 Hardware Configuration Page 427
In this way you can configure the S7-300/400 hardware corresponding with your
project and you can set the parameter of the individual modules accordingly.
After configuring the hardware completely you can save the configuration by executing
the Save Configuration command from the Configuration menu (see chapter
13.2.1).
Now you can close the S7 Hardware Configuration (Exit command from the
Configuration menu - see chapter 13.2.13). In the open PC Block List window the
System Data Blocks (SDBnn) generated with the S7 Hardware Configuration are listed.
Figure 13-39 PC Block List displaying System Data Blocks generated with the S7 Hardware
Configuration
S5 for Windows includes an Integrated Simulation PLC. Special features are added
to allow you to easily test PLC programs. No additional hardware is needed.
7 u Press ALT + W, M.
The Title bar displays S5 / S7 for Windows, the name of the open project (Example1),
a
nd the name of the window (S5 Simulation PLC).
The menu bar contains a list of menus. You can open a menu by clicking the name of
the menu or by pressing the ALT key and then the underlined character from the menu
name.
The tool bar provides instant access to frequently used S5 / S7 for Windows
commands. This tool bar is the same for all S5 / S7 for Windows application windows.
Click an icon with the mouse and the command is executed. With the keyboard you
can reach these functions via the window menu and/or the function keys. For more
details about the tool bar icons see chapter 3.1.
Four (4) buttons are provided to display and control the start and stop of the integrated
simulation PLC.
l RUN
Activating this button will start the simulation PLC. The execution starts with the
instruction where the PLC program was interrupted.
l STOP
Activating this button will stop the simulation PLC. The execution of the PLC program
is interrupted immediately.
A display box is provided to indicate the number of executed cycles of the simulation
PLC. With the Step button you can execute one (1) complete PLC program cycle.
The executed PLC program blocks are displayed in the pull down list.
l Step
A button is provided so you can execute the PLC program in single steps, one (1) PLC
program block after another. The pull down list displays the executed PLC blocks. The
next block to be executed is displayed with a blue background.
l Break Point
A button is provided to set a break point at a certain PLC program block (the program
is interrupted before the block is executed). To set a break point, mark the block and
click the break point button. The break point is indicated in the pull down list by BPT: in
front of the block. Marking the corresponding line and clicking the break point button
again releases the breakpoint.
In the Instruction pull down list, the executed PLC program instructions (statement list
presentation) are displayed.
l Step
A button is provided to execute single instruction step by step. The pull down list
displays the executed instructions. The next instruction to be executed is displayed
with a blue background. The result of the logical operation (RLO) and the contents of
the accumulators are displayed.
l Break Point
A button is provided to set a break point at a certain PLC instruction (the program is
interrupted before the instruction is executed). To set a break point, mark the
instruction and click the break point button. The breakpoint is released by clicking the
break point button again.
The pull down list displays the blocks available for execution in the simulation PLC.
The block length (in Kbytes) and the memory segment address (for internal use only)
are also displayed.
l Disable
A button is provided to lockout blocks from execution. To lockout a block, mark the
block in the pull down list and click the disable button. When executing the PLC
program the simulation PLC ignores the disabled block. Several blocks may be
disabled. A disabled block has the word Disabled in the block name line.
l Enable
A button is provided to enable the execution of a previously disabled block. To enable
a block, mark the block in the pull down list and click the enable button.
Six (6) fields are provided to display variables. The value of the variable (operand)
entered in the name field is displayed in Decimal, Hex , and Binary form. The decimal
value of timers and counters displayed are the decimal decoded values. The value
shown in the Hex and Bin fields are the momentary time or counter values.
If you want to display more than six (6) values simultaneously you should use a picture
block (BBxx). For more details see chapter 3.3.1.
Ten (10) fields to define input, output, and flag bytes are provided. To define a byte,
enter the desired byte number in the text field. An I for an input byte, a Q for an output
byte, or an F for a flag byte must be entered in front of the byte number. The PLC
program will put a mark in the corresponding bit position if the bit is a logical one
(high). You may set (or reset) a bit by clicking the corresponding bit position.
Note:
The simulation PLC supports Forcing. A set input, output, or flag remains in the set
position until the program overwrites it or is reset manually.
The status bar displays the name and the path of the PLC program executed on the
simulation PLC, the progress of a selected action, or information about the icon the
mouse pointer is positioned on.
A list of the instructions set of the integrated simulation PLC can be found in the
appendix of this manual.
7 u Press ALT + P.
The Change Value command is used to modify and display process variables. A
dialog box will be opened. The content of the selected variable is displayed in the value
text field.
7 u Press ALT + S, V.
The Change Value command opens a dialog box to enter a process variable. The
value of the process variable displayed may be changed.
The value of the process variable (operand) entered in the name field is displayed in
the text field. To modify the value enter the new value in the text field.
l Name
l Value
The value of the previously marked variable (operand) or the variable entered in the
name field is displayed in the text field. To modify the value enter the new value in the
text field. The value may be displayed and entered in different forms.
DRn , dbn or Xdbn Data Word (right byte) DR3,X12 = DR3 of DX12
DWn , dbn or Xdbn Data or Extended DX DW3,12 = DW3 of DB12
Fn or FBn Flag (Byte) F5 or FB67 or F15.6
FWn (Word) FW45
In or IBn Input (Byte) I1 or IB3 or I47.1
l S5 Values (Example)
Name Dec Hex Bin ASCII Time Counter Floating Comment
Point
FB 50 84 54 01010100 “ T “ 84 decimal
T 25 123.1 KT 123.1
C 33 234 KC 234
6
FD 55 2E+06 2 * 10
With the Exit command, from the simulation PLC menu, you can close the simulation
PLC window.
7 u Press ALT + S, E.
7 u Press ALT + P.
The simulation PLC execution time is set in msec. The execution time is defined as the
time from the beginning of one PLC program cycle to the beginning of the next PLC
program cycle. With a set cycle time, the inputs and outputs are always handled in the
same time sequence.
The execution time required depends on the cycle time (length) of the PLC program.
With the simulation PLC, the set time is a compromise between the reaction time of
your PC to inputs (key strokes) and a fast PLC execution time. Therefore, to set the
execution time is dependant on the speed of your PC and the length of the PLC
program.
7 u Press ALT + P, E.
This command allows the simulation PLC to ignore commands (PLC instruction) that
the simulation PLC is unable to execute (system commands). This command enables
the execution of PLC programs written for Simatic® S5 PLC's above the 115 U.
7 u Press ALT + P, I.
The selected function is marked with a .
The adjustments made with the commands from the setup menu, the settings of the
view field, and the settings of input, output and flag field are normally temporary
settings. As soon as the simulation PLC window is closed the default settings will be
activated again.
With the Save Settings command the current settings of the commands from the
setup menu, the settings of the view field, and the settings of input, output and flag field
are saved in the project file and are available when you open the project again.
7 u Press ALT + P, S.
The current settings are saved.
Appendix
This example shows how to transfer a PLC Program from S7 for Windows to the
Siemens S7 Programming System.
The example PLC program S7W_EXP has been generated with the S7 for Windows
programming system that includes a Symbolic Table.
Make sure that the PLC Program generated with S7 for Windows can run on the
destination S7-300/400 PLC.
The symbolic table and the actual S7-300/400 PLC program are transferred to a floppy
disk by using the File, Export command.
8 u Click Export in the File menu from the PLC Block List window (see chapter 3.2.7.2).
7 u Press ALT + F, I.
7 u Press ALT + F, I.
The new project may have the name S7W_S7 (or any other name). Confirm with the
OK button.
8 u Mark the "S7W_S7" icon, pull-down the Insert menu and click the command
1 S7-Program.
7 u Use the ARROW and the TAB keys to mark the "S7W_S7" icon.
u Press ALT + I, P, 1.
7 u Mark the S7-Program (1) icon and confirm with the ENTER key
The folders Source Files, Symbols, and Blocks are set -up (figure A – 9).
Figure A - 9 Project with the folders Source Files, Symbols, and Blocks
8 u Mark the Source Files icon, pull -down the Insert menu and click the command
External Source File.
7 u Use the ARROW and the TAB keys to mark the Source Files icon.
u Press ALT + I, X.
7 u Mark the Source File icon and confirm with the E NTER key
7 u Mark the S7W_Exp icon and confirm with the E NTER key
8 u Click New in the File menu of the Source Text Editor window
7 u Press ALT + F, I.
Figure A - 14 The Compile command from the File menu of the Source Text Editor window
The completion of the compile function is indicated. Any errors and warnings are
displayed.
7 u Mark the Symbols icon and confirm with the E NTER key
The Symbolic Editor window is opened. The importation of a symbolic table is
initiated with the Import command from the Symbolic Table menu in the Symbolic
Editor window.
The example is importing the Symbolic Table from the S7W_S7. Any other Symbolic
Table exported with S7 for Windows may also be imported.
8 u Click Import in the Symbolic Table menu of the Symbolic Editor window
7 u Press ALT + S, I.
With the command Save from the Symbolic Table menu of the Symbolic Editor window
you may now complete the importation of a complete PLC program.
The imported project is now ready for any other modification or can be transferred
directly into an S7-300/400 PLC.
S5 / S7 for Windows supports the Dynamic Data Exchange (DDE) to exchange data
between S5 / S7 for Windows and other windows applications. With DDE you can
exchange data between the integrated S5 Simulation PLC, an online hardware PLC,
the S5 / S7 for Windows software PLC, PLC in a PC, and any other windows
applications.
S5 / S7 for Windows uses the DDE Hot Link. Data is only transferred when there has
been a change in the data. Several DDE channels may be opened. It is wise to keep
the number of open DDE channels as low as possible. An excess of open DDE
channels will drastically reduce the performance of the PC.
The S5 / S7 for Windows software PLC, PLC in a PC, provides a special DDE
Manager to exchange data directly with other windows applications without going
through S5 / S7 for Windows.
If DDE is used with an online hardware PLC, the data exchange is done via the serial
port of the PC and a converter cable (S 5 for Windows – current loop converter;
S7 for Windows – MPI converter cable).
l S7 for Windows
Name format of the data to be exchanged between a PLC and any other windows
application (using S7 for Windows as a bridge).
l S5 for Windows
Name format of the data to be exchanged between a PLC and any other windows
application (using S5 for Windows as a bridge).
A I 0.0 to O D 0.0 to
A Q 0.0 127.7
to O T 0.0 255.15
to
A F 0.0 127.7
to O C 0.0 255
to
A D 0.0 255.7
to ON I 0.0 255
to
A T 0.0 255.15
to ON Q 0.0 127.7
to
A C 0.0 255
to ON F 0.0 127.7
to
AN I 0.0 255
to ON D 0.0 255.7
to
AN Q 0.0 127.7
to ON T 0.0 255.15
to
AN F 0.0 127.7
to ON C 0.0 255
to
AN D 0.0 255.7
to ) 255
AN T 0.0 255.15
to A(
AN C 0.0 255
to O(
O I 0.0 255
to O
O Q 0.0 127.7
to
O F 0.0 127.7
to
255.7
Compare operations
! F > F
> F F
F <
< F
>
Set / Reset operations
S I 0.0 to R F 0.0 to
S Q 0.0 127.7
to R D 0.0 255.7
to
S F 0.0 127.7
to = I 0.0 255.15
to
255.7 127.7
Basic Operations; Set / Reset operations (continue)
Load operations
SP T 0 to R T 0 to
SE T 0 256
to S C 0 256
to
SD T 0 256
to R C 0 256
to
SS T 0 256
to CU C 0 256
to
SF T 0 256
to CD C 0 256
to
256 256
Transfer operations
T IB 0 to T DR 0 to
T IW 0 127
to T DL 0 255
to
T QB 0 126
to T DW 0 255
to
T QW 0 127
to T PY 255128 to 255
0 to 127,
T FY 0 126
to T PW 0 to 126, 128 to 254
T FW 0 255
to
254
Block operations
JU PB 0 to C DB 0 to
JU FB 0 255
to BE 255
JU SB 0 255
to C
JU OB 0 255
to BEU
JC PB 0 255
to BA FX 0 to
JC FB 0 255
to BEC FX 0 255
to
JC SB 0 255
to A X DX 0 255
to
JC OB 0 255
to 255
255
Arithmetic operations
+ -
Miscellaneous operations
NOP 0 BLD
NOP 1 STS
STP
QW XOW
OW
TB T 0 to TBN T 0 to
TB C 0 255.15
to TBN C 0 255.15
to
TB D 0 255.15
to TBN D 0 255.15
to
TB BS 0 255.15
to 255.15
255.15
Conversion operation
CFW CSW
Shift operations
SLW 0 to SRW 0 to
15 15
Set / Reset operations
SU T 0 to RU D 0 to
SU C 0 255.15
to S = Formal 255.15
operand
SU D 0 255.15
to RB = Formal operand
RU T 0 255.15
to = = Formal operand
RU C 0 255.15
to RD =
255.15
S5 / S7 for Windows User’s Guide
Appendix 4 S5 Current Loop Converter Page 454
Jump operations
Miscellaneous operations
D 0 to DO FW 0 to
I 0 255
to G DB 3 255
to
DO = 255
Formal operand GX DX 1 255
to
DO DW 0 to DI 255
255
PC <--->PLC
20 mA
11 11 RTS Yellow 7
Request to Send
6 6 DTR Gray 4
TTY OUT +
Data Terminal Ready
9 9
TTY IN +
Input: 12-24V DC
Output: 2 x 20mA
#2544-00X
Constant
Adapter
Current
30cm (10 inch) Cable
Connector (female) to to external Power Supply
the inactive 20 mA The 15 pol. Sub.-D Connector
(TTY) Interface. must be connected with the
Several Sub.-D Connectors S5 for WindowsCurrentLoop
are available. Converter. The pin layout
fits to the S5 for Windows
Current Loop Converter only.
Trans-
mitter
+ 12V
C + TxD - RxD
Transmitter Receiver
D - TxD - 20 mA - 12V
E Shield
Housing, Shield Housing, Shield
F
Type 4 Pin assignmentemulates the TTY (20 mA) Interface of the following programming devices:
PG 670, PG 675, PG 685, PG 635, PG 750 (PG connector emulator)
25 Pin Sub. -D Connector (female). Pin assignment: A --- 22 B --- 10 C --- 8 D --- 21 E,F --- 25
Type X Customer Sub. -D Connector pin assignment.
The connector and the pin assignment must be specified by the customer.
Index
Index B
Basic Data Types): ............................... 203
Basic Operations ................................. 451
Baud Rate .............................................52
BB ................................................ 98, 396
BCD Numbers ..................................... 204
BEGIN ................................ ........ 214, 215
A Binary ................................................. 383
Binary logic operations ......................... 451
Absolute................................................ 55
Block.....................................................96
Absolute Address ................................ 338
Block Address Stack .................... 391, 395
Absolute Addresses ............................. 276
Block Call ......................198, 224, 253, 268
Absolute Operand................... 55, 275, 339
Block Comment .....................................66
Absolute Operand (STL) ........................ 80
Block Compare Menu - Block Compare
Absolute Operands ............... 184, 185, 192 Window ............................................ 371
ACCU1, ACCU2 ....................................75 Block Compare Window ....................... 370
Add New Segment (Modify Menu)........ 166 Block Edit..............................................17
Additional comment ......................339, 341 Block Header ............................... 182, 212
Additional Input .............................223, 289 Block header key words ....................... 213
Address .......................................... 69, 75 Block List......................................... 84, 92
Address Display S5 Conform (Preferences Block List – S5 Simulation PLC – .......... 431
Menu - S7 Hardware Configuration)... 416
Block Menu (Cross Reference Window) 333
Address Register ................................... 76
Block Menu (PLC Block List Window) ... 359
AND..................................... 231, 289, 296
Block Menu - Editor Window................. 162
AND function ....................................... 224
Block Menu – PC Block List ....................95
ANY .............................................210, 211
Block Menu – S5 CSF Presentation ...... 291
AR1 ...................................................... 76
Block Menu – S5 LAD Presentation ....... 314
arch (Cross-Reference Menu).............. 331
Block Menu – S5 STL Presentation ....... 283
Arithmetic operations ........................... 452
Block Menu – S7 CSF Presentation ...... 225
Arrange (Symbolic Table Menu)........... 345
Block Menu – S7 LAD Presentation) ..... 253
Arrange Icons ...................................... 153
Block Menu – S7 STL Presentation ....... 197
Arrange Icons (Windows Menu - S7 Block Menu (PLC Status Window)......... 382
Hardware Configuration) ................... 417
Block Name Assignment ....................... 108
ARRAY ........................................207, 208
Block operations .................................. 452
AS511 (Simatic-S5) ............................... 50
Block Properties ............................. 66, 110
ASCII Format ...................................... 125
Block Protection................................... 218
Assigning a Hardware Configuration File to a
Project ............................................... 30 Block Select...........................................35
Assigning Files to a Project .................... 28 Block Stack ................................. 392, 397
Assignment .... 224, 243, 272, 290, 307, 320 Block Statement List ............................ 182
at (Modify Menu)................................. 293 Block Statement List (Block STL) ............59
Attributes............................................. 114 Block Status ................................ ..........74
Author...................................... 68, 70, 111 Block Status Display ..............................17
S5 ASCII file................................ ........ 128 S7 Input / Output Address format .......... 416
S5 Block Comments .............................. 66 S7 Interrupt Stack................................ 388
S5 Block Editor.................................... 274 S7 Ladder Diagram (LAD) .................... 248
S5 Block Stack (B-Stack) ..................... 397 S7 Ladder Diagram (LAD) Editor........... 251
S5 Block Statement List (Block-STL)..... 321 S7 Library ..............................................36
S5 Constant Current Adapter ................ 455 S7 Name......................................... 67, 69
S5 Control System Flowchart (CSF)...... 287 S7 Name Format to Display or Change
S5 Control System Flowchart (CSF) Editor Values .............................. 380, 384, 385
....................................................... 289 S7 PLC Block List Window ................... 354
S5 Cross Reference............................. 330 S7 PLC Editor...................................... 161
S5 Current Loop Converter................... 454 S7 PLC Status Window........................ 374
S5 Data Blocks Transfer to the PC........ 365 S7 PU Files (*awl)................................ ..40
S5 Editor Title Bar ................................ 161 S7 Statement List (STL) ....................... 191
S5 Extended Interrupt Stack................. 396 S7 Statement List Instructions ............... 191
S5 Interrupt Stack................................ 393 S7 Status Word Register ...................... 390
S5 Ladder Diagram (LAD) .................... 309 S7 STL comments ............................... 193
S5 Ladder Diagram (LAD) Editor .......... 311 S7 STL Editor Window ......................... 194
S5 Name......................................... 66, 69 S7 STL Statement structure.................. 191
S5 Name Format to Display or Change S7 Symbolic Table Format .................... 336
Values ......................................381, 386 S7 Syntax..............................................63
S5 PLC Block List window.................... 356 S7W MPI Address................................ ..52
S5 PLC Editor ..................................... 161 Save (Symbolic Table Menu) ............... 343
S5 'PLC in a PC' external ....................... 50 Save as type................................ ..........27
S5 PU Files (*s5d) ................................. 39 Save Block .......................................... 162
S5 Simulation PLC.................. 18, 154, 428 Save Blocks...........................................63
S5 Simulation PLC Commands ............. 451 Save Configuration (Configuration Menu - S7
S5 Simulation PLC Menu – S5 Simulation Hardware Configuration) ................... 402
PLC - ............................................... 433 Save File As................................ ..........25
S5 Statement List Editor ....................... 274 Save PLC Configuration and Programs (PLC
S5 Statement List Instructions .............. 274 Menu) .............................................. 359
S5 STL - Presentation .......................... 284 Save Program File .................................42
S5 STL Statement structure ................. 274 Save Program File As ............................43
S5 Symbolic Table Format ................... 339 Save Project................................ .... 18, 25
S5D format ............................................ 33 Save Project As .....................................26
S5TIME ........................................204, 205 Save Settings (Preferences Menu) ....... 437
S7 Block Call (Insert Menu) ................. 198 Save Setup (PLC Menu) ...................... 386
S7 Block Editor.................................... 191 Save Symbolic Table............................ 163
S7 Block Names .................................. 108 Save Symbolic Table File .......................45
S7 Block Stack (B-Stack) ..................... 392 Save Symbolic Table File As ..................46
S7 Block Statement List (Source Text). 212 SB ........................................................98
S7 Control System Flowchart (CSF)...... 221 SDB .................................................... 100
S7 Control System Flowchart (CSF) Editor SE ...................................................... 235
....................................................... 223 Search (Cross-Reference Menu) .......... 327
S7 CPU Selection................................ 147 Search (Search Menu – S5 LAD
S7 Diagnostic Buffer ............................ 391 Presentation) .................................... 318
S7 Editor Title Bar ................................ 161 Search Again (Search Menu) ....... 175, 353
S7 Hardware Configuration ...........150, 399 Search Area ..................172, 174, 350, 353
S7 Hardware Configuration Example .... 419 Search for ........................................... 175
Search for (Search Menu) ............170, 348 SR Flip Flop (latch) ........224, 252, 290, 313
Search Menu (PLC Status Window) ..... 384 SR Flip Flop (Latch) ..................... 259, 297
Search Menu (Symbolic Table Window) 348 SS ...................................................... 236
Search Menu - Editor Window .............. 169 START (OB 21) ................................... 430
Search Menu – S5 CSF Presentation .... 294 Start Search ..................172, 174, 350, 353
Search Menu – S5 STL Presentation .... 284 Starting Value ...................................... 210
Search Menu – S7 CSF Presentation .... 229 STAT Variable ..................................... 203
Search Menu – S7 LAD Presentation.... 258 Statement Comments........................... 114
Search Menu – S7 STL Presentation .... 197 Statement List (STL) ..............................57
Search Menu (S5 Block-STL - Presentation) Statement List (STL) (Presentation Menu)
....................................................... 323 ................................ ................ 181, 386
Search Operand .................................. 175 Statement List (STL) Editor........... 194, 281
Search Operand Again (Search Menu). 176 Statement structure .............................. 274
Segment ............................................. 166 Status Bar .............................................19
Segment (Network)................................ 96 Status Display Menu (PLC Status Window)
Segment Comment ................................ 57 ................................ ........................ 378
Segment Comments ............................ 115 Status display, S5 CSF Presentation..... 390
Selecting text using the keyboard .196, 282, Status display, S5 STL Presentation ..... 388
343 Status display, S7 CSF Presentation..... 389
Selecting text using the mouse196, 282, 342 Status display, S7 LAD Presentation ..... 391
Sequence Block (SB)............................. 98 Status Values ........................................75
Serial Number ..................................... 3, 8 Status Word................................... 75, 389
Serial Port ....................................... 48, 51 Step .................................................... 431
Set / Reset operations ...................451, 453 Step Sequence ................................ 83, 90
Set Operand................................ ........ 376 Step Sequence Block .............................98
Set Operand (Status Display Menu) ..... 378 Step Sequence Diagnostics.................. 144
Set PLC Execution Time (Preferences Menu) Step® 5 Block names ........................... 362
....................................................... 436 Step® 7 Block names ........................... 361
SF ...................................................... 236 STL ................................................. 57, 83
SFB .................................................... 100 STL Columns .........................................88
SFC .................................................... 100 STL Editor .............................................62
Shift operations ................................... 453 STL Editor Window .............................. 194
Simulation PLC....................... 18, 154, 428 STL Statement structure....................... 191
Simulation PLC Commands .................. 451 STOP ...................................389, 393, 430
Size ................................................ 72, 85 STRING ...................................... 207, 208
Software License Agreement ....................5 STRUCT ..................................... 207, 209
Sort by Absolute Operands ................... 345 Supplementary Operations ................... 453
Sort by Comments ............................... 345 Symbol Comment length ........................73
Sort by Symbolic Operands .................. 345 Symbolic ...............................................54
Source Text..................................182, 212 Symbolic / Absolute Operand (STL) ........80
Source Text Editor ............................... 445 Symbolic Address ........................ 338, 340
SP ...................................................... 234 Symbolic Addresses ............................. 192
Special Characters within the Symbolic Table Symbolic Comment (STL).......................81
................................................339, 340
Symbolic Comments ...................... 62, 185
Specify (Module Menu - S7 Hardware
Symbolic File .........................................22
Configuration) .................................. 412
Symbolic Operand ......................... 54, 275
SR ...................................................... 235
SR Flip Flop ................................ ........ 232 Symbolic Operands ...................... 183, 184
X
XOR ................................................... 244
XOR function ....................................... 225