Você está na página 1de 376

H1305U1g.fm Seite 1 Donnerstag, 18.

November 1999 9:17 09

User Interface

Sucosoft S 40
Programming Software

07/99 AWB 2700-1305 GB


1st published 1997, edition 12/97
2nd published 1998, edition 06/98
3rd published 1998, edition 06/98
4th published 1999, edition 07/99
See list of revisions on page 4
© Moeller GmbH, Bonn
Authors: Arno Dielmann, Jürgen Herrmann, Peter Stammerjohann
Editors: Annette Scholz, Thomas Kracht
Translators: Baker & Harrison, Terence Osborn
Contents

Introduction 3
1 Sucosoft S 40 Navigator 5
Getting to know the navigator 5
Project management 14
Generating program code 35
Using libraries 57
2 POU Editor 65
Overview 65
Declaration section 74
Instruction section 94
Global type editor 149
Syntax check and error correction 151
Creating a new POU in IL: procedure 152
Opening an existing POU 154
Converting POU types 155
Importing Sucosoft S 30 programs 157
Documentation 165
POU editor settings 169
3 Topology Configurator 173
Overview 173
Toolbar functions 176
Creating a topology configuration 181
Changing a topology configuration 198
4 Form Editor 211
Overview 211
5 Test and Commissioning 217
Overview 218
Defining the program connections 221
07/99 AWB 2700-1305 GB

Remote diagnostics a modem 223


Programming via Suconet K 235
Master-Slave operation with Remote Control 242
Program test for PS 4-200 243

1
Program test for PS 4-300 251
Program test for PS 416 261
Checking or modifying the POU 275
Checking or modifying the POU in LD
and FBD 289
PLC test PS 4-200 292
PLC test PS 4-300 315
PLC test PS 416 332
Network status display 350
Appendix 355
Modem operation 355
Use of several PS 416 CPUs in the
same rack 361
Glossary 365
Abbreviations 371
Index 373

07/99 AWB 2700-1305 GB

2
Introduction

The two reference manuals Sucosoft S 40 User


Interface and Sucosoft S 40 Language Elements are
part of the Sucosoft S 40 programming software.
The Sucosoft S 40 User Interface reference manual
gives a complete description of the software
package, its functions and how to use all Sucosoft
tools. All the necessary steps up to the finished
program are described.
The reference manual Sucosoft S 40, Language
Elements contains definitions, Sucosoft language
elements and programming features for all PLC
types which can be programmed with Sucosoft S 40.
Sucosoft provides specific tools for test and
commissioning tasks according to the type of
device. These tools vary depending on application in
either PS 4 or PS 416 controllers. The differences are
indicated by means of headings or footnotes in the
reference manual. “PS 4-200” refers to PS 4-201-
MM1, PS 4-271-MM1, PS 4-151-MM1, and PS 4-
141-MM1 controllers. “PS 4-300” stands for the
PS 4-341-MM1 controller. “PS 416” includes all
types of CPU’s, i. e. CPU-200, CPU-300 and CPU-
400.
PLCOpen has certified Sucosoft S 40 in compliance
with “Base Level” and “Portability Level” standards.
07/99 AWB 2700-1305 GB

3
List of Revisions to Manual AWB 2700-1305 G
3XEOLFDWLRQ'DWH 3DJH 6XEMHFW 1HZ &KDQJH 'HOHWHG
06/98 31 Note u
208-209 Master Slave Operation with u
Remote Control
211-212 Upper figure, Button description u
displayed
214/227 NOT_READY u
223 Note u
234 Second to last paragraph u

286 D, P, T u
07/99 Entire manual -Revision for
Version 4.0
- Chaps. 1, 2 and 5
- Incorporation of
AWB 2700-1337 GB

07/99 AWB 2700-1305 GB

4
1 Sucosoft S 40 Navigator

Getting to know the Introduction


navigator
The Navigator will assist you with all tasks involving
the organization of Sucosoft S 40 software and the
generation of projects. It provides support for all
necessary organizational tasks, consistenly
manages project-related information and enables
you to create executable, PLC-specific program
code.
The Navigator further allows you the ability to import
function blocks and functions in the form of PLC-
specific libraries. This supports standardization and
thereby shortens the time required for program
development.

The Navigator user interface


The Navigator user interface is bordered on the top
by the title bar and by the status bar on the bottom.
You will find the project name displayed in the title
bar and, among other things, the status bar displays
the project folder. The menu bar appears under the
title bar, followed by the toolbar, and then the
Sucosoft toolbar. The working area located between
them is divided into three windows.
07/99 AWB 2700-1305 GB

5
Sucosoft S 40 Navigator

Figure 1: The Navigator user interface

The upper left window (browser window) contains


the “tree structure window”, displaying the
respective folders. The lower perimeter of this
window contains three tabs: Sources, Devices,
and Libraries.
In the window on the right you will see the file view.
Below this window you will find the output window
for status and error reports which, for example, can
occur when creating program code.
You can change the window layout either vertically or
horizontally by dragging the window margins with the
07/99 AWB 2700-1305 GB

mouse.
Standard Windows-type operations on the Navigator
desktop will not be explained here.

6
Getting to know the
navigator

Menu bar
The menu bar allows you access to the Navigator
menu via the respective menu headings.
In addition to standard menu items such as Edit,
Window and Help, the Navigator menu bar provides
the following selections:
“Project” for editing new or existing S 40 projects.
“Generate” for creating executable program
codes.
“Tools” for implementing Sucosoft Tools or linked
Windows applications, and
“Options” for importing or deleting additional
libraries, integrating Windows applications, and
for arranging your Navigator workspace.
Toolbar
The toolbar contains buttons with which you can
directly carry out the most frequently used
commands for project management and for creating
program code.

Figure 2: Toolbar buttons for project management

Figure 3: Toolbar buttons for creating program code

In addition to the buttons you will find selection


windows inside the toolbar for software listing and
PLC type.
07/99 AWB 2700-1305 GB

7
Sucosoft S 40 Navigator

Sucosoft Toolbar
The Sucosoft toolbar initially contains four Sucosoft
tools for project editing but can be expanded to
include buttons for starting Windows applications
according to individual needs. See chapter
“Integrating additional applications in the Navigator.”

Figure 4: Sucosoft Toolbar buttons

The Sucosoft toolbar reflects the capabilities offered


by the tool menu.
You can implement the following Sucosoft tools via
this menu or the buttons:
Topology Configurator. Here is where you can
define the hardware configuration.
POU-Editor. Here is where you write your POUs
(programs, function blocks, and functions).
Test & Commissioning. With this tool you can
transfer your program to the PLC for testing.
Form Editor. This tool enables you to view and
edit standard forms for printing files.
Status bar
In the left window of the status bar displays the
function of an activated button, the progress display
when creating a make file or when generating
program code, and the resulting generation.
The name of the opened project is displayed for you
in the right-hand window of the status bar.
The line number in which the cursor is positioned
within the output window is displayed in the middle
07/99 AWB 2700-1305 GB

window.

8
Getting to know the
navigator

Context menus
The context menus contain the most important
commands for a specific function. They are opened
with a right mouse click on the selected object or
window.
Short menu content depends upon the environment,
the context in which the mouse pointer finds itself,
and the selected element.

Figure 5: Context menu for the source file tree in the


“tree view” window.

Integrating additional applications into the


Navigator
To easily start frequently-used Windows applications
you can itnegrate the corresponding tool button into
the Navigator Sucosoft toolbar.

Figure 6: Sucosoft toolbar (before)

Precondition: You would like to integrate a Windows


application.
E Click Options ➞ Add Tools...
The Tools dialog window opens.
07/99 AWB 2700-1305 GB

9
Sucosoft S 40 Navigator

Figure 7: Option: Add Tools

E In the Menu Texts field select the application


behind which you want the new application to be
inserted.
E In the Command Line field enter the name of the
executable program together with its directory
and path data in addition to the data listed in the
Menu Text field.
Alternatively, you can click the Add button.
The Open window will open.
07/99 AWB 2700-1305 GB

10
Getting to know the
navigator

E Select the desired application and transfer it by


clicking OK.
The selected application will appear in the Add Tools
window.

Figure 8: New application


07/99 AWB 2700-1305 GB

After pressing the Close button the new application


will be transferred and the new icon will be inserted
in the Sucosoft toolbar.

11
Sucosoft S 40 Navigator

Subsequent rearranging is enabled via the Up


and Down buttons.

Figure 9: Sucosoft toolbar (after)

You can also use Options ➞ Add Tools to delete


applications from the Navigator Sucosoft toolbar.

Importing additional libraries


The Import Library option is executed by means of
the Options ➞ Library ➞ Import menu point or via
the Import Library button.

Figure 10: Import Library button

This allows you to transfer additional libraries


previously created with the help of the Library
Manager. A library version of function blocks and
functions offers you an advantage over source-text
versions in that there is no time required for their
compilation and since it is considered error-free it
can be used with no further checking. Such libraries
vary according to the type of PLC and are accessible
for all projects.
You may obtain further information on creating these
libraries from the online documentation “Library
Manager” (AWB-C 2700-1366 GB). Information on
library application can be found in the chapter “Using
07/99 AWB 2700-1305 GB

Libraries”.

12
Getting to know the
navigator

Choosing the font


You can determine font, font style, and size for the
display of text in the output window with the menu
point Options ➞ Select Font....

Changing dialog language


Sucosoft S 40 is available in German, English,
French, Spanish and Italian. During installation you
indicated which of these languages you wished to
install and which language you wished to use.
You can choose among the installed languages:
E Select the desired dialog language via the menu
bar Options ➞ Dialog Language
Sucosoft S 40 will convert to the selected language
and will automatically restart.
07/99 AWB 2700-1305 GB

13
Sucosoft S 40 Navigator

Project management Introduction


The Sucosoft S 40 Project Manager is contained in
the Navigator. It will organize all the necessary
folders when you create a new project.

Figure 11: Navigator without an existing project.

The Project Manager cannot be replaced by


other file management programs, by File
Manager or Explore, for example. Source files
that have been copied with tools other than the
Project Manager or that have been created with
other editors can subsequently be registered in
the Project Manager. See chapter “Registering
Sources”.
07/99 AWB 2700-1305 GB

14
Project management

File and device view


Contents of the tree structure and file view windows
will vary depending on whether you have activated
source or device display, i. e. have pressed the
Sources or Devices tab.
When you click the Sources tab the tree view window
will display the source file tree. Simultaneously,
sources (POUs) and topology files belonging to the
project are displayed in the file view window.
Double-click on one of these files to open the
Sucosoft S 40 Tool associated with it.
07/99 AWB 2700-1305 GB

Figure 12: Navigator user interface with source file tree.

15
Sucosoft S 40 Navigator

Sub-folders can be created, named, or deleted in the


source file tree by means of the context menu or by
selecting Edit ➞ New. (See the section “Sources -
Creating, renaming, or deleting sub-folders in the
Navigator”.

Before you begin creating your project files,


make sure that the correct type of PLC is
selected. This is displayed and selected in a
selection window in the Navigator toolbar.

Figure 13: Selection window for PLC type

This selection also affects the POU Editor since the


data types as well as manufacturer-defined function
blocks and functions offered there are dependent on
the controller.
When you click the Devices tab the tree view window
will display the device tree along with the three
groups of PLC types currently supported, PS 416,
PS 4-300 and PS 4-200 as sub-folders (select PLC
type).

07/99 AWB 2700-1305 GB

16
Project management

Figure 14: Navigator user interface with device tree.

You will not be able to create any further sub-folders.


When you indicate one of the three sub-folders and
have selected the corresponding type of PLC in the
toolbar selection window, the make files available for
that PLC type and executable application programs
will be displayed in the file view window.
Double-clicking on a program code file
(an executable application program) will open the
Sucosoft-S 40 Tool, Test and Commissioning.
07/99 AWB 2700-1305 GB

17
Sucosoft S 40 Navigator

Output window
The output window displays status and error reports
which, for example, can occur when creating
program code.
You can observe generation progress in the Program
Code Generation window.
After a successful sequence of program code
generation the corresponding report will appear.
If an error should occur during program code
generation, an error tone and corresponding report
along with the line/column position will be issued in
the POU.
If you double-click on an error line or press the return
key the POU Editor will open automatically. The
cursor will position itself in the POU in the line/
column position in which the error was found.
The incorrect input will be displayed in colour.
You can adjust the size of the window by dragging
the horizontal margins with the mouse.

Creating a new project.


Create a new project via the menu the action
Project ➞ New... or with the corresponding button.

Figure 15: New project button


07/99 AWB 2700-1305 GB

18
Project management

The Create New Project dialog window will open:

Figure 16: Create new project

E First choose one of the available directories.


If you wish to create your project in a sub-folder not
yet created:
E Click the New Folder button, then enter the folder
name in the New Folder dialog window. Confirm
the entry with the OK button.
E Finally, enter the name of the folder for the new
project into the New Project Folder entry field.
07/99 AWB 2700-1305 GB

Confirm the entry with the OK button.

19
Sucosoft S 40 Navigator

Sucosoft S 40 will construct a project structure with


the folders, Devices and Source.
The name of the open project will be displayed in the
title bar and the project directory, with path data if
applicable, is displayed in the status bar.

Clicking the respective Sources or Devices tab


will display in the folder window the files
produced during the project in the Source folder
(topology files and POUs) or in the Devices folder
(make files and loadable application programs).

Source
Project files you create in the POU Editor or in the
Topology Configurator are stored in this folder.
All saved files are automatically registered by the
Navigator under the current project. All files of the
type Topology and POU (program, function, and
function block) are therefore displayed in the file view
window on the right. The Topology Configurator or
POU Editor icon before the file name allows you to
quickly arrange the file types.
You can find additional data on the type of POU in
the Type column. Other columns show you the size
of the file, when it was last modified, and registration
status.
When you create Source sub-folders, these will be
offered as destination folders in addition to Source
when you save a POU in the POU Editor.
07/99 AWB 2700-1305 GB

20
Project management

Devices
All controller-specific files related to the project are
stored in this folder.
Device folders PS 416, PS 4-300 and PS 4-200 are
sub-filed in the device tree structure view window on
the left.
After selecting the corresponding folder for the type
of PLC chosen, PS 416 for example, you will see the
make file created and the program code files in the
file view window. The structure and content of the
tree view window are pre-set and cannot be
modified.
When you produce a program code file Sucosoft
S 40 creates a sub-folder for the folder of the
corresponding PLC type, identified by the name of
the make file belonging to it. If you select the
additional sub-folder, all files logically connected to
the make file will be displayed in the file view window
on the right. Starting from this sub-folder you can
initiate a print or delete task via the context menu.
Starting with a double-click in file view you can
navigate between project-relevant files and Sucosoft
S 40 Tools, starting Test and Commissioning, for
example. In addition, you can start a print or delete
task in this window for each individually-selected
make file via the context menu.
07/99 AWB 2700-1305 GB

21
Sucosoft S 40 Navigator

Opening existing projects.


You can open an existing project by means of the
menu point Project ➞ Open... or with the
corresponding button.

Figure 17: Open Existing Project button

The Open Existing Project dialog window will open:

07/99 AWB 2700-1305 GB

Figure 18: Open Existing Project

22
Project management

E Select the desired project name and then press


the Open button.
If the desired project is not listed in the dialog
window tree view:
E Activate the Browse... button.
E Now select the desired project folder in the Open
Existing Project window.
E Confirm the selection with the OK button.

When a folder icon is displayed in green this


indicates that the project is suitable for direct
editing with the Navigator.
The folder icon is displayed in grey if the project
was produced on an older version of Sucosoft
S 40. Older S 40 projects will be automatically
converted to the current version and all relevant
data will be transferred. The converted project
will then no longer be capable of being edited
with the older version.
07/99 AWB 2700-1305 GB

23
Sucosoft S 40 Navigator

Deleting a project
Precondition: The project is open.
E Select Project ➞ Delete.
The open project will be deleted directly, or after a
confirmation, depending on the setting in Options ➞
Options ➞ Confirm Deletion. This latter option is the
default setting.

Confirm this task only when you are certain that


the project contains no files that you still need!

Copying projects
Precondition: The project is open.
Copying a project is carried out via the menu with
Project ➞ Copy... or with the corresponding button.

Figure 19: Copy button

The “Copy Current Project to” dialog window will


open:

07/99 AWB 2700-1305 GB

24
Project management

Figure 20: Copy project

E Change the drive, if necessary, and select the


existing destination folder for the new project in
the tree view of the “Copy Current Project To”
dialog window.
E Enter the project name in the New Project entry
field and confirm with the OK button.
If you are just now going to create the folder for the
project to be copied to:
E Click on the New Folder button in the “Copy
07/99 AWB 2700-1305 GB

Current Project To” dialog window, then enter the


new folder name in the new folder dialog window.
Confirm the entry with the OK button.

25
Sucosoft S 40 Navigator

E Finally, enter the project name in the New Project


Name entry field and confirm with the OK button.
Upon completion of copying, you will receive the
corresponding report in the status bar.

Copying projects to standard disk drives as well


as saving them in this way is not possible. The
way to save a project is described in the chapter
“Saving Projects”.

Renaming projects
Precondition: The project is open.
E Select Project ➞ Rename....
The Rename Project dialog window will open:

Figure 21: Rename project

E Enter the new project name into the entry field


and then click the OK button.
The new project name appears in the title bar.
07/99 AWB 2700-1305 GB

26
Project management

Saving projects
You save a project in compressed form via the menu
point Project ➞ Save..., or with the corresponding
button.
When the project to be saved contains imported
libraries please read the section “Saving Libraries” in
the chapter “Using Libraries”.

Figure 22: Save Project button

The “Copy Current Project To” dialog window will


open.
07/99 AWB 2700-1305 GB

Figure 23: Save project

27
Sucosoft S 40 Navigator

E Choose the drive and select the existing destina-


tion folder for the saved project in the tree view of
the “Save Current Project to” dialog window.
You can reduce the space needed in the saving
medium by saving only Source Folder project files.
E Enter a cross in the Source check box to reduce
saving space.
E Confirm with the OK button.
You can observe saving progress in the status bar.
Project files will be saved in the destination folder
with a PCK file extension. A title must be assigned to
every saved project.
If you are just now going to create the folder for the
material to be saved:
E Activate the New Folder button in the “Save
Current Project To” dialog window, then enter the
new folder name in the New Folder dialog
window. Confirm the entry with the OK button.
E Save the project as described above.

Restoring projects
You can restore a saved project to a destination
directory via the menu with Project ➞ Restore..., or
with the corresponding button.

Figure 24: Restore Project button


07/99 AWB 2700-1305 GB

28
Project management

Upon initiating this action, any other open project will


be closed.
If the project you are restoring contains libraries,
please take note of the section “Restoring libraries”
in the chapter “Using Libraries”.
The “Restore Project From” dialog window will open.

Figure 25: “Restore Project From” dialog window

E Select the saved project, a folder icon displayed


in green with a PCK file extension, after you have
first selected the corresponding directory and, if
07/99 AWB 2700-1305 GB

necessary, the folder(s).

29
Sucosoft S 40 Navigator

E Confirm the task with the Accept button.


The “Restore Project From” dialog window will open.
E Specify a destination directory and the destina-
tion folder.
E Confirm the task with the OK button.
If you are just now going to create the folder for the
project to be saved:
E Click the New Folder button in the “Restore
Project From” dialog window, then enter the new
folder name in the New Folder dialog window.
Confirm the entry with the OK button.
E Specify the destination directory and the destina-
tion folder as described above.
Sucosoft S 40 will organize a project structure with
the folders Devices and Source in the destination
project and enters the project files belonging to it.
The Devices folder will not be described if the Source
check box was crossed when saving.
You can also restore projects saved with a previous
version of Sucosoft S 40.
The folder icons of such projects will appear in the
“Restore Project from” dialog window in grey. These
project files will be automatically registered after
restoring and can thereby be operated with this
Sucosoft version.
The restored project name will be displayed in the
title bar and the project directory, with path data if
applicable, will be displayed in the status bar.
07/99 AWB 2700-1305 GB

30
Project management

Registering sources
In order to edit a POU copied with a different tool,
Explorer for example, it must be registered.
POUs not yet registered are indicated by the lack of
a checkmark in the Registered column of the file view
window.
Precondition: A project is open and the copied files
are displayed in the Source branch.
E Select Project ➞ Register sources.
The new status will be indicated by a checkmark
in the Registered column.

Printer Setting
E Select Project ➞ Printer Setting....
The Printer Setting dialog window offering you
various printer setting options will open. It enables
you to specify a printer, determine a default printer,
and set paper format as well as page layout (portrait
or landscape). You can configure your printer
connection with the Network button. The Options
button allows you to set printer-specific properties.
07/99 AWB 2700-1305 GB

31
Sucosoft S 40 Navigator

Figure 26: Printer Setting dialog window

Printing
Unlike the printing function of the individual S 40
tools, the Navigator printing function allows you to
print files individually or all together. From here you
can print without forms and in text mode.
Printing all files
E To print all the files belonging to an application
program, click the Devices tab and select the
make file in the File View window belonging to the
application program.
E You can then print by means of the menu point
Project ➞ Print, via the context menu, or with the
button.

Figure 27: Print button

The first page to appear will show you the program


07/99 AWB 2700-1305 GB

parameters of the selected application program as


well as an overview of the files belonging to the
program along with their number of pages. A display
of “Global Data Types”, topology files, and
corresponding POUs is attached to the overview.

32
Project management

Printing individual files


E To print individual files of an application program
click the Sources tab and in the File View window,
select the topology file or POU (program, function
block, or function) to be printed.
E Print as described above.
Printing Output window contents
All Output window contents can be printed by
Project ➞ Print Output.

Creating, renaming, or deleting Source sub-


folders in the Navigator
For a clear presentation of an extensive project, you
can arrange additional folders for your POUs
(sources) under the Source folder by means of the
context menu or the menu bar. The new sub-folder
will be created below the selected folder.
E Select Edit ➞ New, or the corresponding option
in the context menu.
07/99 AWB 2700-1305 GB

33
Sucosoft S 40 Navigator

Figure 28: Creating Source folder

You can rename or delete sub-folders in the same


way.

Summary
With the help of Navigator Project Manager functions
you can create a new project and structure it clearly
by setting up additional sub-folders for receiving
sources.
Navigator enables you to delete, copy, and rename
projects, to register files trom other sources (POUs
and .dcf files), and to set up printing and print.
Navigator also simplifies saving and restoring of
projects.
07/99 AWB 2700-1305 GB

34
Generating program code

Generating program Introduction


code
You have numerous commands at your disposal for
creating executable, PLC-specific program code.
These commands can be directly carried out via the
Generate menu point or by means of the toolbar
buttons (see figure 3). These commands will
subsequently be described in sections.
Generation of program code is carried out in two
phases:
Creation of a make file whereby the elements
(files) on which program code generating shall be
based are specified: the program POU (implicit
with this are also the function blocks and
functions it contains), topology files and program
parameters.
You create the file once for each program POU
in your project. The file will automatically have
names of these program POUs automatically.
Sucosoft S 40 will then automatically update the
file as soon as you modify the program POU
(by linking or removing function blocks or
functions, for example), program parameters, or
topology.
You will only need to create a new make file when
the program POU is linked to a completely diffe-
rent topology configuration (a different type of
PLC, for example) or vice-versa.
Generation of program code on the basis of the
make file and dependent on the elements
included in the list.
07/99 AWB 2700-1305 GB

35
Sucosoft S 40 Navigator

Make sure that all project POUs have different


names.
If there are function blocks of the same name in
different sub-folders of the current folder, the first
function block found by Sucosoft in a sub-folder
will be chosen when it automatically generates
the make file.

In a project with several program POUs (main


programs) several make files can be generated and
stored. You will automatically receive the names of
the respective program POUs.

Select PLC type


The data types and manufacturer-defined function
blocks available to you in the POU Editor depend on
the selected PLC type.
You should already have selected the PLC type
appropriate to the topology files before preparing to
generate program code.
The following controllers are currently grouped under
the three selectable PLC types.
PS 4-200:
PS 4-141-MM1,
PS 4-151-MM1,
PS 4-201-MM1,
PS 4-271-MM1
PS 4-300:
PS 4-341-MM1
07/99 AWB 2700-1305 GB

36
Generating program code

PS 416:
PS 416-CPU-200,
PS 416-CPU-300,
PS 416-CPU-400
E Select the desired PLC type in the selection
window in the toolbar, or
E Select Generate ➞ Select PLC... and in the Select
PLC dialog window which then opens choose the
desired PLC type from the PLC Type list box.

Figure 29: Select PLC

If the PLC type does not correspond to the one


specified in the topology file and to the one selected
for the make file, you will receive a corresponding
error report when you attempt to generate a make
file.
07/99 AWB 2700-1305 GB

37
Sucosoft S 40 Navigator

Creating a new make file


Precondition: The desired PLC type has been
selected.
E Select Generate ➞ New Make File..., or the corre-
sponding button.

Figure 30: New Make File button

The New Make File dialog window will open.

Figure 31: New Make File

E Select the program POU you wish to generate as


executable control program from the PROGRAM
POUs list box.
E Select the topology file from the Topology Confi-
gurations list box which is appropriate for your
controller configuration and for the program POU
you previously created with the Topology Confi-
gurator.
E Confirm with the OK button.
The make file, from which the executable program
can be generated, will be created. In this process,
07/99 AWB 2700-1305 GB

the program POU, all function blocks, functions,


topology files, and program parameters will be
entered in the make file. You can follow creation of
the make file in the progress display in the status bar.

38
Generating program code

A report will appear in the status bar when the list is


created.

Any further changes in the number of POUs or in


program parameters, i. e. all project changes, will
be automatically carried out in the make file.

Setting program parameters


Selection of controller-specific program
parameters
You can determine program parameters such as
compiler options for the currently selected PLC type
or relevant terms for program performance such as
maximum cycle time, password, and marker range.
This is performed via the menu point Generate ➞
Program Parameters... or the corresponding button.

Figure 32: Program Parameters button

Changing program parameters for the


PS 4-200
E Initiate setting of parameters with Generate ➞
Program Parameters.... The PS 4-200 dialog box
with current make file data will open:
07/99 AWB 2700-1305 GB

39
Sucosoft S 40 Navigator

E Complete the Runtime Parameters panel or click


the Default button to choose the preset default
values.
Management
Password: The password serves to protect against
unauthorized access to the controller. It can consist
of a maximum of 8 characters (letters and numbers).
If you wish to change a secured password, enter the
new password and confirm with OK or with the return
key.
Your password will be requested whenever there is a
program in the controller secured by a password and
data contents or controller status is to be changed,
i. e. by the functions:
Start
Stop
Diagnostics counter reset
Retentive marker reset
07/99 AWB 2700-1305 GB

Forcing
Online programming
Compare PLC – PC

40
Generating program code

Transfer PC – PLC
Set date in PLC
When the correct password is entered all functions
are freely available until the Test and Commissioning
tool is closed.
If there is no response to a requested password or in
the case of an incorrect entry, an error report will
appear and the functions will not be performed.
Version Number: A version code for the program to
be generated, composed of a maximum of four
letters and numbers, can be assigned in this field.
The version number will be displayed in the Program
Status dialog box of the Test and Commissioning
tool under Program Version. This facilitates
identifying various program versions when
troubleshooting.
Startup behaviour after NOT READY
In the event that the running application program is
interrupted by an error which shuts down the
program - exceeding the maximum cycle time, for
example - the controller will switch to Not Ready
status. This can occur at any place in the program.
Make sure, therefore, that any possibly inconsistent
variable or marker values in Warm Start Behaviour
are avoided, i. e. that no dangerous circumstances
can arise! The startup behaviour after Not Ready
described is only effective and appropriate with the
switch in the RUN position.
Halt: After a program error
there is no restart.
Warm Start: Selects a PLC warm start.
07/99 AWB 2700-1305 GB

Cold Start: Selects a PLC cold .

41
Sucosoft S 40 Navigator

Warm start or cold start may only be selected


when the process to be controlled can also be
restarted after an undefined interruption with the
Not Ready status without danger to man or
machine.

Cycle time
The maximum permissible cycle time for the program
in a range from 1 ms to 255 ms is determined in this
entry field. The default setting is 60 ms; it should only
be set to a lower value when you know precisely the
typical program cycle time and wish to achieve such
precise disturbance control. If the program exceeds
the maximum set cycle time while running, the
controller will switch to Halt.
E Assign the marker range for PLC working memory
under the Compiler register.

This is where you define marker ranges which are


declared with directly represented variables with the
07/99 AWB 2700-1305 GB

identifier AT %M. This range is subdivided into


normal markers and warm and cold start retentive
markers.

42
Generating program code

Active Marker Range: The marker range for


controller memory is assigned here, declared with
directly represented variables with the identifier %M.
The maximum number of these markers is 16 kByte
(0 -16383). Default setting is no marker range.
Retentive Range: Here is where warm start retentive
markers are assigned. These markers are declared
as directly represented variables with the identifier
AT %M but they cannot be asssigned in the variable
declaration along with the keyword RETAIN. Warm
start retentive markers retain their last value before
PLC shutdown and continue to operate with these
values after a warm start. The retentive range is a
subset of the active marker range and must not
overlap the recipe range.
Recipe Range: Here is where cold start retentive
markers are assigned. These markers are declared
as directly represented variables with the identifier
AT %M but they cannot be assigned in the variable
declaration along with the keyword RETAIN. Cold
start retentive markers retain their last value before
PLC shutdown and also through a cold start. The
recipe range is a subset of the active marker range
and must not overlap the retentive range.

Retentive and recipe ranges must both be set


within the defined limits of the active marker field
and may not overlap each other.
07/99 AWB 2700-1305 GB

43
Sucosoft S 40 Navigator

The settings become active after compiling and


transfer.
Changing program parameters for PS 4-300
E Start the parameter setting via Generate ➞
Program Parameters. This will open the PS 4-300
with information about the current make file:

E Make entries in the dialog box as required or click


the Default button to enter the standard values.
Program execution type
Cyclical: The program is immediately restarted each
time program execution is completed.
E Click on the Cyclical tab to enter the parameters
for cyclical program execution:
07/99 AWB 2700-1305 GB

44
Generating program code

Enter the maximum cycle time, i. e. the time within


which program execution must be completed (valid
range 1 ... 1000 ms).
Periodic: The program is restarted when the
specified time interval has elapsed. In addition,
program execution must be completed before the
specified maximum program execution time.
Click on the Periodic tab to enter the parameters for
periodic program execution:
07/99 AWB 2700-1305 GB

45
Sucosoft S 40 Navigator

You must specify:


E a) The required time interval (time between the
individual program invocations). The entry can be
made in:
Milliseconds in the value range 1 ... 60000
Seconds in the value range 1 ... 3600
Minutes in the value range 1 ... 1440
Hours in the value range 1 ... 960
Days in the value range 1 ... 40
b) The value for the maximum program execution
time. The value you specify must not exceed the
specified time interval and must be less than or
equal to1000 milliseconds.
Startup behaviour with warm start
Warm start: If the user program is restarted,
execution will be resumed at the position where it
was interrupted by the error. The data declared with
07/99 AWB 2700-1305 GB

the keyword RETAIN is re-used. For this the


operating mode switch must be set to RUN or
RUN_M_RESET.

46
Generating program code

Cold start: If the user program is restarted, the


initialization values of the variables will be used. The
operating mode switch can be set to RUN or
RUN_M_RESET for the cold start option.
No Restart: With this setting for warm start
behaviour, the user program will not automatically
restart, when, for example, power is restored.
Attempting a warm start will cause the PLC to switch
to NOT-READY and will increment the diagnostics
counter for the ENR diagnostics bit.
Management
Version number: The version number allows you
to assign a version code consisting of up to ten
characters and digits for the program to be
generated. The version number is displayed in
the Program Status dialog box of the Test and
Commissioning tool under Program Version.
This allows easy identification of different program
versions when troubleshooting.
07/99 AWB 2700-1305 GB

47
Sucosoft S 40 Navigator

E Click on the Compiler tab to specify the marker


ranges in the PLC working memory:

This dialog box is used to define the marker range


that is declared and addressed via directly
represented variables with the identifier AT %M.
This range is divided into normal markers, warm start
retentive markers and recipe markers (i. e. cold start
retentive).
Active marker range: This defines the PLC marker
range which can be addressed as directly
represented variables with the identifier AT %M.
The maximum number of these markers is
15 000 Byte (0-14 999). The standard setting is no
active marker range.
Retentive marker range: This defines the range of
the warm start retentive markers. These markers are
07/99 AWB 2700-1305 GB

declared as directly represented variables with the


identifier AT %M.
Warm start retentive markers retain the last value
they had before the PLC was stopped and still have

48
Generating program code

the same value following a PLC warm start. The


retentive range is a subset of the active marker range
and must not overlap the recipe marker range.
Recipe marker range: This defines the range of the
cold start retentive markers (i. e. recipe markers).
These markers are declared as directly represented
variables with the identifier AT %M.
Cold start retentive markers retain the last value they
had before the PLC was stopped and still have the
same value following a PLC cold start. The recipe
range is a subset of the active marker range and
must not overlap the retentive range.
The retentive marker range and the recipe marker
range must both lie within the defined limits of the
active marker range and must not overlap each
other.
PS 4-300 retentive markers can also be declared
with the RETAIN keyword as required.
Only the recipe range must be specified via these
options.

Retentive markers for the PS 4-300 can also be


declared with the keyword RETAIN if required. Only
the recipe range must be assigned via Program
Parameters.
The settings become active only after compiling and
transfer.
07/99 AWB 2700-1305 GB

49
Sucosoft S 40 Navigator

Changing program parameters for the PS 416


E Initiate setting of parameters with Generate ➞
Program Parametters.... The PS 416 dialog box
with current make file data will open:

E Complete the dialog field or click the Default


button to select the pre-set default values.

07/99 AWB 2700-1305 GB

50
Generating program code

Program execution type


Cyclical: The program is immediately restarted each
time program execution is completed.
E Click on the Cyclical tab to enter the parameters
for cyclic program execution:

Enter the maximum cycle time, i. e. the time within


which program execution must be completed (valid
range 1 ... 1000 ms).
Periodic: The program is restarted when the
specified time interval has elapsed. In addition,
program execution must be completed before the
specified maximum program execution time.
Click on the Periodic tab to enter the parameters for
periodic program execution:
07/99 AWB 2700-1305 GB

51
Sucosoft S 40 Navigator

You must specify:


a) The required time interval (time between the
individual program invocations). The entry can be
made in:
Milliseconds in the value range 1 ... 60000
Seconds in the value range 1 ... 3600
Minutes in the value range 1 ... 1440
Hours in the value range 1 ... 960
Days in the value range 1 ... 40
b) The value for the maximum program execution
time. The value you specify must not exceed the
specified time interval and must be less than or
equal to1000 milliseconds.
Startup behaviour with warm start
Warm start: If the user program is restarted,
execution will be resumed at the position where it
was interrupted by the error. The data rescued at the
07/99 AWB 2700-1305 GB

time of the program interruption will be re-used. For


this the operating mode switch must be set to RUN.

52
Generating program code

Cold start: If the user program is restarted, the


initialization values of the variables will be used.
The operating mode switch can be set to RUN or
RUN_M_RESET for the cold start option.

Recipe values are retained with each cold start.


This means that they must initialized before the
first use. With the PS 416 recipe values are reset
after a transfer of the disk operating system (see
AWB 2700-1306 GB: Function Blocks PS 416,
Coldstart Retention.

Management
Version number: The version number allows you to
assign a version code consisting of a maximum of
four characters and digits for the program to be
generated. The version number is displayed in
the Program Status dialog box of the Test and
Commissioning tool under Program Version.
This allows easy identification of different program
versions when troubleshooting.

Select make file


Since you are able to create numerous make files in
a project you are offered the option of choosing for
generating the desired user program. This is done via
the list box in the toolbar

Figure 33: List box with make file

or by the menu point Generate ➞ Select Make File...,


07/99 AWB 2700-1305 GB

whereby the following dialog window opens:

53
Sucosoft S 40 Navigator

Figure 34: List of available make files

You can see an overview of make files created


with all data attributes in the File View window by
clicking the Devices tab and selecting the
corresponding PLC type.

Generating program code


Precondition: You have selected a make file for the
desired PLC type.
E Select Generate ➞ Generate All, or the Generate
All button,

Figure 35: Generate All button

or the context menu for the folder of the


corresponding PLC type in the Tree View window.
07/99 AWB 2700-1305 GB

Figure 36: Generating via the context menu

54
Generating program code

The executable program will be generated according


to the currently selected make file.

If you have modified individual program sections


you can limit generating to the modified parts
with “New Sections”. This reduces compiling
time since only the changed parts will be
regenerated.

E Select Generate ➞ Generate New Sections, the


context menu, or the Generate New Sections
button.

Figure 37: Generate New Sections button

You can watch generating progress in the Output


window.
The corresponding report will appear after
successful execution.
Current compiler outputs can be printed outvia
Project ➞ Print Output or via the context menu.
Program code errors
If an error should occur when generating program
code it will be issued in the Output window with the
corresponding report.

Figure 38: Program code generation with error reports


07/99 AWB 2700-1305 GB

55
Sucosoft S 40 Navigator

Error reports can be printed via Project ➞ Print


Output
Troubleshooting:
By double-clicking on an error line or selecting it with
a mouse-click and then pressing the Enter key the
POU Editor will automatically open. The cursor will
then be positioned in the line/column position in the
specific POU in which the error was found.
By selecting the error line with a mouse-click and
then pressing the F1 button the Help Topics:
Sucosoft Help window will open with an explanation
of the error.

Cancelling program code generation


You can cancel current generation or creation
activity.
E Click the Stop button

Figure 39: Stop button

07/99 AWB 2700-1305 GB

56
Using libraries

Using libraries Introduction


Along with Sucosoft S 40 you are delivered ready-
made and tested function blocks and functions in the
form of manufacturer-defined libraries for each of the
three PLC types.

Figure 40: View of a manufacturer-defined library

In addition to manufacturer-defined libraries you can


import libraries. These can be libraries you have
created yourself with the S 40 Library Manager,
which is available as an S 40 add-on module.
There may also be other libraries available from
Moeller or other suppliers.
07/99 AWB 2700-1305 GB

After you have entered a library into your project, its


function blocks and functions (user modules) are
available to you in the same way as manufacturer or
user-defined blocks.

57
Sucosoft S 40 Navigator

Library view
After clicking the Libraries tab, the Tree structure
window will display the Library file tree with the
PS 416, PS 4-300 and PS 4-200 device folders as
sub-folders and their corresponding library groups.
See Figure 40.
With the Library View you can can get a quick
overview of which modules, i. e. which manufacturer
and user-defined function blocks and functions are
available for efficient program creation.
Additionally, the Help function offers you
explanations for the modules (see the section “Using
Library Help”).
No further sub-folders can be created.
When you select a sub-folder, a folder with
manufacturer-defined libraries and, if imported, a
folder with user-defined libraries will be diplayed.
By double-clicking on the corresponding folder, the
PLC-specific functions and function blocks
belonging to that library will be displayed in the File
View window.

07/99 AWB 2700-1305 GB

58
Using libraries

Using Library Help


Library Help, for a specific function block, for
example, can be accessed by the usual help
procedure in the menu or via “About” in the context
menu. First, open the PLC-specific folder in the
Library tree view, then select the desired sub-folder
and choose the module you are looking for in the File
View window (see Figure 40). Now call up Help (also,
About in the context menu). You will find detailed
explanations loaded with example programs for all
manufacturer-defined function blocks and functions.

You can paste these passages into your POU by


selecting the declaration or instruction part of the
example program with the left mouse button and
then saving on the clipboard.

Importing or deleting libraries


With this option you can transfer or delete an
additional library created by the Library Manager
itself or by other means.
Libraries must be created separately for different
PLC types. You must take note of this when creating
your POU as well as during subsequent library
generation in the Library Manager.
Importing libraries
E Select Options ➞ Library ➞ Import or click on the
Import Library button.

Figure 41: Import Library button


07/99 AWB 2700-1305 GB

59
Sucosoft S 40 Navigator

Figure 42: Import library

After it is imported into a project, Sucosoft S 40


manages the library and provides its function blocks
and functions for the corresponding PLC type in all
projects.
Deleting a library
Deleting a library will remove it from Sucosoft S 40
management.
E Select Options ➞ Library ➞ Delete or Delete in
the context menu for the Library file tree in the File
window.

Creating a library
Creation and subsequent modification of a library will
only be described briefly here. You will find a detailed
description in the handbook “S 40 Library Manager”
AWB 2700-1366 GB.
07/99 AWB 2700-1305 GB

Function blocks (FBs) and functions to be used as


library modules are generated like any other POU.
The project for these generating these POUs is
referred to here as the original library project. After
creating this library module, a program POU must be

60
Using libraries

created for testing purposes, in which the library


modules are instantiated (FBs) and called up. After
the program code has been successfully generated,
the modules can be grouped into a library with the
help of the Library Manager.

Using a library
Imported libraries are available to all projects except
the original library project. A library cannot be
imported while the Libary Origination Project is open
in Navigator.

A library cannot be imported into its original


library project since more than one module of the
same name may not appear.
POU names used in a library can not be assigned
more than once in a project. Sucosoft S 40
monitors assignment of names.

Activating and deactivating library modules


Libraries are automatically activated when imported.
You can confirm activation in the corresponding
column of the Navigator File View window by clicking
the Library tab. There are two reasons that could
prompt you to deactivate a user library:
07/99 AWB 2700-1305 GB

61
When no library module is being used in a library
user project and you wish to conserve memory
for saving the project.
When you wish to subsequently edit a library
module in the original library project.
E Select Edit ➞ Activate/Deactivate or Activate/
Deactivate in the context menu.

Subsequent editing of library modules


When opening the original library project with an
activated library the originating POUs (FB and
function), which are components of the library, are
deregistered.
The respective warnings will appear in the Output
window.
When starting the next generating sequence,
the deregistered origination POUs will not be
regenerated.
Follow these steps to ensure that modified POUs are
taken into account when generating:
E Deactivate the respective library in Navigator.
E Modify and save the originating POU in the POU
Editor.
E Register the POUs in Navigator via the menu
point Project ➞ Register Sources.
E Generate program code.
E Import the library after creating an updated
version in the Library Manager.
07/99 AWB 2700-1305 GB

62
Using libraries

Saving libraries
Libraries cannot be saved individually, only along
with a project as a component.
When you save a project, all currently imported
libraries will be saved with it.

Restoring a library
Libraries cannot be restored individually,only as part
of a a project.
When you restore a project containing a library, it will
be stored under the corresponding PLC type folder in
the Devices project branch. To transfer the library to
Sucosoft S 40 management, you must import it as
described above.

When restoring a project containing a library, it


will not be automatically imported.
07/99 AWB 2700-1305 GB

63
64
07/99 AWB 2700-1305 GB
2 POU Editor

Overview The POU Editor is the Sucosoft S 40 tool you use to


create your POUs.
The term POU stands for Program Organization Unit
and denotes the three POU types - program, function
block, and function - from which a PLC program is
constructed.
Primary functions of the POU Editor:
Declaration of variables
Editing of user programs in the programming
languages IL, LD, FBD
Syntax control
Call-up for code generation
Creation of “global data types” valid for the entire
project
Importing projects created with Sucosoft S 30
Printing with the option of Print Preview
Creation of a cross-reference list
Individualized user interface display and colour
display for user preference
POUs always consist of a declaration section and an
instruction section.
The declaration section is where you declare the
variables you wish to use in the instruction section.
Sucosoft S 40 uses these variables to initialize,
process, and save your data. You create your user
program in the instruction section.
07/99 AWB 2700-1305 GB

65
POU Editor

In the same way as the POU, the POU Editor is


divided into declaration and instruction sections
(Variable Editor and IL Editor, respectively).
Both sections are shown when an existing POU is
opened or the creation of a new POU is initiated.
(see Figure 43).
Sucosoft S 40 provides a table-oriented, Syntax-
controlled Variable Editor (Syntax mode) and a purely
textual, Free Variable Editor (Free mode) for entering
variables in the declaration section.
To create a user program you can choose between
the IL programming language or the graphical
languages, LD and FBD.

Figure 43: POU Editor with declaration section


(Syntax Mode) on the left and instruction section on
the right
07/99 AWB 2700-1305 GB

66
Overview

All actions for creating a POU can be selected via the


standard POU Editor toolbar.

Figure 44: Standard toolbar

Context menu
Context menus offer you a convenient work
assistant. These are short menus containing the
most important commands for a specific function.
They are opened by a right mouse-click on the
selected object or window. Short menu content is
dependent on the environment, the context in which
the mouse pointer is located, and the selected
element.

Structuring the user program


A program should be of a manageable size. When a
large programming task is to be accomplished,
breaking it down into several sections can simplify
handling of the project. This approach is known as
“structured programming”. The sections are then
handled in function blocks or functions.
In the following, the three types of POUs from which
a PLC program is constructed - programs, function
07/99 AWB 2700-1305 GB

blocks, and functions - will be described.

67
POU Editor

You can convert a previously-created POU


(program, function block, or function) into a different
type of POU. To do this, use the option “Changing a
POU type” described on page155.

Program POU
The program POU represents the main program.
All project variables firmly defined at a physical
address (markers and inputs and outputs, for
example) are declared in the program. Functions
blocks and functions can be called up from a
program.

Function block POU


Function blocks (FBs) are important elements in
structuring your PLC program. They are used by
programs or other FBs and can themselves call up
other FBs. FB internal data is retained from one call-
up to the next. Sucosoft S 40 provides numerous
standard function blocks and functions for appli-
cation in frequently encountered programming tasks.

Function POU
Functions are also structuring elements for your PLC
program. They are used by programs or FBs and can
themselves call up other functions. A function can
display one or any of many input parameters it is
linked to and delivers the result as a return value.
In contrast to a function block, a function only returns
one element.
07/99 AWB 2700-1305 GB

Internal data is not saved so a function, called up


with the same input values, always delivers the same
return value.

68
Overview

Functions are valid throughout the project and can


be called up from any POU.
Before beginning to create your POU, select the
correct PLC type in the Navigator toolbar selection
window. The following three PLC types are
displayed, under which the currently selectable
controllers will be listed according to group:
PS 4-200, PS 4-300 and PS 416.
Depending on the PLC type selected, the
corresponding data types, manufacturer-defined
function blocks, and functions will be available to
you.
07/99 AWB 2700-1305 GB

69
POU Editor

Declaration section overview


The declaration section is where you declare you
POU variables with the Variable Editor. Various types
of variables can be used according to and declared
with the POU type. The following table show which
types of variables can be used in the three POUs and
with global types.

Use of Assigned tab FU FB PRG Global


Variable types types

VAR-Input Input ✓ ✓

VAR_Output Output ✓

Var_In_Out In_Out

VAR_Global Global ✓

VAR_External External ✓

Var Local ✓ ✓ ✓

Type Type ✓ ✓ ✓ ✓

Table 1: Overview of variable type applications


To declare variables you can choose between:
Syntax mode, also known as Syntax-controlled
Variable Editor, an editor offering convenient,
user-guided variable declaration and pre-defined
input cells, and
Free mode, also known as Free Variable Editor,
an editor without user-guidance and designed for
experienced PLC programmers who prefer being
able to more quickly enter their inputs.
07/99 AWB 2700-1305 GB

70
Overview

When declaring variables you can freely switch


between Syntax mode and Free mode.

Due to its table orientation in Syntax mode,


the Variable Editor arranges its assigned
components (name, type, etc.) in a set format
during declaration.
Tabulating or unnecessary spaces entered
in Free mode for visual separation of the
components will be deleted upon subsequent
modification of the declaration in Syntax
mode.
Tabulating inserted into comments in Free
mode will be represented as squares in
Syntax mode and then again as spaces after
switching back to Free mode.
A derived (user-defined) data type containing
a structure must be declared in Free mode.
Representation of a structure is not possible
in the existing Syntax mode format. This
applies also to variables whose components
are edited in more than one editing line in
Free mode. Switching into Syntax mode will
therefore be refused with an appropriate
warning prompt.
Commentary may not consist of more than
one line.

All previously declared variables will be - as far as


possible - displayed in both modes and can be
added to and edited in both modes. The declaration
section is independent of the programming language
employed and is thereby the same for all
07/99 AWB 2700-1305 GB

programming languages.

71
POU Editor

When writing (variables, for example) you may


use upper and lower case letters as you wish.
The POU Editor is not case-sensitive.

Instruction section overview


The instruction section is where you link previously
declared variables or function blocks via operators to
an operable POU, possibly using functions.
You can transfer and declare new variables defined
in the instruction section into the declaration section
with simply Insert ➞ Declare Variable... Or via the
context menu.

You can switch between the instruction and


declaration sections at any time by clicking the
left mouse button. You can thereby write an
instruction list and, parallel to it, declare the
variables used.
You can determine which section is active by the
coloured text (declaration section in Free mode
and instruction section as IL Editor). In graphical
display, the active section is highlighted by a
heavy, black-bordered cell (declaration section
in Syntax mode) and a highlighted element
(instruction section as LD/FBD Editor). 07/99 AWB 2700-1305 GB

72
Overview

POU Info
The Editor feature, POU Info, offers effective
assistance in the use of your POUs. You can edit
important POU data such as destination PLC type,
author, date created, comments on the POU, etc. in
the left portion of the dialog box displayed below.
The edited information on a POU is displayed when
you select the POU in the Navigator and select the
“About” option in the Edit menu or you can call it up
via the context menu.
E With an open POU select File ➞ POU Info... and
click the Prototype button in the dialog box that
opens. The following figure will appear:

Figure 45: POU Info

The prototype is shown in the right-hand part of this


07/99 AWB 2700-1305 GB

figure, i. e. the interface of an FB or function type


POU.

73
POU Editor

Declaration section In the declaration section you can define the


variables you want to link with the instruction section.
A variable declaration consists of the following
elements:

Element Entry

Name (variable names) required

Type (Data type) required

Initial value optional

Attribute optional

Address optional

Comment optional

This assignment of variables in the declaration


section is called instantiating whereby Sucosoft S 40
automatically reserves the required memory in the
PLC.
Function blocks are also to be declared as variables.
An FB instance can only be applied within the POU
in which it was declared, except in the case of a
global declaration.
Functions occupy no permanent memory, except for
their return value, and are therefore not declared.

Declarations and instances no longer needed


should be deleted from the POU to minimize the
amount of memory required.
07/99 AWB 2700-1305 GB

74
Declaration section

Introduction to the two variable editors


You can operate the Variable Editor in either Syntax
mode or Free mode. With an open POU you can
switch between the two modes by means of
Options ➞ Variable Editor ➞ Free Mode /
Syntax Mode
or
via standard toolbar buttons.

Figure 46: Free Mode toolbar button

Figure 47: Syntax Mode toolbar button

You can determine basic settings for the Variable


Editor when creating a new POU, among other
things, the mode in which the Editor will open, via
Options ➞ Settings... ➞ Declaration Section.
Syntax mode
The Variable Editor will enable you to easily declare
user-defined variables in this syntax-controlled
mode. For example, you will not need to know the
keywords for variable types; they will be entered
automatically. Variables of each type are entered
separately under its own tab.

Figure 48: Program POU tab

You select the variable type by clicking on one of the


07/99 AWB 2700-1305 GB

tabs offered on the lower edge of the window; only


variable types allowed for the selected type of POU
will be available. With the program POU, for example,
you can only choose between Type, Local, and
Global variable types.

75
POU Editor

Declaring variables and function blocks in


Syntax mode
With an open POU, begin declaring variables by
selecting variable types by clicking one of the tabs
offered on the lower edge of the window.
Description of applicable variable types
Global: You declare a variable as global in the
program POU when you wish it to be valid not only in
the POU itself but also in the function blocks called
up by the POU. It must be declared as an external
variable (VAR_EXTERNAL) in all called-up function
blocks in which the variable is to be used. A global
variable can therefore only be declared in the
program POU. You can supplement global variable
declarations with the Attribute RETAIN or
CONSTANT (see Attribute) as well as with an
Address (see Address).
Keyword: VAR_GLOBAL
Type: The keyword TYPE is used for declaring user-
defined, derived data types with local validity in
program and function block POUs. Derived data
types are special data types you can derive, i. e.
compile yourself, from elementary types.

07/99 AWB 2700-1305 GB

76
Declaration section

Example:
By declaring a derived data type “Pressure” as an
INT data type with a limited value range, the new
data type can be used for declaring variables:
7<3(
3UHVVXUH,17  
(1'B7<3(

9$5
&KDPEHU3UHVVXUH3UHVVXUH
(1'B9$5

The variable “ChamberPressure” is thereby also an


INT data type but can only hold values in the range of
0..100.
Keyword: TYPE
Local: A local variable is only valid in the POU in
which it is declared. You can supplement the
declaration of local variables with the Attribute
RETAIN or CONSTANT (see Attribute) as well as
with an Address (see Address).
Keyword: VAR
Input: Input variables are used to transfer
parameters to functions or function blocks.
They can only be accessed as Read Only.
Keyword: VAR_INPUT
InOut: An InOut variable is read and processed by
a function block and output under the same name;
when the function block is called, the InOut variable
receives a pointer to the transferred variable and its
memory location during parameter passing.
Since an operation on an IN_OUT variable thus
directly affects the content of the transferred
variable, the transferred variable must not be of a
07/99 AWB 2700-1305 GB

type that does not permit write operations, such as


INPUT variables or variables with the attribute
CONSTANT.
Keyword: VAR_IN_OUT

77
POU Editor

Output: An output variable that is declared in the


function block in which it is supplied as the return
value.
Keyword: VAR_OUTPUT
External: If you wish to use a variable declared as
global in the program POU within a function block it
must by declared as an external variable in the
function block.
Keyword: VAR_EXTERNAL
Entering variables in Syntax mode
Variables are entered by filling out the entry cells in
the editing lines. Once the editing of a new editing
line is started, its line number will be displayed in
colour.
There are Name, Type, and Comment cells for every
variable type. Display of Attribute and Address cells
is dependent on POU and variable type. Attributes
can be entered only for Local and Global variable
types. Addresses can only be entered for Local and
Global variable types in the program POU. You can
enter an attribute in its entry cell without writing by
selecting the desired entry from a list box which you
open by first clicking the empty cell with the left
mouse button and then the H button.
Switch between cells with the left/right and up/down
cursor buttons and Page Up/Page Down buttons, or
simply via mouse-clicks.
Incorrect cell entries or incomplete declarations will
be reported before leaving the row.
07/99 AWB 2700-1305 GB

78
Declaration section

Confirm the report with OK and then correct the cell


or row.

In addition to standard Windows text-editing


functions such as Copy, Cut, Paste, and Delete,
you can insert or delete single or multiple rows at
any place in the table after selecting and then
using the Insert Row or Delete Row function.
Select entire lines by clicking on the line number
in the left margin.
If you mis-type while entering you can delete
mistakes with the Back key or Delete key.
Unintentional deleting can be reversed by
entering Alt + Back or by Edit ➞ Undo.
07/99 AWB 2700-1305 GB

79
POU Editor

Entry cells in the Syntax-controlled Variable


Editor
Name: Enter the variable name here. The length of
the name is limited to 64 characters.
.

Cells in Syntax mode may not be large enough to


show the complete variable name, address, or
comment.
However, you can jump to the end or beginning
of the entry with the End or Home keys. You can
also enlarge the cells by clicking on the vertical
border in the header with the left mouse button
and dragging it in the desired direction.

Type: Enter the variable data type in the Type cell.


This can be an elementary data type (such as BOOL,
UINT, etc.), a derived data type, or a function block.
The editing line shown below appears when program
POU and either Local or Global variable types have
been selected.

Figure 49: Editing line with Variable Editor in Syntax mode

07/99 AWB 2700-1305 GB

80
Declaration section

Elementary data types can be entered either


directly or selected from a dialog box. All elementary
data types available to the installed controller can be
found in this dialog box under the Manufacturer tab.
The data types, arranged according to function,
are provided in folders. Open the dialog box with
Insert ➞ Data Types... ➞ Data Types option
button ➞ Manufacturer tab
or
via the Data Types option in the context menu.

Figure 50: Context menu for the declaration section in


Syntax mode

All elementary data types are listed according to


group in individual dialog box folders, shown here for
PS 4-201 and followed by PS 416:
07/99 AWB 2700-1305 GB

81
POU Editor

Figure 51: Elementary data types for PS 4-201

Figure 52: Elementary data types for PS 416

Derived data types defined for the selected PLC


07/99 AWB 2700-1305 GB

type with the help of the Global Type Editor are listed
under the User tab.

82
Declaration section

You can find data types from an imported library


under the tab of the corresponding name.

Figure 53: User-defined data types

Select a data type and confirm by clicking on the


Accept button. The data type will be entered in the
Type cell.
If you wish to use a derived, self-created data type
you can enter it directly or select it in the Data Type
dialog box which you open with Insert ➞ Data
Types... ➞ Data Types options button ➞ User or
via the Data Types option in the context menu.
The name will then also be transferred into the Type
cell.
If you wish to instantiate a Function block you can
also enter it directly by selecting Insert ➞ Data
types... ➞ Function Blocks Options button ➞
Manufacturer/User or via the Data Types option in
07/99 AWB 2700-1305 GB

the context menu.

83
POU Editor

The Function Blocks dialog box will open, in which


manufacturer-defined and, if applicable, user-
defined FBs are organized under the respective tabs.
Manufacturer-defined FBs for the currently selected
PLC are arranged in folders according to function
and are displayed when the folder is opened.
If you click the Help button after selecting the desired
FB you will receive an explanation with a program
example.

If you are programming in IL you may be able to


reduce editing by selecting the Help program
example with the mouse pointer, saving it to the
clipboard with the Windows Clipboard function,
and then inserting it into the instruction section.

Figure 54: PS 416 manufacturer-defined function blocks


07/99 AWB 2700-1305 GB

84
Declaration section

Select the desired function block and click the


Accept button.
The name will then also be transferred to the Type
cell.
Function block instances can be used as Local and
Global variables in the program POU and as Local or
External variables in function block POU types.
In order that a function block instance be valid in all
POUs, it must be declared as a Global variable when
used in the program POU and as an External variable
when used in a function block POU in a sub-folder.
Initial value: The value you enter here will be
assigned to the variable when the PLC is started.
If you enter nothing, the variable will be assigned the
default value (0 for numeric variables).
Attribute: Use this box to define whether the variable
should be assigned an attribute. You can choose
between RETAIN or CONSTANT.
RETAIN: This keyword specifies that the variable is
retentive, i. e. it is retained in the event of a power
failure or when the controller is halted. The RETAIN
attribute is also applicable to FBs.
CONSTANT: This keyword specifies that the variable
is a data element whose value cannot be changed by
the PLC program.
Address: When you require a variable with a set
relation to a physical address - a directly represented
variable - establish this relation by entering an
identifier letter for memory location and an identifier
letter for data format in the address cell.
07/99 AWB 2700-1305 GB

85
POU Editor

Memory location identifiers:


I: Digital input
Q: Digital output
M: Marker
IA: Analog input (not used as bit operand)
QA: Analog output (not used as bit operand)
IC: Counter input (not used as bit operand)
IP: Digital input (peripheral direct access,
not used as word operand with
PS 4-200/300)*
QP: Digital output (peripheral direct access,
not used as word operand with
PS 4-200/300)*
IPA: Analog input (peripheral direct access,
not used as word operand
with PS 4-300)*
QPA: Analog output (peripheral direct access,
not used as word operand
with PS 4-300)*
IPC: Counter input (peripheral direct access,
not used as word operand
with PS 4-300)*
IS: Status information (diagnostics) from
intelligent modules
SD: Send Data – Communication data to
a network station
RD: Receive Data – Communication data
07/99 AWB 2700-1305 GB

from a network station


* (See “Direct Peripheral Access for PS 4-200 and
PS 4-300” in the section “Language Extension” in
AWB 2700-1306)

86
Declaration section

Data format identifiers:


X or without letter: Bit size
B: Byte
W: Word
DW: Double-word
Example:
I0.0.0.0.0
defines a Boolean input
Comment: Enter here any additional comments for
the variable. In Syntax-controlled mode, an initial
parenthesis and an asterisk [(*] are placed
automatically in front of the comment and a closing
parenthesis [*)] is placed behind it. You will only see
this, however, if you switch to Free mode, e. g.
(*Comment*).
E Conclude variable declaration by pressing the
Insert key; the Editor will insert an empty line onto
the end of it.
E Declare all variables of this type in the same way.
You can use the right mouse button and the
context menu if you need to make any
corrections afterwards. Declare variables of the
other variable types in the same way after clicking
the corresponding tab.
07/99 AWB 2700-1305 GB

87
POU Editor

Figure 55: Example list of declared variables– Syntax mode

Declaration for creating program POU – Syntax


mode
Follow these steps for declaring variables for the
program POU for the first time:
Precondition: The POU Editor is open.
E Select Program POU via the Program toolbar
button.

Figure 56: Program toolbar button

E Or select File ➞ New POU ➞ Program.


E Switch to Syntax mode, if applicable.
E Click the corresponding tab on the lower edge of
the window to define the new variable with one of
07/99 AWB 2700-1305 GB

the three possible variable types for a program


POU:

88
Declaration section

Type (user-defined with local validity), Local, or


Global. The tab for the selected variable type is
represented in the foreground.

Figure 57: Possible variable types for the program POU

Enter the data for each variable in the individual entry


cells of the editing line.
Declaration for creating function block POUs –
Syntax mode
Follow these steps to declare variables for function
block POUs for the first time:
Precondition: The POU Editor is open.
E Select Function Block POU via the Function
Block toolbar button.

Figure 58: New Function Block toolbar button

E Or select File ➞ New POU ➞ Function Block, and


make sure that Syntax mode is activated.
E Click the corresponding tab on the lower edge of
the window to define the new variable with one of
the six possible variable types for a function block
POU: Type, Input, Output, In_Out, Local, or
External.

Figure 59: Possible variable types for Function Block POUs


07/99 AWB 2700-1305 GB

89
POU Editor

Enter the data for each variable in the individual entry


cells in the editing line.
Declaration for creating function type POUs –
Syntax mode
Follow these steps to declare variables for function
type POUs for the first time:
Precondition: The POU Editor is open.
E Select Function type POU via the Function
toolbar button.

Figure 60: New function toolbar button

E Or select File ➞ New POU ➞ Function, and make


sure that Syntax mode is activated.
E Click on the corresponding tab on the lower edge
of the window to define the new variable with one
of the three possible variable types for a function
type POU: Type, Input, or Local.

Figure 61: Possible variable types for the function type


POU

Enter the data for each variable in the entry cells of


the editing line.
Free mode
The Free mode setting of the Variable Editor is
designed for experienced programmers who are
familiar with declaring variables in the Sucosoft S 40
and wish to enter them quickly. In Free mode, every
declaration line must be entered in the correct
07/99 AWB 2700-1305 GB

syntax; errors will not be reported until the syntax


check for the entire POU.

90
Declaration section

In contrast to Syntax mode operation, the Variable


Editor shows all declared variables at the same time
in Free mode, thus providing a better overview of
variables already declared.
Declaring variables and function blocks –
Free mode

Figure 62: Declaration section in Free mode

Declaration for creating the POU program –


Free mode
Follow these steps to declare variables:
Precondition: The POU Editor and a POU are open
and the Variable Editor is switched to Free mode.
In Free mode you declare the variables of the same
type in the same declaration block. Separate the
individual components of a declaration line with tabs
to improve clarity. Use the appropriate keywords for
07/99 AWB 2700-1305 GB

the individual variable types, e. g. VAR/END_VAR for


local variables. In general, all the variables described
for Syntax mode are available (see the section
“Description of applicable variable types” on page 76).

91
POU Editor

You must observe the following sequence in


declaration blocks:
VAR_INPUT, VAR_IN_OUT, VAR_OUTPUT,
VAR_GLOBAL, VAR_EXTERNAL, TYPE and
VAR.

There is no syntax control during entry; any potential


errors will not be indicated until the syntax check for
the entire POU is carried out.
E Enter the appropriate keyword for the desired
variable type – this will be shown in colour –
and declare the variables for this type.
Note the information on the following pages.
E Conclude the declaration block with the
appropriate keyword.
E Enter comments for further explanation of corres-
ponding declaration lines. Begin comments with
an initial parenthesis followed by an asterisk and
end them with an asterisk and a closing paren-
thesis, e. g. (*Comment*). Comments are also
shown in colour.
E Save the POU by clicking the button:

The Editor checks POU format before saving. It


begins by checking that all declaration blocks are
bracketed with correctly written keywords,
e. g. VAR...END_VAR; TYPE...END_TYPE.
Sucosoft will show an error message if it finds an
error, a missing END_VAR or comment ending, for
example. In case of an error, check the declaration
section in Free mode and make sure that there are no
07/99 AWB 2700-1305 GB

further characters after the last END_VAR and that


comments are correctly closed.

92
Declaration section

Examples of variable declaration – Free mode


Variable without initialisation:
,QWHUPHGLDWH9DOYH,17

Variable with initialisation:


8QLW1XPEHU,17 

Directly represented variable without name and


without initialisation:
$74%22/

Directly represented variable with name and


initialisation:
$74%22/ 

Directly represented variable with name and without


initialisation:
9DOYH$74%22/

Example of a function block:


&RXQWHU&78
07/99 AWB 2700-1305 GB

93
POU Editor

You can find information and instructions for


using variable types, data types, and function
blocks in declaring variables in the chapter
“Introduction to the two variable editors”.
To simplify selection of data types, Sucosoft
S 40 provides selection lists of all available
data types via the menu point Insert ➞ Data
Types... ➞ Data Types options button ➞
Manufacturer/User You can also request special
Help here.

Declaration for creating function block and


function POUs – Free mode
To declare variables for these POU types, follow the
same procedure described above while using the
appropriate buttons (see Figures 58 and 60).

Instruction section In the instruction section of a POU is where you


program the sequence and calculation instructions
to be carried out by the PLC. You are able to choose
between the three programming language, IL, LD, or
FBD, according to the programming task or personal
preference. Editing in the instruction section for the
three languages will be described in the following
sections.
You can determine basic settings for the Variable
Editor including the programming language, for
which the Editor will open, when creating a new POU
via Options ➞ Settings... ➞ Instruction Section.
The context menu offers you a convenient Editing
Help function which opens by clicking the right
mouse button in the instruction section.
07/99 AWB 2700-1305 GB

94
Instruction section

Instruction section when programming in IL


Overview
IL is a textual, line-oriented programming language.
An instruction line is constructed of the following:
label (optional), operator, operand, comment
(optional)
Creating a POU in IL
Precondition: The POU Editor and the desired POU
type (program, function block, or function) are open.
E Click the appropriate toolbar button if the IL
programming language has not yet been
selected.

Figure 63: IL toolbar button

Inserting operators
E Enter the program. You can enter the operators
directly or take them out of the toolbox if you have
previously activated it by View ➞ Toolbox. You
can also take them out of the Operators list box
which you have to open first via the menu point
Insert ➞ Operators... or by selecting Operators in
the context menu.
07/99 AWB 2700-1305 GB

95
POU Editor
.

Figure 64: Compare operators list

To improve clarity in your POU when operators


and comments are shown in colour you can
separate the individual components (jump labels,
operators, operands, and comments) with a tab
when entering them in the instruction line.

Inserting variables
E You can easily insert previously declared
variables from the list in the dialog available via
Insert Variable ➞ <All/Input/Output etc.>.
E This Dialog window is opened with Insert ➞ Insert
variable ➞ <All/Input/Output etc.> ,
or
via Insert Variable in the context menu.
07/99 AWB 2700-1305 GB

96
Instruction section

Figure 65: Variable selection

Inserting function block variables


If you are dealing with a function block in your
selected variables it will be inserted with all operands
if you leave the default option “FB Instances with
Prototype” active. Otherwise, only the instance name
will be inserted in the instruction section.
E Set function block parameters.
Inserting functions
Since functions do not save internal data and are
therefore not declared, they are called up via
“Functions” and not via the Insert Variable menu
point.
E Select the function from a list that you first call up
via the menu bar with Insert ➞ Functions... ➞
07/99 AWB 2700-1305 GB

Manufacturer/User or via the context menu.

97
POU Editor

The Functions dialog box will open in which


manufacturer-defined and, if applicable, user-
defined functions are arranged behind the respective
tabs. Manufacturer-defined functions for the
currently selected PLC are arranged according to
functionality in folders and will be shown when the
folder is opened.

Figure 66: Insert function

E Select the desired function and click the Accept


button
E Set the function parameters. You can quickly get
instructions for this by clicking the Help button
after selecting the function.
E You can make comments for individual lines of
the instruction file.
07/99 AWB 2700-1305 GB

Enter comments to the right next to the instruction.


Comments must begin with an initial parenthesis
followed by an asterisk and end with an asterisk
followed by a closing parenthesis, e. g. (*Comment*).

98
Instruction section

E Variables not yet declared can be declared now


from the instruction section with Insert ➞ Declare
Variable ➞ (appropriate data type)
E Save the POU by clicking the corresponding
toolbar button.

Figure 67: Save toolbar button

If you are saving the file for the first time you will be
asked in the following dialog window for the name
under which the POU is to be saved. The current
project is pre-set a folder. In the window that opens,
select, if applicable, one of the sub-folders you
created. POUs are always saved in the project in the
Source folder or any possible Source sub-folders.

Instruction section when programming in LD


Overview
The graphical programming language LD originated
in the field of electromagnetic relay systems and is
therefore especially suited to programming of logical
sequences of binary variables with their potential
states of TRUE-1 or FALSE-0.
LD represents the flow of current through a network
starting from the left “current rail” possessing the
TRUE state, through the various network elements
and the variables, to the right “current rail”.
The resulting sequence is determined by the network
elements, their order, and their type of connection
(serial or parallel).
07/99 AWB 2700-1305 GB

A POU may consist of individual networks


corresponding to the program sequences.
The sequence network number is located in the
network header and comments can by entered
below the network number.

99
POU Editor

LD networks consist of the following objects:


Connections (horizontal and vertical lines),
Contents and coils,
Jump instructions,
Function and function block call-ups.
You declare variables in the Variable Editor which is
common to IL, LD, and FBD. You will find a detailed
description of variable declaration in the section
“Declaration section” on page 74.
IL, LD, and FBD programming languages are
interchangeable. This means that you can create a
program in LD, for example, and then display it or
continue working in IL or FBD. When doing this take
note of the restrictions described in the section
“Changing programming language” beginning on
page 142.
E To create a POU in the LD language click on the
LD POU Editor in the instruction section, i. e. via
the corresponding toolbar button.

07/99 AWB 2700-1305 GB

100
Instruction section

Figure 68: LD Editor toolbar button

A number of language elements such as the network


division of the POU, the representation of functions
or function blocks is the same in both LD and FBD.
The linguistic differences between LD and FBD arise
in the programming of logical operations with binary
operands.
You can select all actions for program entry from
the Insert menu. Frequently used functions are also
available from the LD/FBD toolbar.

Z Z In N S S N E
o o s e ta ta a n
o o e g rt rt m te
m m rt a e r
te L F n
In O in D B n e
u p n D e tw
t u e tw
t tw n o
e o rk
o tw rk
rk o a c
rk s o
m
ju m
m e
p n
d t
e
s
ti
n
a
ti
o
n

Figure 69: LD/FBD toolbar buttons

You can also use the context menu (press the right
mouse button) to speed up the completion of
different stages of the POU. You must still, however,
use the keyboard for certain programming entry
tasks.
The following procedures for creating a program in
LD are based primarily on using context menus.
07/99 AWB 2700-1305 GB

Whenever using the toolbar, the right mouse button,


or the keyboard results in significantly faster POU
editing, this will be pointed out.

101
POU Editor

The basic structure of a POU will now be described,


i. e. determining the network sequence and
construction of the individual networks. Identifying
networks as jump destinations as well as entering
variable names and comments are discussed in later
sections.
Variable names and jump destinations are initially
assigned the designation “undef_opd” in the
graphical view of the POU. This must then be
replaced with the required variable name or jump
destination.
Programs can always be written in IL, LD and FBD
programming languages interchangeably. You will
find specific instructions on this topic in the section
“Changing programming language” beginning on
page 142.

Arithmetic functions, logical operations, and


compare functions are all available in the POU
Editor from the list box in the Operators dialog
box which you open via the menu point Insert ➞
Operators... or from the context menu under
Operators....
You can reproduce any number of graphic
elements in a network; however, only one
function block call-up per network. 07/99 AWB 2700-1305 GB

102
Instruction section

Creating a POU in LD
Precondition: The POU Editor is open.
E First select the program POU, declare variables
as described on page 74 in the chapter
“Declaration section”, and then click Use LD
Editor in the toolbar.
E Enlarge the LD Editor window.
E Next to the standard toolbar you should also
display the LD editing toolbar via View ➞ LD/FBD
Toolbar.
The following functions for program entry are
available from the Insert menu:

Figure 70: Insert Variable - LD

To simplify program entry you can also use the LD/


FBD Toolbar (see page 101) or the context menu.
07/99 AWB 2700-1305 GB

Figure 71: Context menu for LD - instruction section

103
POU Editor

The POU Editor offers various actions in the Insert


menu, toolbar, or context menu depending on cursor
position or on the selected area in the instruction
section.
Creating a new LD POU
Precondition: The Instruction Section window is
active.
Starting an LD network
E Select Insert ➞ Start LD Network or click the
corresponding toolbar button:

The first network will appear in the instruction section


with a contact and an output symbol. You can also
carry out this action via the toolbar or context menu.

07/99 AWB 2700-1305 GB

104
Instruction section

Program procedure (Jumps)


E Select JMP or RET operators from the menu via
Operators ➞ Group option, Branches or from the
context menu (see Figure 74, “List of Branch
operators”).
E Click on Accept.
The jump symbol, the element for entering and
editing the jump destination will appear in the new
network.

E Press the Enter key to open the Name Element


window in which you enter the jump destination
(see Figure 75, Name Element - LD).
Displaying and inserting operators
With Sucosoft you have the option of displaying a
toolbox or list box giving you an overview of all
available operators. The list offers the advantage of
showing the operators arranged thematically.
You can insert a required operator into the POU
directly from the list or from the toolbox.
Precondition: The Instruction Section window is
active.
E Display the toolbox via the View ➞ Toolbox menu
point and click the appropriate operator to insert.
07/99 AWB 2700-1305 GB

105
POU Editor

Figure 72: Operators toolbox

Alternative:
E Select the operator from the list box in the
Operators dialog box which you have opened
with the Insert ➞ Operators... menu point or via
Operators... in the context menu. In the right-
hand portion of the list box are listed all operators
available in the first selected group “Logic”. When
you select another group the operators belonging
to that group will be listed (see Figure 64).
E Select the group and the required operator and
click on Accept. The selected operator will be
inserted at the cursor position if the logic check
allows it. Otherwise it will be rejected with an
appropriate message.

If you need information on individual operators,


click on the Help button.

Inserting FB variables
Function blocks must exhibit at least one Boolean
input and output either directly or indirectly
connected to the appropriate current rail.
E Position the cursor on the required spot in the
07/99 AWB 2700-1305 GB

instruction section of your LD POU.


E Select the function block from a list of all declared
variables which you have previously opened with
the Insert ➞ Insert Variable... ➞ All... menu point

106
Instruction section

or via the context menu. The All option produces


a list in the Insert Variable dialog window of all
variables as well as all declared manufacturer and
user-defined function blocks for insertion.
E Select the instance for the required function block
or enter it directly in the entry box and click the
Accept button. The graphical symbol for the
function block will appear with all operands as a
new network if the “FB Instances with Prototype”
option is kept active. You can name and connect
inputs and outputs as you wish.
Inserting functions
Functions cannot be entered in LD networks. Switch
to FBD to enter a function. After changing back to LD
the function will be represented as a FBS block
symbol (See “Inserting functions” in the section
“Creating a new FBD POU”).
Editing POUs in LD
To change a POU you will have to select the
appropriate part of the POU. You can even select a
single graphic element, several adjacent elements, a
network, or the entire POU.
Selecting POU elements
You can use the mouse pointer, the cursor keys, or
the tab key to select the elements required.
To select multiple, adjacent elements in a network
you have various options:
Select one of the outermost elements with the
mouse pointer and, holding down the Shift key,
select the other outermost element.
Select an element with the mouse pointer and
07/99 AWB 2700-1305 GB

then, while holding down the Shift key, select the


desired elements.
Drag a frame around the desired section of the
network with the mouse pointer while holding
down the left mouse button.

107
POU Editor

To select an entire network use the mouse pointer to


click the square marking point located on the left
edge of the screen directly below the network.
To select multiple networks, first click on one of the
marking points. Then, while holding down the Shift
key, click the marking points for the other
appropriate networks above or below the first one
selected.
E Select the entire POU via Edit ➞ Select All.
Inserting networks
A new network can be inserted in front of or behind
an existing network.
E Mark the network marking point behind which the
new network is to be inserted.
E Choose the desired network content from the
Insert menu or from the context menu. The
following options are available: the start of an
LD network, variables (only function blocks,
however, as via the Operators menu point) an
unconditional jump and an unconditional return
as network terminations.
Deleting networks
E Select the network to be deleted.
E Press the DEL key or select Delete from the menu
bar or the context menu. The selected network
will be deleted.
Marking the network as a jump destination
A network can be marked as a jump destination for a
jump operation programmed in another network.
E Position the cursor in the network you wish to
07/99 AWB 2700-1305 GB

mark as a jump destination.


E Select Insert ➞ Network Label or click the
corresponding toolbar button:

108
Instruction section

The Network Label window will open.

Figure 73: LD Network Label

E Enter the name of the jump label, in this case


“Label_2”, in the box and confirm by clicking OK.
The jump label name will appear in the network
header of the selected network.
0005 Label_2

Input Output

Editing logic sequences


An LD initial network consists of a contact and an
output symbol. You can insert and edit logic
sequences in this network.
Inserting an AND sequence
E Mark the point on the horizontal line in which the
new contact is to be inserted.
0001

Input_1 Result
07/99 AWB 2700-1305 GB

E Press the space bar and a contact will be


inserted. You can also take the AND operator out
of the toolbox or insert it from the Operators list
box which is opened through the Insert ➞
Operators... or via the context menu.

109
POU Editor

0001

Input_1 Input_2 Result

Inserting an OR sequence
E Mark the contact or the network area to which a
parallel contact should be added.
0001

Input_1 Result

E Choose the OR operator out of the toolbox or


from the Operators list box which you can open
with the Insert ➞ Operators... menu point or via
the context menu.
A new contact will be added parallel to the
marked area.
0001

Input_1 Result

Input_2

Inserting a conditional output


E Mark the horizontal line directly before or after the
existing output symbol.
0001

Input_1 Output_1

Output_2
07/99 AWB 2700-1305 GB

E Choose the required conditional operation: ST,


STN, S, R, JMPC, JMPCN, RETC or RETCN from
the toolbox or from the Operators list box which

110
Instruction section

you can open with Insert ➞ Operators... via


the menu or through the context menu.

Figure 74: List of Branch operators

The corresponding graphical symbol will appear


above (marking in front of the output symbol) or
below (marking behind the output symbol) the
existing output symbol.
You can also mark the horizontal line directly in front
of Output_2 and insert the conditional operation
behind it. You will obtain the same result in this way.

0001

Input_1 Output_1

undef_opd

Output_2

S
07/99 AWB 2700-1305 GB

Modifying logic sequences


You can change the logic sequence of a mixed AND/
OR sequence by adding or deleting vertical
connection lines between the parallel branches.

111
POU Editor

1. Adding vertical connection lines


In order to add a vertical line the two lines to be
connected must be marked.
E Use the mouse or the cursor keys to mark the first
point between the parallel branches you wish to
connect.
E Press the Control key and hold it down while
marking the second point.
E Release the Control key.
0001

Input_1 Input_2 Input_3 Result

Input_4 Input_5

E Press the space bar and the marked points will


be connected; the logic sequence has been
changed:
0001

Input_1 Input_2 Input_3 Result

Input_4 Input_5

2. Deleting vertical connection lines


E Mark the vertical line you wish to delete.
0001
OR_before_AND_Sequence

Input_1 Input_2 Result


07/99 AWB 2700-1305 GB

Input_3 Input_4

112
Instruction section

E Press the DEL key or Delete via the menu bar or


the context menu. The marked line will be deleted
and the OR before AND sequence becomes an
AND before OR sequence:
0001
AND_before_OR_Sequence

Input_1 Input_2 Result

Input_3 Input_4

Negating contacts or outputs


Only individual marked elements can be negated.
E Mark the element to be negated.
0001

Jump when current reset=1

Input_1 Input_2

>>Label_1

E The marked element will be negated by pressing


the space bar.
This command is also available via the Symbol
menu

oder die Toolbox vornehmen.

0001

Jump when current result = 0

Input_1 Input_2

>>o Label_1
07/99 AWB 2700-1305 GB

113
POU Editor

Deleting elements
You can delete a single graphical element or a group
of adjacent elements. If you wish to delete several
elements in mixed AND/OR sequences the POU will
only allow element groupings resulting in a logical
network content, i. e. there must always remain at
least a valid network start after deleting.
In networks with conditional jump operations,
JMPCN or RETC for example, the entire logic
sequence can be deleted. A JMP or RET
unconditional operation will remain in the network.
In networks with conditional allocation instructions
such as ST, STN, S and R, at least one contact must
remain after the deletion.
When deleting output symbols at least one output
must be left over.
Naming elements
The inputs and outputs must be completed by
entering variable names. Parameter passing in the
program requires the assignment of variable names
to the connections of functions and function blocks.
Inputs can also be assigned constants, i. e. values.
E Select the element for which you wish to enter an
element name.
0001

undef_opd
>>undef_opd

E Press the Enter key and the Name Element dialog


box will open.
07/99 AWB 2700-1305 GB

114
Instruction section

Figure 75: Name Element - LD

E Or select the variable from a list of all declared


variables which you open via the Insert ➞
Variable ➞ All... menu point or the context menu.
Entering names for jump operations
A jump symbol must be completed by defining the
jump destination.
E Select the jump symbol for which you wish to
define a jump destination.
0001

Input
>>undef_opd

E Press the Enter key.

Figure 76: Naming an element as jump destination


07/99 AWB 2700-1305 GB

E Enter the name of the jump destination and


confirm by clicking OK.

115
POU Editor

0001

Input
>>Label_3

Entering network comments


Each network can be assigned a comment of several
lines in length.
E Position the cursor in the network.
E Select Insert ➞ Network Comment... or click on
the toolbar button:

The Network Comment dialog box will open.

Figure 77: Network Comment - LD

E Enter the comments and confirm by clicking OK.


The comments entered will appear in the network
header beneath the network number.
0001

Network comment
07/99 AWB 2700-1305 GB

Input

>>o Label

116
Instruction section

Creating function blocks in LD


Precondition: The POU Editor is open, you have
selected Function Block and have clicked the
“Use LD Editor” toolbar button.
The same rules for creating programs apply to
creating function blocks in LD.
Creating functions in LD
Precondition: The POU Editor is open, you have
selected Function and have clicked the “Use LD
Editor” toolbar button.
The same rules for creating programs apply to
creating functions in LD

Instruction section when programming in FBD


Overview
The FBD programming language has it origins in
the field of electrical signal processing.
In FBD, the instruction section is divided into
networks as it is in LD. The individual objects
(language elements) are represented with the help of
graphical symbols. Structuring of the POU is carried
out via these graphics.
FBD recognizes the following objects:
Connections
Execution control elements (jumps)
Function block and function call-ups
Operators
Operators, functions and function blocks are shown
as block symbols with connection lines for inputs on
07/99 AWB 2700-1305 GB

the left side and connection lines for outputs on the


right. The ends of connection lines are to be assigned
parameters (variables/constants) or connected with
other inputs or outputs. They are initially assigned
with “undef_opd”.

117
POU Editor

Several operators and functions can be linked in any


sequence within a network.
A function block is treated as an individual network to
which no other program components, except for pre-
switching conditions in the form of contact elements,
can be added. In contrast to a function, it can contain
several inputs and outputs. A function can only have
one output with several possible inputs.
When writing a user-defined function block the
inputs and outputs are shown on the function block
symbol in the order in which they were declared in
the Variable Editor of the function block concerned.
This order can be changed via the Variable Editor.
FBD networks consist of the graphical objects:
Network labels,
Network comments, and
Network graphics,
which are explained below.
Network labels
Every network which is to be a jump destination for
another network must begin with an alpha-numeric
identifier or an unsigned decimal integer which
serves as a jump label.
This label must not be confused with the continuous
numbering with which the POU Editor automatically
begins each network.
Network comments
Network comments can be entered between
network labels and network graphics. One comment
per network is allowed but it can be extended to
07/99 AWB 2700-1305 GB

several lines by pressing the Insert key.

118
Instruction section

Network graphics
Network graphics consist of graphical elements
(block symbols) with input connection lines on the
left and output connections lines on the right side.
Data flows over these connection lines and then over
the further-extending horizontal or vertical
connection lines to graphical elements where it is
processed and led on to the output.
Outputs from one block, as well as those of different
blocks, cannot be connected together because the
source of the data to be passed on would not be
clear.
Data flow can only occur from an output or from a
variable/constant to one or several inputs of a
subsequent block.
Declare the variables in the Variable Editor common
to the programming languages. You will find a
detailed description of variable declaration in the
section “Declaration section” beginning on page 74.
IL, LD, and FBD programming languages are
interchangeable. You can therefore begin writing a
program in FBD and then display or continue writing
it in IL or LD. While doing this, you must take note of
the restrictions which are explained in the section
“Changing programming language” beginning on
page 142.
To create a POU in FBD activate the FBD POU Editor
in the instruction section via the corresponding
toolbar button.

Figure 78: FBD Editor toolbar button


07/99 AWB 2700-1305 GB

A number of language elements such as POU


network layout and representation of functions or
function blocks are the same in FBD and LD.
The differences between them arise in the

119
POU Editor

programming of logical sequences of binary


operands.
You can select all functions for program entry in the
FBD Editor from the Insert menu. Frequently-used
functions are also available from the toolbar. You can
also use the context menu (press the right mouse
button) to speed up the completion of different
stages of the POU. You must still, however, use the
keyboard for certain programming entry tasks.
The following procedures for creating a program in
LD are based primarily on using context menus.
Whenever using the toolbar, the right mouse button,
or the keyboard results in significantly faster POU
editing, this will be pointed out.
Basic construction of a POU will now be described,
i .e. specifying the network sequence and
construction of the individual networks. Identifying
networks as jump destinations as well as entering
variable names and comments are discussed in later
sections.
Variable names and jump destinations are initially
assigned the designation “undef_opd” in the
graphical view of the POU. This must then be
replaced with the required variable name or jump
destination.

Arithmetic functions, logical operations, and


compare functions are all available in the POU
Editor from the list box in the Operators dialog
box which you open via the menu point Insert ➞
Operators... or from the context menu under
Operators....
07/99 AWB 2700-1305 GB

120
Instruction section

Creating a POU in FBD


Precondition: The POU Editor is open.
E First select the program POU, declare variables
as described in the chapter “Declaration section”
beginning on page 74, and then click Use FBD
Editor in the toolbar.
E Next to the standard toolbar you should also
display the FBD editing toolbar via View ➞ LD/
FBD Toolbar.
The following functions for program entry are
available from the Insert menu:

Figure 79: Insert Variable - FBD

To simplify programming entry you can also use the


LD/Toolbar (See page 101) or the context menu as in
Figure 71.
The POU Editor offers various actions in the Insert
menu, toolbar, or context menu depending on cursor
position or on the selected area in the instruction
section.
07/99 AWB 2700-1305 GB

121
POU Editor

Creating a new FBD POU


Starting an FBD network
E Select Insert ➞ Start FBD network or click on the
toolbar button:

The first network will appear in the instruction section


with a contact and an output symbol. You can also
carry out this procedure via the toolbar or the context
menu.

Procedure (Jumps)
Select JMP or RET operators from the menu via
Operators ➞ Group - Branches or from the context
menu (see Figure 74, “List of Branch operators”).
E The jump symbol, the element for entering and
editing the jump destination will appear in the
new network.
E Press the Enter key and the Name Element dialog
box in which you enter the jump destination will
open.
07/99 AWB 2700-1305 GB

122
Instruction section

Displaying and inserting operators


With Sucosoft you have the option of displaying a
toolbox or list box giving you an overview of all
available operators. The list offers the advantage of
showing the operators arranged thematically. You
can insert a required operator into the POU directly
from the list or from the toolbox.
Precondition: The Instruction Section window is
active.
E Open the toolbox via the View ➞ Toolbox menu
point and click on the appropriate operator.
Alternatively:
E Select the operator from the list box in the
Operators dialog box which you can open
through the menu with Insert ➞ Operators... or
via the context menu. All operators available in
the first selected group, Logic, will be listed in the
right side of the list box. When you select another
group the operators belonging to that group will
be listed.
E Select the group and the required operator and
then click on Accept. The selected operator will
be inserted at the cursor position.

Information on individual operators is available


07/99 AWB 2700-1305 GB

by clicking on Help.

123
POU Editor

Inserting function block variables


Function blocks are treated as individual networks.
E Position the cursor in the required place in the
instruction section of your FBD POU.
E Select the function block from a list of all declared
variables which you open first via the Insert ➞
Insert Variable ➞ All... menu point or through the
context menu. The All option also lists all
declared manufacturer and user-defined function
blocks in addition to all the variables that can be
inserted.

Figure 80: Insert declared function block

E Select the required FB instance or enter it directly


into the entry field and confirm by clicking
Accept. If the FB Instance with Prototype option
07/99 AWB 2700-1305 GB

is kept active the graphical symbol for the


function block will appear with all operands
as a new network. Assign parameters with the
appropriate variable designators and
connections.

124
Instruction section

0004

Counter_1

_16Bit Counter

Forward

>

Backward

>

Set

>

ReSet Zero

InputValue OutputValue

Inserting functions
E Select Insert ➞ Start FBD Network or click the
corresponding toolbar button when the function
is designated for a separate, new network. If you
wish to insert the function into an existing
network observe the following procedure.
E Select the complete connection line after which a
function is to be inserted.
0001

SUB

AND
Position

Running to
Reference point
right

Enable
:=

E Select the function from a list that you can call up


via the Insert ➞ Function... ➞ Manufacturer/User
menu point or from the context menu.
07/99 AWB 2700-1305 GB

125
POU Editor

The Function dialog box will open. This contains the


manufacturer-defined or, if applicable, user-defined
functions organized under the respective tabs.
Manufacturer-defined functions for the currently
selected controller, arranged according to
functionality, are grouped in folders and will be
displayed by opening the respective folder.

Figure 81: Insert function – FBD

E Select the required function or enter it directly


into the entry field and click on Accept. The
graphical symbol for the function will be inserted
behind the selected location.
07/99 AWB 2700-1305 GB

126
Instruction section

0001

SUB

ispositive AND
Position

Running to
Reference point
right

Enable
:=

An error message will inform you if you are trying to


enter a function with incorrect syntax.
Deleting function blocks or functions
E Select the function block or function and press
the DEL key or select Delete in the menu bar or
context menu. The graphical symbol will be
deleted.
Editing POUs in FBD
In order to modify a POU you must first select the
appropriate part. You can select a single graphical
element, several adjacent elements, a network or the
entire POU.
Selecting POU elements
You can use the mouse pointer, the cursor keys, or
the tab key, in conjunction with the Shift key, to
select the elements required.
To select multiple, adjacent elements in a network
you have various options:
Select one of the outermost elements with the
mouse pointer and, holding down the Shift key,
select the other outermost element.
07/99 AWB 2700-1305 GB

Select an element with the mouse pointer and


then, while holding down the Shift key, select the
desired elements.

127
POU Editor

Drag a frame around the desired section of the


network with the mouse pointer while holding
down the left mouse button.
To select an entire network use the mouse pointer to
click the square marking point located on the left
edge of the screen directly below the network.
To select multiple networks, first click on one of the
marking points. Then, while holding down the Shift
key, click the marking points for the other
appropriate networks above or below the first one
selected.
Select the entire POU via Edit ➞ Select All.
Inserting networks
A new network can be inserted in front of or behind
an existing network.
E Mark the network marking point behind which
the new network is to be inserted.
E Choose the desired network content from the
Insert menu or from the context menu.
The following options are available: FBD network
start, variables (only function blocks, however, as
via the Operators menu point) an unconditional
jump and an unconditional return as network
conclusions.
07/99 AWB 2700-1305 GB

128
Instruction section

Deleting networks
E Select the network to be deleted.
E Press the DEL key or select Delete from the menu
bar or the context menu. The selected network
will be deleted.
Marking the network as a jump destination
A network can be marked as a jump destination for a
jump operation programmed in another network.
E Position the cursor in the network you wish to
mark as a jump destination.
E Select Insert ➞ Network Label or click the
corresponding toolbar button:

The Network Label window will open:

Figure 82: Network Label - FBD

E Enter the name of the jump label, in this case


“Label_2”, in the box and confirm by clicking OK.
The jump label name will appear in the network
header of the selected network.

0005 Label_2
07/99 AWB 2700-1305 GB

Output
Input
:=

129
POU Editor

Editing networks
You can insert graphical symbols such as operators
and functions into an existing network. You can
thereby program several operators and functions in
any sequence in a network.
When combining functions using operators with
more than two inputs, an additional graphical symbol
can only be inserted in front of the first function input.
.

When a network is edited in FBD, you can nest


any number of operators and functions, even if
the data types are different. The data types are
not checked until the syntax check.

Inserting graphical symbols


In order to insert a graphical symbol, the connection
line in front of or behind an existing symbol must be
marked. The new graphical symbol is inserted to the
right of the marked position.
1. Inserting operators
E Select the connection line after which you wish to
insert a new operator, e. g. a logical AND
operator.

0001

SUB
Measuring

Value_1 ispositive

Measuring Result

Value_2
:=
07/99 AWB 2700-1305 GB

130
Instruction section

E Select the AND operator from the Toolbox,


or
from the Operators list box which you can open
from the menu via Insert ➞ Operators... or via the
context menu.

Figure 83: List of logical operators

E Click on Accept. The operand symbol will appear


behind the marked position:
0001

SUB

Measuring Value_1
ispositive AND
Measuring Value_2

Result

undef_opd
:=

2. Inserting functions
See the section “Creating a new FBD POU”
07/99 AWB 2700-1305 GB

beginnung on page 122.

131
POU Editor

Deleting graphical symbols


Marked graphical symbols can be deleted from a
network. When a marked sequence symbol is
deleted, only the graphical symbols at the topmost
input upstream and the graphical symbols
downstream are kept.
E Mark the graphical symbol to be deleted.

0001

AND
Automatic

OR
Running to right

AND

Manual operation
Motor_right

Key_right
:=

E Press the DEL key or select Delete from the menu


bar or context menu. The selected graphical
symbol will be deleted.
0001

AND

Automatic

Motor_right

Running to right
:=

Inserting inputs
The number of inputs can only be increased for logic
sequence symbols and the arithmetic operations
07/99 AWB 2700-1305 GB

ADD and MUL.


E Mark the input behind which you wish to insert a
new input.

132
Instruction section

0001

OR

Off undef_opd
Halt
R

E Select Insert ➞ Insert Input. An additional input is


inserted after the marked input.
0001

OR

Off
undef_opd undef_opd
Halt
R

In order to insert an input at the bottom, mark either


the existing bottom input or the graphical symbol
itself.
Deleting inputs
You can reduce the number of input variables for
logic sequences and for arithmetic operations to two
input variables in the following way. Note: the entire
symbol will be deleted if you reduce the number of
inputs to one.
E Mark the input to be deleted.
07/99 AWB 2700-1305 GB

133
POU Editor

0001

AND

Input_1
Input_2
Input_3
Result
Input_4
:=

E Press the DEL key or select Delete from the menu


bar or context menu. The selected input will be
deleted.

0001

AND

Input_1
Input_3 Result
Input_4 :=

You can also select and delete several adjacent


inputs.
Inserting outputs
An output can be inserted above or below an existing
output.
The operators ST, STN, S, R, JMPC,JMPCN, RETC
and RETCN are available for Boolean outputs and
only ST for the other data types. STN can also be
used with bit patterns.
1. Inserting an output above all existing outputs
07/99 AWB 2700-1305 GB

E Mark the connection line in front of the output


symbol.

134
Instruction section

OR

Malfunction

AND

Display of
Display of
malfunction
malfunction

Acknowledge
:=

E Select the operator from the list box in the


Operators dialog box which you can open via the
Insert ➞ Operators... menu point or the Operators
context menu.
All operators available in the currently selected group
are listed on the right side of the list box. The usable
operators, organized by group, are listed below:
Logic group:
for Boolean outputs: S, R
Branches group:
for Boolean outputs: JMPC, JMPCN, RETC and
RETCN
Calls group:
for Boolean outputs: ST
for other data types: ST
for bit patterns: STN
E Mark the required operator. The appropriate
graphical symbol will be inserted above
existing outputs.
07/99 AWB 2700-1305 GB

135
POU Editor

OR
Malfunction

Display of AND

malfunction
undef_opd

Acknowledge
:=

Display of

malfunction

:=

2. Inserting outputs behind an existing output


E Mark the output behind which you wish to
insert the new output.

0001

OR
Malfunction

Display of AND

malfunction
Display of

malfunction
Acknowledge
:=

E Select the operator as described above.


E Mark the required operator. The appropriate
graphical symbol will appear below the existing
output.
07/99 AWB 2700-1305 GB

136
Instruction section

OR
Malfunction

Display of AND

malfunction Display of

malfunction
Acknowledge
:=

undef_opd

:=

Deleting outputs
Individual outputs or several adjacent outputs can
be deleted. At least one output symbol must be left
when outputs are deleted
E Mark the output range to be deleted.

0001

AND

Input_1
Output_1
Input_2
:=

Output_2

S
Output_3
R

E Press the DEL key or select Delete from the menu


bar or context menu. The selected output range
07/99 AWB 2700-1305 GB

will be deleted.

137
POU Editor

0001

AND

Input_1
Output_3
Input_2
R

Negating inputs
You can negate inputs assigned to Boolean data
types or bit pattern data types.
E Mark the input to be negated.

0001

AND

Input_1
Result
Input_2
:=

E Press the space bar and the marked input will be


negated.
This command is also available via the toolbar or
Toolbox.

0001

AND

Input_1
Result
Input_2
:=

Negating outputs
A
07/99 AWB 2700-1305 GB

You can negate outputs assigned to binary or bit


pattern data types. This does not apply to “S” and
“R” operators.

138
Instruction section

E Mark the output to be negated.

0001

AND
Input_1
Result
Input_2
:=

E Press the space bar and the marked output will


be negated.
This function is also available via the toolbar or
the Toolbox.

0001

AND
Input_1
Result
Input_2
NOT

Naming elements
The inputs and outputs must be completed by
entering variable names. Parameter passing in the
program requires the assignment of variable names
to the connections of functions and function blocks.
Inputs can also be assigned constants, i. e. values.
1. Naming inputs
E Mark the input for which you wish to enter a
variable name or a constant.
E Press the Enter key to open the Name Element
dialog box.
07/99 AWB 2700-1305 GB

139
POU Editor

Figure 84: Name Element - FBD

E Enter the variable name directly or via the


Clipboard or enter the value of a constant and
confirm with the OK button,
or
E Select the variable from a list of all declared
variables which you can open from the Insert ➞
Variable ➞ All... menu point or via the context
menu.
2. Naming outputs
E Mark the output for which you wish to enter a
variable name.
E Press the Enter key to open the Name Element
dialog box.
E Enter the variable name and confirm with the OK
button,
or
E Select the variable from a list of all declared
variables which you can open from the Insert ➞
Variable ➞ All... menu point or via the context
menu.
Entering names for jump operations
A jump symbol must be completed by defining the
07/99 AWB 2700-1305 GB

jump destination.
E Mark the jump symbol for which you wish to
define a jump destination.

140
Instruction section

0001

And

Starting position

Start
>>undef_opd

E Press the Enter key.


This function is also available via the menu by
selecting Insert ➞ Name Element...
The Name Element dialog box will open.

Figure 85: Name element as jump destination - FBD

E Enter the name of the jump destination and


confirm with the OK button.

0001

And

Starting position

Start
>>System_1

Entering network comments


Each network can be assigned a comment of several
lines in length.
07/99 AWB 2700-1305 GB

E Position the cursor in the network.


E Select Insert ➞ Network Comment....
The Network Comment window will open.

141
POU Editor

Figure 86: Network comment - FBD

E Enter the comment (you can switch lines by


pressing the Enter key) and confirm with the OK
button. The specified comment will appear in the
network header underneath the network number.

0001

Network comment

And

Starting position

Start
>>System_1

Changing programming language


In general, IL, LD and FBD programming languages
are interchangeable if the POU is syntactically
correct. If not, you will receive the corresponding
error message. Follow this procedure to change
languages:
07/99 AWB 2700-1305 GB

142
Instruction section

E Select Options ➞ Programming Language ➞ IL/


FBD/LD
or
E Select the desired programming language via the
toolbar button in the standard toolbar.

Figure 87: Toolbar button for changing language

The instruction section for the POU will appear in the


selected programming language.
Some instruction sequences of a program created in
IL cannot be shown graphically, even when
complying with Sucosoft syntax. When translating
such a program into one of the graphic languages, a
network with the message “Network cannot be
graphically displayed” will be issued for each
program section which cannot be converted.
A corresponding notice will be displayed in IL.

Figure 88: POU section which cannot be graphically


displayed

The following examples are offered to help you solve


any problems arising from conversion restrictions.
07/99 AWB 2700-1305 GB

143
POU Editor

Conditional function block call


A CALC or CALCN function block call that was
programmed in IL cannot be displayed graphically.
Example
&RQGLWLRQDOFDOORIWKH&78FRXQWHUIXQFWLRQEORFN
ZKHQWKH´SDOOHWL]LQJµSURGXFWLRQ
VWHSLVUXQQLQJ
/' 3DOHWWL]LQJ
&$/&&RXQWHUB
&8 /LJKWEDUULHU
5(6(7 5(6BEXWWRQ
39 
_
IXOO 4
 &9

After changing to LD or FBD the program section


appears as follows (it cannot be edited here).

07/99 AWB 2700-1305 GB

144
Instruction section

Solution
Programming a conditional jump of the CAL function
block call when the variable Palletizing is “0” results
in an IL program that can be displayed graphically.
/'13DOOHWL]LQJ
-03&/DEHOB
&$/&RXQWHUB
&8 /LJKWEDUULHU
5(6(7 5(6BEXWWRQ
39 
_
IXOO 4

/DEHOB

After changing to FBD the program section appears


as follows:

0011

Palletizing
>>o Label_4

0012

Counter_3

CTU

Lightbarrier CU
>

Res_button RESET Q full

120 PV CV

0013 Label_4
07/99 AWB 2700-1305 GB

145
POU Editor

Intermediate storage within an IL sequence


Intermediate storage within a sequence is possible in
IL programming.
Example
$1'EHIRUH25VHTXHQFH
RQO\GLVSOD\DEOHLQ,/
/'YDU
25 YDU
$1'YDU
67$1'BUHVXOW ,QWHUPHGLDWHVWRUDJHQRWGLVSOD\DEOHLQ/'
)%'

25YDU
6725BUHVXOW

After changing to LD or FBD the program section


appears as follows:

Solution
$1'EHIRUH25VHTXHQFH
/')%'FRPSDWLEOH3DUW
/'YDU
$1'YDU
67$1'BUHVXOW
07/99 AWB 2700-1305 GB

$1'EHIRUH25VHTXHQFH
/')%'FRPSDWLEOH3DUW
/'YDU
25$1'BUHVXOW
25YDU
6725BUHVXOW

146
Instruction section

After changing to FBD the program section appears


as follows:

0001

AND-before-OR sequence,

LD/FBD compatible, Part 1

AND

var2
AND_result

var3
:=

0002

AND_before_OR_sequence,

LD/FBD compatible, Part 2

OR

var1

AND_result
OR_result

var4
:=

Line-oriented comments
Line comments are possible in IL at any point in the
program. In graphical programming languages,
comments can only be entered in the network
header.
When a program written in IL is displayed in LD or
FBD, all line comments of an IL sequence will appear
in the network header.
These comments can then no longer be re-assigned
07/99 AWB 2700-1305 GB

to the respective IL lines if you change back into IL


format, and will be placed at the beginning of the IL
sequence.

147
POU Editor

Example:
&RXQWLQJWKHSURGXFHGSDUWV
&$/&RXQWHUB ,QVWDQFHRIWKH&7'IXQFWLRQEORFN 
&' 3DUW 3XOVHVIURPDOLJKWEDUULHU
/RDG 6HW.H\
39  4XDQWLW\LQDSDFNLQJXQLW
_HPSW\ &RXQWHUB4 &RXQWHUHODSVHG
LH3DFNLQJIXOO
 &9

After changing to FBD the program section appears


as follows:

0003

Counting the produced parts

Instance of the CTD function

Pulses from a light barrier

Quantity in a packing unit

Counter elapsed, i.e. Packing full

Counter_4

CTD

Part CD
>

Set key
LOAD Q empty

50 PV CV

After returning to IL the program looks as follows:


 &RXQWLQJWKHSURGXFHGSDUWV
,QVWDQFHRIWKH&7'IXQFWLRQEORFN
3XOVHVIURPDOLJKWEDUULHU
4XDQWLW\LQDSDFNLQJXQLW
&RXQWHUHODSVHGLH3DFNLQJIXOO

CALCounter_4(
CD := Part
LOAD :=SetKey,
07/99 AWB 2700-1305 GB

PV :=50
|
empty:=Counter_4.Q
:=CV
)

148
Global type editor

Global type editor You can easily make complex types of declarations,
e. g. structures you wish to use for several POUs
within the overall project, by declaring them in a
separate editor that you can call up via the menu bar
by selecting File ➞ Open Global Types.

Figure 89: Open Global Types

You can declare both derived and elementary data


types within the keywords TYPE...END_ TYPE
(See “Derived Data Types” in AWB 2700-1306).
Note: Make sure that this type of declaration is
applicable only to the currently selected PLC!
07/99 AWB 2700-1305 GB

149
POU Editor

Figure 90: Global user-defined data types

In contrast to derived data types, which you


assemble as TYPE variables for program and
function block POUs and which are valid only within
the respective POU, the data types assembled here
are global, i. e. valid throughout the project. They can
thereby be used, for example, as data types for input
or output variables for function blocks. As a further
example, complex data can be transferred by using
a structure variable at a function block input for
processing.
07/99 AWB 2700-1305 GB

150
Syntax check and error
correction

Syntax check and error Precondition: You have written the instruction
correction section, all variables used have been declared and
the POU has been saved.
E Select File ➞ Syntax Check,
or
click on the Syntax Check toolbar button.

Figure 91: Syntax Check toolbar button

A syntactically correct POU will be reported to you by


a corresponding message in the Status bar on the
lower edge of the window.
The Error Messages window will open if syntax errors
are detected.

Figure 92: Syntax check with error message

The first entry in each line indicates whether the


error is in the instruction section (Ins) or declaration
section (Decl). This is followed by the line and column
number of the error, the name and path of the POU
and a short error description. Up to 25 errors can be
listed; if more than 25 errors have been found, the
remaining error messages will not be shown until the
first 25 have been rectified.
E Correct the errors in ascending line order.
07/99 AWB 2700-1305 GB

Double-click on each error message to display


the source of the error in the IL Editor - the cursor
is positioned in the faulty line. If you require

151
POU Editor

further help in rectifying a particular error, select


the error message concerned and press F1.
E Save the corrected POU.

Creating a new POU Declaration section


in IL: procedure Here you will find procedures for declaring all
variables to be used in a project and for writing
function block instances. You can find detailed
information on the specific steps in the individual
sub-topics.
Precondition: The required PLC type has been
selected and the POU Editor is open.
E Click on one of the standard toolbar buttons P,
FB, or F, corresponding to program, function
block, or function, for the required type of POU
or
E Choose File ➞ New POU ,
then select the desired POU type.
The two windows for the declaration and instruction
sections will open. They will be arranged as pre-set
under Options ➞ Settings... (See the section “POU
editor settings”).
If you select the Function type POU the Function
Type dialog box, in which you will be asked to enter
the type of function, will also open. The type of
function corresponds to the data type of the return
value
(e. g. BOOL, UINT etc.), delivered by this function.
After entering the function type, the two windows for
the declaration and instruction sections will open.
07/99 AWB 2700-1305 GB

The declaration section appears in the pre-set mode;


switch to Syntax mode, if applicable.

152
Creating a new POU in IL:
procedure

Creating a program POU in IL programming


language:
E Declare the variables in the Variable Editor.
Define your variables with one of the three
possible variable types, Type (user-defined with
local validity), Local, or Global, by clicking the
corresponding tab on the lower edge of the
window.
Click on the Type column and determine the data
type of the variable (e. g. BOOL, UINT, etc.).
Enter a variable name in the Name field.
Enter any additional information in the Initial
Value, Attribute, Address, and Comment fields.
E Place the cursor in the Instruction Section
window and write your POU.
Operators can be conveniently taken from the
Toolbox or from the Operators dialog box which
you can open by selecting Insert ➞ Operators...
in the menu or via the Operators context menu.
You can open the context menu with a right
mouse-click in the Instruction Section window.
In the list box which then opens you can will find
all the available commands. Remember that the
appropriate context menu as well as the Insert ➞
Operators menu point is only available when the
Instruction Section window is active!
E You can insert previously declared variables via
the Insert Variable dialog box by selecting:
< Variables Type> and a subsequent selection of
variable names. Open this dialog box with
Insert ➞ Insert Variable... ➞ <Variable type>, or
via the Insert Variable context menu.
07/99 AWB 2700-1305 GB

153
POU Editor

E Save the POU in the current project via File ➞


Save As... or by clicking the appropriate toolbar
button:

E Conduct a syntax check via File ➞ Syntax Check


or with the corresponding toolbar button.

Make sure that all variables used have been declared


and that function block instances have been written
before checking syntax; otherwise you will receive
error messages due to missing variable declarations.
Detected syntax errors will be displayed in the Error
List of <Name> window.

You can switch between the declaration and


instruction sections at any time when writing
your POU to add to or modify already existing
POU sections.

Opening an existing If you wish to The Open File dialog box will open.
POU continue working on an existing POU you can open
it in the following way:
E Select File ➞ Open POU, or click on the
corresponding toolbar button:

The Open File dialog box will open.


07/99 AWB 2700-1305 GB

154
Converting POU types

Figure 93: Open file

E If the POU is located in another project, select the


project Source folder (according to drive and
directory, if applicable). Select the desired POU.
E Confirm the selection by clicking on OK.
The POU will be opened in the pre-set form (See the
section “POU editor settings”).

Converting POU types Use this option when you want to use the contents of
an existing POU in a new POU of a different type
(program, function, or function block) or when you
have selected the wrong POU type when creating the
POU with File ➞ New POU.
Precondition: The POU whose type you wish to
change is open in the POU Editor.
07/99 AWB 2700-1305 GB

155
POU Editor

The declaration of certain variable types can


become unusable when changing the POU type.
These are the variables that are not available in
the new POU type (e. g. input or output variables
with a program POU). The IL part will, however,
be accepted unchanged.

E Select File ➞ Convert POU Type. Select the


desired POU type in the list box that opens
showing the current POU type with a checkmark
and the change will be carried out. The new POU
type will be displayed in the title line of the POU
Editor.

Figure 94: Convert POU type

E Switch the Variable Editor to Free mode with


Options ➞ Variable Editor ➞ Free Mode in order
that you have the entire declaration section with
all variable types in view. Check both the
instruction and the declaration sections of your
POU.
E Save the POU.
You can also use this option to convert the return
value of a function POU currently in process to
another return value.
E Select File ➞ Convert POU Type. Choose
Convert Function Type in the list box that opens
showing the Function POU type with a
07/99 AWB 2700-1305 GB

checkmark. The Function Type dialog box in


which you enter the new function type will open.
Confirm with the OK button.

156
Importing Sucosoft S 30
programs

The return value will be converted and the new


value will then be displayed in the title line of the
POU Editor.

Figure 95: Convert function type

Importing Sucosoft Programs written with Sucosoft S 30 can be


S 30 programs imported to Sucosoft S 40. The following program
types can be converted:
files for the PS 316/PS 306 with the extension*.q6b
or *.q6w,
files for the PS 3 with the extension *.q3, and
files for the PS 4-201-MM1 and PS 4-141/151-MM1
with the extension *.q42.

Structure of the S 30 program source


The S 30 program source can consist of a main
program and several include programs that are
incorporated into the main program.
The reference files (*.Z**) should have been
incorporated in the source programs (*.Q**) with the
Include instruction. In this case, symbolic operands
are declared and used in the converted program.
07/99 AWB 2700-1305 GB

The symbolic operands are supplemented with a


comment specifying the contact characteristics
(M/B) and terminal designation (T) that were defined
in the reference file.

157
POU Editor

Type of conversion
Use a newly created S 40 project for the conversion.
The conversion will change the S 30 program into a
program type POU and, if necessary, into one or
several function block POUs.
When converting, the S 30 converter always
automatically creates S 40 program equivalents.
For example, a program for the PS 4-200 compact
PLC is made from an S 30-S 4- or S 30-S 3 program.
S 30-S 316 source programs are converted to a
program for a PS 416.
Due to the differences between the S 30 IL and
IEC 1131 the cross compiler may not be able to carry
out complete conversions in some cases and may
not be able to generate syntactically correct POUs.
A syntax check should therefore always be carried
out after importing in order to rectify any errors
reported.
The converter can only handle blocks of up to
500 lines. Source programs with large blocks are
displayed in the Status display of the converter and
must be reduced by the user.

Conversion procedure
E Open the new S 40 and call up the POU Editor.
Make sure there are no POUs in the project since
any POU will be overridden by the imported POU
of the same name.
E Select File ➞ Import...,
or
enter the key combination Ctrl. + T.
07/99 AWB 2700-1305 GB

The Converter S 30 to S 40 window will open.

158
Importing Sucosoft S 30
programs

Figure 96: Converter S 30 to S 40

E Open the window with File ➞ Open... to select a


source file.

Figure 97: Selecting an S 30 source file


07/99 AWB 2700-1305 GB

159
POU Editor

E Enter the type of source file to be imported in the


File Type list box.
E Select the source file (*.Q??) of the main program
you want to import and confirm with OK.
E Select the corresponding reference file (*.Z??).
Confirm with OK.
Ensure that the other programs (*.Z) and (*.K) are
stored in the same directory as the source file.
A message window will notify you of the progress of
the conversion. The converted file is loaded and
opened in the POU Editor once the conversion has
been successfully completed.
The further procedures correspond to general POU
editing.

Instructions or sequences that cannot be


imported are accepted unchanged and shown as
comments. These non-convertable sections of
the program are indicated via the syntax check
and give the user an idea of what material cannot
be translated.

Program adaptations during conversion


Adapting names
In order to observe the IEC 1131-3 syntax rules
regarding POU and variable names, some changes
are automatically made during the import.
The following name changes to programs and
function blocks should be noted:
Two consecutive underlines in a program or FB
07/99 AWB 2700-1305 GB

name, i. e. "__" are changed to "_I".


An underline at the end of a program or FB name
is changed to a single E.

160
Importing Sucosoft S 30
programs

A number at the beginning of a program or FB


name is preceded by an A if the name is not eight
characters long. If the name is eight characters
long, the number is changed to the
corresponding letter. 0 becomes A, 1 becomes B,
2 becomes C, etc.
Changes in the name of a symbol:
A number at the beginning of a symbol is
preceded by a D.
An underline at the beginning of a symbol is
preceded by a single U.
An underline at the end of a symbol is followed by
a single U.
Two consecutive underlines in a symbol "__" are
changed to "_I".
If these characters were used in your S 30 source
program, check whether the automatic name change
has by accident created identical names for different
variables.
Transferring system parameters
When importing S 30-S 4 source programs the
system parameters (active marker range, max. cycle
time...) are stored as comments in the program POU
header.
After creating the make file the parameters must be
set in the Program Code Generation tool via
Generate ➞ Program Parameters ➞ Compiler/
Configurator.
When importing S 30-S 316 source programs the
system parameters must be set in the following way
07/99 AWB 2700-1305 GB

after creating the make list:


Generate ➞ Program Parameters ➞ System Builder
/ Periodic / Cyclical.

161
POU Editor

S 30-S 316 conversion restrictions


Topology configuration
There is no topology configuration in S 30-S 316.
After the conversion you must recreate the S 40
topology in the Topology Configurator and save it
in the program so that it can be generated.
SK sequential control function block
The SK sequential control function block is not
available in S 40 programming for the PS 416.
The SK function block is nevertheless generated
so that the source programs can be transferred if
necessary to S 4 or the program logic re-created.
COM function block serial interface
The function block for serial communication
"COM" functions in Transparent mode. Mask and
Text mode are not supported in the PS 416.
The input "SlotNummer" and the two outputs
"InterfaceStatus" and "SlotError" stay
unassigned in S 40 since they do not exist in S 30.
The S 30 inputs "I1" to "I32", as well as "TOFF"
and "ROFF" are not supported in the PS 416
system and therefore are not converted.
The inputs "TADR" and "RADR" are "AnyARRAY"
data types in S 40. The size of these arrays
cannot be recognised by the converter if this
information is contained in a variable. The array
size must then be defined in the declaration of the
S 40 source program.
07/99 AWB 2700-1305 GB

162
Importing Sucosoft S 30
programs

ICPY function block


The "ICPY" function block is converted to the
"TransferArray" function block. The inputs
"Source" and "Destination" are "AnyARRAY"
data types in S 40. The size of these arrays
cannot be recognised by the converter if the
information is contained in a variable. The array
size must then be defined in the declaration of the
S 40 source program.
ICP function block
The "ICP" function block is converted to the
"Comparator" function block. The inputs
"Source" and "Destination" are "AnyARRAY"
data types in S 40. The size of these arrays
cannot be recognised by the converter if the
information is contained in a variable. The array
size must then be defined in the declaration of the
S 40 source program.
DSW diagnostics status word
The PS 416 supports the following PS 306/
PS 316-compatible diagnostic bits:
DAK Card not fitted
DBM CPU battery failure
Address operator
The address operator of S 30-PS 316/306
programming has no equivalent for PS 416 in
S 40. Although it is converted in S 4 programming
for the PS 4-200, the code generator of the
PS 416 will report a program error.
07/99 AWB 2700-1305 GB

163
PP and SYS commands
The PP operands and the SYS commands are
transferred to the S 40 source program without
any changes. They create a syntax error when
compiled. In this case, adapt your program logic
accordingly.
Flash markers
The 3 flash markers (e. g. FRQ1) of the PS 316 are
replaced by suitable time generators.
Timers
The timers (e. g.T24) of the PS 316 are replaced
by suitable timers.
NOP command
This command does not exist in S 40. It is not
converted.
TEST command
The TEST command is replaced by the functions
"Issuer" and "IsPositiv".
# define command
The # define command does not exist in S 40.
It is commented out in parentheses.

S 30-S 3: Conversion restrictions


Topology configuration
There is no topology configurator in S 30-S 3.
This must be created new for the PLC concerned.
07/99 AWB 2700-1305 GB

C0 function block High-speed counter


The C0 function block cannot be converted
because there is no similar counter with hardware
input and scaling factor.

164
Documentation

TR function block - on-delayed timer


The TR function block has a basic clock rate of
100 ms. It is replaced by a suitable time
generator.

S 30-S4: Conversion restrictions


NOP command
This command is not available in S 40 and is not
converted.
Printer control commands
Printer control commands such as TITLE etc. do
not exist in S 40 and are commented out in
parentheses.
CK function block input DATE
Unlike the S 30-CK function block, the S 40
RealTimeClock function block requires a year
entry at the REALDATE input. This entry must be
updated by the user.

Documentation Printer setup


E Select File ➞ Printer Setup....
The Printer Setup dialog box will open offering you
various setup options. You can assign a special
printer, determine the default printer, and set paper
format as well as page layout (portrait or landscape).
By clicking the Network button you can assign your
printer connection and you can set printer-specific
properties via the Options button.
07/99 AWB 2700-1305 GB

165
POU Editor

Figure 98: Printer Setup dialog box

Printing a POU
Precondition: The POU to be printed is open.
E Select File ➞ Print...,
or
click the corresponding toolbar button:

The Print dialog box will open:

07/99 AWB 2700-1305 GB

Figure 99: Print dialog box

166
Documentation

E Fill out the dialog box:


Form: Choose one of the forms on which your
document is to be printed.
Check the pre-set font size in the Form Editor by
entering Options ➞ Font... and reduce it if necessary.

Figure 100: Font dialog box

Cover Sheet: Select a form for the cover sheet if a


cover sheet is required.

Standard forms and cover sheets in German


start with the letter D, in English with GB and in
French with F.

No. of Copies: Enter the number of copies to be


07/99 AWB 2700-1305 GB

printed.

167
POU Editor

Page Numbering Starting From Page: Enter the


page number from which the page numbering should
begin.
Printer: Your document will be sent to the printer you
have chosen. The Sucosoft Print Manager icon will
appear at the bottom of the screen. This indicates
that the Print Manager is open.
Screen: Your document is shown on the screen as it
will be printed. Use the buttons to choose between
several forms of display and to zoom in/out. It is
especially important with the graphical programming
languages that the zoom factor when printing is
properly suited to the page format.
Printer Setup...: The Printer Setup dialog box will
open when you click the corresponding toolbar
button. The same setup options will be available as
those described in the section “Printer setup”
beginning on page 165.
Print Range:
E Select All.
The entire POU consisting of declaration and
instruction sections will be printed.
E Select Marked Block.
Only the marked area will be printed.
E When you click the OK button the print order will
be sent to the printer or issued on the screen.

Note: The size of the screen display when


programming in IL or FBD affects the print size!
07/99 AWB 2700-1305 GB

168
POU editor settings

Cross-reference file
The cross-reference file provides you a listing of all
declared variables including which variables are
written in which line of the instruction section and
which operations are used with them. It also provides
the physical address or location or directly
represented variables.
Open the cross-reference file by choosing File ➞
Cross-Reference File

Figure 101: Cross-Reference File

POU editor settings You can set the POU Editor to your personal
preferences via the Options menu point:
07/99 AWB 2700-1305 GB

Figure 102: Options

169
POU Editor

To begin with there are the previously described


options in regards to the Variable Editor and the
programming language for editing the current POU.
Additionally, you can set font and font size via the
menu with Options - Font and colour display of
characters in the Editor via Options - Colour Settings.
Syntax colouring, which displays operators and
comments in a different colour from declaration and
instruction lines, makes editing easier for you as
does setting off incorrect lines in a different colour
after a syntax check.

Figure 103: POU Editor Settings

You can also choose horizontal or vertical layout of


instruction and variable section windows and POU
Editor pre-settings for opening of the next POU via
the same Options - Settings menu point.
After determining the settings you must save them by
07/99 AWB 2700-1305 GB

selecting Save Settings on Exit or Save Settings


Now.
If you want to continue writing a POU the next time
the POU Editor opens you can set it to open

170
POU editor settings

automatically by selecting Save Settings Now in the


Options - Settings menu. Make sure the POU is open
when you make the setting.
Set the desktop layout for editing more than one
POU via the Window menu point. The variations
correspond to stand Windows options.
07/99 AWB 2700-1305 GB

171
172
07/99 AWB 2700-1305 GB
3 Topology Configurator

Overview The Topology Configurator is used to configure the


hardware configuration of your automation system.

Figure 3-1: Topology Configurator showing a PS 4


configuration
07/99 AWB 2700-1305 GB

173
Topology Configurator

Figure 3-2: Topology Configurator showing a PS 416


configuration

The Topology Configurator allows you to specify the


local and remote Suconet K expansions of the
automation system in a graphical user interface
starting from the CPU, and lets you assign
parameters.
07/99 AWB 2700-1305 GB

174
Overview

The Topology Configurator allows you to inter-


connect and configure all cards and modules which
are relevant for developing your program.
This includes:
PS 416 modular PLCs
PS 4 compact PLCs
Network stations such as expansion modules
with their local expansions, slave PLCs, PC
network cards, operator panels, displays, drives,
partner devices of other manufacturers.
Some devices, such as power supply units, cannot
be configured.
Each device in the configuration is displayed with its
network and device address and the device type.
A 12 character user description can also be entered
for every device. The Configurator displays this entry
below the device type.
The three digit sequence that is shown above every
configured component is the device (i. e. module or
card) address. It is assigned automatically when the
device is inserted into the network with the
Configurator. The three digits in the address are for
line number, station or rack number and module or
slot number (for compact and/or modular PLCs,
respectively). In PLC programs, this three digit
address corresponds to the first three digits of the
variable address. For example, the card with the
address 1.3.7 is accessed in a PLC program with the
variable address %Q1.3.7.0.0.
The range of possible functions and the availability of
cards and modules in the selection windows is
07/99 AWB 2700-1305 GB

determined by the plausibility checks within the


Configurator.

Thus the Configurator only provides those options


that are permissible in the configuration concerned.

175
Topology Configurator

Toolbar functions The Topology Configurator has a toolbar below the


menu bar with all the functions required for creating
a configuration.

New Configuration: This creates a new


configuration and opens the New Configuration
dialog box. You must specify the file name for the
new configuration and the type of CPU to be
configured:

The PLC Type selection field shows all the installed


CPU types available. You must select one of the
available CPU types listed.
Open Configuration: This function loads an existing
topology configuration into the Configurator.

Save Configuration: This saves the edited


configuration in a configuration file with the
extension “.dcf”.
07/99 AWB 2700-1305 GB

Ensure that the file is saved in the “kompo.sys”


branch of the project, otherwise an error
message will be displayed when the code is
generated and the syntax is checked.

176
Toolbar functions

Print Configuration: Calls up Sucosoft’s standard


print dialog box.

Local Expansion: This provides a local expansion


for the selected PLC or network station, i. e. directly
on the device. A selection list will appear with all
possible local expansion devices.

Remote Expansion: Expands a network module or


networkable device via Suconet K. A selection list
will appear with all modules and devices that can be
connected to this device through Suconet K.
07/99 AWB 2700-1305 GB

177
Topology Configurator

Delete: Deletes the selected device. With PS 416


card racks, the now empty slot is still shown on the
screen to make it easier to insert a new device.
Parameters: This function is used for setting device
parameters. The values are entered in the Set
Parameters window:

07/99 AWB 2700-1305 GB

178
Toolbar functions

Change Display: This switches the topology


display between graphical and compressed mode.
In compressed mode (see figure below), the device
names are shown abbreviated and the user
descriptions of the components are not shown.
Editing and configuring can be done in both views.

Display I/O Utilisation: This displays the utilisation


of the communication memory in the status line.
Clicking the button once more hides the information
again.

The information shown includes the number of


_assigned inputs and outputs and the total number
of inputs and outputs available.
I Inputs
O Outputs
07/99 AWB 2700-1305 GB

I+O Total of inputs and outputs

179
Topology Configurator

Inputs refer here to physical inputs, receive data


and diagnostics data from stations. Outputs are
physical outputs and send data.

The information shown applies to the currently


selected network line.
Display Bus Cycle Time: This displays the
theoretical bus cycle time for the selected network
line in the status line. The figure shown is a typical
value for trouble-free communication. Clicking the
button once more hides the information again.

07/99 AWB 2700-1305 GB

180
Creating a topology
configuration

Creating a topology Configuration example for PS 4


configuration
Module-No

0 1 2 3 4 5

PS4-201 SBI LE LE LE LE
Device A
CPU

1 2
Modules
1 PS4-141
Device B
Lines CPU
2

Slaves
PS4-201 SBI LE
Device C
CPU

1
EM Device E

2
EM Device F
Modules

1 PS4-201 SBI LE LE
Device D
CPU

1
EM Device G
Slaves

2
EM Device H

2
EM LE LE Device I

Modules

PS 4-201: Compact PLC (locally expandable)


PS 4-141: Compact PLC
SBI: Serial Bus Interface (LE 4-501-BS1)
EM: Expansion module
(e. g. EM 4-201-DX2)
LE: Local expansion module
(e. g. LE 4-116-XD1)
07/99 AWB 2700-1305 GB

181
Topology Configurator

The configuration example consists of:


A PS 4-201-MM1 compact PLC with an
integrated SBI as master. The basic unit is locally
expanded with an additional SBI master and 4 LE
modules, e. g. digital modules (device A).
A PS 4-141-MM1 compact PLC with an
integrated SBI as slave (device B).
A PS 4-201-MM1 compact PLC with an
integrated SBI as master and an additional
SBI slave and one local expansion (device C).
A PS 4-201-MM1 compact PLC with an
integrated SBI as slave and an additional SBI as
master and 2 local expansion modules (device D).
Five expansion modules (EM ...) one of which is
fitted with 2 local expansion modules
(devices E, F, G, H, I).
Topology configuration procedure
A Suconet K network only supports one master for
each line. The master is the module or device that
opens a new line. All other stations on the same line
are slaves. A topology configuration must be created
for every station that has a CPU.
The following is specified in the CPU’s configuration
1. All local expansions of the master are described.
They can be recognised later by their line and
station number, which is 0.
2. All slaves which are attached to the line
originating from the master are described.
The procedure to follow depends on whether the
07/99 AWB 2700-1305 GB

slave has its own CPU or not:

182
Creating a topology
configuration

In the case of a slave with its own CPU, the


master configuration only describes the slave and
not the slave’s subordinate modules.
In the example, this is the case for the SBI in
device C and the CPU in device D.
The CPU’s of devices C and D are masters for
their subordinate modules, and thus need their
own, separate topology configuration. Device B
also needs a separate topology configuration
because it has its own CPU, even though it has no
subordinate modules. However, the configuration
of devices B, C and D will not be described in this
example.
In the case of a slave without its own CPU,
the master’s configuration also specifies all local
components of the slave (e. g. devices E, F, G,
H, I).
The line numbers and the station numbers of the
network slaves are automatically assigned by the
Topology Configurator. The lines are numbered
consecutively starting from the left with line
number 1. The stations are numbered consecutively
from top to bottom. The address is displayed above
each module.
Power supply units do not need to be configured.
07/99 AWB 2700-1305 GB

183
Topology Configurator

The number of lines which can be connected to the


master is dependent on the type of master.
In the following example, the configuration for device
A will be described first. You define the configuration
for all stations with their own CPU and save the
topology configuration in the current project.
A separate file with the extension “.dcf” is created
for each topology configuration.
E Create a new configuration file with the name
“DEVICE_A” and choose the type of the CPU to
be configured from the list, in the example
PS 4-201-MM1.

E Use the Local Expansion Button or choose


Edit ➞ Local Expansion in the menu to configure
all local modules of the CPU. Choose each of the
modules from the list and configure their
parameters if necessary with the Parameters
button or with Edit ➞ Parameters in the menu.
The CPU of device A is already configured as
master.
07/99 AWB 2700-1305 GB

Remember that the module position (automatic


address assignment) depends on the sequence
in which the devices are entered.

184
Creating a topology
configuration

Select the PS 4-201-MM1 and configure the


network stations with the Remote Expansion
button or with Edit ➞ Remote Expansion in the
menu. Select the network stations which are
connected as slaves to the line opened by the
CPU.
Remember that the automatic address
assignment depends on the sequence in which
the devices are entered.
07/99 AWB 2700-1305 GB

185
Topology Configurator

In line 1, the configuration of device A only requires


the connected CPU of device D to be configured as
a network slave. All slaves and network lines which
are subordinate to device D are defined in device D’s
own configuration file.
On the other hand, device I does not require its own
configuration since it is only an I/O expansion for
device A and does not have its own CPU. It is thus
defined in device A’s configuration file just like all of
the local expansion modules for device A.

E Select the LE 4-501-BS1 network module and


define the slave stations of the line it opens. The
07/99 AWB 2700-1305 GB

line will be automatically assigned line number 2.

186
Creating a topology
configuration

The first station in line 2 is a PS 4-141-MM1 compact


PLC (device B). This PLC must also be configured
separately. The second station in line 2 is the
network module (SBI) LE 4-501-BS1 of device C.
Device C has its own CPU which must be configured
separately. Only the SBI of device C will appear in the
configuration of device A as a Sucosoft station.

In order to simplify the graphical representation, the


Topology Configurator only shows the currently
selected line completely. The other lines are only
indicated as follows: lines from masters are indicated
by a thick line below the device. Lines leading to
slaves are indicated by a thick line going upwards.
07/99 AWB 2700-1305 GB

187
Topology Configurator

E Save the complete configuration. It will be saved


as DEVICE_A, the name you chose earlier.
E Open a new configuration for device D.

E Define its local expansion devices and the slaves


connected to it (devices G and H). Remember
that the CPU of device D must be configured as a
slave since it is connected to line 1 of device A.

If a topology becomes so extensive that it cannot be


shown completely, use the Compress button or
choose Displays ➞ Compress to switch to a more
compact form of display.
07/99 AWB 2700-1305 GB

188
Creating a topology
configuration

The I/O utilisation and the theoretical bus cycle time


of the selected network line can be displayed in the
status line of the Configurator. This information can
be displayed or hidden by clicking the Display I/O
and Display Bus Cycle Time buttons or via the
Displays ➞ I/O Utilisation and Displays ➞ Bus Cycle
Time menus, respectively.

Configuration example for PS 416

Slots

0 2 4 5 6 7 8

S A A I O
Power CPU
B I I N U Device A
supply
I N O P T
unit

Lines 2
1
PS 4-200 Device B

0 2 3 4

S A A
Stations Power
B I I Device C
supply
I N O
unit

0 2 4 5 6 7

A A I O S
Power CPU
I I N U B Device D
supply
N O P T I
unit

1 Device F
1
EM LE LE

Stations
Module

2
EM LE LE Device E
07/99 AWB 2700-1305 GB

Module

189
Topology Configurator

CPU: Central Processing Unit


(PS 416-CPU-400)
SBI: Serial Bus Interface (PS 416-NET-400)
AIN: Analog input card (PS 416-AIN-400)
AIO: Analog input/output card
(PS 416-AIO-400)
INP: Digital input card (PS 416-INP-400)
OUT: Digital output card (PS 416-OUT-400)
EM: Expansion module (e. g. EM 4-201-DX2)
LE: Local expansion module
(e. g. LE 4-116-XD1)
The example configuration consists of:
a PS 416 controller as master with a power
supply, a master CPU with integrated SBI, an
SBI card with a master function, two analog and
two digital cards (device A)
a PS 4-200 compact controller (device B),
an expansion rack without CPU with a power
supply, an SBI card PS 416-NET 400 E
(E = Expansion mode) and two analog cards
(device C)
a PS 416 controller with power supply, a slave
CPU with integrated SBI, two analog and two
digital cards and an SBI card with master function
(device D)
two expansion modules (EM ...), each fitted
with two local expansion modules (LE ...)
(devices E and F)
07/99 AWB 2700-1305 GB

Topology configuration procedure


A Suconet K network only supports one master for
each line. The master is the module or device that
opens a new line. All other stations on the same line

190
Creating a topology
configuration

are slaves. A topology configuration must be created


for every station that has a CPU.
The following is specified in the CPU’s configuration
1. All local expansions of the master are described.
They can be recognised later by their line and
station number, which is 0.
2. All slaves which are attached to the line
originating from the master are described. The
procedure to follow depends on whether the
slave has its own CPU or not:
In the case of a slave with its own CPU, the
master configuration only describes the slave and
not the slave’s subordinate modules. In the
example, this is the case for device D.
The CPU of device D is a master for its
subordinate modules, and thus needs its own,
separate topology configuration. However, the
configuration of device D will not be described in
this example.
In the case of a slave without its own CPU, the
master’s configuration also specifies all local
components of the slave (e. g. device C).
The line numbers and the station (or rack) numbers of
the network slaves are automatically assigned by the
Topology Configurator. The lines are numbered
consecutively starting from the left with line
number 1. The stations are numbered consecutively
from top to bottom. The address is displayed above
each module (or card).
Power supply units and card racks do not need to be
07/99 AWB 2700-1305 GB

configured.
The number of lines which can be connected to the
master is dependent on the type of master.

191
Topology Configurator

Since the digital input and output cards of the


PS 416 modular controller are not addressed
through the slot number, there are two different
possibilities to describe the input and output
modules:
The digital cards are individually selected and
represented. This approach is useful when it is
required to have a visual match between
the actual configuration and the graphical
representation in the configurator. However,
this is not strictly necessary.
The digital input and output cards are grouped
together for the entire rack and configured as a
single symbol.
Depending on which method you choose, you
can apply the test and commissioning functions
(Show/Force I/Os) to the overall view of the digital
I/O or selectively to individual card-related views.
In the following example, the configuration for device
A will be described first. You define the configuration
for all stations with their own CPU and save the
topology configuration in the current project.
A separate file with the extension “.dcf” is created
for each topology configuration.
07/99 AWB 2700-1305 GB

192
Creating a topology
configuration

E Create a new configuration file with the name


“DEVICE_A” and choose the type of the CPU to
be configured from the list, in the example
PS 4-201-MM1.

E Use the Local Expansion Button or choose


Edit ➞ Local Expansion in the menu to configure
all local cards of the CPU. Choose each of the
cards from the list and configure their parameters
if necessary with the Parameters button or with
Edit ➞ Parameters in the menu. The CPU of
device A is already configured as master.
Remember that the card position (automatic
address assignment) depends on the sequence
in which the devices are entered.
07/99 AWB 2700-1305 GB

193
Topology Configurator

E Select the PS 416-CPU-400 and configure the


network stations with the Remote Expansion
button or with Edit ➞ Remote Expansion in the
menu. Select the network stations which are
connected as slaves to the line opened by the
CPU.
07/99 AWB 2700-1305 GB

Remember that the automatic address


assignment depends on the sequence in which
the devices are entered.

194
Creating a topology
configuration

E Configure the CPU of device D as a slave.

In line 1, the configuration of device A only requires


the connected CPU of device D to be configured as
a network slave. All slaves and network lines which
are subordinate to device D are defined in device D’s
own configuration file.
On the other hand, device E does not require its own
configuration since it is only an I/O expansion for
device A and does not have its own CPU. It is thus
defined in device A’s configuration file just like all of
the local expansion modules for device A.

E Select the PS 416-NET-400 network module


(SBI) and define the slave stations of the line it
07/99 AWB 2700-1305 GB

opens. The line will be automatically assigned line


number 2.

195
Topology Configurator

The first station in line 2 is a PS 4-201-MM1 compact


PLC (device B). This PLC must also be configured
separately. The second station in line 2 is a modular
expansion rack with an SBI network card (SBI)
PS 416-NET-400 in expansion mode (device C).
Since the rack does not have its own CPU,
it must be fully described with all of its devices in the
configuration of the network card PS 416-NET-400.

In order to simplify the graphical representation, the


Topology Configurator only shows the currently
selected line completely. The other lines are only
indicated as follows: lines from masters are indicated
by a thick line below the device. Lines leading to
slaves are indicated by a thick line going upwards.
07/99 AWB 2700-1305 GB

E Save the complete configuration. It will be saved


as DEVICE_A, the name you chose earlier.

196
Creating a topology
configuration

E Open a new configuration for device D.

E Define its local expansion devices and the slave


connected to it (device F). Remember that the
CPU of device D must be configured as a slave
since it is connected to line 1 of device A.

If a topology becomes so extensive that it cannot be


shown completely, use the Compress button or
choose Displays ➞ Compress to switch to a more
compact form of display.
The I/O utilisation and the theoretical bus cycle time
of the selected network line can be displayed in the
status line of the Configurator. This information can
be displayed or hidden by clicking the Display I/O
and Display Bus Cycle Time buttons or via the
Displays ➞ I/O Utilisation and Displays ➞ Bus Cycle
Time menus, respectively.
07/99 AWB 2700-1305 GB

197
Topology Configurator

Changing a topology Changing parameter data


configuration E Load an existing configuration file with the Load
Configuration button or by choosing File ➞ Open
in the menu of the Topology Configurator. The
configuration will appear in the graphics window.
E Choose the device or card whose configuration
you want to change by clicking on it with the left
mouse button.
E Click the Parameters button or choose
Edit ➞ Parameters in the menu.
E Change the parameter data.

E Save the new settings.

Adding a new local device


E Load an existing configuration file using the Load
Configuration button or by choosing File ➞ Open
in the menu of the Topology Configurator. The
configuration will appear in the graphic window.
E Select the device directly to the left of the position
where you want to insert the new device.
E Open the selection window Local Expansion
using the Local Expansion button or choose
Edit ➞ Local Expansion in the menu. A list of
possible expansion modules is shown.
E Choose the required device from the list and
confirm with OK. The new device is inserted to
the right of the selected device, whilst all other
devices to the right are moved one position
further to the right. The Configurator
automatically updates the device numbers of
all affected devices.
07/99 AWB 2700-1305 GB

With the PS 416 modular controller, if you add a


device to an empty slot, there is no need for the
Configurator to update existing device numbers.

198
Changing a topology
configuration

Deleting a local device


E Load an existing configuration file using the Load
Configuration button or by choosing File ➞ Open
in the menu of the Topology Configurator. The
configuration will appear in the graphic window.
E Select the device to be deleted.

E Click the Delete button or choose Edit ➞ Delete in


the menu. This will delete the device and the
Configurator will update existing device numbers
if necessary.
With the PS 416 modular controller, the now empty
slot is still shown on the screen as “Empty Slot” to
make it easier to insert a new device in the same
place. If required, you can delete the empty slot by
choosing delete again.
If the device to be deleted is connected to other
subordinate elements, e. g. slaves or local expansion
modules, they are deleted together with the local
component. A warning prompt warns you that
subordinate elements will be deleted and allows you
to cancel deleting if required.
07/99 AWB 2700-1305 GB

199
Topology Configurator

Adding a new remote device


E Load the existing configuration file using the Load
Configuration Button or by choosing File ➞ Open
in the menu of the Topology Configurator. The
configuration will appear in the graphic window.
E Select the device directly above the position
where you want to insert the new device.
E Open the Remote Expansion window using
the Remote Expansion button or choose
Edit ➞ Remote Expansion in the menu. A list
of possible expansion modules is shown.
E Choose the required device from the list and
confirm with OK. The new device is inserted
below the selected device, whilst all other devices
below are moved one position further
downwards. The Configurator automatically
updates the device numbers of all affected
devices
Deleting a remote device
E Load an existing configuration file using the Load
Configuration button or by choosing File ➞ Open
in the menu of the Topology Configurator. The
configuration will appear in the graphic window.
E Select the device to be deleted. A remote device
is always connected directly to the line.
E Select the Delete button or choose Edit ➞ Delete
in the menu. A warning prompt warns you that
when you delete the device all subordinate
components of the device will be deleted as well.
Confirm or abort the deletion as required.
07/99 AWB 2700-1305 GB

200
Changing a topology
configuration

Replacing a device
E Load an existing configuration file using the Load
Configuration button or by choosing File ➞ Open
in the menu of the Topology Configurator. The
configuration will appear in the graphic window.
E Select the device you wish to replace.

E Select the Delete button or choose Edit ➞ Delete


in the menu to delete the device. With PS 416
card racks, the now empty slot is still shown on
the screen as “Empty Slot” to make it easier to
insert a new device in the same place.
E Click on either the Local Expansion or Remote
Expansion button or choose Edit ➞ Local
Expansion or Edit ➞ Remote Expansion in the
menu to open a selection window with a list of
possible expansions.
E Select the required device and confirm via OK.
The new device is inserted at the same position
as the deleted device.

ASInterface Fieldbus, Offline configuration


The Actuator-Sensor-Interface (AS-i) is an open-
standard and rugged fieldbus system which extends
the networkability of automation devices down to the
field level.
This fieldbus technology is characterised by a simple
and reliable way of connecting up the devices. Its
popularity and system-independent applicability are
promoted and ensured by the AS-Interface User
Organisation. The AS-Interface User Organisation is
07/99 AWB 2700-1305 GB

also responsible for defining so-called profiles, which


specify the general features for groups of devices
with similar characteristics.

201
Topology Configurator

AS-Interface devices are characterised by:


the number of inputs and outputs,
the ID-Code, and
a maximum of four initial parameters.
The number and arrangement of inputs and outputs
are described with the I/O code, a parameter which
ranges from hex. 0 to F. ASI devices can have a
maximum of four inputs and outputs.
The device type is uniquely identified by the combi-
nation of the I/O code and the ID code – a parameter
which also ranges from hex. 0 to F. Only about 5 of
the 16 possible ID codes are currently assigned.
Depending on the device type or profile, the initial
parameters can be used to choose or enable/disable
certain device parameters such as the frequency for
proximity switches, the value range for current inputs
and outputs and the characteristics of make and
break contacts for digital inputs and outputs.
Configuration and handling of the AS-Interface are
fully integrated into the environment of the Sucosoft
S 40 software. For example, configuration of AS-i
devices can be specified graphically in the dialogs of
the Topology Configurator and each of the devices in
the AS-Interface line can be uniquely addressed
using the standard Moeller address notation.
There are two ways of configuring an AS-Interface
line:
Offline configuration: The complete AS-Inter-
face configuration can be specified offline in the
Topology Configurator.
Online configuration: A basic configuration only
07/99 AWB 2700-1305 GB

is specified in the Topology Configurator.


Following this, Sucosoft automatically detects all
AS-Interface devices which are connected to the
line.

202
Changing a topology
configuration

With the first approach, a topology configuration is


defined by adding the AS-Interface master as a local
expansion to the PLC and specifying the ASI slave
components as remote devices. In principle, this
procedure corresponds to configuration of a
Suconet-K line. However, the addresses of the AS-i
devices can be specified purely by software (i. e.
without needing to set switches or jumpers).
With the second approach, you also specify a local
AS Interface master in the topology configuration.
Sucosoft then uses this basic configuration to auto-
matically detect all active AS-i slave devices online.
Both approaches result in a new configuration which
must then be transferred to the PLC as the so-called
“Permanent configuration” together with the PLC
program. The permanent configuration specifies all
devices on the AS-i line and allows the PLC to
access all inputs and outputs of the AS-i devices
when the program is running.
Create a new configuration in the Topology
Configurator with Configuration ➞ New
Configuration and choose an expandable compact
controller, e. g. PS 4-201-MM1.
Click the Local Expansion Button or choose
Edit ➞ Local Expansion in the menu to add an AS-i
master (e.g. LE 4-505-BS1) and any other local
expansions required.
07/99 AWB 2700-1305 GB

203
Topology Configurator

Configuring the AS-i master LE 4-505-BS1


E Select the LE 4-505-BS1 and click the
Parameters button or choose Edit ➞ Parameters
in the menu. The device parameters dialog will be
shown:

E Check Enable Autoaddressing if you want to be


able to swap faulty slaves in the AS-Interface line
with the system running and without having to
stop the PLC. Confirm your settings with OK.
A pre-requirement for the Enable Autoaddressing
option is that you replace the faulty slave with an
identical device which has the same I/O code and ID
code. In addition, the replacement must be set to the
default AS-i slave address “0”.
If Enable Autoaddressing is active, the AS-i master
LE 4-505-BS1 automatically re-programs the new
slave to the address of the faulty slave and re-starts
the data communication.
Adding a new remote device
E Select the LE 4-505-BS1 module or any device in
the AS-Interface line.
E Open the Remote Expansion window by clicking
the Remote Expansion button or choose
Edit ➞ Remote Expansion in the menu. A list of
07/99 AWB 2700-1305 GB

possible expansion modules is shown.

204
Changing a topology
configuration

Select the AS-Interface profile which corresponds to


a device group with the required features in the
Preselection list. The Type list box then only shows
devices with the specified profile.
Choose “All Profiles” in the Preselection list to get a
list of all so-called generic components, which can
be used to describe any AS-Interface device. The
names of the generic components indicates the
number of inputs and output, e. g. “2 INP/2 OUT”.
Note: The non-generic devices have Moeller names
such as ATI1 DNS-ASI.
E Choose a profile in the Preselection list if you
want to limit your selection to devices with a
particular profile.
E Choose the required device from the Type list
box.
07/99 AWB 2700-1305 GB

When specifying a new device, you are automatically


prompted with the next unused AS-i address in the
Station number pop-up list.

205
Topology Configurator

E If required, you can choose another address for


the device. The pop-up list only shows AS-i
addresses which are unused.
The Properties panel shows features which are
dependent on the device chosen:
Manufacturer Manufacturer of the chosen AS-i
device.
IO Code Each type is assigned a special I/O
code which appears automatically.
The A-F code indicates the number of
inputs and outputs.
ID Code Unique identification code for a profile
or device group.
Inputs and Number and position “0”, “1”, “2” or
outputs “3” of the inputs and outputs are
shown with an “X”. The position of the
“X” determines the address of the
respective input or output in the PLC
program.
E For generic AS-Interface devices, you must
specify the ID code listed in the manufacturer’s
documentation. The ID code for the non-generic
devices (those with Moeller names such as
ATI1 DNS-ASI) is pre-defined cannot be
changed.
E Confirm your entries by clicking OK.

E Save the topology configuration by choosing


Configuration ➞ Save As... in the menu.
E Specify a directory within the kompo.sys branch
07/99 AWB 2700-1305 GB

and specify the required filename for the topology


configuration in the Filename field.

206
Changing a topology
configuration

The file is saved with the filename extension “.DCF”


as the new permanent configuration for the current
project.
Deleting a remote device
E Load the configuration file by clicking the Load
Configuration button or choose File ➞ Open in
the menu of the Topology Configurator. The
configuration will appear in the graphic window.
E Select the device to be deleted from the
AS-Interface line.
E Click the Delete button or choose Edit ➞ Delete in
the menu. The device is removed from the
configuration.
Replacing a device
E Load the configuration file by clicking the Load
Configuration button or choose File ➞ Open in
the menu of the Topology Configurator. The
configuration will appear in the graphic window.
E Select the AS-Interface device to be replaced.

E Click the Delete button or choose Edit ➞ Delete in


the menu. The device is removed from the
configuration.
E Click on either the Local Expansion or Remote
Expansion button or choose Edit ➞ Local
Expansion or Edit ➞ Remote Expansion in the
menu to open a selection window with a list of
possible expansions.
E Select the required device and confirm with OK.
The new device is inserted at the same position
as the deleted device.
07/99 AWB 2700-1305 GB

207
Topology Configurator

Changing the parameters for a device


E Load the configuration file by clicking the Load
Configuration button or choose File ➞ Open in
the menu of the Topology Configurator. The
configuration will appear in the graphic window.
E Choose the AS-Interface device whose
configuration you want to change by clicking on it
with the left mouse button.
E Click the Parameters button or choose
Edit ➞ Parameters in the menu. The device
parameters dialog will be shown as follows:

07/99 AWB 2700-1305 GB

208
Changing a topology
configuration

E Change the parameter data as necessary:

If required, you can choose another AS-i address


for the selected device in the Station number
pop-up list. You are only shown AS-i addresses
which are unused.
You can specify a device name of up to
12 characters length in the Name field.
The Properties panel contains four “initial
parameters” checkboxes which are used to
set the operating parameters for the device.
The significance of these four parameters is
described in the manufacturer’s documentation
for the device.
Example “Parameter bit for proximity switch”
With the ATI1 DNS-ASI proximity switch, parameter
bit “P1=1” specifies that a switch defined as a make
contact should function as a break contact instead.
The I/O code indicates the number of inputs and
outputs.
For generic AS-Interface devices, you must specify
the ID code listed in the manufacturer’s
documentation. The ID code for the non-generic
devices (those with Moeller codes such as
ATI1 DNS-ASI) is pre-defined and cannot be
changed.
E Save your settings by clicking Accept. The dialog
stays open.
E Choose another AS-Interface device in the
topology configuration to check or change its
configuration settings.
07/99 AWB 2700-1305 GB

E Close the dialog with Cancel when you are


finished.

209
210
07/99 AWB 2700-1305 GB
4 Form Editor

Overview The Form Editor is used to create your own forms for
printing out files. To print a file, select the form
required from the Form list box.

Figure 4-1: Form Editor

The Form Editor allows you to create the basic


structure of the form with lines for dividing up the
page and logos or other graphical elements. Save
the file you create with the extension “.wmf”.
Then use menu options or the buttons in the toolbar
shown overleaf to insert the date, page number and
file name as required and to define the range within
which the data is to be printed out.
If you click on a toolbar button, it’s function will be
explained in the status line at the bottom of the
screen.
07/99 AWB 2700-1305 GB

211
Form Editor

Ope Ope Sav Def Def Def Pos Pos Pos Pos Pos Pos Dra Dra Dra Pos Loa Edit Brin Sen
n ne n ex e cu ine l ine l ine f ition ition ition ition ition ition w lin w re w ci ition d bi ent g fo d to
w d istin rren ine t ine c ill co text dat tim pag file pro e
ctan rcle text tmap ered rwa bac
ocu g d t do hick olo lou ou e e
e n nam ject r k
men ocu cum nes ur r tput umb e nam gle
output in cur eleme d
m
t en ent s rag er e r e nt f tsn
t e in orm
form

Sucosoft also provides you with some standard


forms which you can edit to your own specifications
if required.

Creating a print form


If you want to design a new form, you can either edit
an existing standard form to your own specifications
or design a completely new form. The form can
include lines and graphic elements, bitmaps and
placeholders for variable text such as the current
date and time.
Precondition: You are in the Form Editor and have
loaded a new or existing form with File ➞ New or
File ➞ Open or by using the corresponding buttons
in the toolbar.
E Choose File ➞ Printer Setting... and specify the
correct paper size and page orientation (portrait
or landscape).
E Choose Elements ➞ Print Range or click the
corresponding button in the toolbar and define
the region on the form in which the user data will
be printed. You can adjust the size of the area by
07/99 AWB 2700-1305 GB

dragging the cursor while keeping the mouse


button pressed. The font type and font size used
for the user data and the variable text which is
inserted instead of the placeholders is the setting

212
Overview

which was in force when you defined the print


region.
E Position the required elements by first clicking the
appropriate button, e. g. Draw Rectangle to insert
a rectangle, and then click the position in the form
where the element should appear.
E Choose Options ➞ Font and select the font type
and font size for the standard text. Click the Insert
Text button and enter the standard texts which
should appear on each printout with this form.
E To change the font type and font size used for the
user data and the variable text which is inserted
instead of the placeholders, click twice in the
defined print region and make the adjustments in
the dialog box which is shown. This does not
change the font type and font size of previously
entered standard texts.
E Save the new form with File ➞ Save As... or by
clicking the corresponding button.

Inserting standard text in a print form


Precondition: A form is open.
E Choose Options ➞ Font and select the font type,
font size and font style in the dialog box. You can
check the settings made in the Sample box.
E Click the Insert Text button and then click the
position in the form where you want the text to
appear.
07/99 AWB 2700-1305 GB

213
Form Editor

E Write your text. If you make a mistake correct it


with the Backspace key. Only one line texts can
be written.
When the text is entered, it is displayed in a
standard font irrespective of the font selected.

E Complete your entry by pressing the Enter key.


The text cannot be corrected afterwards. The text
is then shown in the selected font.
E To move text, click the Edit Element button,
select the text with the mouse and drag it while
keeping the mouse button pressed. If you double
click on the text, you will start the edit mode and
can edit the text you entered.
The font type and font size of previously entered
standard text stays in the font it was written in
and cannot be changed afterwards. To correct
the font or the text, delete the existing text and
rewrite with the correct settings.
The setting for line colour affects standard texts,
user data in the defined print region and the
variable text which is inserted instead of the
placeholders. The setting for fill colour affects
rectangles, circles and (as a background colour),
all texts.
All elements are printed with the settings which
were in force when they were created.
07/99 AWB 2700-1305 GB

214
Overview

Checking the layout in print preview


Precondition: The form to be checked is opened in
the Form Editor.
E Choose File ➞ Print Preview

The form is displayed as it will be printed but only the


placeholders for date, file name etc. are shown. If you
print out a file on the print form, the current date and
file name etc. will be inserted at these positions.

Editing elements
Precondition: The form to be edited is loaded.
E Choose Elements ➞ Edit element or click the
corresponding button in the toolbar
E Select the element to be edited and drag it to the
required position while keeping the mouse button
pressed.
Make sure that all bitmaps (*.bmp) that are used
in each form are stored in the same directory as
the form file itself. Large graphic elements such
as page frames may cover smaller elements
making them no longer visible or accessible.
The top element must then be moved or
deleted.
07/99 AWB 2700-1305 GB

215
216
07/99 AWB 2700-1305 GB
5 Test and Commissioning

The individual test and commissioning steps can be


found in the Device menu in the main window of the
Test and Commissioning tool. The main functions are
also available as buttons in the toolbar at the top of
the Connection List window:
POU Editor Online
Topology Configurator
Interface Parameters.
Many of the steps are also available as menu items
and as buttons in subordinate windows, too. The
following descriptions refer to using the buttons.

POUs can be displayed and modified online in the


Test and Commissioning tool. The program can be
displayed in IL, LD or FBD.
Switching between the different programming
languages is possible both offline (i. e. with the
Status Display switched off) and online (with an
active Status Display).
07/99 AWB 2700-1305 GB

217
Test and Commissioning

Overview The Test and Commissioning tool is used to test and


commission the user program and the controller.
Functions are available for defining the connections
between the programming device and the controller,
for diagnosing errors in the hardware and the user
program and for viewing online messages from the
program. You can also display values of variables
and change the program and modify the variables
online. The wiring of the connections between the
controller and the production plant can be checked.
To allow you to test the functionality of the plant, you
can display the input states and force outputs with
the PLC halted.
With the PS 416 controller, you can also force
variable values statically or dynamically in the
Variables window with the PLC in the RUN state.
The following flow diagrams show the typical test
and commissioning procedure:

07/99 AWB 2700-1305 GB

218
Overview

Program test

Establishing the PRG-PLC

connection

no
OS present?

yes
Transfer OS or boot from MC

(PS 416)

yes
PLC test 1

no
2

Transfer program to the PLC

if not loaded yet

Start program

Test/modify program

yes
Wiring test?

no
Stop program (HALT)

yes
Check further POUs?
3
07/99 AWB 2700-1305 GB

no

Terminate connection

219
Test and Commissioning

PLC test

Wiring test

07/99 AWB 2700-1305 GB

220
Defining the program
connections

Preconditions: for the PLC or wiring test:


The serial programming cable is fitted between
the PC and the PLC.

With the PS 416 controller, check the correct


position of the interface switch on the CPU card:
RS 232 ➞ cable PS 416-ZKB-210
RS 485 ➞ interface converter UM 1.5

A connection list is available.


The Test and Commissioning tool is running.
A wiring test can only be carried out if a user program
with the topology configuration is loaded in the PLC.
Furthermore, a program test can only be carried out
if the POUs and the executable program code file for
the current project are available in the programming
device (PC). If a program is to be tested or modified
that is already loaded in the PLC, an unaltered
version of the corresponding project must be present
on the PC.

Defining the program E Click the Test and Commissioning icon in the
connections Sucosoft Manager or in the toolbar.
Test and Commissioning
This will open the Test and Commissioning main
window with the Connection List:
07/99 AWB 2700-1305 GB

221
Test and Commissioning

The Connection List window automatically displays


some default values that you can add to or modify as
required.
E Click with the cursor in the Device Name box and
enter the required name for the PLC, in this
example “Example”.
If the PLC is connected to a master via Suconet K,
it can be programmed via the master through
Suconet K with the serial programming cable
attached to the master. Further information is
contained under “Programming via Suconet K” on
page 235.
The Line and Station fields in the Connection List
window are only relevant if you want to program the
PLC via Suconet K.
If your serial programming cable is not connected to
the default serial interface COM1, click in the
Interface field and select another interface from the
pop-up list which is shown.
E Click the Interface Parameters button to
display the Interface Settings dialog box.
Enter the required interface parameters for your
programming connection.
07/99 AWB 2700-1305 GB

222
Remote diagnostics a
modem

With the PS 4 compact controller, the baud rate is


fixed at 9600 baud and you cannot change the CPU
address:

Check the checkbox Connection Via Modem if you


want to program the PLC remotely via a modem. The
programming connection is made in this case via the
public telephone network. This is discussed in more
detail in the following section.
E Choose File ➞ Save to save the connection list.

Remote diagnostics a Data can be transferred between a PC and the PLC


modem via the public telephone network using a modem.
A PLC that is connected to the public telephone
network via a modem can be diagnosed from a PC
which is located in another town or country, for
example.
You can also remotely operate and test a PLC via
modem. For example you can remotely load program
07/99 AWB 2700-1305 GB

updates into the PLC, check the status of machines


or carry out program diagnosis and remedy faults.
All functions that can be carried out locally with the
Sucosoft software can also be carried out remotely
via modem.

223
Test and Commissioning

Commissioning the modem


To commission your modem you need the following
components:
Connection to the public telephone network
Modem with manual
PC with available serial interface
Connecting cables from modem to telephone
socket and to PC
A telephone connection is necessary for data
communication in the public telephone network.
You can either connect the modem in parallel to an
existing telephone by sharing the same telephone
socket or – in the case of a private telephone ex-
change (PBX) – the modem can be connected to a
separate telephone extension.
The PC is connected with an RS 232 cable to the PC
modem via an unused serial interface on the PC. The
PC modem is connected to the PLC modem through
the public telephone network.
Depending on the interface and type of controller,
the PLC modem is connected to the programming
interface (PRG) of the PLC via RS 232 or RS 485.

Telephone RS 485/
RS 232
section
RS 232

PC PC Modem PLC Modem PLC

E Connect the modem to your PC and to the


telephone socket as described in the modem
manual.
E Start the Sucosoft software.
07/99 AWB 2700-1305 GB

224
Remote diagnostics a
modem

Warning
Remote programming allows you to program a
running PLC. Since you can influence running
processes and machines, this can present a
potential hazard for persons and machinery.
Only change the settings of a PLC – in particular
during online programming and forcing outputs
remotely – if you are sure it does not cause any
hazardous conditions for persons or machinery.

Installation and configuration on the PC side


A remote connection to a PLC involves the following
steps:
Initialize the PC and the PLC modem
Establish the connection
Operate the PLC through Sucosoft
Terminate the connection
The steps will now be discussed in detail.
Initialize the PC modem
E Start the Test and Commissioning tool.
E Define a connection to the required PLC in the
connection list.
E Click the Interface Parameters button or choose
Device ➞ Interface Parameters in the menu.
E Check the checkbox Connection Via Modem.
The dialog box will then be extended as follows
(the example is for PS 4-201-MM1):
07/99 AWB 2700-1305 GB

225
Test and Commissioning

The settings in the Modem Connection panel in the


above dialog box are used to configure your PC
modem.
Baud rate
The drop-down list Baud Rate is used to choose the
interface speed between the PC and the PC modem.
The most suitable baud rate depends on the
maximum baud rate that the serial interface of your
PC supports without problems. The communication
speed between the PC modem and the PLC modem
is not configurable – the two modems negotiate the
fastest possible speed automatically when the
connection is initiated.
07/99 AWB 2700-1305 GB

The configured interface speed between the PLC


and the PLC modem must not exceed the configured
interface speed between the PC and the PC modem.
The interface speed between the PLC and the PLC

226
Remote diagnostics a
modem

modem can be configured with a standard terminal


program by sending modem AT commands from
your PLC program using the function block
SendATCommand. This function block is described
in AWB 2700-1306-GB, “Sucosoft S 40, Language
Elements”. See “Initializing the PLC modem” on
page 231 for more details.
Timeout delay for the protocol
The entry box Timeout delay for the protocol in ms is
used to specify the maximum time that Sucosoft
waits for a response from the PLC. The suggested
value is dependent on the configured modem baud
rate and should not be reduced. You can increase
the value if you expect a poor quality connection or
an existing connection is often dropped without
warning.
AT commands for establishing the modem
connection
The so-called AT commands, which are used to
issue commands to the modem, have been
standardized to a certain extent by the Hayes
company. The text field AT Commands for
Establishing the Connection is used to enter the
commands for establishing the modem connection.
These are the commands that are issued to the
modem when you click on the Connect button or
choose Device ➞ Connect from the menu.
Important AT commands are summarized in the
Appendix. Please refer to your modem manual for a
complete list of the AT commands which are
supported by your particular type of modem.
If your PC modem is connected to a private
07/99 AWB 2700-1305 GB

telephone exchange (PBX), the dial tone may differ


from the standard dial tone and will then not be
recognized by the modem. This can be remedied by
changing the dialling command to ATX3DP for pulse
dial and ATX3DT for tone dial, respectively.

227
Test and Commissioning

The standard AT commands for a standard


telephone connection are ATDP for pulse dial and
ATDT for tone dial, respectively. If pauses are
necessary during the dialling process, this can be
achieved by inserting the letter “W” within the
number to be dialled.
Examples:
ATX3DT00W0228 602 1414
Dial the telephone number 0228 602 1414 from a
PBX using tone dialling; wait for the outside line
signal after dialling “00”.
ATDP0228 602 1414
Dial the telephone number 0228 602 1414 from a
direct telephone connection using pulse dialling.
Modern modems can store several sets of parameter
settings internally. You can save the current modem
configuration to parameter set 0 with the command
AT&W0. At a later time, even if the modem has been
switched off and on again, you can reset the modem
and recall a stored parameter set by issuing the ATZ
command with a following digit, e. g. ATZ0 to reset
the modem with the first parameter set.
AT commands for terminating the connection
This text field is used to enter the commands
necessary to hang up the line. They are issued to the
modem when you click Disconnect button or choose
Device ➞ Disconnect from the menu. The standard
AT command to disconnect the line is ATH0. It may
be necessary to prefix this command with the
characters “+++” to ensure that the modem switches
from the data communications mode back to the
command mode in order to accept the command.
07/99 AWB 2700-1305 GB

Check connection via DCD line (carrier detect)


Sucosoft will indicate when the connection to the
PLC modem is established. Programming actions
can only be carried out when the connection is valid.

228
Remote diagnostics a
modem

Display connection establishment protocol


If you check this checkbox, you will see a detailed log
of each of the modem commands and reactions
while the connection is being established:

This can be useful for solving problems. If this option


is disabled, you should check the option Connection
Check via DCD line, since otherwise you will not be
informed about the connection status. If the log
window is disabled, you will only see a short
message to indicate whether the connection was
made successfully or not.
07/99 AWB 2700-1305 GB

229
Test and Commissioning

Wait for connection in s


This field is used to enter the maximum time that
Sucosoft should wait for the connection through the
PC modem to be established. If the connection has
not been established within this time, the connection
attempt will be aborted with an error message.
Connecting up the PLC modem
After installing and configuring the PC modem, it is
necessary to connect up the PLC modem. The
following items are required:
A V.24 interface cable for the PLC modem
A telephone connection close to the PLC
One of the following PLC models:
PS 4-201-MM1 version 05 or later
PS 4-141-MM1
PS 4-151-MM1
PS 416-CPU-400 version 04 or later
PS 416-CPU-200/300
An external, asynchronous Hayes compatible
modem.
The modem is connected to the PLC by attaching the
serial cable to the PRG interface socket. The socket
and the pin assignments are different for the
PS 4-200 series controllers (PS 4-141/151, PS 4-201)
and the PS 416-series (PS 416-CPU-200/300/400).
More information on wiring, cables and connectors
can be found in the Appendix and:
for PS 416 in the manual AWB 27-1208-GB
for PS 4-200 in the manual AWB 27-1184-GB.
E Connect up the PLC modem to the PLC and the
telephone socket and switch on the modem.
07/99 AWB 2700-1305 GB

The modem will carry out a short self-test and is then


ready for operation. LEDs on the modem are
provided to indicate the modem’s status.

230
Remote diagnostics a
modem

Initializing the PLC modem


There are several ways to initialize and set the
parameters for the PLC modem:
Set the parameters once with a standard terminal
program such as Telix. The configuration can be
stored in the modem’s non-volatile memory and
is available each time the modem is switched on
or reset.
Use modem function blocks in the IL program.
They allow you to send AT commands to the
modem via the PRG interface.
If remote configuration is supported by your
modem, you can configure the PLC modem from
a remote PC through the telephone line.
Initializing with a standard terminal program
You can initialize the modem with a standard
terminal program such as Telix. Such programs are
usually supplied with the modem. Schließen Sie das
SPS-Modem zunächst an die freie serielle
Schnittstelle eines PC an.
E Connect the PLC modem temporarily to a free
serial interface on your PC.
E Start the terminal program and configure it to use
the serial interface to which the modem is
connected. Configure the serial interface as
follows:
9600 Baud, 8 bits, 1 stop bit, no parity
Flow control: disable XON/XOFF or CTS/RTS
Local echo: OFF
Terminal type: VT100 or similar.
E Check whether the PLC modem is ready and
07/99 AWB 2700-1305 GB

connected up correctly. In your terminal program,


switch to terminal mode, type in the characters
“AT” and press return. The modem is ready and

231
Test and Commissioning

connected up correctly if it responds with the


characters “OK”.
E Enter the following modem AT commands in the
order shown. They are necessary to configure the
modem for use with the PLC. Since the following
commands are not completely standardized for
all modem types, compare the commands and
their significance with the command list in your
modem manual. The Appendix to this manual
contains a selection of common Hayes
compatible AT commands.
$7&RPPDQG 6LJQLILFDQFH
ATE0 Disable command echo to host (i. e. PLC)
ATV1 Return messages from modem in plain text (verbose)
ATM1 Enable loudspeaker to monitor connection establish-
ment acoustically
AT&D0 Ignore DTR line or DTR status change
AT\D0 Disable DSR/CTS control and/or DSR/CTS always on
AT&C0 DCD always active (carrier detect)
AT&S0 Ignore DSR signal and/or always active
AT\Q0 or Data flow and/or handshake method: disable XON/
AT&K0 XOFF handshake, disable RTS/CTS handshake
AT\G0 Modem flow control (XON/XOFF)
AT\J0 Modem DTE baud rate to PLC fixed and thus inde-
pendent of connect speed
ATS0=3 Enable automatic call answering (in the example, the
modem waits for three rings of the phone)

With the PS 4-200 compact controller, the baud


rate should be set to 9600 baud only.
07/99 AWB 2700-1305 GB

E Store the configuration settings in the modem’s


non-volatile memory. Use the AT command
AT&W0 to store the configuration in parameter
set 0.

232
Remote diagnostics a
modem

The settings are retentive even if the modem is


switched off – the settings are activated again when
the modem is switched on.
Modern modems usually have two or more
parameter sets in non-volatile memory, whereby
the default action is to load parameter set 0
following power up or reset.

E Disconnect the modem from the PC and connect


it to the PLC.
If you have problems with data transmission or an
existing connection is terminated without warning,
disable the following protocols in the PLC modem
with the AT commands listed below. If the modem
returns ERROR, check the command in your modem
manual for correctness.
$7FRPPDQG 6LJQLILFDQFH

AT%C0 Disable data compression

AT\N0 Disable automatic error correction

AT&U1 Additional error protocol at V.32 (e. g. Trellis)

AT-J0 Disable V.42 detection

Initialising the modem from the PLC program


You can use the function block “SendATCommand”
in your PLC program to issue the necessary AT
commands to the modem. Output the AT command
in the first cycle following cold start to ensure that the
modem is always correctly initialized without further
program actions.
See the manual AWB 2700-1306-GB “Sucosoft S 40,
Language Elements” for information on the
07/99 AWB 2700-1305 GB

“SendATCommand” function block and an example


of its usage.

233
Test and Commissioning

Using the modem with a private telephone


exchange (PBX)
When connecting up the modem to a private
telephone network, pay attention to non-standard
features e. g. differing pin assignment of the
telephone socket, enabling the telephone extension
for outside calls, or the procedure or code necessary
to get an outside line. If necessary, contact the
supplier of the PBX.
Protection of PLC from unauthorized access
Since it is possible to make a connection to the PLC
modem with any other modem, you should protect
the PLC and the connected machines against
unauthorized access. Several methods are available:
Password protection
Sucosoft provides password protection to protect a
program or the PLC from unauthorized access. The
password protection is independent of the type of
modem used, but differs according to the controller
type as follows:
PS 4-200:
With these PLCs, the PLC program can be
protected with a password. The password must
be entered for all actions that change the PLC
status or data. See page 252 for information on
entering the password.
PS 416
A password can be assigned to the controller
irrespective of the individual program or the
number of simultaneously loaded programs.
You are prompted for the password each time
you connect to the controller in this case.
07/99 AWB 2700-1305 GB

Further information on password entry can be


found on .

234
Programming via
Suconet K

Access protection via the PLC modem


Modern modems provide a feature which requires a
password to be entered before the connection is
established. Note that this feature is not available for
all modems and needs to be explicitly activated.
Access protection via automatic callback
With this method of protection, the called PLC
modem automatically terminates the connection
after successful connection establishment, and
returns the call automatically to a specified
telephone number (i. e. the PC modem). This ensures
that access is only possible from a certain telephone
number. Some modems allow several callback
telephone numbers to be configured. Note that this
feature is not supported by all modems and also
needs to be explicitly activated. The PC modem
must be configured for automatic call answering to
use this option.

Programming via PLCs that are designed for use in a Suconet network
Suconet K can be individually programmed just like stand-alone
PLCs using a programming cable connected in turn
between each PLC and the programming device
(PC).
Sucosoft also allows one or more subordinate PLCs
to be programmed and commissioned via the
Suconet network from a central “master” PLC which
is connected to the programming device using a
single programming cable. The subordinate PLCs
must be stations on Suconet K lines which are
directly managed by the master (their remote
expansions cannot be programmed via Suconet
07/99 AWB 2700-1305 GB

from the master). Only one cable is thus required for


programming, maintenance and communication and
it is possible to address several PLCs from a single
central programming system.

235
Test and Commissioning

Information on whether a particular PLC type can be


programmed via Suconet is contained in the
documentation of the respective PLC.

PC

Sucosoft

Programming connection

(ZB 4-303-KB1)

PS 4-201-MM1

from V 1.05

Master PLC

PS 4-201-MM1
Suconet K
from V 1.05
Line 1
station 1

Figure 104: Programming via Suconet K (PS 4)

The following PLC types are suitable for


programming via Suconet K:
PS 4-201 MM1 from V1.05
PS 4-141 MM1, PS 4-151 MM1
PS 416-CPU-200, PS 416-CPU-300
PS 416-CPU-400 from V1.04
07/99 AWB 2700-1305 GB

PS 416-NET-400 from V1.05.

236
Programming via
Suconet K

PC

Sucosoft

S 40

Programming cable

(PS 416-ZBK-210)

NET 400

V 1.05

PS 416
Power CPU
Master PLC
supply

PS 416
Power CPU
Station 1
Suconet K supply

Line 1

Figure 105: Programming via Suconet K (PS 416)

If the master PLC is a PS 4-150 series or


PS 4-200 series compact controller, you can only
program subordinate PLCs of the same series via
Suconet K, but not PLCs with a different
programming protocol, such as
PS 416-CPU-xxx.3

Including networked PLCs in the connection list


Precondition: In order to program PLCs via a
07/99 AWB 2700-1305 GB

Suconet K network, the “master” CPU to which the


programming cable is attached must be configured
as the network master.

237
Test and Commissioning

Furthermore, a small “dummy” program must be


pre-loaded in the master and in all other PLCs to be
programmed through Suconet K to ensure that the
required, final topology configuration is available
(it is embedded in the program code).
The master PLC must also be specified in the
Connection List to allow the programming device to
address the subordinate PLCs which are connected
to it. Use the following procedure:
E Connect the master PLC to the subordinate PLC
or PLCs via Suconet K.
E Define the direct connection between the
programming device and the master, device
“example” in the example below.
E Insert a new line in the Connection List with
Device ➞ New in the menu.
E Select the name of the master from the Interface
pop-up list.

E Enter the required name for the subordinate PLC


in the Device Name box.
E Enter the number of the network line which
connects the subordinate PLC to the master and
the station address of subordinate PLC in the
07/99 AWB 2700-1305 GB

Line and Station boxes, respectively.


E Save the Connection list via File ➞ Save.

238
Programming via
Suconet K

Configuring a PLC for the first time via Suconet K


In order to make it easier to program a new CPU –
such as a replacement for a failed device – from a
central programming system via Suconet K, new
CPUs are factory set with the station number 0
(“unaddressed slave”).
E Enter the required name for the new PLC in the
Device Name box.
E Enter the number of the network line which
connects the CPU to the master in the Line box.
E Enter the temporary address 0 (unaddressed
slave) in the Station box.
E Save the connection list via File ➞ Save in the
menu.
Connect the new PLC to the network and transfer a
small “dummy” program containing a topology
configuration that contains the required final station
number for the new PLC. See “Program test for
PS 4-200” on page 243 or “Program test for PS 416”
on page 261 for further details.
E Update the station number of the new PLC in the
Connection List to correspond with the final
topology configuration.
E Save the Connection List via File ➞ Save in the
menu.
The following method allows you to configure an
entire, new Suconet K network from a single
programming device without loading the final user
programs at this stage:
Precondition: The master is already defined in the
07/99 AWB 2700-1305 GB

Connection List.
In addition, the programming device must already
have program code with the required final topology
configuration for each slave PLC. At this stage, the

239
Test and Commissioning

contents of the Program POUs which are used for


program code generation can be small “dummy”
programs which do not yet implement the assigned
automation task.
E Connect the first slave PLC to the Suconet K
network.
E In the Connection List, enter the temporary
address 0 (unaddressed slave) in the Station box.
E Establish the connection between PC and PLC
and transfer the dummy program with the
associated topology configuration.
E Update the station number of the new PLC in the
Connection List to correspond with the final
topology configuration and save the Connection
List via File ➞ Save.
Repeat the above steps for the remaining slave
PLCs.
You can physically connect up the next slave
controller as soon as the address of the previous
slave station has been updated in the connection
list. Another method is to use a standard direct
programming cable to specify the required final
Suconet K station address of each slave
controller in advance. This is done by loading a
program into each slave controller together with
the associated topology configuration which
specifies the required final station address before
connecting the controller to the network.

By using the master controller as a “gateway”


between the programming cable and the Suconet K
fieldbus, all programming and monitoring functions
07/99 AWB 2700-1305 GB

can be carried out as if each slave controller


connected to the fieldbus is directly connected to the
programming device. In addition, online services
supported by the programming device are executed
independently of data communications which may

240
Programming via
Suconet K

be taking place through the same Suconet K


connection simultaneously.
Programming performance
The time response when programming through a
master controller and Suconet K is dependent on the
number of connected slave stations and the quantity
of program data to be transferred. Accordingly, it is
only possible to specify approximate values.
If the master controller is currently in the READY
state, functions such as loading a user program and
displaying status information from a slave are about
10 % slower than with a direct connection to the
programming device; if the master controller is
running a program (RUN state), the functions are
about 20 % slower than a direct connection.
Errors during transfer to slave PLCs
If the address of a station has changed during the
transfer to a slave PLC, this may cause an error
during the transfer.
Example
Connect a network station on address 2
Download a program containing the station
address changed to 4
After the transfer the PLC can no longer be
addressed under address 2.
In this case return to the Connection List and make
the connection using the new address.
07/99 AWB 2700-1305 GB

241
Test and Commissioning

Master-Slave operation All PLCs running as active slaves in a Suconet K


with Remote Control network follow the operating mode (Run or Halt) of
the master when the operating mode selector switch
is set to “RUN” or “M-RESET”.
In certain circumstances this may cause the slave to
change operating mode unexpectedly:
For PS 4-150 and PS 4-200 slaves
If a wiring test is carried out for the slave in the Online
Topology Configurator (Display/Force I/O) in Halt
mode, and if the outputs are forced, the Remote
Control function is inhibited for the duration of the
wiring test. The slave stays in the same state.
Remote Control is re-enabled after the wiring test is
completed and after the slave is started manually.
For PS 4-341-MM1 and PS 416 slaves
If network diagnostics or a wiring test is carried out
for the slave in the Online Topology Configurator, the
Remote Control functions is disabled for this time
and the slave stays in the same state. On completion
of the network diagnostics or wiring test the slave will
in certain circumstances take on the changed
operating state of the master.
Slaves on a PS 416-CPU-400, PS 416-CPU-300 or
PS 416-NET-400 as Master
If the diagnostics status or wiring test is started for
the master in the Online Topology Configurator, all
remote slaves in Halt status switch to Run and return
to Halt when the test is completed.
Procedure in the event of a power failure
Master and slave PLCs are in RUN
The power supply fails temporarily for all stations.
07/99 AWB 2700-1305 GB

As soon as power is restored, the master PLC


switches to HALT.
The slave PLCs are started.

242
Program test for PS 4-200

If a slave PLC requires a longer startup time than


the master, it will stay in RUN. Otherwise it will
also switch to HALT after a few seconds.
The starting of the slaves can be prevented by
setting the operating mode selector switch on the
slave CPU to HALT.
If two programming devices attempt to write
information to a slave controller simultaneously
through the network connection, this can lead to
collisions which cause the PLC to enter the NOT
READY state.

Program test for The following steps must carried out before you can
PS 4-200 test the program in the controller:
Establish the connection between the
programming device and the PLC.
Transfer the program.
Start the program.
Some of these steps are only required when you test
the program and the controller for the first time and
need not be repeated for subsequent program tests.

Establishing the connection between the PC


and the PLC
E Select one or more lines with defined connections
in the Connection List window.
E Establish the connection between the
programming device and the controller by
clicking the Connect button. The message
07/99 AWB 2700-1305 GB

“Connected” will appear in the Status box in the

243
Test and Commissioning

Connection List next to the device name and the


connection parameters.
If the "Save Settings on Exit" in the "Options"
menu is active, starting the T & C tool will
automatically cause the reconnection of all
devices that were connected during the previous
session.
Likewise when starting the T&C, the program
and/or Device Configuration window is opened
that was active during the last session.

Before proceeding, you must first select the


respective controller in the Connection List.

Loading the program


Transferring the program from Sucosoft to the
PLC
E Click the Transfer button in the main window of
Test and Commissioning to open the Transfer/
File Manager window:

07/99 AWB 2700-1305 GB

244
Program test for PS 4-200

E Select the program code file to be transferred to


the PLC and click Execute to start the transfer of
the program. The Transfer progress indicator will
open to show the progress of the load operation:

The Transfer window is closed automatically when


the transfer is completed.
E Close the Transfer/File Manager window by
clicking on Close.
A master configuration can be loaded into a PS 4
slave via Suconet K, causing the slave to be
incorrectly configured.
In this case, the PLC must be switched off and
the battery and memory card removed.
This configuration cannot be deleted via the
software.

Comparing a program on the PC and the PLC


Precondition: The Test and Commissioning tool is
open and a program code file and a connection list
are available on the PC. The programming cable is
connected (or the network connection between the
PC and the PLC is present). The connection between
the PC and the PLC is established.
07/99 AWB 2700-1305 GB

E Click the Transfer button in the main window of


Test and Commissioning to open the Transfer/
File Manager window.

245
Test and Commissioning

E Choose the Compare option in the Action pop-up


list.
E Select the program to be compared in the list box
and click OK.
After a short time, a message will appear indicating
whether the program in the PLC matches the
program in the PC or not.
E Acknowledge the message with OK.
E Close the Transfer/File Manager window by
clicking on Close.

Starting programs
Starting programs from Sucosoft
E Click the Program Status button in the main
window of Test and Commissioning to open the
Program Status window:

07/99 AWB 2700-1305 GB

246
Program test for PS 4-200

The Program Status window provides information on


the operating status of the CPU, the position of the
CPU’s operating mode selector switch and the
program execution parameters. This window also
lets you start and stop the program.
E Click the Cold Start button to start the program
with the initialisation values of the variables. The
RUN status will be indicated on the screen and on
the CPU and the Halt button will be activated.
E Click the Halt button to stop the program. The
CPU status changes to Ready and the Cold Start
and Warm Start buttons will be activated (the
Warm Start button will only be active if the PLC
operating mode selector switch is in the RUN
position, see below).
E Click OK to close the window.
CPU status
This shows the current CPU status as follows:
READY: The CPU is ready for operation but the user
program is not being processed. A cold start or warm
start can be executed depending on the position of
the operating mode selector switch.
With a cold start the user program is started with the
initialisation values of the variables. Any process
data that remains in the PLC after the user program
was stopped is discarded.
With a warm start the user program is resumed at the
point where it was stopped.
RUN: The user program is being processed in the
CPU. This status is reached via a cold or warm start.
NOT_READY: A fatal error has been detected. The
07/99 AWB 2700-1305 GB

diagnostics status word must be acknowledged so


that the Warm Start and Cold Start buttons can be
activated.

247
Test and Commissioning

Switch position
This shows the current position of the CPU operating
mode switch as follows:
RUN: A warm or cold start is possible.
RUN_MR: A cold start is possible.
HALT: PLC cannot be switched to RUN
Program information
The current program execution parameters are
shown as follows:
Program name: Name of user program in the PLC
Program version: version number of the program
as set in the Code Generation function under
Options ➞ Configure PLC.
Code size: the size of the executable code of the
PLC user program
Data size: size of the data area for the user
program
Program date: the date and time of the program
generation
Startup behaviour after NOT READY (page 250)
Program execution type – cyclical
Maximum permissible cycle time: if the specified
time is exceeded, the PLC switches to HALT
Cycle time: when the PLC is in the RUN status,
this displays the current cycle time
These parameters correspond to the values used for
the generation of the program code, i. e. the
standard settings or the settings which you made in
the Code Generator under Options ➞ Configure
PLC. The parameters cannot be changed in this
07/99 AWB 2700-1305 GB

window.

248
Program test for PS 4-200

Buttons in the Program Status window


Depending on the CPU status, the position of the
operating mode selector switch and the chosen
program startup behaviour, the following buttons
may be active or inactive (gray):
Cold Start button: This starts the user program with
the initialisation values of the variables. A cold start is
possible with the operating mode selector switch set
to RUN or RUN_M_RESET. Any process data that
remained in the PLC after the user program was
stopped is discarded. However, the values of
markers in the recipe marker range defined in the
Code Generation tool under Options ➞ Configure
PLC are retained following a cold start.
Warm Start button: This resumes the user program
at the point where it was stopped. A warm start is
only possible if the operating mode selector switch
is set to RUN and the CPU is in Halt status. The
process data is saved if the program is interrupted
and is still available if the program is resumed.
A warm start is only possible after an already started
program has been stopped, i. e. by setting the
operating mode selector switch to HLT and pressing
the SET button or by clicking the Halt button. If the
program was stopped by switching to HLT, the
operating mode selector switch must be set to RUN
again before it can be warm started.
Halt button: This stops a running user program.
07/99 AWB 2700-1305 GB

249
Test and Commissioning

Diagnostics button
This opens the Program Diagnostics window
showing additional information on the status of the
user program. The detected errors and the number of
errors are highlighted in red. The diagnostics bits and
the diagnostics counter can be reset:

Starting the program without Sucosoft


Depending on the position of the operating mode
selector switch, the program can either be cold or
warm started without Sucosoft.
The startup behaviour of the PLC when you press the
SET button depends on the setting for “Startup
behaviour after NOT READY” which was chosen in
the Code Generation tool under Options ➞
Configure PLC and on the setting of the operating
mode selector switch as follows:
Configuration/ Halt Warm start Cold start
07/99 AWB 2700-1305 GB

Switch

RUN M RESET NOT READY WARM START COLD START

250
Program test for PS 4-300

Booting the PLC from the memory card


The program saved on the memory card is
transferred to the PLC if the PLC contains no
program or a faulty one when the PLC is switched on
or started (see also page 267).

Program test for The following steps must be carried out before you
PS 4-300 can test the program in the controller:
Establish the connection between the
programming device and the PLC
Transfer the operating system, if there is no
current version loaded already,
Transfer the program
Start the program.
Some of these steps are only required when you test
the program and the controller for the first time and
need not be repeated for subsequent program tests.

Establishing the connection between the PC


and the PLC
E Select one or more lines with defined connections
in the Connection List window.
E Establish the connection between the programm-
ing device and the controller by clicking the
Connect button. If you have defined a password
beforehand for this connection, you will be asked
to enter it. Confirm your entry with OK. The
message “Connected” will appear in the Status
box in the Connection List next to the device
name and the connection parameters.
07/99 AWB 2700-1305 GB

251
Test and Commissioning

If the "Save Settings on Exit" in the "Options"


menu is active, starting the T & C tool will
automatically cause the reconnection of all
devices that were connected during the previous
session.
Likewise when starting the T & C, the program
and/or Device Configuration window is opened
that was active during the last session.

Defining/changing the password


A password can be used to protect against
unauthorised access to the PS 4-300 status or data.
The password, which can include both alphabetic
characters and digits, has a maximum length of
8 characters.
E Choose Device ➞ Password, enter the required
password, enter it again in the Confirm Password
box and click OK

Loading the operating system


If the PLC contains no operating system or an old
operating system version, you must first transfer a
new version of the operating system into the
07/99 AWB 2700-1305 GB

controller.

252
Program test for PS 4-300

Transferring the operating system from


Sucosoft into the controller
E Click the Transfer button in the main window of
Test and Commissioning to open the Transfer/
File Manager window:

The list box on the left lists either the names of


executable program code files with the extension
“*.pcd” or the PLC operating system file with the
extension “*.osf”, depending on what is chosen in
the File Format pop-up list. The default for Storage
Media field is PRG (programming device).
E In order to transfer the operating system to the
controller, choose “OSF Files” in the File Format
pop-up list, select the operating system file with
the extension “.osf” and click on Transfer ➞ PLC.
07/99 AWB 2700-1305 GB

253
Test and Commissioning

When you replace an existing operating system


in the controller with a new version, all user
programs and data are deleted at the same time!
Accordingly, you will be prompted to confirm this
action before transfer is started.

The transfer can take several minutes, depending on


the baud rate of the connection. A progress indicator
gives information on the progress of the transfer.
After successful transfer, the green READY lamp
lights on the CPU card to show that it is ready.
E Close the Transfer/File Manager window by
clicking on the Close button.
Transferring the operating system from
Sucosoft to the memory card
E Choose OSF Files in the File Format pop-up list.
E Select the operating system file with the
extension “.osf”.
E Start the transfer by clicking on Transfer ➞ MC.

Loading the program


Transferring the program from Sucosoft to the
PLC
E Choose Program Files in the File Format
pop-up list.
07/99 AWB 2700-1305 GB

254
Program test for PS 4-300

E Select the program code file with the extension


“.pcd” that you want to transfer into the PLC and
start the transfer by clicking on Transfer ➞ PLC.
A progress indicator gives information on the
progress of the transfer:

E Close the Transfer/File Manager window by


clicking on the Close button.
The following file extensions are reserved for
Sucosoft and must not be used for other files:
“.DCF”, “.ETC”, “.GAB”, “.GID”, “.ITB”, “.ITC”,
“.LAB”, “.LID”, “.PCD”, “.PDF”, “.TID”.
Files with these extensions are not displayed in
07/99 AWB 2700-1305 GB

the File format list box when the All Files setting is
selected.

255
Test and Commissioning

Transferring the program from Sucosoft to the


memory card
Proceed as described above to transfer the program
from Sucosoft to the controller but click instead
Transfer ➞ MC instead of Transfer ➞ PLC.
Transferring the program from the memory
card into the controller
Proceed as described above to transfer the program
from Sucosoft to the controller but choose instead
“MC” under Storage Medium and click on
Transfer ➞ PLC.

Starting programs
Starting programs from Sucosoft
E Click the Program Status button in the main
window of Test and Commissioning to open the
Program Status window:

07/99 AWB 2700-1305 GB

256
Program test for PS 4-300

The Program Status window provides information on


the operating status of the CPU, the position of the
CPU’s operating mode selector switch and the
program execution parameters. This window also
lets you start and stop the program.
E Click the Cold Start button to start the program
with the initialisation values of the variables. The
RUN status will be indicated on the screen and on
the PLC and the Halt button will be activated.
E Click the Halt button to stop the program. The
CPU status changes to Ready and the Cold Start
and Warm Start buttons will be activated (the
Warm Start button will only be active if the PLC
operating mode selector switch is in the RUN
position, see below).
E Click OK to close the window.
CPU status
This shows the current CPU status as follows:
READY: The PLC is ready for operation but the user
program is not being processed. A cold start or warm
start can be executed depending on the position of
the operating mode selector switch.
With a cold start the user program is started with the
initialisation values of the variables. Any process
data that remains in the PLC after the user program
was stopped is discarded.
With a warm start the user program is resumed at the
point where it was stopped.
RUN: The user program is being processed in the
PLC. This status is reached via a cold or warm start.
07/99 AWB 2700-1305 GB

257
Test and Commissioning

NOT_READY: A fatal error has been detected. The


diagnostics status word must be acknowledged.
Switch position
This shows the current position of the CPU operating
mode switch as follows:
RUN:A warm or cold start is possible.
RUN_MR:A cold start is possible.
HALT:PLC cannot be switched to RUN
Program information
The current program execution parameters are
shown as follows:
Program name: Name of user program in the PLC
Program version: version number of the program
as set under Options ➞ Configure PLC.
Code size: the size of the executable code of the
PLC user program
Data size: size of the data area for the user
program
Program date: the date and time of the program
generation
Startup behaviour after NOT READY
Program execution type – cyclical
Maximum permissible cycle time: if the specified
time is exceeded, the PLC switches to HALT
Cycle time: when the PLC is in the RUN status,
this displays the current cycle time
These parameters correspond to the values used for
the generation of the program code, i. e. the
standard settings or the settings which you made
07/99 AWB 2700-1305 GB

under Options ➞ Configure PLC. The parameters


cannot be changed in this window.

258
Program test for PS 4-300

Buttons in the Program Status window


Depending on the PLC status, the position of the
operating mode selector switch and the chosen
program startup behaviour, the following buttons
may be active or inactive (grey):
Cold Start button: This starts the user program with
the initialisation values of the variables. A cold start is
possible with the operating mode selector switch set
to RUN or RUN_M_RESET. Any process data that
remained in the PLC after the user program was
stopped is discarded. However, the values of
markers in the recipe marker range defined under
Options ➞ Configure PLC are retained following a
cold start.
Warm Start button: This resumes the user program
at the point where it was stopped. A warm start is
only possible if the operating mode selector switch is
set to RUN and the PLC is in Halt status. The process
data is saved if the program is interrupted and is still
available if the program is resumed. A warm start is
only possible after an already started program has
been stopped, i. e. by setting the operating mode
selector switch to HLT and pressing the SET button
or by clicking the Halt button. If the program was
stopped by switching to HLT, the operating mode
selector switch must be set to RUN again before it
can be warm started.
Halt button: This stops a running user program.
07/99 AWB 2700-1305 GB

259
Test and Commissioning

Diagnostics button
This opens the Program Diagnostics window
showing additional information on the status of the
user program. The detected errors and the number of
errors are highlighted in red. The diagnostics bits and
the diagnostics counter can be reset:

Starting the program without Sucosoft


Depending on the position of the operating mode
selector switch, the program can either be cold or
warm started without Sucosoft.
The startup behaviour of the PLC when you press the
SET button depends on the setting for “Startup
behaviour after WARM START” which was chosen
07/99 AWB 2700-1305 GB

under Options ➞ Configure PLC and on the setting


of the operating mode selector switch as follows:

260
Program test for PS 416

Configuration/ Halt Warm start Cold start


Switch

RUN NOT READY WARM START COLD START

Booting the PLC from the memory card


The operating system and program are transferred to
the PLC in that order if none are present on the PLC
beforehand. The program will be started automa-
tically if this has defined accordingly as the startup
behaviour.

Program test for PS 416 The following steps must becarried out before you
can test the program in the controller:
Establish the connection between the
programming device and the PLC.
Transfer the operating system if a current version
is not yet loaded.
Transfer the program.
If necessary, define or change the program
startup behaviour of the memory card.
Start the program.
Some of these steps are only required when you test
the program and the controller for the first time and
must not be repeated for subsequent program tests.

Establishing the connection between the PC and


the PLC
E Select one or more lines with defined connections
in the Connection List window.
07/99 AWB 2700-1305 GB

E Establish the connection between the programm-


ing device and the controller by clicking the
Connect button. If you have defined a password
for this connection, you will be prompted to

261
Test and Commissioning

enter it. Confirm with OK. The message


“Connected” will appear in the Status box in the
Connection List next to the device name and the
connection parameters.
If the "Save Settings on Exit" in the "Options"
menu is active, starting the T & C tool will
automatically cause the reconnection of all
devices that were connected during the previous
session.
Likewise when starting the T&C, the program
and/or Device Configuration window is opened
that was active during the last session.

Defining/changing the password


A password can be used to protect against
unauthorised access to the PS 416 status or data.
The password, which can include both alphabetic
characters and digits, has a maximum length of
8 characters.
E Choose Device ➞ Password, enter the required
password, enter it again in the Confirm Password
box and click OK

07/99 AWB 2700-1305 GB

262
Program test for PS 416

Loading the operating system


If the PLC contains no operating system or an old
operating system version, you must first transfer a
new version of the operating system into the
controller.
Transferring the operating system from
Sucosoft into the controller
E Click the Transfer button in the main window of
Test and Commissioning to open the Transfer/
File Manager window:

The list box on the left lists either the names of


executable program code files with the extension
“*.pcd” or the PLC operating system file with the
extension “*.osf”, depending on what is chosen in
the File Format pop-up list. The default for Storage
Media field is PRG (programming device).
E In order to transfer the operating system to the
07/99 AWB 2700-1305 GB

controller, choose “OSF Files” in the File Format


pop-up list, select the operating system file with
the extension “.osf” and click on Transfer ➞ PLC.

263
Test and Commissioning

When you replace an existing operating system in


the controller with a new version, all user
programs and data are deleted at the same time!
Accordingly, you will be prompted to confirm this
action before transfer is started.

The transfer can take several minutes, depending on


the baud rate of the connection. A progress indicator
gives information on the progress of the transfer.
After successful transfer, the green READY lamp
lights on the CPU card to show that it is ready.
E Close the Transfer/File Manager window by
clicking on the Close button.
Transferring the operating system from
Sucosoft to the memory card
E Choose OSF Files in the File Format pop-up list.
E Select the operating system file with the
extension “.osf”.
E Start the transfer by clicking on Transfer ➞ MC.

07/99 AWB 2700-1305 GB

264
Program test for PS 416

Loading the program


Transferring the program from Sucosoft to the
PLC
E Choose Program Files in the File Format
pop-up list.

E Select the program code file with the extension


“.pcd” that you want to transfer into the PLC and
start the transfer by clicking on Transfer ➞ PLC.
A progress indicator gives information on the
progress of the transfer:
07/99 AWB 2700-1305 GB

265
Test and Commissioning

E Close the Transfer/File Manager window by


clicking on the Close button.
The following file names and extensions are
reserved for Sucosoft and must not be used for
other files:

Files:
“416m_” or “341_” followed by numbers,
“PS416”, “BOOT”, “Update”, “RSDAT”
Extensions:
“.DCF”, “.ETC”, “.GAB”, “.GID”, “.ITB”, “.ITC”,
“.LAB”, “.LID”, “.PCD”, “.PDF”, “.TID”.
Files with these extensions are not displayed in
the File format list box when the All Files setting is
selected.

Transferring the program from Sucosoft to the


memory card
Proceed as described above to transfer the program
from Sucosoft to the controller but click instead
Transfer ➞ MC instead of Transfer ➞ PLC. The
“Startup behaviour” window opens automatically
when the transfer is complete to allow you to define
how the controller starts up when booting with a
memory card inserted. Information on the meaning of
each of the elements in the window can be found in
“Defining the startup behaviour of the memory card”
on page 267.
Transferring the program from the memory
card into the controller
Proceed as described above to transfer the program
from Sucosoft to the controller but choose instead
“MC” under Storage Medium and click on
Transfer ➞ PLC.
07/99 AWB 2700-1305 GB

266
Program test for PS 416

Defining or changing the startup behaviour of the


memory card
Defining the startup behaviour of the memory
card
With SRAM memory cards, the “Startup behaviour”
window is opened automatically after transferring
each program from Sucosoft to the memory card by
clicking on “Transfer ➞ MC” in the Transfer/File
Manager window. The “Startup behaviour” window
allows you to define the startup behaviour of the
controller when booting from the memory card or to
allow you to load programs automatically from the
memory card into the controller:

With FLASH memory cards, the “Startup behaviour”


window is only opened after closing the Transfer/File
Manager window.
E Select the program whose command assignment
you want to change and then click on the required
option in the “Command sequence” box.
“Load(program)” means that the specified program
07/99 AWB 2700-1305 GB

will be transferred automatically into the controller’s


memory when booting from the memory card or
when starting the controller with the memory card
inserted.

267
Test and Commissioning

“Autostart” means that the program will be


transferred into the controller’s memory and will then
start automatically if the operating mode switch is set
to RUN or RUN/M-RESET. This option can only be
assigned to one program!
“Not Set” means that when the controller is booted
with the memory card inserted, the program will not
be transferred into the controller’s memory.
E Check “Delete PLC memory” when you want to
delete the PLC memory before transferring the
program from the memory card.
E Check “Automatic device coldstart” if you want to
automatically carry out a coldstart of the PLC
after the program has been transferred, even if
the operating mode switch is set to RUN.
E Confirm your choices with “OK” in order to write
the information to the memory card. The following
message is shown:

E Confirm the message with ”OK“.


Changing the startup behaviour on the
memory card
Information on the startup behaviour which is stored
on the memory card can be changed later if
necessary.
07/99 AWB 2700-1305 GB

E Click on the “Program status” button in the main


window of Test and Commissioning to open the
“Program status” window.

268
Program test for PS 416

E Click on the button “Startup behaviour of the


MC...” to open the “Startup behaviour” window.
E To change the startup behaviour, proceed as
described above for defining the startup
behaviour.
E Close the “Program status” window by clicking
on “OK“.

Starting programs
Starting programs from Sucosoft
E Click the Program Status button in the main
window of Test and Commissioning to open the
Program Status window:
07/99 AWB 2700-1305 GB

The Program Status window provides information on


the operating status of the CPU, the position of the
CPU’s operating mode selector switch and the

269
Test and Commissioning

program execution parameters. This window also


lets you start and stop the program.
CPU status
This shows the current CPU status as follows:
BOOT: A system cold start is required, i. e. the
operating system must be loaded into the RAM
memory of the CPU (see “Loading the program” on
page 244.
READY: The CPU is ready for operation but the user
program is not being processed. A cold start or warm
start can be executed depending on the position of
the operating mode selector switch.
With a cold start the user program is started with the
initialisation values of the variables. Any process
data that remains in the PLC after the user program
was stopped is discarded.
With a warm start the user program is resumed at the
point where it was stopped.
RUN: The user program is being processed in the
CPU. This status is reached via a cold or warm start.
NOT_READY: A fatal error has been detected. The
diagnostics status word must be acknowledged so
that the Warm Start and Cold Start buttons can be
activated.
Switch position
This shows the current position of the CPU operating
mode switch if a program is selected.Program
information
The current program execution parameters are
shown as follows:
07/99 AWB 2700-1305 GB

Program execution type – cyclical or periodical –


with the associated cycle time or interval time
Startup behaviour after ERROR (page 250).

270
Program test for PS 416

These parameters correspond to the values used for


the generation of the program code, i. e. the
standard settings or the settings which you made in
the Code Generator under Generate ➞ Program
Parameters. The parameters cannot be changed in
this window.
Program list box
The program list box contains information on the
user program in the controller:
Program instance: Name of the user program.
Program type: In version 2.x identical to program
instance.
Status: Program status, e. g. “started“.
Startup: This column indicates whether automatic
program startup is possible. The attribute “active”
means that the user program can be started with a
system cold start using the CPU operating elements
and without needing a programming device. The
“active” attribute can be set by clicking the “Set
Startup” button. If it is not set, a minus sign “-”
appears in this column. If several executable
programs are loaded in the controller, only one of
them can be set to “active”.
Buttons in the Program Status window
Depending on the CPU status, the position of the
operating mode selector switch and the chosen
program startup behaviour, the following buttons
may be active or inactive (i. e. grey):
Cold Start button: This starts the selected user
program with the initialisation values of the variables
07/99 AWB 2700-1305 GB

(see Startup, above). A cold start is possible with the


operating mode selector switch set to RUN or
RUN_M_RESET. Any process data that remained in
the PLC after the user program was stopped is
discarded.

271
Test and Commissioning

When the program cold start takes place for the first
time, the CPU is requested to start the user program
which is marked as “active”. The status “started” is
then displayed in the program box.
Warm Start button: This resumes the selected user
program at the point where it was stopped. A warm
start is only possible if the operating mode selector
switch is set to RUN and the CPU is in Halt status.
The process data is saved if the program is
interrupted and is still available if the program is
resumed. A warm start is only possible after an
already started program has been stopped, i. e. by
setting the operating mode selector switch to HLT
and pressing the SET button or by clicking the Halt
button. If the program was stopped by switching to
HLT, the operating mode selector switch must be set
to RUN again before it can be warm started.
Halt button: This stops a running user program.
Deactivate button: The selected user program is
deactivated as a CPU process (i. e. the CPU is no
longer required to execute the program) and the
program attribute is set to “-”. However, the user
program remains as a file in the CPU memory. A
deactivated user program can be deleted from the
PLC memory in the Transfer/File Manager window.
The deactivated program can be started again by
clicking on the cold start button with the operating
mode selector switch set to RUN or RUN_M_RESET.
07/99 AWB 2700-1305 GB

272
Program test for PS 416

Diagnostics button
This opens the Program Diagnostics window
showing additional information on the status of the
user program. The detected errors and the number of
errors are highlighted in red. The diagnostics bits can
be reset:

Set startup button


You must first select a program.
If you click on the Set startup button, the status
“active” is displayed in the “Startup” column. The
button then changes to “Delete Startup”. The status
“active” means that the user program can be started
without needing a programming device.
E Select the program name in the program list box
and set the operating mode switch of the CPU to
RUN.
E Click the Cold Start button to start the program
with the initialisation values of the variables. The
07/99 AWB 2700-1305 GB

RUN status will be indicated on the screen and on


the PLC and the Halt button will be activated.

273
Test and Commissioning

E Click the Halt button to stop the program. The


CPU status changes to Ready and the Cold Start
and Warm Start buttons will be activated (the
Warm Start button will only be active if the PLC
operating mode selector switch is in the RUN
position, see below).
E Click OK to close the window.
Starting the program without Sucosoft
You can only start a program without Sucosoft if you
have enabled “startup” for the program with the Set
startup button in the Program Status window.
Depending on the position of the operating mode
switch, the program will then start automatically as a
coldstart or warmstart. More information on the
startup behaviour can be found in “Starting
programs from Sucosoft” on page 246.
If a memory card containing user programs is
inserted in the controller when it is switched on, the
program startup behaviour is determined by the
startup information which is stored on the memory
card. More information can be found in “Defining the
startup behaviour of the memory card” on page 267.
Booting the controller from the memory card
If neither operating system nor program are stored in
the PLC and both of these are stored on the memory
card, first of all the operating system is transferred to
the PLC after switching it on. The program is only
transferred and possibly started depending on the
startup information which is stored on the memory
card. More information can be found in “Defining the
startup behaviour of the memory card” on page 267.
07/99 AWB 2700-1305 GB

274
Checking or modifying the
POU

Checking or modifying The program executing in the controller can be


the POU checked and modified while the program is running,
i. e. online. The POUs can be displayed together with
the changing values of the variables. In addition,
selected variables from several POUs can be
displayed in a variable window.
If the program is to be edited online, the current
project must first be selected in Sucosoft. Also,
the contents of the individual POUs and the
program code must match the program version in
the controller.

E Click the POU Editor Online button in the main


window.
This will open the Program window. The Device
function in the menu bar is replaced by Program:

Connection list
Variable window
07/99 AWB 2700-1305 GB

275
Test and Commissioning

The Resource (PLC) is displayed as the highest level


of the program structure in the left part of the window
and the name of the Program POU is displayed as
the next lower program level in the right part of the
window. You can select the individual program
components from the program structure tree via
menu items in the menu bar. You can also select the
individual branches by clicking them with the mouse.
If a selected program component has further
branches (invoked function blocks and functions),
they are marked with a plus sign next to their name.
E Double click Resource in the left-hand window.
The Program POU appears in the left window.
POUs at a lower level of the program structure
tree appear in the right window.
E Select the POU that you wish to check.
E Click Display/Change POU to open the POU
Online Editor:

07/99 AWB 2700-1305 GB

276
Checking or modifying the
POU

The POU Online Editor is used to modify the program


(Modify option) and the status display of the variables
(Status Display option) in online operation.
In order to work in LD or FBD, choose
Options ➞ Programming Language and select the
programming language required.
E Click the Status Display option. The individual
instructions and the corresponding variable
states are displayed as follows:
With IL, in the left box next to the individual
instructions.
With LD, below the contacts, the output symbols
or the connection lines.
With FBD, below the output symbols and the
connection lines
The variable states are updated on the screen if they
change while the program is executed. The current
values are shown in the format set in the Display
menu, e. g. decimal or binary.
Note that with the PS 4-200 only one screen page
can show a maximum of 255 bytes. If more data can
be shown this is indicated by “???”. In this case,
reduce the size of the window or shift the contents
until the required variables are shown.
E Select the Offline option if you wish to abort the
updating of the variable states. The previously
shown states are “frozen” on the screen. Use this
possibility for troubleshooting.
07/99 AWB 2700-1305 GB

277
Test and Commissioning

The POU editor allows the entry of special


characters (e.g. Ä, ö, ü etc.) in strings.
These characters will appear in the Status Display
as $ sequences because they do not belong to
the character set supported by IEC1131-3.

The program can also be modified with the PLC in


RUN.
The following modifications are possible:
Modifying and adding instructions for existing
variables
Deleting instructions
Modifying and adding comments
Inserting, modifying and deleting jumps and jump
targets (jump labels)
Assigning new jump labels
Modifying the parameters of function blocks
Adding new invocations of existing function
blocks
The following modifications are not possible:
Assigning new variable names
Deleting existing variables from the declaration
blocks
Modifying several POUs simultaneously
Deleting existing POUs
Creating new POUs
In order to work in LD or FBD, choose
Options ➞ Programming Language and select the
programming language required.
07/99 AWB 2700-1305 GB

278
Checking or modifying the
POU

E Click the Modify option at the bottom of the


screen. The status display of the variables
disappears and the cursor appears in the first
program line. Modify the POU in the same way as
in the POU Editor. If the POU has been modified,
the Activate button is available.
Aktivieren
E Click the Activate button to update the
modifications in the POU, the program code and
in the controller.
If the online modification is too big for the program
memory PS 4-200 series controllers, a dialog box will
appear in which you
can confirm whether the existing POUs should be
re-arranged online in the program memory.

E Close the Online Editor.


E Select a new POU from the program structure
tree if you wish to check or modify another POU.
Repeat the other steps.
07/99 AWB 2700-1305 GB

279
Test and Commissioning

It is also possible to display the states of selected


variables in the Variable window whilst the program
is running.
If after the activation of a modification the
message "Online modification could not be
executed" is output, the cause may be that the
program files on the PC and on the PLC are not
identical. In this case transfer the PC program to
the PLC once more..

Status display of selected variables


Precondition: The program is executing in the PLC,
a POU has been selected and the Online Editor
window has been opened.
The states of the variables cannot be displayed in
the Online Editor and in the Variable window at
the same time.

E Click the Offline option.


E Select the variables in the displayed program that
you want to transfer to the Variable window.
E Transfer the selected variables via
Online ➞ Transfer variables.
E Go to the Variable window via Online ➞ Open
Variable Window. The Variable window appears
with the name of the selected POU in the left part
of the window.
E Click the POU name. The selected variables are
displayed in the right part of the window (the
example is for a PS 4 controller):
07/99 AWB 2700-1305 GB

280
Checking or modifying the
POU

E If you wish to transfer variables from other POUs


(function blocks) to the Variable window, return to
the Online Editor via ALT+TAB and exit the editor.
This returns you to the program structure tree in
the Program window where you can select further
POUs as required. Repeat the above steps.
E If you want to change the display format of one or
more variables, first select them in the list and
then choose the required format (binary, decimal,
hexadecimal or BCD) in the Display menu of the
main window of the Test and Commissioning
tool. For each variable shown it is possible to set
a different display format as required.
E Click the Display Status checkbox. The current
states of the listed variables are displayed.
E Return to the Online Editor via ALT+TAB.
E Quit the Online Editor with File ➞ Exit when you
have completed the program test. This returns
you to the main Test and Commissioning
window.
E Click the CPU Status button or choose
Device ➞ CPU Status if you wish to carry out a
PLC test.
07/99 AWB 2700-1305 GB

281
Test and Commissioning

E Click the Topology Configurator button or choose


Device ➞ Topology if you wish to carry out a
wiring test.
E Quit Test and Commissioning via File ➞ Exit if
you do not wish to carry out any further tests.
Status display of complex data types
Values of a complex data type (data fields,
structures) are displayed as a tree in a separate
window (Zoom window) of the status display.
You can display or hide (“open” and “close”) specific
structure elements. Data read by the PLC is
automatically adapted to the complex data on
display at that time. Double-click in the Status
column of the current status display to open and
adapt the window for the first time. The status values
will remain frozen in the Status column as long as the
window is open..

The selected field is displayed with colours


inverted. The Zoom window will only show values
of the field which was last selected. It closes
automatically when the status display is finished,
for example, upon switching after modification or
switching to another POU.

07/99 AWB 2700-1305 GB

282
Checking or modifying the
POU

The following figure shows the Zoom window for a


complex variable.

Variables window
You can transfer field or structure type variables from
the Online Editor into the Variables window. Data
structure content will be displayed in a tree, in the
same way as in a separate window of the status
display. Specific structure elements can be viewed
by “opening” the structure or hidden by “closing” it.
07/99 AWB 2700-1305 GB

283
Test and Commissioning

The following figure shows the Variables window for


a complex variable.

Test and Commissioning saves the entire


content of the Variables window in order that
Variables window content will not be corrupted
during online changes.

Forcing the value of variables in the RUN state,


PS 416 and PS 4-341
With PS 416 and PS 4-300 controllers, you can
assign a defined value to a variable while the
controller is running. First create a variable list as
described earlier.
07/99 AWB 2700-1305 GB

284
Checking or modifying the
POU

If you want to assign a particular value to a variable


while the controller is running, this can be done in the
variable window in two different ways: static forcing
and dynamic forcing.
Take care when you force the values of variables
while the controller is running since you directly
affect the control of the machine and can cause
uncontrolled states.

When you force a variable statically, the respective


variable is assigned the required value at the
beginning of the cycle (for inputs, symbolic variables
and markers) or at the end of the cycle (for outputs)
and the value is forced repeatedly each cycle until
the forcing operation is cancelled again by the user.
When you force the value of a variable dynamically,
the variable is assigned the specified value once and
may become changed again immediately by the user
program. The timepoint of the forcing is the same as
for static forcing, but in this case forcing takes place
once only and not repeatedly.
It is important to note, however, that the user
program running on the controller may modify the
value of the variable during the cycle, i. e.
calculations which are carried out on the forced
variable do not necessarily take place with the
specified forced value.
Variables which are assigned to physical inputs are
forced with the specified value at the beginning of the
next cycle, after the inputs have been read.
07/99 AWB 2700-1305 GB

285
Test and Commissioning

In contrast, variables which are assigned to physical


outputs are forced with the specified value at the end
of the cycle.
E Click the numeric field (left hand column) of all
entries with variables which you want to force.
The chosen entries are shown selected.
E Choose Specify Forced State in the Variables
menu.
x

E Position the cursor in the Status field and enter


the value to be forced.
E Choose the required forcing mode in the “Mode”
panel and confirm your entries with “OK”.
E Repeat these steps for all the variables that you
selected earlier.
E Click the Force button. All selected variables are
forced either statically or dynamically in
07/99 AWB 2700-1305 GB

accordance with your settings.

286
Checking or modifying the
POU

E With statically forced variables, the fields


“Name”, and “State” are shown with a
coloured background and the window’s
status line displays the message “Variable
forced statically”. In the variable list, POUs
with forced variables are also shown with a
red background. This makes it easy to
recognise which variables are forced.

E To cancel the static forcing of particular variables,


select the required lines in the Variables window
and click on the Clear Forcing button.
The Clear All button is used to clear the static forcing
of all variables in the controller.
E Choose Options ➞ Save Settings On Exit to get
the variable list which you last created the next
time you start the Test and Commissioning tool.
Online changes cannot be made while variables
in the controller are being forced.
07/99 AWB 2700-1305 GB

287
Test and Commissioning

Don’t change offline parts of a program in which


variables are forced, since the Variables window
can then no longer be displayed.
In this case, the only way to clear the forcing is to
deactivate the active process in the controller or
to transfer the program to the controller again.

Inputs and markers are forced with the specified


value at the beginning of the cycle. Accordingly,
the value of the variable can become changed by
the user program during the cycle even with
statically forced variables.
Outputs are forced with the specified value at the
end of the cycle.
If you connect to a controller which has forced
variables, you will get the following warning:

Forcing of complex data types


You can transfer field or structure-type variables
from the Online Editor into the Variable window. The
data structure content will be displayed in a tree in
the same way as in a separate window of the status
display. The specific structure elements can be
viewed by “opening” the structure or hidden by
“closing” it. Both static and dynamic forcing of a field
or structure element is possible in the same way as
with basic data types.
07/99 AWB 2700-1305 GB

288
Checking or modifying the
POU in LD and FBD

E Select the corresponding field or structure


element in the Test and Commissioning Variable
window.
E Then click Variables ➞ Enter Forced Status....
You can then select the status and forced value
from the dialog box which appears.

Checking or modifying Precondition:


the POU in LD and FBD The Test and Commissioning tool has been started.
The connection has been established.
The selected POU is shown in the POU Editor Online
and Offline or Status Display is selected:
07/99 AWB 2700-1305 GB

289
Test and Commissioning

LD
E Click Options ➞ Programming Language.
E Select the programming language LD.
The current POU is displayed in LD.
If you click the Status Display option, the current
variable states will be shown underneath the
contacts, output symbols or connection lines:

E Click the Modification option at the bottom of the


screen if you wish to modify the POU. The status
display of the variables disappears. Modify the
POU in the same way as in the POU Editor LD.
The Activate button is available if the POU has
been modified.
07/99 AWB 2700-1305 GB

Activate

290
Checking or modifying the
POU in LD and FBD

E Click the Activate button to update the


modifications in the POU, the program code and
in the controller.

FBD
E Click Options ➞ Programming Language.
E Select the programming language FBD. The
current POU is displayed in FBD. If you click the
Status Display option, the current variable states
will be shown underneath the contacts, output
symbols or connection lines:

E Choose Online ➞ Modify if you wish to modify


the POU. The status display of the variables
disappears. Modify the POU in the same way as
07/99 AWB 2700-1305 GB

in the POU Editor FBD. The Activate button is


available if the POU has been modified.

291
Test and Commissioning

E Click the Activate button to update the


modifications in the POU, the program code and
in the controller.
Activate

PLC test PS 4-200 The Test and Commissioning tool helps you to check
the CPU status. This can be carried out during the
program test or independently of the user program.
E If the PLC is not yet connected, establish the
connection by clicking the Connect button. The
name, connection parameters and the message
“Connected” will appear in the Connection List
window.
E Click the CPU Status button to open the CPU
Status dialog box (the example is for
PS 4-201-MM1):

07/99 AWB 2700-1305 GB

292
PLC test PS 4-200

This window displays information about the CPU as


follows:
CPU Operating status
Information on the current operating status of the
CPU is shown as text and also graphically in the
image of the PLC. The states displayed have the
following meaning:
RUN: The user program is running in the PLC; LED 2
is lit in the PLC image.
READY: The PLC is ready for operation but the user
program is not running. LED 1 is lit in the PLC image.
07/99 AWB 2700-1305 GB

NOT READY: The running program or memory test


has encountered fatal hardware or software errors.
The user program cannot continue; LED 3 is lit in the
PLC image.

293
Test and Commissioning

Battery: The battery on the CPU or the memory card


must be fitted or exchanged. LED 4 is lit in the PLC
image.
Switch position
This shows the position of the operating mode
selector switch on the CPU:
HALT: The operating mode selector switch is set to
HLT.
RUN: The operating mode selector switch is set to
RUN.
RUN MARKER RESET: The operating mode
selector switch is set to RUN_M_RESET.
Date/Time
This shows the date and time of the real-time clock
in the CPU.
System information
This shows the version and the identification code of
the operating system in the CPU.
Memory
This shows the available CPU memory for the user
program and the capacity of the entire CPU memory.
Memory card
This shows information on the CPU‘s memory card if
it is fitted.
Diagnostics status word
Click the Diagnostics button to get information on
the system diagnostics status word:
07/99 AWB 2700-1305 GB

294
PLC test PS 4-200

The system diagnostics status word encodes


14 events that can be diagnosed as errors. Each
diagnostics bit is assigned a counter. In the event of
an error, the diagnostics bit is shown in red and the
value of the associated diagnostics counter is
incremented. Diagnostics bits which are set (red)
can be reset by clicking Reset Diagnostics Bits.
The diagnostics counter is not incremented while the
bit is set. The diagnostics counters can be reset, if
required, by clicking Reset Diagnostics Counter.
Errors that cause the program to stop (CPU status
NOT READY) have the Stop attribute in the Category
column on the right. After rectifying the error, the
diagnostics bit can be acknowledged by clicking
Reset Diagnostics Bits or by pressing the SET button
on the CPU with the operating mode selector switch
set to HLT.
07/99 AWB 2700-1305 GB

295
Test and Commissioning

The user program can be restarted in two ways:


Via the software using the buttons in the Program
Status dialog box, taking into account the
position of the operating mode selector switch
and the assigned startup behaviour of the
program concerned. See “Starting programs
from Sucosoft” on page 246 for more details.
By pressing the SET button on the CPU with the
operating mode selector switch set to RUN or
RUN_M_RESET, taking into account the
assigned startup behaviour of the program
concerned. See “Starting programs from
Sucosoft” on page 246 for more details.
The second type of error are those that cause the
assigned diagnostics bit to be set but do not cause a
Halt or NOT READY status. They are shown with the
Indication attribute in the Category column on the
right. Such errors are not indicated by the LEDs on
the CPU. After rectifying the error, the diagnostics bit
can be acknowledged by clicking Reset Diagnostics
Bits or – depending on the CPU status – by pressing
the SET button on the CPU.
If the CPU is in RUN and the operating mode
selector switch is set to HLT when the SET button
is pressed, the diagnostics bits are not reset but
the program is stopped instead.

Types of errors indicated in the dialog box:


ECT Cycle time exceeds the maximum value
(error category: Stop).
EDC DC voltage failure due to short-circuit or
overload in the basic unit. The outputs are
07/99 AWB 2700-1305 GB

reset by the hardware – error category: Stop


EWD The CPU hardware watchdog signalled CPU
failure (error category: Stop).

296
PLC test PS 4-200

EPM Program memory error. Error found in the


checksum or during plausibility check of
the user program. The program must be
re-loaded (error category: Stop).
EDR Data retention of the operating system
corrupted. Important control data of the
operating system is corrupted or missing
following a change of RAM or with a new
PLC (error category: Stop).
In addition, all memory ranges are cleared and
the CPU is re-initialised.
ERT Run-Time error. Error in the CPU during run
time (error category: Stop).
ENR Restart only possible with retentive marker
reset. This message only occurs if the PLC is
configured for HALT under “Startup behaviour
after NOT READY” in the Code Generation
tool, and an attempt was made to warm start
the CPU after a Stop category error. In this
situation, restart is only possible via retentive
marker reset.
DAC Supply voltage dip. The supply voltage of the
basic unit has failed temporarily (error
category: Indication).
DBM The CPU battery is faulty or empty
If a battery error is detected during a system
cold start, the controller remains in READY
status – the user program is not started.
The error category is Indication in all other
cases.
If a memory card with a valid program cannot
be found during system start, the PLC will stay
in NOT_READY. Also see “Startup behaviour
07/99 AWB 2700-1305 GB

after NOT_READY” on page 260.

297
Test and Commissioning

DMC Backup not present. The backup


automatically saved on the memory card is
faulty or a FLASH EEPROM memory card is
not fitted (error category: Indication).
DLK Error in the local configuration. The PLC
configuration is not correct or a local
expansion module fitted to the basic unit is
faulty (error category: Indication).
DLS Error local status. Short-circuit or overload of
the CPU’s digital outputs (error category:
Indication).
DDK Error remote configuration. The configuration
of one or more network stations is not correct,
i. e. the specified type designation does not
match the actual device present (error
category: Indication).
DDS SBI or network station error. Error detected
via Suconet K. The error can be localised by
checking the diagnostics bytes of the network
stations (error category: Indication)
E Click OK to close the System Diagnostics dialog
box and return to the CPU Status dialog box.
E Click OK to close the CPU Status dialog box and
return to the main Test and Commissioning
window.
E Select another function or leave the Test and
Commissioning tool via File ➞ Exit.
07/99 AWB 2700-1305 GB

298
PLC test PS 4-200

Wiring test and system diagnostics PS 4


The Test and Commissioning tool helps you to check
the connection between the controller and the plant.
You are thus able to check for correct and complete
wiring as well as the correct function of the sensors
and actuators (inputs and outputs).
When the PLC is in RUN status, you can inspect the
system diagnostics data from the PLC itself and from
all network users and devices which are connected
to the PLC through Suconet K.
E If the PLC is not yet connected, establish the
connection by clicking the Connect button. The
Connection List window then shows the message
Connected in addition to the PLC name and
connection parameters.
The wiring test can only be carried out with the
CPU in HALT, i. e. no program running.

E Click the Topology Configurator button to open


the Topology Configurator window in the Test
and Commissioning tool. The menu bar is
adapted for the Topology Configurator:
07/99 AWB 2700-1305 GB

299
Test and Commissioning

The window shows the topology configuration that is


stored in the PLC and has been read out of the PLC
again. The optional user descriptions which can be
stored for each of the devices when creating the
topology configuration are missing, since they are
stored in the topology file but are not transferred with
the program code to the controller. However, the
descriptions can be made visible by creating a link to
the topology file on the PC by clicking on the
“Compare Configuration” button (see below).
07/99 AWB 2700-1305 GB

300
PLC test PS 4-200

Toolbar buttons
All actions required to test and commission a
configuration with the Topology Configurator can be
chosen using the buttons on the toolbar.

Compare Configuration: Opens a standard file


dialog to allow you to choose the topology file to
compare with the topology information stored in the
PLC. If both topologies are identical, optional user
descriptions for the cards and devices are then
displayed on the screen, if available. If the topologies
are not identical, the following message is shown:

Save: Saves the topology configuration which was


read from the controller into a file. The standard
“Save as...” file dialog is shown on the screen.
Print: Opens the standard Sucosoft print dialog.

Compressed Display: Toggles the display of the


topology between graphical and compact views. In
the latter case, the device names are shown
abbreviated and the user descriptions of the devices
are not shown.
07/99 AWB 2700-1305 GB

CPU Status Display: If a CPU is selected in the


Topology Configurator, click this button to display
the current CPU status. The information displayed
includes operating state, memory size, operating
system version, diagnostic bits, etc. The same

301
Test and Commissioning

information is shown when you click the CPU Status


button in the main window of the Test and
Commissioning tool.
Network Diagnostics Display: This switches on or
off monitoring of the network status in the Online
display of the Topology Configurator. In the event of
a network fault, devices with communication
problems are shaded in red, network lines with
communication problems are shown dotted and the
master CPU which controls the line is marked with a
lightning symbol.
Display Diagnostics: The diagnostics status is only
showed if you have enabled network diagnostics in
the Display menu. Diagnostics information is shown
for the currently selected device. The descriptions for
the diagnostics bits are always shown in English.
Display/Force I/O: This is used to display and to
change values for inputs and outputs of up to
10 devices simultaneously.
The Topology Configurator window shows the
topological configuration, i. e. the hardware
configuration which was specified with the Topology
Configurator during project development. You can
inspect the input and output values of various
devices.
E Select the devices whose input and output values
you want to inspect, or to change while the
controller is in the HALT state. Press the Ctrl
button when selecting the devices with the
mouse.
You can select up to 10 devices simultaneously.
07/99 AWB 2700-1305 GB

302
PLC test PS 4-200

E Click the Display/Force I/O button or choose


Components ➞ Display/Force Input/Output in the
menu.
The selected components are then shown in a
window which displays the states of the respective
PLC inputs and allows you to force the PLC outputs
to defined states independently of the user program.
07/99 AWB 2700-1305 GB

303
Test and Commissioning

In the example, the addresses I0.0.0.0.0, I0.0.0.0.3


and I0.0.0.2.2 are set (the latter is an input of the
EM 4-101-DD12 expansion module at the bottom of
the screen). The bits which are set are shown in
black. The hex value resulting from the bit pattern is
shown alongside each digital input or output byte.
The upper part of the window shows the values of the
analog inputs and outputs of the PS 4-201-MM1 in
07/99 AWB 2700-1305 GB

decimal.

304
PLC test PS 4-200

Forcing outputs
Take care when you force the values of outputs
since you directly affect the control of the
machine and can trigger uncontrolled states.
The interlocks in the program have no effect since
the program is not being executed at this stage.

The configured range of the PLC outputs is


displayed. The outputs are initially “0” since the PLC
is now halted.
E Click on the bit which is to be set. It will be
indicated as a “lit” LED and the hexadecimal
value resulting from the bit pattern is shown
alongside the output byte:

In the example, the address Q0.0.0.0.5 is set.


E Click the Activate button to transfer the specified
value to the PLC. The LED with the specified
address will light on the output module and the
corresponding action will be triggered in the
machine.
E Click the Deactivate button to cancel the forcing,
i. e. to cancel the effect of the value on the
machine.
E Click the Delete button to clear the selected bits.
E Continue the wiring test in this way.
E Click Cancel to close the Display/Force I/Os
window and return to the main window of Test
and Commissioning.
07/99 AWB 2700-1305 GB

E Select another action or exit the Test and


Commissioning tool via File ➞ Exit.

305
Test and Commissioning

Wiring test example PS 4


The following example illustrates a wiring test of
analog inputs and outputs. In addition to digital
inputs and outputs, station 0 on line 0 has analog
inputs and outputs.
E In the Topology Configurator window, select the
devices that you want to subject to a wiring test:

E Click the Display/Force I/Os button to open the


corresponding window:
07/99 AWB 2700-1305 GB

306
PLC test PS 4-200

The window shows the input and output areas of the


selected devices together with the current input
values. The outputs have the value 0.
E Select the analog output to be checked and
specify the required value:

E Accept the value entered by clicking with the


mouse in the Display/Force I/Os window.
E Click the Activate button to transfer the specified
value to the PLC.
E Click Deactivate if you wish to cancel the forcing,
i. e. to cancel the effect of the value on the
machine.
All forced values are automatically reset when
leaving the Display/Force I/Os window.
07/99 AWB 2700-1305 GB

307
Test and Commissioning

Online configuration
Compared to offline configuration, online
configuration saves time in the following two cases:
You want to create a topology configuration for
an ASI line which is already configured, or
you want to extend an existing configuration.
The starting-out point in both cases is the so-called
“actual configuration” - the configuration currently
stored in the PLC. This can be a basic configuration
with an expandable PS 4 controller and an AS-
Interface master LE 4-505-BS1 or a functioning
actual configuration which you want to extend.
The basic configuration can be created offline as
described on page 201.
First compile the basic configuration with any
(dummy) PLC program in the Code Generation tool
and transfer it to the PLC. If all required AS-i slaves
are already addressed, you can then use
Configuration mode to load the actual configuration
from the PLC and save it on disk. If you want to add
new AS-i slaves, you can extend the actual
configuration and store the new configuration when
you are finished.
The new stored configuration is then used as the new
permanent configuration in the Code Generation tool
and transferred to the PLC together with the program
after recompiling. The new topology configuration is
transferred from the PLC to the AS-i master
automatically when the PLC is restarted.
The new permanent configuration is needed
by the PLC in RUN mode and for network
07/99 AWB 2700-1305 GB

diagnostics and ensures that all inputs and


outputs of the AS-Interface devices can be
accessed.

308
PLC test PS 4-200

Reading the actual topology configuration


Preconditions: The Test & Commissioning tool is
running and the connection is established to the
PLC. A topology which includes the AS-Interface
master is already stored in the PLC.
The PLC is in HALT mode.
E Click the Topology Configurator button or choose
Device ➞ Topology in the menu to start the
Online Topology Configurator and load the actual
topology configuration from the PLC.
E Select the AS-Interface master module and
switch to Configuration mode by choosing
Component ➞ Actual AS-i Configuration in the
menu.
Sucosoft S 40 switches to AS-i configuration mode
and shows the actual topology configuration in the
online display. The selected AS-i master is shown
with an exclamation mark and the associated AS-i
line is shown dotted in green.
07/99 AWB 2700-1305 GB

309
Test and Commissioning

You cannot display online diagnostics


information in Configuration mode of the AS-i
master.

The AS Interface master reads the actual


configuration cyclically and identifies the AS-i slave
types from the combination of I/O code and ID code.
Since this combination is not unique, all slaves are
shown in Configuration mode as generic symbols
together with the number of inputs and outputs.
If the AS-Interface line contains slaves whose
address was previously configured with a
PG 2-105-AD1 addressing device, they are
shown correctly in the configuration.
Only one non-configured slave with a default
address “0” must be connected, since otherwise
an address conflict will occur.

If communication to one of the slaves is interrupted,


the device is automatically removed from the online
display. Analogously, a pre-addressed slave appears
in the online display shortly after it is connected to
the AS-Interface Line provided that no address
conflicts with other slaves are present.
If a newly connected slave still has the default
standard address “0”, the required address and
other parameters can be configured afterwards
online.
When the actual configuration has been modified as
required, it should be stored on disk as the new
permanent configuration and transferred to the PLC
after recompiling the program with the Code
Generation tool.
07/99 AWB 2700-1305 GB

310
PLC test PS 4-200

Saving the actual configuration as the


permanent configuration
Preconditions: The Test & Commissioning tool is
running and the connection is established to the
PLC. The actual topology configuration with the
configured AS-Interface line is opened in the Online
Topology Configurator window.
E Save the topology configuration by choosing
Configuration ➞ Save As... in the menu.
E Specify a directory within the kompo.sys branch
and specify the required filename for the topology
configuration in the Filename field.
The file is saved with the filename extension “.DCF”
as the new permanent configuration for the current
project.
Editing the actual configuration
Preconditions: The Test & Commissioning tool is
running and the connection is established to the
PS 4 PLC. A topology which includes the AS-
Interface master is already stored in the PLC.
The PLC is in STOP mode.
E Click the Topology Configurator button or choose
Device ➞ Topology in the menu to start the
Online Topology Configurator and load the actual
topology configuration from the PLC.
E Select the AS-Interface master module and
switch to Configuration mode by choosing
Component ➞ Actual AS-i Configuration in the
menu.
Sucosoft S 40 switches to AS-i configuration mode
and shows the actual topology configuration in the
07/99 AWB 2700-1305 GB

online display. The selected AS-i master is shown


with an exclamation mark and the associated AS-i
line is shown dotted in green.

311
Test and Commissioning

All AS-i devices are shown using generic symbols.


E Connect a new slave with the default address “0”
to the AS-Interface line.
E Select the new slave in the graphical display and
choose Component ➞ ASI Slave Status in the
menu.

You are automatically prompted with the next


unused AS-i address in the New pop-up list in the
Station number panel.
E If required, you can choose another address for
the device. The pop-up list only shows AS-i
addresses which are unused
The Configured Values panel shows parameters for
the specified station number from the stored
(permanent) configuration. The Current Values panel
shows the current parameters for the specified
station number which have been read online from the
07/99 AWB 2700-1305 GB

PLC.
E If necessary, change the slave parameters in the
Current values panel. The significance of these
entries is described on page 209.

312
PLC test PS 4-200

E Confirm your entries by clicking Accept. The


dialog box remains visible and shows the
parameters of the selected device.
The slave will now be configured with the parameters
you entered and will be shown at the corresponding
place in the graphical display of the AS Interface line.
E Select the other slaves one after another and set
the parameters using the same procedure. Close
the dialog with Exit when you are finished.
E Save the completed actual configuration as the
new permanent configuration.
The slave parameters you have stored with the new
configuration are only effective after recompiling the
program in the Code Generation tool and transferring
it to the PLC. When the LE4-505-BS1 is powered up,
AS Interface parameters are automatically
transferred from the configuration currently stored in
the PLC.
Using the new permanent configuration
In order to commission the PLC and start the
communication on the ASI Interface line, you must
recompile the program with the new permanent
configuration using the Code Generation tool and
transfer it to the PLC.
ASI parameters can only be changed while the
PLC is in RUN mode by using the “ASI_PARAM”
function block. This function block is described in
the manual AWB 27-1314 GB, which describes
the ASI master LE 4-505-BS1.

Communication in the ASI Interface line starts


when the PLC changes from READY to RUN mode.
07/99 AWB 2700-1305 GB

In RUN mode, the AS-i master LE 4-505-BS1 will


automatically switch to Protected mode automati-
cally if there are no configuration errors.

313
Test and Commissioning

The AS-i master status can be displayed in RUN and


READY modes as follows:
E Select the AS-i master in the Online Topology
Configuration window.
E Choose Component ➞ ASI Master Status in the
menu.
The following dialog then gives information on the
operating mode (protected or configuration mode)
and the setting of the Autoaddressing option.

Network status diagnostics


Click the Network Diagnostics button or choose
Network Diagnostics in the Display menu to show or
hide the display of network diagnostics information.

07/99 AWB 2700-1305 GB

The graphical display of the topology configuration


now includes additional information which allows
you to quickly assess the status of the network
communications.

314
PLC test PS 4-300

In the event of a network fault, devices with


communication problems are shaded in red, network
lines with communication problems are shown
dotted and the master CPU which controls the line is
marked with a lightning symbol.
Select a device and choose Device ➞ Display
Diagnostics to display the diagnostic bits or click the
corresponding button in the toolbar.

PLC test PS 4-300 The Test and Commissioning tool helps you to check
the CPU status. This can be carried out during the
program test or independently of the user program.
E If the PLC is not yet connected, establish the
connection by clicking the Connect button. The
name, connection parameters and the message
“Connected” will appear in the Connection List
window.
E Click the CPU Status button to open the CPU
Status dialog box :
07/99 AWB 2700-1305 GB

315
Test and Commissioning

This window displays information about the CPU as


follows:
CPU operating status
Information on the current operating status of the
CPU is shown as text and also graphically in the
image of the PLC. The states displayed have the
following meaning:
RUN: The user program is running in the PLC. LED 2
is lit in the PLC image.
READY: The PLC is ready for operation but the user
program is not running. LED 1 is lit in the PLC image.
NOT READY: The running program or memory test
has encountered fatal hardware or software errors.
The user program cannot continue; LED 3 is lit in the
PLC image.
The diagnostics status word must be acknowledged
so that the Cold Start and Warm Start buttons are
available.
Battery: The battery on the CPU must be fitted or
exchanged. LED 4 is lit in the PLC image.
Switch position
This shows the position of the operating mode
selector switch on the PLC:
HALT: The operating mode selector switch is set to
HLT.
RUN: The operating mode selector switch is set to
RUN.
RUN MARKER RESET (RUN MERKERRESET):
The operating mode selector switch is set to
RUN_M_RESET.
07/99 AWB 2700-1305 GB

316
PLC test PS 4-300

Date/Time
This shows the date and time of the real-time clock
in the CPU.
System information
This shows the version and the identification code of
the operating system in the CPU.
Memory
This shows the available CPU memory for the user
program and the capacity of the entire CPU memory.
Memory card
This shows information on the CPU memory card if it
is fitted.
Diagnostics status word
Click the Diagnostics button to get information on
the system diagnostics status word:
07/99 AWB 2700-1305 GB

317
Test and Commissioning

The system diagnostics status word encodes


22 events that can be diagnosed as errors. Each
diagnostics bit is assigned a counter. In the event of
an error, the diagnostics bit is shown in red and the
value of the associated diagnostics counter is
incremented. Diagnostics bits which are set (red)
can be reset by clicking Reset Diagnostics Bits.
The diagnostics counter is not incremented while the
bit is set. The diagnostics counters can be reset, if
required, by clicking Reset Diagnostics Counter.
07/99 AWB 2700-1305 GB

318
PLC test PS 4-300

Errors that cause the program to stop (CPU status


NOT READY) have the Stop attribute in the Category
column on the right. After rectifying the error, the
diagnostics bit can be acknowledged by clicking
Reset Diagnostics Bits or by pressing the SET button
on the PLC with the operating mode selector switch
set to HLT.
The user program can be restarted in two ways:
Via the software using the buttons in the Program
Status dialog box, taking into account the
position of the operating mode selector switch
and the assigned startup behaviour of the
program concerned. See “Starting programs
from Sucosoft” on page 246 for more details.
By pressing the SET button on the CPU with the
operating mode selector switch set to RUN or
RUN_M_RESET, taking into account the
assigned startup behaviour of the program
concerned. See “Starting programs from
Sucosoft” on page 246 for more details.
The second type of error are those that cause the
assigned diagnostics bit to be set but do not cause a
Halt or NOT READY status. They are shown with the
Indication attribute in the Category column on the
right. Such errors are not indicated by the LEDs on
the CPU. After rectifying the error, the diagnostics bit
can be acknowledged by clicking Reset Diagnostics
Bits or – depending on the CPU status – by pressing
the RESET button on the CPU.

If the CPU is in RUN and the operating mode


selector switch is set to HLT when the Reset
Diagnostics Bits button is pressed, the
07/99 AWB 2700-1305 GB

diagnostics bits are not reset but the program is


stopped instead.

319
Test and Commissioning

Types of errors indicated in the dialog box:


ECT Cycle time exceeds the set maximum value
(error category: Stop).
EDC DC voltage failure due to short-circuit or
overload in the basic unit. The outputs are reset by
the hardware – error category: Stop
EWD The CPU hardware watchdog reports CPU
failure (error category: Stop).
EPM Error in program memory. Checksum error or
plausibility error in the user program. The program
must be reloaded (error category: Stop).
EDR Data retention of the operating system
destroyed. Important control data of the operating
system is destroyed (error category: Stop).
ERT Run-Time error. Error in the PLC user program
during run time, e. g. index in array access exceeds
array limits (error category: Stop).
ENR Restart only possible with retentive marker
reset. This message only occurs if an attempt to
warm start the PLC was made although the PLC is
configured in the Code Generation tool (Options ➞
Configure PLC ➞ System Builder....) for No Restart
under Warm Start Behaviour. It will also occur if an
attempt was made to warm start the PLC after a Stop
category error.. In this situation, restart is only
possible via retentive marker reset..
EHM RAM memory in the PLC faulty
(error category: Stop).
ECM Checksum error of operating system
(error category: Stop).
07/99 AWB 2700-1305 GB

ECL CPU real-time clock faulty (error category:


Stop).

320
PLC test PS 4-300

ETR Timer failure – the timer on the CPU is faulty


(error category: Stop).
EIL An attempt was made to execute an
impermissible operation of the 80C167
microcontroller (error category: Stop).
EOS Error in current OS40 discovered. Safe
processing cannot be ensured (error category: Stop)
ECA Application destroyed (error category: Stop)
EAH Application has stopped by calling the
PS_Application_Halt function block (error category:
Stop)
DAC Supply voltage dip. The supply voltage of
the basic unit has failed temporarily (error category:
Indication).
DBM The CPU battery is faulty or empty:
Replace the battery.
DMC The memory module is not suitable for a
program backup or for saving files. It occurs if the
ZB 4-128_SF1 or ZB 4-160-SM1 memory modules
are fitted.
DLK Error in the local configuration. The PLC
configuration is not correct or a local expansion
module fitted to the basic unit is faulty (error
category: Indication).
DLS Error local status. Short-circuit or overload of
the CPU’s digital outputs (error category: Indication).
DDK Error remote configuration. The configuration
of one or more network stations is not correct, i. e.
the specified type designation does not match the
07/99 AWB 2700-1305 GB

actual device present (error category: Indication).

321
Test and Commissioning

DDS SBI or network station error. Error detected


via Suconet K. The error can be localised by
checking the diagnostics bytes of the network
stations (error category: Indication)
E Click OK to close the System Diagnostics dialog
box and return to the CPU Status dialog box.
E Click OK to close the CPU Status dialog box and
return to the main Test and Commissioning
window.
E Select another function or leave the Test and
Commissioning tool via File ➞ Exit.

Wiring test and system diagnostics, PS 4-300


The Test and Commissioning tool helps you to check
the connection between the controller and the plant.
You are thus able to check for correct and complete
wiring as well as the correct function of the sensors
and actuators (inputs and outputs).
When the PLC is in RUN status, you can inspect the
system diagnostics data of the PLC itself and of all
network users and devices which are connected to
the PLC through Suconet K.
E If the PLC is not yet connected, establish the
connection by clicking the Connect button.
The Connection List window then shows the
message Connected in addition to the PLC name
and connection parameters.
The wiring test can only be carried out with the
CPU in HALT, i. e. no program running.
07/99 AWB 2700-1305 GB

322
PLC test PS 4-300

E Click the Topology Configurator button to open


the Topology Configurator window in the Test
and Commissioning tool. The menu bar is
adapted for the Topology Configurator:

The window shows the topology configuration that is


stored in the PLC and has been read out of the PLC
again. The optional user descriptions which can be
stored for each of the devices when creating the
topology configuration are missing, since they are
stored in the topology file but are not transferred with
the program code to the controller. However, the
descriptions can be made visible by creating a link to
the topology file on the PC by clicking on the
Compare Configuration button (see below).
07/99 AWB 2700-1305 GB

323
Test and Commissioning

Toolbar buttons
All actions required to test and commission a
configuration with the Topology Configurator can be
chosen using the buttons on the toolbar.

Compare Configuration: Opens a standard file


dialog to allow you to choose the topology file to
compare with the topology information stored in the
PLC. If both topologies are identical, optional user
descriptions for the cards and devices are then
displayed on the screen, if available. If the topologies
are not identical, the following message is shown:

Save: Saves the topology configuration which was


read from the controller into a file. The standard Save
As... file dialog is shown on the screen.
Print: Opens the standard Sucosoft print dialog.

CPU Status Display: If a CPU is selected in the


Topology Configurator, click this button to display
the current CPU status. The information displayed
includes operating state, memory size, operating
system version, diagnostic bits, etc. The same
information is shown when you click the CPU Status
07/99 AWB 2700-1305 GB

button in the main window of the Test and


Commissioning tool.

324
PLC test PS 4-300

Network Diagnostics Display: This switches on or


off monitoring of the network status in the Online
display of the Topology Configurator. In the event of
a network fault, devices with communication
problems are shaded in red, network lines with
communication problems are shown dotted and the
master CPU which controls the line is marked with a
lightning symbol.
Display Diagnostics: The diagnostics status is only
shown if you have enabled network diagnostics in
the Display menu. Diagnostics information is shown
for the currently selected device. The descriptions for
the diagnostics bits are always shown in English.
Display/Force I/O: This is used to display and to
change values for inputs and outputs of up to
10 devices simultaneously.
Compressed Display: Toggles the display of the
topology between graphical and compact views. In
the latter case, the device names are shown
abbreviated and the user descriptions of the devices
are not shown.
The Topology Configurator window shows the
topological configuration, i. e. the hardware
configuration which was specified with the Topology
Configurator during project development. You can
inspect the input and output values of various
devices.
E Select the devices whose input and output values
you want to inspect, or to change while the
controller is in the HALT state. Press the Ctrl
button when selecting the devices with the
mouse.
07/99 AWB 2700-1305 GB

You can select up to 10 devices simultaneously.

325
Test and Commissioning

E Click the Display/Force I/O button or choose


Component ➞ Display/Force Input/Output in the
menu.
The selected components are then shown in a
window which displays the states of the respective
PLC inputs and allows you to force the PLC outputs
to defined states independently of the user program.

07/99 AWB 2700-1305 GB

326
PLC test PS 4-300

In the example, the addresses I0.0.0.0.0, I0.0.0.0.3


and I1.1.0.0.2 are set (the latter is an input of the
EM 4-101-DD1/88 expansion module at the bottom
of the screen). The bits which are set are shown in
07/99 AWB 2700-1305 GB

black. The hex value resulting from the bit pattern is


shown alongside each digital input or output byte.
The analog input and output values are shown in
decimal format.

327
Test and Commissioning

The upper part of the window shows the values of the


analog inputs and outputs of the PS 4-201-MM1 in
decimal.
Forcing outputs
Take care when you force the values of outputs
since you directly affect the control of the
machine and can trigger uncontrolled states.
The interlocks in the program have no effect since
the program is not being executed at this stage.

The configured range of the PLC outputs is


displayed. The outputs are initially “0” since the PLC
is now halted.
E Click on the bit which is to be set. It will be
indicated as a “lit” LED and the hexadecimal
value resulting from the bit pattern is shown
alongside the output byte.

In the example, the address Q0.0.0.0.5 is set.


E Click the Activate button to transfer the specified
value to the PLC. The LED with the specified
address will light on the output module and the
corresponding action will be triggered in the
machine.
E Click the Deactivate button to cancel the forcing,
i. e. to cancel the effect of the value on the
machine.
E Click the Delete button to clear the selected bits.
E Continue the wiring test in this way.
07/99 AWB 2700-1305 GB

E Click Cancel to close the Display/Force I/Os


window and return to the main window of Test
and Commissioning.

328
PLC test PS 4-300

E Select another action or exit the Test and


Commissioning tool via File ➞ Exit.
Wiring test example
The following example illustrates a wiring test of
analog inputs and outputs. In addition to digital
inputs and outputs, station 0 on line 0 has analog
inputs and outputs.
E In the Topology Configurator window, select the
devices that you want to subject to a wiring test:
07/99 AWB 2700-1305 GB

329
Test and Commissioning

E Click the Display/Force I/Os button to open the


corresponding window:

The window shows the input and output areas of the


selected devices together with the current input
values. The outputs have the value 0.
E Select the analog output to be checked and
specify the required value:

E Accept the value entered by clicking with the


mouse in the Display/Force I/Os window.
E Click the Activate button to transfer the specified
value to the PLC.
E Click Deactivate if you wish to cancel the forcing,
i. e. to cancel the effect of the value on the
machine.
07/99 AWB 2700-1305 GB

330
PLC test PS 4-300

All forced values are automatically reset when


leaving the Display/Force I/Os window.

Network status diagnostics


Click the Network Diagnostics button or choose
Network Diagnostics in the Display menu to show or
hide the display of network diagnostics information.
07/99 AWB 2700-1305 GB

331
Test and Commissioning

The graphical display of the topology configuration


now includes additional information which allows
you to quickly assess the status of the network
communications.
In the event of a network fault, devices with
communication problems are shaded in red, network
lines with communication problems are shown
dotted and the master CPU which controls the line is
marked with a lightning symbol.
Select a device and choose Device ➞ Display
Diagnostics to display the diagnostic bits or click the
corresponding button in the toolbar.

PLC test PS 416 The Test and Commissioning tool helps you to check
the CPU status. This can be carried out during the
program test or independently of the user program.
E If the PLC is not yet connected, establish the
connection by clicking the Connect button. The
name, connection parameters and the message
“Connected” will appear in the Connection List
window.
E Click the CPU Status button to open the CPU
Status dialog box (the example is for PS 416):
07/99 AWB 2700-1305 GB

332
PLC test PS 416

This window displays information about the CPU as


follows:
CPU Operating status
Information on the current operating status of the
CPU is shown as text and also graphically in the
image of the PLC. The states displayed have the
following meaning:
RUN: The user program is running in the PLC; the
green LED RUN is lit in the PLC image.
READY: The PLC is ready for operation but the user
program is not running. the green LED READY is lit in
the PLC image.
NOT READY: The running program or memory test
has encountered fatal hardware or software errors.
07/99 AWB 2700-1305 GB

The user program cannot continue; the red LED NOT


READY is lit in the PLC image.

333
Test and Commissioning

BOOT: The operating system is not loaded in the


controller; all the LEDs are blinking on the PLC.
ERROR: An error occurred while the user program
was running, e. g.:
Access to a parallel bus station is not possible
Remote I/O has failed
The specified cycle time of the user program was
exceeded
RUNTIME ERROR.
If a RUNTIME ERROR occurs, the RUN or READY
LEDs and the red ERROR LED are lit. The
corresponding diagnostics bit is set in the program
diagnostics status word. You can change from the
RUNTIME ERROR status to another status of the
controller by confirming the diagnostics status word,
via a system cold start or a cold start of the user
program.
CHANGE: The battery on the CPU or the memory
card must be fitted or exchanged. The red LED
CHANGE is lit in the PLC image.
Switch position
This shows the position of the operating mode
selector switch on the CPU:
HALT: The operating mode selector switch is set to
HLT.
RUN: The operating mode selector switch is set to
RUN.
RUN MARKER RESET: The operating mode
selector switch is set to RUN_M_RESET.
07/99 AWB 2700-1305 GB

Date/Time
This shows the date and time of the real-time clock
in the CPU.

334
PLC test PS 416

System information
This shows the version and the identification code of
the operating system in the CPU.
Memory
This shows the available CPU memory for the user
program and the capacity of the entire CPU memory.
Memory card
This shows information on the CPU‘s memory card if
it is fitted. Click the Information button to get further
information on the memory card.
Diagnostics status word
Click the Diagnostics button to get information on
the system diagnostics status word:

The system diagnostics status word encodes


13 events that can be diagnosed as errors. Each
diagnostics bit is assigned a counter. In the event of
an error, the diagnostics bit is shown in red and the
value of the associated diagnostics counter is
07/99 AWB 2700-1305 GB

incremented. Diagnostics bits which are set (red)


can be reset by clicking Reset Diagnostics Bits.
The diagnostics counter is not incremented if the bit

335
Test and Commissioning

is set. The diagnostics counters can be reset, if


required, by clicking Reset Diagnostics Counter.
Errors that cause the program to stop (CPU status
NOT READY) have the Stop attribute in the Category
column on the right. After rectifying the error, the
diagnostics bit can be acknowledged by clicking
Reset Diagnostics Bits or by pressing the SET button
on the CPU with the operating mode selector switch
set to HLT.
The user program can be restarted in two ways:
Via the software using the buttons in the Program
Status dialog box, taking into account the
position of the operating mode selector switch
and the assigned startup behaviour of the
program concerned. See “Starting programs
from Sucosoft” on page 246 for more details.
By pressing the SET button on the CPU with the
operating mode selector switch set to RUN or
RUN_M_RESET, taking into account the
assigned startup behaviour of the program
concerned. See “Starting programs from
Sucosoft” on page 246 for more details.
The second type of error are those that cause
the assigned diagnostics bit to be set but do not
cause a Halt or NOT READY status. They are
shown with the Indication attribute in the
Category column on the right. Such errors are not
indicated by the LEDs on the CPU. After rectifying
the error, the diagnostics bit can be acknow-
ledged by clicking Reset Diagnostics Bits
or – depending on the CPU status – by pressing
the SET button on the CPU.
07/99 AWB 2700-1305 GB

336
PLC test PS 416

If the CPU is in RUN and the operating mode


selector switch is set to HLT when the SET button
is pressed, the diagnostics bits are not reset but
the program is stopped instead.

Types of errors indicated in the dialog box:


DHM RAM memory error (error category: Stop).
DCM Checksum error of the operating system (error
category: Stop).
DCL CPU real-time clock is faulty (error category:
Stop).
DBM The CPU battery is faulty or empty (error
category: Indication). If a battery error is
detected during a system cold start, the
controller remains in READY status – the user
program is not started.
DBC The battery on the memory card is faulty or
empty (error category: Indication).
If a battery error is detected during a system
cold start, the controller remains in READY
status – the user program is not started.
DAC Supply voltage dip. The supply voltage of the
basic unit has failed temporarily (error
category: Indication).
DDC D.C. voltage failure due to short-circuit or
overload in the basic unit. The outputs are
reset by the hardware (error category: Stop).
DAK Card cannot be found in the slot. No reaction
of a card after addressing or addressing of a
card which is not fitted (error category:
Indication).
DTR Timer failure: The timer on the CPU is faulty
07/99 AWB 2700-1305 GB

(error category: Stop).


DWA The CPU hardware watchdog signalled CPU
failure (error category: Stop).

337
Test and Commissioning

DIL Faulty code (error category: Stop).


DOS Fatal software error (error category: Stop).
ACE Checksum error. This error is indicated if the
code or data is faulty in the user program
before a restart (error category: Stop)
E Click OK to close the System Diagnostics dialog
box and return to the CPU Status dialog box.
E Click OK to close the CPU Status dialog box and
return to the main Test and Commissioning
window.
E Select another function or leave the Test and
Commissioning tool via File ➞ Exit.

Wiring test and system diagnostics PS 416


The Test and Commissioning tool helps you to check
the connection between the controller and the plant.
You are thus able to check for correct and complete
wiring as well as the correct function of the sensors
and actuators (inputs and outputs).
When the PLC is in RUN status, you can inspect the
system diagnostics data of the PLC itself and of all
network users and devices which are connected to
the PLC through Suconet K.
E If the PLC is not yet connected, establish the
connection by clicking the Connect button.
The Connection List window then shows the
message Connected in addition to the PLC name
and connection parameters.
The wiring test can only be carried out with the
CPU in HALT, i. e. no program running.
07/99 AWB 2700-1305 GB

338
PLC test PS 416

E Click the Topology Configurator button to open


the Topology Configurator window in the Test
and Commissioning tool. The menu bar is
adapted for the Topology Configurator:

The window shows the topology configuration that is


stored in the PLC and has been read out of the PLC
again. The optional user descriptions which can be
stored for each of the devices when creating the
topology configuration are missing, since they are
07/99 AWB 2700-1305 GB

stored in the topology file but are not transferred with


the program code to the controller. However, the
descriptions can be made visible by creating a link to
the topology file on the PC by clicking on the
“Compare Configuration” button (see below).

339
Test and Commissioning

The digital input and output cards of the PS 416 are


not addressed through the slot number. Accordingly,
they may have different slot numbers than those
shown in the Topology Configurator, or they may in
fact not be inserted in the controller at all.

Toolbar buttons
All actions required to test and commission a
configuration with the Topology Configurator can be
chosen using the buttons on the toolbar.

Compare Configuration: Opens a standard file


dialog to allow you to choose the topology file to
compare with the topology information stored in the
PLC. If both topologies are identical, optional user
descriptions for the cards and devices are then
displayed on the screen, if available. If the topologies
are not identical, the following message is shown:

Save: Saves the topology configuration which was


read from the controller into a file. The standard
“Save as...” file dialog is shown on the screen.
Print: Opens the standard Sucosoft print dialog.
07/99 AWB 2700-1305 GB

Compressed Display: Toggles the display of the


topology between graphical and compact views. In
the latter case, the device names are shown

340
PLC test PS 416

abbreviated and the user descriptions of the devices


are not show.
CPU Status Display: If a CPU is selected in the
Topology Configurator, click this button to display
the current CPU status. The information displayed
includes operating state, memory size, operating
system version, diagnostic bits, etc. The same
information is shown when you click the CPU Status
button in the main window of the Test and
Commissioning tool.
Network Diagnostics Display: This switches on or
off monitoring of the network status in the Online
display of the Topology Configurator. In the event
of a network fault, devices with communication
problems are shaded, network lines with communi-
cation problems are shown dotted and the master
CPU which controls the line is marked with a
lightning symbol.
Show Diagnostics: The diagnostics status is only
shown if you have enabled network diagnostics in
the Display menu. Diagnostics information is shown
for the currently selected device. The descriptions for
the diagnostics bits are always shown in English.
07/99 AWB 2700-1305 GB

341
Test and Commissioning

Display/Force I/O: This is used to display and to


change values for inputs and outputs of up to
10 devices simultaneously.
The Topology Configurator window shows the
topological configuration, i. e. the hardware
configuration which was specified with the Topology
Configurator during project development. You can
inspect the input and output values of various
devices.
E Select the devices whose input and output values
you want to inspect, or to change while the
controller is in the HALT state. Press the Ctrl key
when selecting the cards with the mouse.
You can select up to 10 cards simultaneously.

07/99 AWB 2700-1305 GB

342
PLC test PS 416

E Click the Display/Force I/O button or choose


Components ➞ Display/Force Input/Output in
the menu.
The selected components are then shown in a
window which displays the states of the respective
PLC inputs and allows you to force the PLC outputs
to defined states independently of the user program.
07/99 AWB 2700-1305 GB

343
Test and Commissioning

In the example, the inputs I0.0.0.0.0, I0.0.0.0.3 and


I0.0.0.2.2 and the outputs Q0.0.0.0.3, Q0.0.01.1 and
Q0.0.0.3.2 are set. The bits which are set are shown
in black. The hex value resulting from the bit pattern
is shown alongside each digital input or output word.
The lower part of the window shows the values of the
analog inputs and outputs of the PS 416-AIO-400 in
decimal.
07/99 AWB 2700-1305 GB

344
PLC test PS 416

Forcing outputs
Take care when you force the values of outputs
since you directly affect the control of the
machine and can trigger uncontrolled states.
The interlocks in the program have no effect since
the program is not being executed at this stage.

The configured range of the PLC outputs is


displayed. The outputs are initially “0” since the PLC
is now halted.
E Click on the bit which is to be set. It will be
indicated as a “lit” LED and the hexadecimal
value resulting from the bit pattern is shown
alongside the output word:

In the example, the address Q0.0.0.2.7 is set.


E Click the Activate button to transfer the specified
value to the PLC. The LED with the specified
address will light on the output module and the
corresponding action will be triggered in the
machine.
The digital input and output cards of the PS 416
are not addressed through the slot number.
Accordingly, they may have different slot
numbers than those shown in the Topology
Configurator, or they may in fact not be inserted
in the controller at all.
07/99 AWB 2700-1305 GB

E Click the Deactivate button to cancel the forcing,


i. e. to cancel the effect of the value on the
machine.

345
Test and Commissioning

E Click the Delete button to delete the selected bit.


E Continue with the wiring test using the same
procedure.
E Click Cancel to close the Display/Force I/Os
window and return to the main window of Test
and Commissioning.
E Select another action or exit the Test and
Commissioning tool via File ➞ Exit.
Wiring test example PS 416
The following example illustrates a wiring test of
analog inputs and outputs. In addition to digital
cards, station (rack) 0 is fitted with an analogue
PS 416-AIO-400 card in slot 10 (line 0).
E In the Topology Configurator window, select the
devices that you want to subject to a wiring test:

07/99 AWB 2700-1305 GB

346
PLC test PS 416

E Click the Display/Force I/Os button to open the


corresponding window:
07/99 AWB 2700-1305 GB

347
Test and Commissioning

The window shows the input and output areas of the


selected devices together with the current input
values. The outputs have the value 0.
E Select the analog output to be tested and specify
the required value:

E Accept the value entered by clicking with the


mouse in the Display/Force I/Os window.
E Click the Activate button to transfer the specified
value to the PLC.
E Click Deactivate if you wish to cancel the forcing,
i. e. to cancel the effect of the value on the
machine.

07/99 AWB 2700-1305 GB

348
PLC test PS 416

Network status diagnostics


Click the Network Diagnostics button or choose
Network Diagnostics in the Display menu to show or
hide the display of network diagnostics information.

The graphical display of the topology configuration


now includes additional information which allows
you to quickly assess the status of the network
communications.
In the event of a network fault, devices with
communication problems are shaded in red, network
lines with communication problems are shown
dotted and the master CPU which controls the line is
07/99 AWB 2700-1305 GB

marked with a lightning symbol.


Select a device and choose Device ➞ Display
Diagnostics to display the diagnostic bits or click
the corresponding button in the toolbar.

349
Test and Commissioning

Network status display In order to check for correct functioning of the


system, the Sucosoft S 40 is able to display network
diagnostics for all Suconet-K and AS-Interface lines.
Preconditions: A PLC program which includes the
configuration of an ASI Interface Master is loaded in
the PLC. The connection has been established to the
PLC.
E To show or hide the display of network
diagnostics information, click the Network
Diagnostics button or choose Display ➞ Network
Diagnostics in the menu.

The graphical display of the topology configuration


now shows additional information which allows you
to quickly assess the status of the network
communications in the Suconet K and AS-Interface
lines.
07/99 AWB 2700-1305 GB

To display diagnostics information for a particular


device, select the device and click the Diagnostics
button or choose Device ➞ Display Diagnostics in
the menu.

350
Network status display

In Protected mode of the AS-i master and in the


event of a network fault, devices with communication
problems are shown shaded in red in the permanent
configuration, network lines with communication
problems are shown dotted in red and the master
CPU which controls the line is marked with a
lightning symbol.
You cannot display online AS-i diagnostics
information in Configuration mode of the AS-i
master.
07/99 AWB 2700-1305 GB

351
Test and Commissioning

With the PLC in RUN mode, the PLC program can


access all devices which are correctly specified in
the permanent configuration as long as no device
faults are present.
In RUN mode, the Online Topology Configuration
window of the Test & Commissioning tool shows the
permanent configuration.

If more AS-i slaves are connected to the AS-i line


than are specified in the permanent configura-
tion, the additional slaves are not shown in the
online topology.
In this case, data communication is still possible
to the devices which are correctly specified in the
permanent configurationpermanent configura-
tion. However, the ASI master LE 4-505-BS1 will
report a configuration error.
07/99 AWB 2700-1305 GB

352
Network status display

If the program is started by changing the PLC mode


from STOP to RUN using the Test & Commissioning
Tool, the AS-i master will only switch to protected
mode automatically if no AS-i devices with the
default address “0” are attached the line.
If a device is present with a default address “0”, the
PLC must be stopped and the slave disconnected.
Alternatively, the correct AS-i address for the slave
must be assigned in the current configuration in the
Test & Commissioning tool by choosing Device ➞
AS-i Slave Status in the menu.

In contrast to the PLC mode change from STOP


to RUN, the AS-i master will switch to protected
mode if the system is switched off and on again
even if a slave is present with a default address
of “0”.
07/99 AWB 2700-1305 GB

353
354
07/99 AWB 2700-1305 GB
Appendix

Modem operation Modem requirements


The modem should be suitable for asynchronous
data communications, compatible with Hayes AT
commands and be approved for connection to the
public telephone network in your country or region.
The modem should have a non-volatile memory for
modem settings.
Parameter settings:
8 bits, no parity, 1 stop bit (8N1)

Frequently asked questions and problems


relating to modems
Dialling does not work and the modem does not
accept any more AT commands.
Make sure that:
The modem is switched on.
The modem is connected to a serial interface on
your PC with a suitable cable.
The modem is connected to the telephone
socket.
Make sure that the serial interface (COM port)
configured in Sucosoft is the same interface to which
the modem is connected.
Make sure that the interface baud rate configured in
Sucosoft is suitable for your modem (modem
07/99 AWB 2700-1305 GB

automatic baud rate detection).


Make sure that no other program, e. g. FAX software,
is using the same PC interface.

355
Appendix

Check that the cable between the modem and the


PC is not faulty and/or the cable pin assignments are
correct or suitable. It may be possible to check this
with another terminal program.
Dialling is interrupted before dialling is finished
Make sure that “Timeout in s” (the max. time for
establishing the connection) is long enough. It is
configured in Sucosoft under Interface Parameters.
If the modem is connected to a private telephone
exchange, check whether the telephone extension is
authorized to make the required connection (e. g.
authorized for international or long distance calls).
Make sure that you have entered the modem
telephone number in the correct format: “<country
code> (<area code>) telephone number“. The
telephone number you specify can contain hyphens,
spaces and periods. It may also contain commas and
the “W” character (see modem manual) and a prefix
required to get an outside line.
The modem does not recognize the dial tone
After each dialling attempt, the modem returns the
message “NO DIALTONE”: In this case, your modem
is probably connected to a private telephone
exchange (PBX). Most PBX’s require a prefix digit
(e. g. “0”) to get an outside line. In this case, your
dialling sequence should be ATDT0<number> for
tone dialling or ATDP0<number> for pulse dialling.
Many PBX’s do not provide a standard dial tone. In
this case, use the X3 parameter to cause the modem
to ignore the dial tone, e. g. ATX3DT0<number> or
ATX3DP0<number>.
07/99 AWB 2700-1305 GB

The modem may need to wait for the dial tone of the
outside line before dialling. In this case, include the
W parameter (wait) in the dialling string.
Example: ATDT0W <number>

356
Modem operation

After each dialling attempt, the modem returns


the message “DELAYED CALL” or “DIAL
LOCKED”.
In some countries and depending on the modem
settings, in order to protect the telephone network
from overloading, the modem blocks redial attempts
for a specified period (typically between 30 and
60 seconds) following each unsuccessful dialling
attempt (e. g. if the party you are dialling is currently
busy). The modem does not accept any redial
attempts for this period. Furthermore, depending on
the country and modem settings, the modem may
block redial attempts for two to six hours following
12 unsuccessful attempts to dial. The modem will not
dial at all for this period.
International telephone calls are disabled
If the modem is connected to a PBX, make sure that
the telephone extension is authorized to make
international or long distance telephone calls.
The modem is connected to a telephone
extension and returns “busy” although the
extension is not busy and the party you are
dialling is not engaged
In some cases, the modem incorrectly interprets
the internal dial tone of the PBX as an engaged tone.
In this case, disable busy tone detection for your
modem with the command ATX0.
The connection to the other modem does not
function at all or does not function correctly
Make sure that the settings for data bits, parity,
stop bits and baud rate are the same as those of the
remote modem.
07/99 AWB 2700-1305 GB

357
Appendix

Overview of the most important Hayes


compatible AT commands

A Answer incoming call


Example “enable auto-answer”: ATA

D Dial the number that follows


Example “dial KM mailbox”: ATDT 0W0228 6021414

E Enable/Disable command echo to host (PC or PLC)


Example “no command echo”: ATE0

H Hook control
Example “hang up existing connection”: ATH0

L Speaker volume
Example “low speaker volume”: ATL0

M Control modem loudspeaker


Example “modem loudspeaker on until carrier
detect“: ATM1

P Use pulse dialling


Example “dial KM mailbox”: ATDP 0W0228 6021414

S Set and/or read internal modem registers


07/99 AWB 2700-1305 GB

Example “Read contents of register 10”: ATS10

358
Modem operation

T Use tone dialling


Example “dial KM mailbox”: ATDT 0W0228 6021414

X Modem dialling procedure


Example “ignore busy signal”: ATX0

Z Reset modem and load stored configuration


Example “Reset and load parameter set 1”: ATZ1

V.24 interface and modem cable


The following table shows the pin assignments of the
V.24 (RS 232 serial) interface for 9-pin and 25-pin
connectors.

SLQ SLQ $EEUH &&,77 )XQFWLRQ


YLDWLRQ ,787 GLUHFWLRQ
U* 1 GND 101 Protective Ground
5 7 SGND 102 Signal Ground
3 2 TxD 103 Transmit Data
PC/PLC –> Modem
2 3 RxD 104 Receive Data
PC/PLC <– Modem
6 6 DSR 107 Data Set Ready
PC/PLC <– Modem
8 5 CTS 106 Clear To Send
PC/PLC <– Modem
9 22 RI 125 Ring Indicator
PC/PLC <– Modem
1 8 DCD 109 Data Carrier Detect
PC/PLC <– Modem
07/99 AWB 2700-1305 GB

4 20 DTR 108 Data Terminal Ready


PC/PLC –> Modem
7 4 RTS 105 Request to Send
PC/PLC –> Modem
U* = Connector body/screen

359
Appendix

Connecting the PLC to the PLC modem

PS 4-series PS_416-series PLC modem


8-pin 9-pin 25-pin9-pin
connector connector connectorconnector

2 2 <---------- RxD ------------3<----------2


5 3 ------------ TxD ----------->2---------->3
3 5 ------------ SGND ------------7------------5

576 _!_!
&76 _ _ 

DTR |----->20 |-----> 4


DSR |<-----6 |<----- 6
DCD |<-----8 |<----- 1

Please note the following when using the cable


ZB 4-303-KB1 for the PS 4 series and/or the cable
PS 416-ZBK-210 for the PS 416 series:
Use a 9-pin 1:1 adapter between PRG socket and
the cable.
The RxD and TxD lines must be crossed over in
this adapter or in a further adapter (null modem
adapter).
In addition, with cable PS 416-ZBK-210, you
must also interconnect (bridge) the lines RTS/
CTS and the lines DTR, DSR and DCD.
For the PS 416 series controllers, you can
generally use the cable supplied with the modem
together with an adapter. Since standard modem
cables do not interconnect the lines RTS/CTS
and DTR, DSR and DCD, it is essential to issue
the modem AT command settings in the table on
page 232, which disable modem flow control.
07/99 AWB 2700-1305 GB

360
Use of several
PS 416 CPUs in
the same rack

Use of several The installation of several PS 416 CPUs in the same


PS 416 CPUs in rack can provide a platform for more complex
the same rack technological applications. For example, one CPU
can be used for overall process control, whereas a
further CPU can carry out complex control or
positioning tasks in parallel. This can lead to a faster
and more efficient processing of the overall process.
Data exchange between the CPU card uses the
function block “CPUDataExchange”.

Configuring the PS 416 system


The main CPU, which will be called “master CPU” in
the following, must be installed in the slot pair 2/3.
Additional CPUs, called “slave CPUs” in the
following, are installed in the slot pairs 4/5, 6/7, 8/9,
etc. The master CPU must be installed in slot pair
2/3 and subsequent slave CPU cards must be
installed in consecutive slot pairs as described.
Before commissioning the equipment, calculate the
total current consumption of all cards installed in the
PS 416 rack and ensure that the power supply rating
is not exceeded. Information on the current
consumption for each of the cards is contained in the
corresponding manual.
07/99 AWB 2700-1305 GB

361
Appendix

Assigning local inputs and outputs


Cards which process wordwise, e. g. analog input/
output cards, counter cards, and network cards, can
only be accessed and controlled by the master CPU.
In contrast, the local digital inputs and outputs can
be optionally accessed either by the master or from
the slave CPU in slot pair 4/5.
The topology configuration which is created with
Sucosoft S 40 for each CPU specifies which CPU
has access to the local digital inputs and outputs.
The following configuration example is admissible if
the master CPU should have access to the local
digital inputs and outputs:

Configuration of master CPU Configuration of slave CPU Configuration of slave CPU


in slot pair 2/3 in slot pair 4/5 in slot pair 6/7

Line Rack Slot Type Line Rack Slot Type Line Rack Slot Type

0 0 0 PS 416 INP 0 0 4 PS 416 0 0 6 PS 416


OUT CPU-400 CPU-400

0 0 2 PS 416
CPU

0 0 4 PS 416
CPU

0 0 6 PS 416
CPU

0 0 12 PS 416
COM-200*)

0 0 16 PS 416
NET-220*)

*) Example of cards which process wordwise


07/99 AWB 2700-1305 GB

362
Use of several
PS 416 CPUs in
the same rack

The following example configuration is admissible if


the slave CPU should have access to the local digital
inputs and outputs:

Configuration of master CPU Configuration of slave CPU Configuration of slave CPU


in slot pair 2/3 in slot pair 4/5 in slot pair 6/7

Line Rack Slot Type Line Rack Slot Type Line Rack Slot Type

0 0 2 PS 416 0 0 0 PS 416 INP 0 0 6 PS 416


CPU OUT CPU-400

0 0 4 PS 416 0 0 4 PS 416
CPU CPU-400

0 0 6 PS 416
CPU

0 0 12 PS 416
COM-200*)

0 0 16 PS 416
NET-220*)

*) Example of cards which process wordwise

All other system configurations, in particular the


configuration of cards which process wordwise in
the topology configuration of a slave CPU or the
simultaneous assignment of digital inputs/
outputs to master and slave CPUs, are inadmis-
sible and can lead to undefined system states
which can only be cleared by removing the
battery and switching off the controller.
03/99 AWB 2700-1305 D

363
Appendix

Accessing remote outputs and inputs via


Suconet K
Both the master CPU and slave CPUs can be
connected to a Suconet K line through the on-board
SPI interface and thus have access to remote inputs
and outputs independently of each other.

Programming the master and slave CPUs


The master and slave CPUs are programmed
separately. Their programs execute completely
independently and asynchronously. A change of
state of a master or slave CPU to “READY” has no
effect on the other CPUs.
Data is exchanged between master and slave
CPUs via a special memory chip using the
“CPUDataExchange” function block. When
exchanging data, one CPU writes a defined data area
and the other CPU reads the same area. One of the
partners exchanging data must always be a master
CPU. It is not possible to exchange data directly from
slave CPU to slave CPU.
Data exchange is not synchronized. Accordingly,
when developing the program, it is necessary to
provide a suitable handshake method to synchronize
the exchange of data.
An example of the use of the “CPUDataExchange”
function block can be found in the description of this
function block in the manual AWB-27-1306-GB
“Sucosoft S 40, Language Elements”.
07/99 AWB 2700-1305 GB

364
Glossary

Glossary

Array Variable consisting of several data elements of the


same data type. This is a derived data type that is
declared with the ➞ Keyword ARRAY.

ARRAY ➞ Keyword for declaring an array from elements of


the same data type.

AT ➞ Keyword for declaring ➞ Directly represented


variables (e. g. Start AT%I0.0.0.1.2:=BOOL;).

CONSTANT ➞ Keyword for declaring a data element with


contents that cannot be changed. Can be used in
conjunction with local and global variables.
(e. g.: VAR_GLOBAL CONSTANT).

Constant A fixed value that is directly set and processed as


such during the entire execution of the program
without being assigned an identifier (e. g.: LD 100).

Current result (CR) Result of an operation. Corresponds to the


content of the working register.

Default value Value that is automatically assigned to a variable


when it is declared and when no other specific initial
value has been defined.
07/99 AWB 2700-1305 GB

365
Appendix

Derived data types Manufacturer and user defined data types that are
derived from ➞ Elementary data types and can be
listed under a new name. They are declared within
➞ Keywords TYPE... END_TYPE
(e. g. structures, arrays).

Directly represented Variable for representing the physical PLC address.


variable Identified in the declaration with the ➞ Keyword AT
(e. g.: Start AT %I0.0.0.1.2:=BOOL;).

Elementary data types Predefined data types that are identified by


➞ Keywords (e. g.: INT, BOOL, DWORD).

Function Program organisation unit that can be used for


recurring control task elements. A function can
process several input parameters. It only supplies
one return value as a result. A function cannot save
values internally from one invocation to the next
since it must always supply the same return value
from the same input parameters.

Function block Program organisation unit that can be used for


recurring control task elements. A function block can
process several input parameters and supply several
output values. The processed values are saved by
the function block.

Global variable A variable that is declared in the ➞ POU Program as


a VAR_GLOBAL and is available for all function
07/99 AWB 2700-1305 GB

blocks that are invoked in this POU. It must be


declared as a VAR_EXTERNAL in the function blocks
that use it.

366
Glossary

Identifier E. g. name of a variable and ➞ Keywords.

Input variable Variable that is only read in a ➞ POU but which


cannot be changed. It can be used for the parameter
setting of a function or function block. It is declared
within the ➞ Keywords VAR_INPUT...END_VAR.

InOut variable Variable that can be read and processed in a function


block and then output under the same name. The
change of an InOut variable value within a function
block also effects the variable of the invoking POU,
that was given as parameters to the InOut variables
in the individual function blocks ➞ Keywords
VAR_IN_OUT ... END_VAR.

Initialisation value A value that the controller uses at the start of a


program. Variables can be initialised in the
declaration section of a program
(e. g.: Value:INT:=100;).

Instance The application of a function block within a program


or a function block. A data range for processing the
function block is automatically reserved when the
function block is instantiated.

Keyword Unambiguous character combinations (e. g. LD, CA,


VAR_GLOBAL, ...) that have a special meaning in the
programming language and which can only be used
for this purpose. Keywords are terms used for
07/99 AWB 2700-1305 GB

identifying commands, data and variable types and


POU types.

367
Appendix

Local variable A variable that is only valid within the ➞ POU in which
it is declared within the ➞ Keywords VAR...
END_VAR.

Modem A composite word made up of MOdulator and


DEModulator. A modem modulates the digital
signals from a computer to analog signals which are
suitable for transmission through the public
telephone network and demodulates these signals
again after data transmission back into digital
signals. So-called ISDN terminal adapters are used
for data exchange through the digital ISDN telephone
network instead of analog modems.

Output variable Variable that is declared in the function block within


the ➞ Keywords VAR_OUTPUT ... END_VAR.
The output variable represents a return value
provided by the function block. The value can then
be processed by other POUs.

POU ➞ Program organisation unit

Program A high structuring level containing instructions,


functions and function blocks. The inputs and
outputs of the PLC can only be addressed within a
program.

Program organisation (POU) A self-contained program unit for structuring


unit the user program. Three POU types are available:
07/99 AWB 2700-1305 GB

➞ Program, ➞ Function and ➞ Function block.


A POU consists of a declaration and an instruction
section.

368
Glossary

RETAIN ➞ Keyword for declaring a ➞ Retentive variable.

Retentive variable Local or global variables that retain their value in the
event of a power loss. They are declared by
assigning the ➞ Keyword RETAIN to the ➞ Keyword
VAR or VAR_GLOBAL (e. g. VAR_GLOBAL RETAIN).

TYPE ➞ Keyword for declaring ➞ Derived data types.

VAR ➞ Keyword for declaring ➞ Local variables.

VAR_EXTERNAL ➞ Keyword for declaring external variables. They are


used for accessing ➞ Global variables within a
function block.

VAR_GLOBAL ➞ Keyword for declaring ➞ Global variables.

VAR_INPUT ➞ Keyword for declaring ➞ Input variables.

VAR_IN_OUT ➞ Keyword for declaring ➞ InOut variables.

VAR_OUTPUT ➞ Keyword for declaring ➞ Output variables.

Variable A data element of a particular data type for which the


appropriate memory location is reserved. A variable
07/99 AWB 2700-1305 GB

is addressed under its name (identifier). It is declared


and, if necessary, initialised in the declaration section
of a POU.

369
Appendix

Variable declaration The individual variables are assigned data types in


the variable declaration. If the variables are not
assigned an initial value, the ➞ Default value is
accepted. The variable declaration is made in the
declaration section of a POU.

Variable initialisation Assignment of a default value to a variable in the


declaration section.

Working register Register in the CPU of a PLC. It stores the results of


arithmetic, logic and I/O operations. the working
register takes on the data type of the entered data
element.

07/99 AWB 2700-1305 GB

370
Abbreviations

Abbreviations The following abbreviations are used in this manual:


FB Function block
FU Function
POU Program organisation unit
PRG Programming device
CR Current result
07/99 AWB 2700-1305 GB

371
372
07/99 AWB 2700-1305 GB
Index

A F
Actual configuration 308 Fieldbus
read 309 ASI 201
ASI see AS-Interface Form Editor
AS-i-master 204 Checking the layout in
AS-Interface page view 215
Diagnostic 350 Creating forms 212
offline configuraton 201 Editing elements 215
online configuraton 308 Overview 211
overview 201 Page View 215
Autoadressing 204
G
C Generic components 205
Checking the topology
299, 322, 338 I
Code generation 39 ID Code 206
Configuration Inputs/outputs
read 309 Function test 299, 322,
Configuration mode 309, 338
311
CPU L
Status information LD/FBD POU Editor
293, 316, 333 POU online
CPU operating mode modifications 290,
selector switch 294, 291
316, 334 Testing the POU online
289
D LE 4-505--BS1 204
Diagnostics status word Load operating system
295, 318, 334, 335 252, 263
Display CPU status 247,
257, 270 M
Markers 43, 44, 48
E Master 204
07/99 AWB 2700-1305 GB

Enable autoadressing 204


Error diagnostics 319, 336 O
Error overview 320 Offline configuration 201
Online configuration 308
Online test 275

373
Index

P Suconet K network 237


Password 40
PLC connection T
Checking 299, 322, 338 Test and commissioning
Establishing connection 217
243, 251, 261 Buttons 249, 259, 271
PLC test 292, 315, 332 Comparing the program
POU 245
Modifying online 289 Connection list 221
POU Editor LD/FBD Establishing the
Input connection 243, 251,
Deleting 133 261
Parameter passing 114, Flow diagrams 218
139 Overview 218
POU online test 275 PLC test 292, 315, 332
Program Starting programs 246,
Cycle time 42 256, 269
Protecting 40, 252, 262 Wiring test 299, 322,
Starting 246, 250, 256, 338
260, 269 Topology Configurator
Transfer from memory Buttons 176
card 251, 261 Changing parameters
Version number 41, 47, 198, 208
53 Configuration
Program code generation Changing 198
Changing options 39 Devices
Program configuration Adding 198, 200, 204
Changing 39 Deleting 199, 200, 207
Program diagnostics status Overview 173
word 334 Wiring test 299, 322,
Properties panel (AS-i 338
device parameters) 209 Topology expansion
Local 198
R Remote 177, 200, 204
Recipe range 43, 49 Transfer
Required configuration 203 Program in controller
254, 265
S Program to PLC 244,
07/99 AWB 2700-1305 GB

Startup behaviour after 253, 263


NOT READY 260

374
Index

V W
Variables Wiring test 299, 322, 338
Status display 277, 290, Example 306, 329, 346
291
07/99 AWB 2700-1305 GB

375