Sunteți pe pagina 1din 456

User Interface Sucosoft S40 Programming Software

07/01 AWB2700-1305-GB
1st edition 12/97 2nd edition 06/98 3rd edition 06/98 4th edition 07/99 5th edition 05/00 6th edition 07/01 See list of revisions on inside rear cover Moeller GmbH, Bonn Author: Arno Dielmann Editor: Thomas Kracht Translator: Terence Osborn

All brand and product names are trademarks or registered trademarks of the owner concerned. All rights reserved, including those of the translation. No part of this manual may be reproduced in any form (printed, photocopy, microfilm or any otherprocess) or processed, duplicated or distributed by means of electronic systems without written permission of Moeller GmbH, Bonn. Subject to alterations without notice.

Contents

Introduction 1 NAVIGATOR Getting to know the NAVIGATOR Introduction The NAVIGATOR user interface Incorporating other applications in the NAVIGATOR Importing additional libraries Changing dialog language Font and colour setting NAVIGATOR settings POU Editor settings Project management Introduction Source file and device view Options Creating a new project Opening existing projects Deleting a project Copying projects Renaming projects Saving projects Restoring projects Exporting/importing sources Registering sources Printer Setting Printing POU information Program code generation Introduction Selecting PLC type Creating a new make file Setting program parameters Selecting make files Generating program code Aborting program code generation

7 9 9 9 9 13 16 17 17 18 18 19 19 19 22 23 27 28 29 31 31 33 36 39 39 40 41 42 42 43 44 46 61 62 64 1

07/01 AWB2700-1305-GB

Contents Creating a cross-reference file 64 Program properties 65 Using libraries 67 Introduction 67 Library view 68 Importing or deleting libraries 69 Creating a library 71 Using a library 71 Activating and deactivating library modules 72 Editing of library modules at a later time 72 Saving libraries 73 Restoring a library 73 Information on libraries 74 Library properties 75 Importing S30 programs 76 Structure of the S30 program source 76 Type of conversion 77 Conversion procedure 78 Program adaptions during conversion 79 S30-S316: conversion restrictions 80 S30-S3: conversion restrictions 84 S30-S4: conversion restrictions 84 2 POU Editor Overview Program type POU Function block POU Function type POU Structure of a POU Primary functions of the POU Editor: Declaration of variables Starting the POU Editor User interface of the POU Editor Declaration section Instruction section Menu bar Standard toolbar Language elements toolbar Output window Variables declaration 85 85 86 86 86 87 88 88 89 90 91 92 98 99 100 102

07/01 AWB2700-1305-GB

Contents Scopes for variables 103 Declaring variables 106 Programming in IL 121 Overview 121 Creating a POU in IL 121 Programming in ST 127 Overview 127 Creating a new POU in ST 128 Programming in LD 132 Overview 132 Creating a new POU in LD 135 Editing POUs in LD 138 Programming in FBD 149 Overview 149 Creating a new POU in FBD 153 Editing POUs in FBD 158 Changing programming language 175 Conditional function block call 176 Intermediate storage within an IL sequence 178 Line-oriented comments 180 POU Info 182 Converting POU types 183 Opening/editing global types 185 Cross-reference file 186 3 Topology Configurator (Offline) Basic principles Structure Offline mode Plausibility checks Starting the Topology Configurator Network types Operations Toolbar functions Changing a topology configuration Topology configuration with Suconet K Topology configuration Device configuration Addressing the slaves 187 187 187 187 188 189 190 193 193 203 206 206 206 210

07/01 AWB2700-1305-GB

Contents Master - slave operation with Remote control 211 Special note with PS4-101-DD1 and PS4-111-DR1 213 Special note with PS4-300 214 Special note with PS416 217 Topology configuration with AS-Interface 219 Topology configuration with PROFIBUS-DP 220 Deviations between current and saved DP configuration 221 Accessing the I/O of a PROFIBUS-DP slave 221 Syntax check of access addresses for PROFIBUS-DP slaves 221 Maximum number of modules per slave 222 Behaviour of the DDK or KOM diagnostics bits 222 Changing the DP configuration with CFG-DP 223 Startup of a PROFIBUS-DP line of the PS416 modular PLC 223 Configuration examples 224 Example with a local configuration (PS4-200) 224 Example with PS4-300 228 Example with PS416 244 Example with AS-Interfacenetwork (PS4-200 256 Example with PROFIBUS-DP network (PS416-CPU-300) 262 Complex configuration example (PS416-CPU-400) 268 Example with multi-processing operation 271

07/01 AWB2700-1305-GB

Contents 4 Form Editor Overview User interface Toolbar Menu bar Functions of the Form Editor Designing a new print form Editing an existing standard print form Using a new print form for a project printout 5 Test & Commissioning Overview User interface Menu bar Toolbar Commissioning Overview of programming connections Point-to-point programming connection (directly to the PLC) Multidrop programming connections Programming connection via modem Programming via Suconet K Connecting and disconnecting a PLC Wiring test Transferring the operating system Transferring the program Starting programs System diagnostics CPU status CPU diagnostics Program status Network diagnostics Program test Overview Switching the POU Editor to online mode Test POU Modifying POUs online Quitting the online POU Editor Configuring the AS-Interfacenetwork online 281 281 281 282 283 284 285 291 293 295 295 297 299 303 311 313 313 315 316 334 341 343 349 352 357 361 361 366 374 379 384 384 385 387 396 403 403 5

07/01 AWB2700-1305-GB

Contents Appendix 417 Modem operation 417 Modem requirements 417 Frequently asked questions and problems relating to modems 417 Overview of the most important Hayes compatible AT commands 420 V.24 interface cable for modem operation 421 Connecting the PLC with the PLC modem 422 Configuration example using ke modems LOGEM 928 and LOGEM LGH 28.8D1 423 Configuration example using the Westermo modem TD-32 424 Initialise via remove configuration using a Logem 928 ke modem 426 Using several PS416-CPUs 427 Configuring a PS416 system 427 Assigning local inputs and outputs 428 Addressing remote I/O via Suconet K 430 Programming master and slave CPU 430 Glossary 431 Shortcuts 437 Index 439

07/01 AWB2700-1305-GB

Introduction

The two reference manuals Sucosoft S40 User Interface and Sucosoft S40 Language Elements are part of the Sucosoft S40 programming software. The Sucosoft S40 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 S40, Language Elements contains definitions, Sucosoft language elements and programming features for all PLC types which can be programmed with Sucosoft S40. Sucosoft provides specific test and commissioning tools for every Sucosoft device type. These tools vary depending on application in either PS4 or PS416 controllers. The differences are indicated by means of headings or footnotes in the reference manual. PS4-200 refers to PS4-201-MM1, PS4-271-MM1, PS4-151-MM1, and PS4-141-MM1 controllers. PS4-300 stands for the PS4-341-MM1 controller. PS416 includes all types of CPUs, i.e. CPU-200, CPU-300 and CPU-400. The user interface is a standard Windows interface.

07/01 AWB2700-1305-GB

07/01 AWB2700-1305-GB

NAVIGATOR

Getting to know the NAVIGATOR

Introduction The NAVIGATOR will assist you with all tasks involving the organisation of Sucosoft S40 software and the generation of projects. It provides support for all necessary organisational tasks, consistently manages project-related information and enables you to create executable, PLC-specific program code. The NAVIGATOR furthermore allows you the ability to import function blocks and functions in the form of PLC-specific libraries. This supports standardisation 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. The title bar displays the project name, and the status bar includes the name of 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/01 AWB2700-1305-GB

NAVIGATOR

Figure 1: The NAVIGATOR User Interface

The upper left window (browser window) contains the tree structure window, displaying the respective folders. The bottom of this window is made up of the four file card tabs: Sources, Devices, Libraries and Options. The right-hand window shows the view of the file structure. Underneath these windows is the Output window in which status and error messages are shown that may, for example, be output during program code generation. The division of these windows is fixed. Only the horizontal and vertical size of the windows can be altered by dragging the window margins with the mouse.
07/01 AWB2700-1305-GB

10

Getting to know the NAVIGATOR Menu bar The following menus are provided in addition to the standard Edit, View, Window and Help menus: Project for editing new or existing S40 projects. File for editing objects selected in the browser and file window, Generate for creating executable program codes. Tools for implementing Sucosoft Tools or integrated Windows applications, and Options for importing and deleting additional libraries, for incorporating Windows applications and for setting up the NAVIGATOR environment to your particular requirements. Toolbar As well as function buttons for project management and program code generation tasks, the toolbars also provide list functions for selecting make files and PLC types.

Figure 2: Toolbar buttons for project management

Figure 3: Functions in the program code generation toolbar

07/01 AWB2700-1305-GB

11

NAVIGATOR Sucosoft toolbar The Sucosoft toolbar initially contains the four Sucosoft project tools that are also available in the Tools menu. To these toolbars can also be added buttons for starting Windows applications, see section Incorporating other applications in the NAVIGATOR on Page 13.

Figure 4: Toolbar buttons

Sucosoft S40 tools include: POU Editor. Here you can create the source files of your programs. 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. Topology Configurator. Here you can define the hardware configuration and set the device parameters. Status bar As in other Sucosoft S40 tools, the left section 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 result of this generation. The right section of the status bar displays the path to the directory in which the opened project is located.
07/01 AWB2700-1305-GB

The section in between shows the line, in which the cursor is located in the output window.

12

Getting to know the NAVIGATOR Context menus The context menus contain the most important commands for a selected object. They are opened by right clicking the selected object or window. The content of the context menu depends on where the mouse was activated and the selected object.

Incorporating other applications in the NAVIGATOR To start frequently-used Windows applications easily you can integrate the appropriate tool button into the NAVIGATOR Sucosoft toolbar.

Figure 5: Sucosoft toolbar (before)

Requirement: This is a windows application. Click Options Add Tools... The Add/Delete Tools dialog will open.

07/01 AWB2700-1305-GB

Figure 6: Add/Delete Tools dialog.

13

NAVIGATOR In the Command Line field enter the name of the executable program together with its directory and path data, in addition to the entry in the Menu Text field. Alternatively you can click the ... button next to the command line to search for the required application. This will activate the Open dialog.

Select the desired application and accept it by clicking Open. The selected application will be transferred into the Menu Text and Command Line fields of the Add/ Remove Tools window. You can then specify call arguments for the application concerned. After clicking Add, the new application is added to the list of tools in the Add/Remove Tools window and the new icon will be inserted in the Sucosoft toolbar.

14

07/01 AWB2700-1305-GB

Getting to know the NAVIGATOR

Figure 7: New application

The Up and Down buttons can be used to change the order of the tools in the toolbar.

Figure 8: Sucosoft toolbar (after)

You can also use Options Tools... to remove applications from the NAVIGATOR's Sucosoft toolbar.

07/01 AWB2700-1305-GB

15

NAVIGATOR Importing additional libraries The Import Library option is available via Options Library Import or via the Import Library button.
Importing libraries

This allows you to transfer additional libraries previously created with the help of the Library Manager. Compared to using the source text of function blocks and functions, the use of function blocks and functions in library format has the advantage that the time required for compiling them is no longer necessary, and they can be considered to be error-free without the need for further testing. Such libraries vary according to the type of PLC and are accessible for all projects. Further information on creating these libraries is available in the online documentation Library Manager (AWB-C 2700-1366 GB). Information on the use of libraries is available in the section Using libraries on Page 67.

16

07/01 AWB2700-1305-GB

Getting to know the NAVIGATOR Changing dialog language Sucosoft S40 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: Select the required dialog language via Options Dialog Language. Sucosoft S40 will convert to the selected language and will automatically restart.

Font and colour setting You can make font settings in the NAVIGATOR output window and in the POU Editor using the fields provided under the Font tab in Options Settings.... As well as defining the font, you can also set the colour of different outputs in the NAVIGATOR and syntax elements in the Editor. These settings can then be saved as a particular Scheme. The font styles Italic, Bold and Bold Italic are not supported in the Editor.

07/01 AWB2700-1305-GB

17

NAVIGATOR NAVIGATOR settings You can define the behaviour of the NAVIGATOR when printing projects via the Print tab in Options Settings.... Other settings for the behaviour of the NAVIGATOR are available in the Others tab in Options Settings....

POU Editor settings You can define the behaviour of the Editor when creating source files via the Editor tab in Options Settings....

18

07/01 AWB2700-1305-GB

Project management Project management Introduction The NAVIGATOR contains the Sucosoft S40 Project Manager. This is used to organise all the necessary folders when you create a new project. The Project Manager cannot be replaced by other file management programs such as File Manager or Explorer. Source files that are copied with a different tool to the Project Manager or created with different editors can be imported and registered in a project at a later time, see section Exporting/importing sources on Page 36 and Registering sources on Page 39.

Source file and device view The content of the Tree Structure and File Structure windows depends on whether you have activated the source or device display, i.e. the file card tabs Sources or Devices. Clicking the Sources, tab will cause the tree structure window to show the Sources tree structure. At the same time the source files (POUs) and topology files belonging to the project will be shown in the file structure window. Double-click on one of these files to open the Sucosoft S40 Tool that they are associated with.

07/01 AWB2700-1305-GB

19

NAVIGATOR

Figure 9: The NAVIGATOR user interface with source file tree

The context menu (right mouse button) or File New, File Rename, and Edit Delete can be used for creating, renaming or deleting subfolders in the source file tree structure. Before you start to create 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. This selection also affects the POU Editor since the data types as well as manufacturer-defined function blocks and functions offered there depend on the controller selected.

20

07/01 AWB2700-1305-GB

Figure 10: Selection window for PLC type

Project management After the Devices file card tab has been clicked, the tree structure window will show the three currently supported groups of PS416, PS4-300 and PS4-200 PLC types as subfolders (see section Selecting PLC type on Page 43).

Figure 11: The NAVIGATOR user interface with the device tree structure

You will not be able to create any further subfolders. If you select one of the three subfolders or have selected the corresponding PLC type in the toolbar selection window, the make files and executable user programs available for this PLC type will be displayed in the file structure window. Double-clicking a program code file (executable user program) will open the Sucosoft S40 Test & Commissioning tool.
07/01 AWB2700-1305-GB

21

NAVIGATOR Options Clicking the Options file card tab will cause the tree structure window to display the Options folder, in which you can store any documents that you wish to store in your project. To do this use Windows Explorer to drag the file concerned into the file structure window of the Navigator or add it to the Navigator via Edit Paste. The document can now be opened in the appropriate application by doubleclicking from the file structure window or via the context menu. When saving or restoring a project, the Options folder will be included if this has been set on the Others tab via Options Settings.... Other subfolders can also be created in the Options folder.

22

07/01 AWB2700-1305-GB

Project management Creating a new project Choose Project New... or click the corresponding button to create a new project.
New Project button

This opens the Create New Project dialog:

Figure 12: Create new project dialog

First select one of the drives suggested.


07/01 AWB2700-1305-GB

If you wish to create your project in a subfolder not yet created: Click the New Folder button and enter the name of the new folder in the New Folder dialog. Confirm the entry with the OK button.

23

NAVIGATOR The OK button will be made available if the project name entered does not already exist as a folder, does not contain any impermissible special characters and is not more than 32 characters long. Finally, enter the name of the folder for the new project into the New Project Folder entry field. Confirm the entry with the OK button. Sucosoft S40 will set up 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, will be 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).

24

07/01 AWB2700-1305-GB

Project management Source This folder stores all the project files that you create in the POU Editor or in the Topology Configurator. All the files you save are automatically registered by the Navigator under the current project. All topology and POU (program, function, and function block) files are therefore displayed in the file structure window on the right. The Topology Configurator or POU Editor icon in front of the file name allows you to arrange and locate the file types quickly. You can find additional information 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. You can sort the files according to name, type and modification date by clicking the appropriate column header. How to view POU related information is described in section POU information on Page 41. If you have created Source subfolders, these will be offered as destination folders in addition to Source when you save a POU in the POU Editor.

07/01 AWB2700-1305-GB

25

NAVIGATOR Devices All controller-specific files related to the project are stored in this folder. Device folders PS416, PS4-300 and PS4-200 are sub-filed in the Devices tree structure window on the left. After selecting the appropriate folder for the PLC type required, PS416 for example, you will see the make file created and the program code files in the file structure window. The structure and content of the tree structure window are preset and cannot be modified. When you generate a program code file, Sucosoft S40 creates a subfolder for the folder of the corresponding PLC type, identified by the name of the make file belonging to it. If you select this additional subfolder, all files logically connected to the make file will be displayed in the file structure window on the right. In this subfolder you can use the context menu to print, delete or view the properties of program POUs or program code files. Further information on this is provided in the section Program properties on page Page 65. Starting with a double-click in the file structure you can navigate between project-related files and Sucosoft S40 Tools, starting Test & Commissioning, for example. In addition, you can start a print or delete task in this window for each individuallyselected make file via the context menu.

26

07/01 AWB2700-1305-GB

Project management Opening existing projects You can open an existing project by means of the menu item Project Open... or with the corresponding button.
Open Project button

The Open Existing Project dialog window will open:

Figure 13: Open Existing Project dialog


07/01 AWB2700-1305-GB

Select the desired project name and then click the Open button.

27

NAVIGATOR If the desired project is not listed in the tree structure of the dialog window: Click the Browse... button. Now select the desired project folder in the Open Existing Project window. Confirm the selection with the OK button. The OK button is only made available if the selected project folder can be processed by the NAVIGATOR, i.e. it must be a Sucosoft S40 project folder. Older S40 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 Sucosoft S40 version.

Deleting a project Requirement: The project must be open. Choose Project Delete. The open project will be deleted directly, or after a confirmation, depending on the setting in Options Options Deletion Confirm. This latter option is the default setting. Confirm this task only when you are certain that the project does not contain any files that you still need!

28

07/01 AWB2700-1305-GB

Project management Copying projects Requirement: The project must be open. Copying a project is carried out by choosing Project Copy... or with the corresponding button.
Copy button

The Copy Current Project To dialog window will open:

Figure 14: Copy Project dialog


07/01 AWB2700-1305-GB

29

NAVIGATOR Change the drive, if necessary, and select the existing destination folder for the new project in the tree structure view of the Copy Current Project To dialog window. Enter the project name in the New Project Name entry field and confirm with the OK button. If you are just now going to create the folder for the project to be copied: Click on the New Folder button in the Copy Current Project To dialog window, then enter the new folder name in the new folder dialog window. Confirm the entry with the OK button. 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 is not possible. Projects can, however, be saved. Information on how to save a project is provided in section Saving projects on Page 31.

30

07/01 AWB2700-1305-GB

Project management Renaming projects Requirement: The project must be open. Choose Project Rename.... The Rename Project dialog window will open:

Figure 15: Rename project dialog

Enter the new project name into the entry field and then click the OK button. The new project name appears in the title bar.

Saving projects You can save a project in compressed form via the menu item Project Save..., or by clicking the corresponding button. If the project to be saved contains imported libraries, read the section Saving libraries on Page 73.
Save Project button

07/01 AWB2700-1305-GB

31

NAVIGATOR The Save Current Project To dialog window will open.

Figure 16: Save Project dialog

Choose the drive and select the existing destination folder for the saved project in the tree structure of the Save Current Project To dialog window. You can reduce the space needed in the saving medium by saving only project files from the Sources folder. Enter a cross in the Only Sources check box to reduce the space requirements. Confirm with the OK button.
07/01 AWB2700-1305-GB

32

Project management You can observe the progress of saving in the status bar. The entire project is saved in ZIP format in the destination folder under the project name with the extension ZIP. If you are just now going to create the folder for the material to be saved: Click 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. Save the project as described above.

Restoring projects You can restore a saved project to a destination drive by choosing Project Restore..., or by clicking the corresponding button.
Restore Project button

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 a library on Page 73.

07/01 AWB2700-1305-GB

33

NAVIGATOR The Restore Project From dialog window will open.

Figure 17: Restore Project From dialog

Select the drive, and, if necessary, the folder(s) of the archived project and the project itself with the extension PCK for archived projects carried out with a Sucosoft S40 version older than 5.0, or with the extension ZIP, for projects archived with Sucosoft S40 version 5.0. Confirm the task with the Accept button.
07/01 AWB2700-1305-GB

34

Project management The Restore Project To dialog window will open. Specify a destination drive and the destination folder. Confirm the task with the OK button. If you are just now going to create the folder for the project to be saved: Click the New Folder button in the Restore Project To dialog window, then enter the new folder name in the New Folder dialog window. Confirm the entry with the OK button. Specify the destination drive and the destination folder as described above. Sucosoft S40 will organise a project structure with the folders Devices and Source in the destination project and will enter the project files belonging to it. The Devices folder will not be written if the Only Sources check box was crossed when saving. 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/01 AWB2700-1305-GB

35

NAVIGATOR Exporting/importing sources Export This function can be used to copy POU files from the current project to any location outside of the project. This function can be used on one or several selected POUs. To do this first select the POUs to be exported and then choose Project Export/Import... Export POU Sources... or select Export/Import... Export POU Sources... in the context menu for the selected file(s). The Export POU dialog window will open. Now select the destination folder to which you wish to export the file(s). You can also specify the format of the file(s) to be exported: S40 Format: This is the format of POUs for projects that were written with Sucosoft version 5.0 or higher. This format therefore enables you to process the exported files in this type of project. S40 V4.xx Format: This is the format of POUs for projects that were written with Sucosoft version 4.x or higher. The POU file name is therefore shortened to 8 characters. The POU information is retained, however. S40 Format V1.00 to V3.11: This is the POU format for projects that were processed with Sucosoft version 3.11 or an older version. The POU file name is therefore shortened to 8 characters. If the source file to be exported contains POU information, this is converted to a comment. This format therefore enables you to process the

36

07/01 AWB2700-1305-GB

Project management exported files in an older project if you use programming elements that were not yet supported by this older Sucosoft version. Text File: This a simple text file. Special entries for processing the file(s) in Sucosoft projects are no longer contained. If the POU to be exported contains POU information, this is converted to comments in text format. This simple format allows you to process the exported file in other IEC/EN 61131-3 programming systems (see following paragraph Importing IEC/EN 61131-3 sources). Import This function can be used to copy POU files from any location outside of the project to the current project. All POUs are copied to the current project and registered there. This function can be used on one or several selected POUs. Either IEC/EN 61131-3 sources or S30 sources can be imported. Importing IEC/EN 61131-3 sources To do this choose Project Export/Import... Import IEC/EN 61131-3 Sources... or Export/ Import... Import IEC/EN 61131-3 Sources... in the context menu of a directory in the source file structure. This will open the IEC/EN 61131-3 Sources dialog box.
07/01 AWB2700-1305-GB

Now select the file(s) you wish to import. The file display of this dialog is preset for POU file types. However, it can be set for all file types as required.

37

NAVIGATOR The import function is possible for all IEC/EN 61 1313 source files, i.e. they must have a declaration section and instruction section in ASCII format. The Sucosoft S40 version of the source file or whether it was written with a different editor is not important. The only requirement for a successful import is that the file name corresponds to the name of the program, function or function block inside the file. After the import has been successfully completed, the imported file has the extension POE and is stored in the source file structure for which you have called the function. Importing S30 sources To do this choose Project Export/Import... Import S30 Sources... or Export/Import... Import IEC/EN S30 Sources... in the context menu of a directory in the source file structure. This will open the dialog box with the caption Please Select An S30 Program File. Now select the S30 file(s) you wish to import. This dialog will only display Sucosoft S30 file types. Further information on importing S30 sources is provided in the section Importing S30 programs on Page 76.

38

07/01 AWB2700-1305-GB

Project management Registering sources In order to edit a POU copied to the project with a different tool such as Explorer, it must be registered. POUs not yet registered are indicated by a missing checkmark in the Registered column of the file view window. Requirement: A project must be open and the copied files must be displayed in the Source branch. Choose Project Register Sources. The new status will be indicated by a checkmark in the Registered column.

Printer Setting Choose Project Print Setup.... The Print Setup dialog window offering you various printer setting options will open. You can select your printer, specify a standard printer, set the paper and print format (portrait or landscape) and select the form and cover sheet which you wish to use for the printout. You can use the Form Editor to create other forms which can be used in this dialog in addition to the standard forms.

07/01 AWB2700-1305-GB

39

NAVIGATOR Printing Unlike the print function of the individual S40 tools, the NAVIGATOR print function allows you to print files individually or all together. The printout in this case uses the currently set cover and form sheet. Printing all files To print all the files belonging to a user program, click the Devices tab and select the make file in the file structure window belonging to the program concerned. You can then print by means of the menu item File Print, via the context menu, or by clicking the button. The first page printed shows an overview of the project directory with information on the CPU type, the data of the make file, compiler flags, and program parameters as well as the main program and all POUs used, including path and type. After the overview the following is printed out: the Global Data Types, the topology for the make file, the POUs and instance tree. The program parameters, global data types, the device configuration, the instance tree and the functions and function blocks of the program can only be printed if the appropriate output was activated on the Print file card via Options Settings... .

40

07/01 AWB2700-1305-GB

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

POU information In the file structure window of the Sources file card you can display information on selected POU source files via the direct Help of the context menu (rightclick). This information is created beforehand in the POU Editor via File POU Info.... For each POU a dialog is opened with fields for Project, Name, Author, Version, PLC Type(s), Date, Comment and the prototype if required. This information is also available for POUs in libraries if there is no library Help available for the POU concerned (see Using Library Help on Page 69).

07/01 AWB2700-1305-GB

41

NAVIGATOR Program code generation Introduction A wide range of commands are provided for creating executable, PLC-specific program code. These commands can be directly carried out via the Generate menu item or by means of the toolbar buttons (see Figure 3). These commands will be described below in sections. Generation of program code is carried out in two phases: the creation of a make file in which the elements (files) are specified that must be included in the program code generation process, i.e. the program POUs (including the instantiated function blocks and functions they contain), the topology file and the program code parameters. You create the file once for each program POU in your project. The files will automatically have the name of these program POUs. Sucosoft S40 will then automatically update the file as soon as you modify the program POU, for example, by incorporating or removing function blocks or functions, program parameters, or the topology. Only if the program POU is linked with a completely different topology configuration (e.g. another PLC type) or vice versa, does the make file have to be created again. Generation of program code is carried out on the basis of the make file and therefore depends on the elements included in the file. Make sure that all POUs in a project have different names. If there are function blocks of the same name in different subfolders of the current folder, the function block registered at the time of the generation will be selected. All unregistered sources will be ignored during generation.

42

07/01 AWB2700-1305-GB

Program code generation In a project with several program POUs (main programs) several make files can be generated and stored. They will automatically receive the name of the respective program POU.

Selecting PLC type The data types and manufacturer-defined function blocks and functions available to you in the POU Editor depend on the PLC type selected. 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:

07/01 AWB2700-1305-GB

43

NAVIGATOR PS4-200: PS4-141-MM1, PS4-151-MM1, PS4-201-MM1, PS4-271-MM1 PS4-300: PS4-341-MM1 PS416: PS416-CPU-200, PS416-CPU-300, PS416-CPU-400 Select the desired PLC type in the selection window in the toolbar. 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.

Creating a new make file Requirement: The required PLC type must have already been selected. Choose Generate New Make File..., or the corresponding button.
New Make File button

The New Make File dialog window will open.


07/01 AWB2700-1305-GB

44

Program code generation

Figure 18: New Make File dialog

Select the program POU you wish to generate as an executable control program from the program POUs list box. Select the topology file from the Topology Configurations list box which is appropriate for your controller configuration and for the program POU you previously created with the Topology Configurator. Confirm with the OK button. The make file, from which the executable program can be generated, will be created. The selected files and default program parameters are entered in the make file. A report will appear in the status bar when the list is created. All other changes to program parameters, i.e. all changes to the project are automatically entered in the make file. Unlike older Sucosoft versions, the required function blocks and functions required for generating the program code are not saved in the make file but are determined anew for each access.

07/01 AWB2700-1305-GB

45

NAVIGATOR Setting program parameters Selection of controller-specific program parameters You can set program parameters such as compiler options for the currently selected PLC type or relevant parameters for program performance such as maximum cycle time, password, and marker range. This is carried out via the menu item Generate Program Parameters... or the corresponding button.
Program Parameters button

Changing program parameters for the PS4-200 Requirement: PS4-200 must have been selected as PLC type. Initiate the setting of parameters via Generate Program Parameters.... The PS4-200 Program Parameters dialog will open for the current make file:

46

07/01 AWB2700-1305-GB

Program code generation Runtime settings Complete the Runtime Parameters panel or click the Default button to choose the preset default values. Password: The password is used for protecting the PLC from unauthorised access. It can consist of a maximum of 8 characters (letters and numbers). If you wish to change a saved password, enter the new password and confirm with OK. The password is requested every time a connection is established (Connect) if the PLC concerned contains a password-protected program. When the correct password is entered once, all functions are freely available until the connection (Disconnection) is closed. If there is no response to a requested password or in the case of an incorrect entry, an error message will appear and the connection will not be established. : 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 & Commissioning tool under Program Version. This facilitates identifying various program versions when troubleshooting. Startup behaviour after Not Ready: If the running user program is interrupted by a Stop error, such as maximum cycle time exceeded, the PLC will switch to Not Ready.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

07/01 AWB2700-1305-GB

47

NAVIGATOR behaviour after Not Ready described is only effective and appropriate with the switch in the RUN position. Stop: After a program error there is no restart. Warm Start:Selects a PLC warm start. Cold Start:Selects a PLC cold start. 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. Maximum Cycle Time: This entry field is used to enter the maximum cycle time for the program in the range from 1 ms to 255 ms. 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 fault control. If the program exceeds the maximum set cycle time while running, the controller will switch to Halt.

48

07/01 AWB2700-1305-GB

Program code generation Markers This is where you define the marker range which is declared with directly represented variables with the identifier AT%M. This range is subdivided into normal markers and warm and cold start retentive markers.

Assign the marker ranges for the PLC working memory under the Markers tab: Active Marker Range: This defines the PLC marker range which can be addressed as directly represented variables with the identifier %M. The maximum number of these markers is 16 KByte (0 -16383). The standard setting is no active marker range.

07/01 AWB2700-1305-GB

49

NAVIGATOR Retentive Range: This specifies the range of the warm start retentive markers. 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: This specifies the range of the cold start retentive markers. 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 marker ranges must both be set within the defined limits of the active marker field and may not overlap each other. The use of the keyword RETAIN in the declaration of retentive markers for the PS4-200 only has a documentation function. The actual retentive setting is made in the marker range. The settings become active only after compiling and transfer.

50

07/01 AWB2700-1305-GB

Program code generation Changing program parameters for PS4-300 Requirement: PS4-300 must have been selected as PLC type. Start the parameter setting via Generate Program Parameters.... The PS4-300 Program Parameters dialog will open for the current make file:

Runtime settings Complete the Runtime Parameters panel or click the Default button to choose the preset default values.

07/01 AWB2700-1305-GB

51

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

Enter the maximum program runtime, i.e. the time within which a program execution must be completed (permissible value range 1...1000 ms).

52

07/01 AWB2700-1305-GB

Program code generation Periodic: The program is restarted when the specified time interval has elapsed. In addition, program execution must be completed before the specified maximum program runtime. Click on the Periodic tab to enter the parameters for periodic program execution.

07/01 AWB2700-1305-GB

You must specify: The required time interval (time between the individual program invocations). The entry can be made in: - Milliseconds in the value range 1 to 60000 - Seconds in the value range 1 to 3600 - Minutes in the value range 1 to 1440 - Hours in the value range 1 to 960 - Days in the value range 1 to 40. The value for the maximum program runtime. The value you specify must not exceed the specified time interval and must be less than or equal to 1000 milliseconds.

53

NAVIGATOR Warm Start: If the user program is restarted, execution will be resumed at the position where it was interrupted. The data declared with the keyword RETAIN is reused. For this the operating mode switch must be set to RUN. Cold Start: This starts the user program with the initialisation values of the variables. The operating mode switch can be set to RUN or RUN-M-RESET for the cold start option. No Restart: If this has been selected with the setting Warm Start as startup behaviour, the user program will not be automatically restarted when the power supply 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. A version code for the program to be generated, composed of a maximum of ten letters and numbers, can be assigned in this field. The version number is displayed in the Program Status dialog box of the Test & Commissioning tool under Program Version. This facilitates identifying various program versions when troubleshooting.

54

07/01 AWB2700-1305-GB

Program code generation Markers This is where you define the marker range which is declared with directly represented variables with the identifier AT%M. This range is subdivided into normal markers and warm and cold start retentive markers.

Assign the marker ranges for the PLC working memory under the Markers tab: Active Marker Range: This defines the PLC marker range which can be addressed as directly represented variables with the identifier %M. The maximum number of these markers is 15000 Byte (0 to 14999 Byte). The standard setting is no active marker range. Retentive Range: This specifies the range of the warm start retentive markers. These markers are declared as directly represented variables with the identifier AT %M.

07/01 AWB2700-1305-GB

55

NAVIGATOR 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: This specifies the range of the cold start retentive markers. These markers are declared as directly represented variables with the identifier AT%M. 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. Recipe values are retained with each cold start. This means that they must be initialised before they are first used in the user program. With the PS4-300 recipe data is also retained after the operating system is transferred. 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. Retentive markers for the PS4-300 can also be declared with the keyword RETAIN if required. Only the recipe range must be defined via the Program Parameters. The settings become active only after compiling and transfer.

56

07/01 AWB2700-1305-GB

Program code generation Changing program parameters for the PS416 Requirement: PS416 must have been selected as PLC type. Initiate the setting of parameters with Generate Program Parameters...... . The PS416 Program Parameters dialog will open for the current make file:

Make entries in the dialog box as required or click the Default button to enter the standard values. The recipe range (cold start retentive markers) of PS4-200/-300 controllers is defined in the Program Parameters... dialog on the Markers tab.
07/01 AWB2700-1305-GB

You can define the protected recipe range of the PS416 controller whilst a program is running via the ColdstartRetention function block (see AWB2700-1306-GB).

57

NAVIGATOR Runtime settings Cyclical: The program is immediately restarted each time program execution is completed. Click on the Cyclical tab to enter the parameters for cyclical program execution.

Enter the maximum cycle time, i.e. the time within which a program execution must be completed (permissible value 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 runtime.
07/01 AWB2700-1305-GB

Click on the Periodic tab to enter the parameters for periodic program execution.

58

Program code generation

You must specify: The required time interval (time between the individual program invocations). The entry can be made in: - Milliseconds in the value range 1 to 60000 - Seconds in the value range 1 to 3600 - Minutes in the value range 1 to 1440 - Hours in the value range 1 to 960 - Days in the value range 1 to 40. The value for the maximum program runtime. The time value must not exceed the value for the set time interval and must be less than or equal to 1000 milliseconds.

07/01 AWB2700-1305-GB

59

NAVIGATOR Warm Start: If the user program is restarted, execution will be resumed at the position where it was interrupted. The data rescued at the time of the program interruption will be reused. For this the operating mode switch must be set to RUN. Cold Start: This starts the user program with the initialisation values of the variables. 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 be initialised before the first use. The recipe data of the PS416 is reset after the operating system is transferred (see AWB2700-1306-GB: PS416 function block, ColdstartRetention). A version code for the program to be generated, composed of a maximum of ten 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 the identification of various program versions when troubleshooting.

60

07/01 AWB2700-1305-GB

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

Figure 19: Make file list box

You can see an overview of make files created with all file attributes in the file structure window by clicking the Devices tab and selecting the corresponding PLC type.

Figure 20: Created make files with file attributes

07/01 AWB2700-1305-GB

When you open the folder of a PLC type in the tree structure window and select one of the make files displayed, the file structure window will show all the POUs assigned to this make file as well as the assigned topology (see following figure).

61

NAVIGATOR

Figure 21: POUs and topologies for the selected make file

Generating program code Requirement: You must have selected a make file for the desired PLC type. Choose Generate Generate Program Code, or click the corresponding button:
Generate Code button

The executable program will be generated according to the currently selected make file. If you select the folder of a PLC type in the tree structure window, you can also generate the program code via the context menu.

Figure 22: Generating via the context menu

62

07/01 AWB2700-1305-GB

Program code generation The executable programs are generated according to all the make files assigned to the selected PLC type. The progress of the generation can be viewed in the Output window. An appropriate report will appear after successful execution. Current compiler outputs can be printed via Project Print Output. Program code errors If an error should occur when generating program code, it will be issued in the Output window with the appropriate report.

Figure 23: Output window after program code generation with error reports

Clicking one of the output lines during this operation, will freeze the list at this position. In this way, the window no longer scrolls through the other output lines. Error reports can be printed via Project Print Output

07/01 AWB2700-1305-GB

63

NAVIGATOR Troubleshooting After code generation has been completed, the F4 key can be used to reach the first reported error in the Output window. Each additional press of the F4 key moves the cursor to the next reported error. Double-clicking on an error line or firstly selecting it with a mouse-click and then pressing the Enter key will automatically open the POU Editor. The cursor will then be positioned in the line/column position in the specific POU in which the error was found. Clicking an error line and then pressing the F1 key opens a Help window explaining the error that has occurred.

Aborting program code generation You can abort the current generation process before completion via Generate Abort Generation or by clicking the Stop button. Click the Stop button.
Stop button

Creating a cross-reference file Requirement:A make file has been created and has been selected in the file structure window after clicking the Devices tab. You can now create a cross-reference file via the context menu or via File Cross-Reference File. This then also appears in the file structure window with the same name as the make file for which it was created. This is created as an Excel table and can be loaded into the Excel Editor via the Open function of the context menu, if you have associated this file type with Excel via Explorer.

64

07/01 AWB2700-1305-GB

Program code generation Program properties Requirement: The program code generation has been completed successfully via a make file. If you have selected a make file in the tree structure window of the Devices tab, you can use the Properties function in the context menu of a source or program file selected in the file structure window to display file related information in a dialog. With Source files this information consists of the POU type (program, function, function block), the PLC series for which the source was written, the number of bytes that this source takes up in the code size of the program code file, the number of bytes that this source takes up in the data size of the program code file, date and time of the last modification to this source, a list of local function blocks used in this source a list of the global function blocks used in this source. With program code files, this information is displayed as the instance tree (the hierarchical display of all instances used in the program with the function block name in square brackets) as well as general properties information with the name of the program, the total code size of the program in bytes, the total data size of the program in bytes, the topology configuration assigned to the program, date and time of program code generation, the total number of POU sources used in this program, 65

07/01 AWB2700-1305-GB

NAVIGATOR the number of function blocks used in this program, the number of functions used in this program, the number of function block instances used in this program, the PLC type for which the program was created (corresponding to the PLC type set in the topology configuration), the number of user libraries used in this program, the list of these user libraries.

66

07/01 AWB2700-1305-GB

Using libraries Using libraries Introduction Sucosoft S40 is provided with ready-made and tested function blocks and functions in the form of manufacturer-defined libraries for each of the three PLC types.

Figure 24: View of a manufacturer-defined library

In addition to manufacturer-defined libraries you can import other libraries. These can be libraries you have created yourself with the S40 Library Manager, which is available as an S40 add-on module. There may also be other libraries available from Moeller or other suppliers. After you have entered a library into your project, its function blocks and functions (user modules) are available for use in your project in the same way as manufacturer or user-defined blocks.

07/01 AWB2700-1305-GB

67

Library view After clicking the Libraries tab, the tree structure window will display the Library file tree with the PS416, PS4-300 and PS4-200 device folders as subfolders and their corresponding library groups (see Figure 24 ). The Library view offers a brief overview of which modules, i.e. which manufacturer-defined and userdefined function blocks and functions are available for effective programming. The Help function also provides information on the individual modules (see section Using Library Help on Page 69). No further subfolders can be created. When you select a subfolder, a folder with manufacturer-defined libraries and, if imported, a folder with user-defined libraries will be displayed. By clicking the appropriate folder, the PLC-specific functions and function blocks belonging to that library will be displayed in the file window.

68

07/01 AWB2700-1305-GB

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 subfolder and select the module you are looking for in the file structure window (see Figure 24). Now call up Help. You will find detailed explanations loaded with example programs for all manufacturer-defined function blocks and functions. If a library POU does not have a Help text, the POU information created in the POU Editor via File POU Info... will be shown as Help text instead. You can paste these passages into your POU by selecting the declaration or instruction section 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 this into account when creating your POU as well as during subsequent library generation in the Library Manager.

07/01 AWB2700-1305-GB

69

NAVIGATOR Importing libraries Choose Options Library Import or click on the Import Library button.
Import library button

The Import Library dialog window will open. Now select the libraries you wish to import. This dialog will only display libraries (*.lib). After it is imported into a project, Sucosoft S40 manages the library and makes its function blocks and functions available for the corresponding PLC type in all projects. Deleting a library Deleting a library will remove it from Sucosoft S40 management. Choose Options Library Delete or Delete in the context menu for the Library file tree structure in the tree structure window.

70

07/01 AWB2700-1305-GB

Using libraries Creating a library Creation and subsequent modification of a library will only be described briefly here. You will find a detailed description in the manual S40 Library Manager AWB-C2700-1366GB. Function blocks (FBs) and functions to be used as library modules are generated like any other POU. The project for generating these POUs is referred to here as the original library project. After creating these library modules, a program POU must be 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 library origination project is open in the 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 must not be assigned more than once in a project. Sucosoft S40 monitors the assignment of names.

07/01 AWB2700-1305-GB

71

NAVIGATOR Activating and deactivating library modules Libraries are automatically activated when imported. After clicking the Library tab you can confirm activation in the appropriate column of the Navigator file structure window. There are two reasons that could prompt you to deactivate a user library: 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. Choose Edit Activate/Deactivate or the Activate/Deactivate option in the context menu.

Editing of library modules at a later time If you open the original library project with the library activated, all the library entries will be deactivated so that the original POUs can be compiled with the next program generation. The corresponding warning messages will appear in the Output window.

72

07/01 AWB2700-1305-GB

Using libraries Follow these steps to ensure that modified POUs are included in the generation: Deactivate the respective library in the NAVIGATOR. Modify and save the originating POUs in the POU Editor. Register the POUs in the NAVIGATOR via the menu point Project Register Sources. Generate the program code. Import the library after creating an updated version in the Library Manager.

Saving libraries Libraries cannot be saved individually, only along with a project as a component. When saving a project the most recently imported libraries apart from those that were deactivated will be saved as well.

Restoring a library Libraries cannot be restored individually, only as part of 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 S40 management, you must import it manually as described above.
07/01 AWB2700-1305-GB

73

NAVIGATOR Information on libraries If you have selected a PLC type in the tree structure window of the Libraries tab, you can use the Properties function in the context menu to display information on the libraries of this PLC type in the Library Information dialog. This information consists of the selected PLC type, the list of all libraries for this PLC type with the total number of libraries and the number of deactivated libraries, the list of all groups in the libraries for this device type with the total number of groups and the number of hidden groups and the list of all POUs in the libraries for this device type with the total number of POUs, the number of hidden POUs, the number of function blocks and functions.

74

07/01 AWB2700-1305-GB

Using libraries Library properties If you have selected a PLC type in the tree structure window of the Libraries tab, in the file structure window you can use the Properties function in the context menu to display information in the Library Properties dialog on the libraries listed. This information consists of a list of the physical libraries of which the displayed library consists (depending on the library file selected in this list, the display for the number of all library modules, the visible, hidden and deactivated library modules changes), the name of the manufacturer of this library, the version number of this library, the name of the Help file linked to this library, the path where the physical libraries are located, the PLC type for which this library was created, the total number of all functions and function blocks in the physical library selected under the Name, the number of functions and function blocks that can be used in the physical library selected under Name,

07/01 AWB2700-1305-GB

75

NAVIGATOR the number of the functions and the function blocks that are hidden in the physical library selected under Name and which cannot therefore be used, the number of the functions and the function blocks that are deactivated in the physical library selected under Name and which cannot therefore be used, the notification whether the library is password protected or not.

Importing S30 programs

Programs that you have written in Sucosoft S30 can be imported to Sucosoft S40. A program conversion is used that matches the program content to the IEC/EN 61131-3 standard. Programs can be imported and converted that were written for the PS316/PS306 with the suffixes *.q6b or *.q6w, for the PS3 with the suffix *.q3 and for the PS4-201-MM1 and PS4-141/151-MM1 with the suffix *.q42, with the appropriate reference files.

Structure of the S30 program source The S30 program source can consist of the main program and several Include programs that are incorporated into the main program.

76

07/01 AWB2700-1305-GB

Importing S30 programs If other reference files are required for generating the S30 program in addition to the main reference file, these must be incorporated into the source programs (*.Q**) using the Include instruction. All S30 sources must be located in the same folder. In this case, symbolic operands are declared and used in the converted program. The symbolic operands are also provided with a comment specifying the contact characteristics (M/B) and terminal designation (T) that were defined in the reference file.

Type of conversion Use a newly created S40 project for the conversion. The conversion will change the S30 program into a program type POU and, if necessary, into one or several function block POUs. The S30 converter automatically generates equivalent S40 programs during the conversion process. S30-S4 or S30-S3 source programs are converted to programs for PS4-200 compact PLCs, S30-S316 source programs are converted to programs for the PS416. Remember to create a hardware configuration with the Topology Configurator for your PS416 PLC (see Page 187). Due to the different programming concepts, the converter may in some cases not be able to make a complete conversion 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.
07/01 AWB2700-1305-GB

77

NAVIGATOR Conversion procedure Open the new S40 project and ensure that it does not contain any POUs. Existing POUs will be overwritten by imported POUs with the same name. Choose Project Export/Import Import S30 Sources.... This will open the window for selecting an S30 program file:

Figure 25: Selecting an S30 program file

78

07/01 AWB2700-1305-GB

Set the File Type list box to the imported source file. Select the source file (*.Q??) of the main program you wish to import and click the Open button. After this process has been completed successfully, the window opens for selecting the relevant S30 reference file. Select the relevant reference file (*.Z??) and click the Open button. Ensure that the other programs (*.Z) and (*.K) are located in the same folder as the source file.

Importing S30 programs Sucosoft S40 indicates the progress of the conversion in the Output window. The sources are registered automatically after the conversion has been successfully completed. The remaining steps are the same as in general POU processing. Instructions/sequences that have not be imported are transferred unchanged and appear as comments. In this way, the user is notified of unconvertible program sections via the syntax check.

Program adaptions during conversion Adapting names In order to fulfill IEC/EN 61131-3 requirements with regard to POU and variable names, some adaptions are carried out during the import. Modifications in the name of a program or function block: Two _ _ underlines in succession are converted to _ I. An underline at the end of a name is changed to the single character E. A number at the beginning of a name is preceded by the single character A if the name is less than 8 characters in length. If the name is 8 characters long, the number is changed to the corresponding letters: 0 for A, 1 for B, 2 for C etc.
07/01 AWB2700-1305-GB

79

NAVIGATOR Changes in the name of a symbol: A number at the beginning of a symbol is preceded by D. An underline at the beginning/end of a symbol is preceded/followed by a U. Two _ _ underlines in succession in a symbol are converted to _ I. If these characters were used in your S30 source program, check whether the automatic name change has by accident created identical names for different variables. Transferring the system parameters When importing S30-S4 source programs the system parameters (active marker range, max. cycle time...) are stored as comments in the program POU header. For program code generation in the NAVIGATOR you must first create the make file and then set the commented parameters via Generate Program Parameters... (see section Setting program parameters on Page 46).

S30-S316: conversion restrictions Topology configuration There is no topology configuration in S30-S316. After the conversion you must create the S40 topology for the required PS416 PLC in the Topology Configurator and save it in the project. You can generate the program after you have written the make file.

80

07/01 AWB2700-1305-GB

Importing S30 programs SK sequential control function block The SK sequential control function block is available in S40 programming for the PS4200/300 PLCs in the form of the equivalent SFC function block. This function block is not available in S40 programming for PS416 controllers. The SK function blocks are nevertheless portable so that the sources can be used for PS4 controllers or for corresponding function blocks for the PS416. COM serial interface function block The COM function block for serial communication functions in Transparent mode. Mask and Text mode are not supported in the PS416. The SlotNumber input and the two outputs InterfaceStatus and SlotError remain unassigned in S40 because they did not yet exist in S30. The S30 inputs I1 to I32, as well as TOFF and ROFF, are not supported in the PS416 system and are therefore not converted. The TADR and RADR inputs are AnyARRAY type inputs in S40. 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 S40 source program.

07/01 AWB2700-1305-GB

81

NAVIGATOR ICPY function block The ICPY module is converted to the TransferArray function block. The Source and Destination inputs are AnyARRAY type inputs in S40. 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 S40 source program. ICP function block The ICP function block is converted to the CompareArray function block. The Source and Destination inputs are AnyARRAY type inputs in S40. 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 S40 source program. DSW diagnostics status word Only the following PS306/PS316 compatible diagnostic bits are supported in the PS416: DAK: Card not fitted DBM: CPU battery failure Address operator The address operator in S30-PS316/306 programming does not have any equivalent in S40 programming for the PS416. Although it is converted for the PS4-200 in S4 programming, the PS416 code generator will report a syntax error.
07/01 AWB2700-1305-GB

82

Importing S30 programs PP and SYS commands The PP operands and the SYS commands are transferred to the S40 source program without any changes. They create a syntax error when compiled. In this case, adapt your program logic accordingly. Flash markers The three flash markers of the PS316 (e.g. FRQ1) are replaced with appropriate time generators. Timers The timers of the PS316 (e.g. T24) are replaced with suitable time generators. NOP command The NOP command does not exist in S40. It is not converted. TEST command The TEST command is replaced by the functions IsZero and IsPositiv. #define command The #define command is not supported in S40. It is therefore transferred as a comment.

07/01 AWB2700-1305-GB

83

NAVIGATOR S30-S3: conversion restrictions Topology configuration There is no topology configuration in S30-S3. After the conversion you must create the S40 topology for the required PS4-200 PLC in the Topology Configurator and save it in the project. You can generate the program after you have written the make file. C0 high-speed counter function block The C0 function block cannot be converted, because a similar counter with a hardware input and scaling factor is not available. 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.

S30-S4: conversion restrictions NOP command This command does not exist in S40. It is not converted. Printer control commands Printer control commands such as TITLE are not supported in S40 and are transferred as comments. CK function block input DATE
07/01 AWB2700-1305-GB

Unlike the S30 CK function block, the RealTimeClock function block requires a year entry at the RealDate input. This entry must be updated by the user.

84

POU Editor

Overview

The POU Editor is the Sucosoft S40 tool you use to create your POUs. The term POU stands for Program Organisation Unit and denotes the three POU types program, function block, and function from which a PLC program is constructed. These different POU types allow you to divide an extensive programming task into several subtasks which are in turn handled in function blocks or functions. In this way, the user program is kept to a manageable size and handling is simplified. This approach is known as structured programming. In the following, the three types of POUs from which a PLC program is constructed programs, function blocks, and functions will be described. You can convert a previously-created POU (program, function block, or function) into a different type of POU. To do this, use the Convert POU type option Section Converting POU types described on Page 183.

07/01 AWB2700-1305-GB

85

POU Editor Program type 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 or functions. The internal data of FBs is retained for the time between one call and the next. Sucosoft S40 provides numerous standard function blocks and functions for use in frequently encountered programming tasks.

Function type 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 number of input parameters it is linked to and delivers the result as a return value. Unlike a function block, a function only returns one element. Internal data is not saved so a function, called up with the same input values, always delivers the same return value. Functions are valid throughout the project and can be called up from any POU.
07/01 AWB2700-1305-GB

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

86

Overview controllers will be listed according to group: PS4-200, PS4-300 and PS416. Depending on the PLC type selected, the corresponding data types, manufacturer-defined function blocks and functions are made available to you.

Structure of a POU 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 S40 uses these variables to initialise, process, and save your data. You create your user program in the instruction section. To create a user program you can choose between the textual programming languages, Instruction List (IL) and Structured Text (ST), or the graphical languages Ladder Diagram (LD) and Function Block Diagram (FBD).

07/01 AWB2700-1305-GB

87

POU Editor Primary functions of the POU Editor: Declaration of variables Declaring variables Editing user programs in the programming languages IL, ST, LD, FBD Syntax control Calling the code generation function Creating global data types valid for the entire project Printing Creation of a cross-reference file list Customised user interface display and colour display

Starting the POU Editor The POU Editor is started as a tool from the NAVIGATOR.

88

07/01 AWB2700-1305-GB

User interface of the POU Editor User interface of the POU Editor Like the POU itself, the POU Editor window is divided into declaration and instruction sections (Variables Editor and IL Editor, respectively). Both sections are shown when an existing POU is to be opened or a new one is to be created.

Figure 26: POU Editor with declaration section (Syntax mode) at the top and the instruction section at the bottom Toolbar, see Page 98 Language element toolbar for IL, ST, LD or FBD; see Page 99 Declaration section (in Syntax mode), see following section Instruction section, see Page 91 File card tabs for switching quickly between POUs, Output window and Editor for global types
07/01 AWB2700-1305-GB

A number of Windows standard shortcuts are listed in the Appendix on Page 437 for optimum use of the POU Editor.

89

POU Editor Declaration section Sucosoft S40 provides either a tabular, Syntaxcontrolled Variables Editor (Syntax mode) or a purely textual, Free Variables Editor (Free mode) for entering variables in the declaration section. Both modes are described in Section Declaring variables from Page 106. Switching between Syntax mode and Free mode With an open POU you can switch between the two modes by choosing Options Variables Editor Free Mode/Syntax Mode or via standard toolbar buttons.
Free mode button Syntax mode button

You can define basic settings for the Variables Editor when creating a new POU, i.e. the mode in which the Editor will open, via Options Settings... Editor Display Mode in Declaration Section. The declaration section is independent of the programming language employed and is therefore the same for all programming languages.

90

07/01 AWB2700-1305-GB

User interface of the POU Editor Instruction section You create your user program in the instruction section. The instruction section is where you link previously declared variables or function blocks via operators to form an operable POU, and possibly using functions, to form an executable user program. New variables that were used in the instruction section can be transferred to the declaration section and declared via Insert Variables Declaration... or via the context menu: Position the cursor in the instruction line containing the new variable and then call the variables declaration function. You can switch between the instruction section and the declaration section by clicking the left mouse button or by choosing Window Change. The language toolbar is activated as soon as the cursor is positioned in the instruction section. Tool tips The Sucosoft S40 tool tips offer simple and quick information on the buttons of the toolbars. These can be particularly useful for variables in the instruction section. In this way you can provide information the manufacturer or user-defined data types or function blocks, by positioning the cursor on the variable name. Functions and function blocks are shown as prototypes with all their relevant inputs and outputs and data types. These tool tips are only available in textual programming languages.
07/01 AWB2700-1305-GB

91

POU Editor

Figure 27: Tool tip for variables

Menu bar The functions of Sucosoft S40 within the individual windows are described below: File menu The File menu is used for processing new or existing POUs or files containing global types, i.e. with PLCdependent, user-defined data types, for preparing printouts and printing POUs, and for displaying the cross-reference file. The following menu items are described in the appropriate section: POU Info, see Page 182 Converting POU types, see Page 183 Opening global types, see Page 185 Cross-reference file, see Page 186. Print setup and print menus The same settings are made here as for the NAVIGATOR (see Page 39 and Page 40).
07/01 AWB2700-1305-GB

92

User interface of the POU Editor Edit menu The Edit menu provides standard functions such as Undo, Restore, Find..., Replace... and Go To.... The Undo and Restore functions work separately for the declaration section and the instruction section. If, for example, you wish to undo an action in the instruction section, the cursor must also be positioned in this section. The Find elements for the Go To... function depend on the cursor position and the selected programming language. Pressing the More button in the Find... and Replace... dialog boxes enables you to select additional search criteria. The options for searching/ replacing in several files can be particularly helpful, allowing the search to be extended to the files associated with a particular make file or files that belong to the current project. The result of a find/ replace operation in several files is shown in the Output window. The Find Undeclared Variables menu item allows you to search the opened POUs for variables that are used in the instruction section but which are not yet declared. The result is shown in the Output window under Undeclared Variables. Double-clicking a line in the Output window will move you to the location of the variable in the instruction section.

07/01 AWB2700-1305-GB

93

POU Editor To do this position the cursor in a suitable line in the Output window and then press F5 to open the Declaration Wizard. Add the missing information to the variable names shown; the variable will then be inserted to the declaration section.

Figure 28: Find, Replace and Go To dialog

Figure 29: Find result


07/01 AWB2700-1305-GB

94

User interface of the POU Editor Insert menu The Insert menu is used for inserting manufacturer and user-defined functions or already declared variables. For this the cursor must be positioned in the instruction section before the menu is opened. The Variables Declaration menu item enables new variables to be declared. The Variables From Topology menu item enables directly addressed variables from your topology to be transferred and declared. When declaring variables, it doesn't matter whether the cursor is located in the declaration section or the instruction section. Online menu The Online menu enables you to edit your POUs online during test and commissioning (see Page 385). Options menu The Options menu offers the following settings: Variables Editor: switching the declaration section between Free and Syntax mode (Page 90). Programming language: switching between programming languages IL, ST, LD and FBD, Code generation: for calling the code generator via the NAVIGATOR (see Page 62), Calling the Settings... dialog box and Calling the Customize Toolbars dialog box (Page 97).
07/01 AWB2700-1305-GB

95

POU Editor Settings dialog The setting options of this dialog box are largely self-explanatory and are not fully described here.

Figure 30: Settings Editor dialog

Editor: the options Automatic and Free of the Column Adjustment control the column width, i.e. the width of the entry cells in the declaration section in Syntax mode. Automatic: column adjustment automatically adjusts to the width of the longest entry. Free: the column width is fixed as set, even with long entries. The whole entry can be seen by moving the cursor within the entry field.

96

07/01 AWB2700-1305-GB

User interface of the POU Editor Font: This is the same font and colour setting that can be carried out in the NAVIGATOR. For example, you can define the colour for keywords or the background colour of comments. Multiple-nested comments cannot be shown in the same colour. The settings you have made can be saved as a new scheme by clicking the Save As... button and entering a name for the scheme. Print: If you wish to print or display in the NAVIGATOR a project or parts of it selected via a make file, you can define the content of the output in the options selected here. For example, you can include or exclude in the output the display of the device configuration and the global data types. Customize Toolbars... menu Once this dialog has been opened you can adapt the toolbars of the POU Editor to suit your personal requirements or create additional toolbars. The toolbars of the POU Editor can be reduced in size by clicking the unwanted buttons and dragging them (mouse button depressed) over the edge of the POU Editor. You can increase the size of toolbars or re-compose them by adding the buttons from the dialog box or another toolbar. You can create your own toolbars named consecutively ToolBar1 ... n by dragging the buttons onto the screen. The toolbar created in this way can be positioned as required or hidden. It cannot, however, be removed from the list of available toolbars.
07/01 AWB2700-1305-GB

97

POU Editor

Figure 31: Customize Toolbars dialog box

Standard toolbar You can display or hide the standard toolbar via the View menu. It can be added to with the following buttons: - Buttons for using bookmarks

Within a file (POU or global types) you can assign a bookmark to a line in which the cursor is positioned. Bookmarks enable you to use the following symbols for finding particular positions in the programs.
07/01 AWB2700-1305-GB

98

User interface of the POU Editor

Next Bookmark

Previous Bookmark

You can use bookmarks in the POU Editor in both online and offline mode. In Free mode you can insert bookmarks in the instruction section or declaration section in the POU. For this position the cursor in the appropriate line and click the Set Bookmark button. The other buttons allow you to jump to the previous or next bookmark or delete all of them. Buttons for arranging several POUs on the desktop or for arranging the declaration section or instruction section.

- Buttons for changing the programming language:

Language elements toolbar You can display or hide the language elements toolbar via the View menu. The buttons available in the language elements toolbar depend on the programming language selected. They are inactive (dimmed), if the cursor is positioned in the declaration section.

07/01 AWB2700-1305-GB

99

POU Editor Output window The Output window is used for displaying the results of different operations. It is opened automatically as soon as the operation you have started has been executed. You can close the Output window at any time if it impairs your view of the screen. The Output window can display error reports, the results of a find/replace operation in several files, the results of a search for undeclared variables or a cross-reference file. The contents displayed depend on the operation you have started or on the file card tab that you have selected: Error report display An error report will appear if you have started a syntax check of the POU and Sucosoft S40 has found an error. Find/Replace display The results of a find/replace operation in several files will be shown with all the locations of the search string with the file name, line, column and program line in the declaration section and instruction section and in the global type file (usertyp.typ), if appropriate. Cross-reference file The cross-reference file is displayed for the current POU if you have selected File Cross-Reference File beforehand. This cross-reference file enables you to move easily to the required position of a variable in the instruction section. To do this, doubleclick the appropriate line in the cross-reference file list.
07/01 AWB2700-1305-GB

100

User interface of the POU Editor Display mode of the Output window The Output window can be docked or floated on the screen depending on the setting made. This is carried out via Options Settings Editor Output Window. The Output window is then displayed according to the setting made. When in docked mode the Output window is positioned directly below the Editor window. You can drag the Output window to the position required by clicking the handle and docking it to any of the four edges of the Editor window. A docked Output window is always visible and cannot therefore be moved to the background. An undocked Output window can always be moved to the background as required. You can bring one of the opened POUs or the Output window to the foreground as required by clicking the file card tab or via the Window menu.

07/01 AWB2700-1305-GB

101

POU Editor Variables declaration The declaration section is where you define the variables (assign a data type or a function block to the individual variables) you wish to link together in sequences in the instruction section. Depending on the application concerned, add other values to the declaration such as initial values, attributes or, in the case of directly represented variables, an address. A variable is identified by a name. This name must be different from the POU with which it is associated. Writing conventions for variable names are described in the sections Variables and Compliance with the IEC Standard, in the manual S40 Language Elements (AWB2700-1306-GB).
Element Name (variable names) Type (Data type) Initial value Attribute Address Comment Entry required required optional optional optional optional

This assignment of variables in the declaration section is called instantiating, whereby Sucosoft S40 automatically reserves the required memory in the PLC. Function blocks are also declared as variables. Functions occupy no permanent memory and are therefore not declared. Declarations and instances no longer needed should be deleted from the POU to minimise the amount of memory required.

102

07/01 AWB2700-1305-GB

Variables declaration Scopes for variables This section provides information on the permissible scopes for variables, according to the POU type concerned. Understandably, a program POU cannot recognise an External variable since the Global variable type is the only one that can be declared in program type POUs. A program POU can only occur once inside a project.
Table 1: Overview of permissible scopes for variables in the three POU types and with global types Scope Free mode VAR_INPUT VAR_OUTPUT VAR_IN_OUT VAR_GLOBAL VAR_EXTERNAL VAR Type Syntax mode Input Output Input/output Global External Local Type
            

FU

FB

PRG Global types

Input Input variables are used to transfer parameters to functions or function blocks. They can only be accessed as Read Only. Keyword: VAR_INPUT Output An output variable that is declared in the function block in which it is supplied as the return value. You can supplement the declaration of output variables with the attribute RETAIN or CONSTANT (see Page 114). Keyword: VAR_OUTPUT

07/01 AWB2700-1305-GB

103

POU Editor Input/output An input/output variable (also known as passing parameter) is read and processed by a function block and output under the same name. When the parameters are passed with the function block call, the IN_OUT variable receives a pointer to the transferred variable and its memory location. 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 type that does not permit write operations such as variables with the attribute CONSTANT. Input/output variables must assigned parameters and connected with every call. Keyword: VAR_IN_OUT Global You declare a variable as global in the program POU when you wish it to be valid in the program POU itself and in the function blocks called up by the POU. It must be declared as an external variable (VAR_EXTERNAL) in all the function blocks in which the variable is to be used. A global variable can therefore only be declared in the program POU. Global variable declarations can be assigned the attribute RETAIN or CONSTANT (see Page 114) as well as being assigned an address (see Page 114). Keyword: VAR_GLOBAL External If you wish to use a variable declared as global in the program POU within a function block it must be declared as an external variable in the function block. Keyword: VAR_EXTERNAL
07/01 AWB2700-1305-GB

104

Variables declaration Local A local variable is only valid in the POU in which it is declared. Global variable declarations can be assigned the attribute RETAIN or CONSTANT (see Page 114) as well as being assigned an address (see Page 114). Keyword: VAR Type The keyword TYPE is used for declaring userdefined, derived data types with local scope in the relevant POU. Derived data types are special data types you can derive, i.e. compile yourself, from elementary types. As an alternative to these local type definitions, you can make global type definitions via File Open Global Types. 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:
TYPE Pressure : INT (0..100); END_TYPE VAR ChamberPressure: Pressure; END_VAR

The variable ChamberPressure is thereby also an INT data type but can only hold values in the range of 0..100.Keyword: TYPE

07/01 AWB2700-1305-GB

105

POU Editor Declaring variables


Table 2: Overview of procedures Procedures Open POU Editor Select POU type Generate variables from topology? Generate other variables with the Declaration Wizard in Syntax mode in Free mode Page 109 Page 106 Program Function block Function

without the Declaration Wizard Page 112 Page 118

Changing declared variables Page 120

Generating variables from the topology This function is only available in program type POUs. You can transfer the physical PLC addresses defined in the Topology Configurator to the declaration section of a program POU in order to reduce the amount of editing required. These physical PLC addresses such as PLC inputs and outputs or elements of the communications memory are called directly represented variables. They are entered automatically for the global scope and are therefore known within the program POU as well as within the FBs that are called from this program. The assignment of symbolic names is useful but not compulsory (see the chapter Directly Represented Variables in the manual S40 Language Elements).

106

07/01 AWB2700-1305-GB

Variables declaration If you wish to create a new program POU, the POU Editor will first of all ask if you wish to create and declare variables from a topology.

Figure 32: Generate variables from a topology?

Answer with Yes and then select a topology from your current project. To extend the declaration of an existing program POU: Open the Insert Variables Declaration dialog box by choosing Insert Variables From Topology.... Then select a topology from your current project.

Figure 33: Topology selection

07/01 AWB2700-1305-GB

107

POU Editor Once you have opened the required topology, the variables are automatically transferred to the declaration section. They are assigned global scope. The name of the configuration file (*.dcf) is entered together with the drive, path and device specifications.

Figure 34: Example declaration from a topology

Only the (optional) assignment of symbolic names is required.

108

07/01 AWB2700-1305-GB

Variables declaration Declaration Wizard Variable declarations can be made "free-hand" or with the aid of the S40 Declaration Wizard. The S40 Declaration Wizard simplifies declarations by proposing the order and number of entries required, as well as a selection of available function blocks and data types. It also limits the possible scopes according to the POU type being processed. For example, the local, global and type scopes for the Program POU. Variables declarations using the Declaration Wizard are carried out in the Insert Variables Declaration dialog of the relevant PLC. This dialog box can be opened via Insert Variables Declaration..., the context menu, function key F5 or via the appropriate toolbar button. The symbol button is enabled if you show the declaration section in Syntax mode or if the cursor is in the instruction section.
Declare New Variable button

07/01 AWB2700-1305-GB

109

POU Editor

Figure 35: Declaration Wizard with a selection of manufacturer-defined data types

New variables can be accepted after you have selected a function block or data type and made the necessary entries for variable name, scope and length, if necessary. Only then is the OK button available and no longer dimmed so that variables can be accepted in the declaration section. Instances of function blocks, i.e. variables assigned with a function block, can be used as local and global variables in the program POU and as local or external variables in function block POUs. In order for a function block instance to 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.

110

07/01 AWB2700-1305-GB

Variables declaration The Manufacturer file card tab provides all the manufacturer-defined function blocks and data types available for the PLC used. The data types provide a group with derived data types and several groups with elementary data types. All the data types provided here are pre-defined and are identified by keywords. Further information and notes on manufacturerdefined data types and function blocks are provided in the Help system via the context menu (F1) or direct Help (?). The User file card tab provides all the user-defined function blocks and global data types available for the PLC used. These data types, also known as derived data types, are type declarations that were previously created via the Open Global Types function, see Section Opening/editing global types on Page 185.

07/01 AWB2700-1305-GB

111

POU Editor

Figure 36: Declaration section with a group of user-defined data types

If you have imported a library, its function blocks are available by clicking the appropriate file card tab (in this case "ControllerLib"). Syntax mode In Syntax mode the Variables Editor offers convenient, user-guided variable declaration.For example, you will not need to know the keywords for scopes; they will be entered automatically. Variables can be entered for each scope separately under a separate file card directly in the entry cells.

112

07/01 AWB2700-1305-GB

Variables declaration Procedure: If necessary, switch to Syntax mode. Click the appropriate file card tab at the bottom of the window to assign the new variable to a scope. The tab for the selected range is shown in the foreground.

Figure 37: Possible scopes for the program POU

Fill in the entry cells in the editing line.

Figure 38: Editing line for the program POU and Local or Global variable types.

The entry cells for Name, Type and Comment are available for every scope. Attribute and Address entry cells are displayed according to the POU and variable type involved. 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. The display of entry cells can be defined via Options Settings Editor Column Adjustment.

07/01 AWB2700-1305-GB

113

POU Editor Entry cells for variable properties in the Syntaxcontrolled Variables Editor: Name: Enter the variable name here. The length of the name is limited to 64 characters. 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. 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 can also be used with 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, i.e. 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.

114

07/01 AWB2700-1305-GB

Variables declaration Memory location identifiers: I: Q: M: IA: QA: IC: IP: QP: IPA: QPA: IPC: IS: SD: RD: Digital input Digital output Marker Analog input (not usable as bit operand) Analog output (not usable as bit operand) Counter input (not usable as bit operand) Digital input (peripheral direct access)* Digital output (peripheral direct access)* Analog input (peripheral direct access)* Analog output (peripheral direct access)* Counter input (peripheral direct access)* Status information (diagnostics) Send Data Communication data to a network station Receive Data Communication data from a network station

* (See Direct Peripheral Access for PS4-200 and PS4-300 in the section Language Extension in AWB2700-1306GB)

Data format identifiers: X or without letter: B: W: D: Example: I0.0.0.0.0 defines a Boolean input Bit size Byte Word Double-word

07/01 AWB2700-1305-GB

115

POU Editor Comment: Enter here any additional comments for the variable. In Syntax 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. (*Comment*). Conclude variable declaration by pressing the Enter key; the Editor will add an empty line to the end of it. Declare all variables of this scope 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 scopes in the same way after clicking the corresponding tab.

116

07/01 AWB2700-1305-GB

Variables declaration

Figure 39: Sample list of declared variables in Syntax mode

Due to its tabular layout in Syntax mode, the Variables Editor arranges its assigned components (name, type etc.) in a set format during declaration. Tabulators or line breaks 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. When writing (variables, for example) you may use upper and lower case letters as you wish. The POU Editor is not case-sensitive here.

07/01 AWB2700-1305-GB

117

POU Editor Free mode Free mode is designed for experienced programmers who are familiar with declaring variables in Sucosoft S40 and require a fast entry tool. In Free mode, every declaration line must be entered in the correct syntax. Errors will not be reported until the syntax check for the entire POU is carried out. Unlike Syntax mode operation, the Variables Editor shows all scopes all declared variables at the same time in Free mode, thus providing a better overview of variables already declared.

Figure 40: Declaration section in Free mode

118

07/01 AWB2700-1305-GB

Variables declaration Procedures: Switch to Free mode, if applicable. Declare the variables according to scopes in separate declaration blocks. Enter the appropriate keyword for the required scope. This is shown in colour. For greater clarity separate the individual components of a declaration line with tabs. You must observe the following sequence in declaration blocks: VAR must not be placed in front of VAR_INPUT, VAR_OUTPUT, VAR_IN_OUT. In general, all the variables described for Syntax mode are available (see Section Scopes for variables on Page 103). Enter the same variable properties that were described for Syntax mode (see Page 114). Conclude the declaration block with the appropriate keyword. Enter comments for further explanation of the corresponding declaration lines. Begin comments with an initial parenthesis followed by an asterisk and end them with an asterisk and a closing parenthesis, e.g. (*Comment*). Comments are also shown in colour. Saving a POU 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.
07/01 AWB2700-1305-GB

Sucosoft will show an error message if it finds an error, a missing END_VAR or comment ending, for example. Check the declaration section in Free mode and make sure that there are no additional characters before a VAR or after a END_VAR, and that all comments are correctly closed. 119

POU Editor Examples of variable declaration Free mode


Variable without initialisation: Variable with initialisation: IntermediateValue : INT; Qty : INT := 5;

AT %Q0.0.0.0.0 : BOOL; Directly represented variable, specified by a % character directly in front of the required physical address and a preceding AT identifier, without name and without initialisation: Directly represented variable without name and with initialisation: Directly represented variable with name and without initialisation: Example of a function block: AT %Q0.0.0.0.1 : BOOL := 1; Valve AT %Q0.0.0.0.2 : BOOL; Counter1 : CTU;

Changing declared variables To change the properties of a previously declared variable, first position the cursor on the name of the variable concerned either in the declaration section or the instruction section and then call the S40 Declaration Wizard.

120

07/01 AWB2700-1305-GB

Programming in IL Programming in IL Overview IL is a textual, line-oriented programming language. Each instruction line must be terminated with a line break. This has the following structure:
Label (optional) - Operator - Operand - Comment (optional)

Creating a POU in IL Requirement: The POU Editor and the desired POU type (program, function block, or function) must be open. Click the appropriate toolbar button if the IL programming language has not yet been selected.
Using the IL Editor

Once this button is clicked, the language elements toolbar will provide IL operators.

Figure 41: Toolbar buttons for IL language elements

07/01 AWB2700-1305-GB

Inserting operators and functions Enter the instruction list in the instruction section of the POU. The operators and functions can be entered directly or taken from the language elements toolbar. Use the F button on this toolbar or choose Insert Functions... to open a dialog box providing functions compatible with the PLC, from which you can create your instructions.

121

POU Editor

Figure 42: Function selection

The file card tabs provide the manufacturer-defined or, if applicable, user-defined functions or functions from imported libraries. Manufacturer-defined functions for the currently selected PLC are arranged according to functionality in folders. Select the desired function and click the OK button. Set the function parameters. You can quickly get instructions for this by selecting the function in the instruction section and pressing function key F1.

122

07/01 AWB2700-1305-GB

Programming in IL Inserting variables You can enter the variable name manually or insert a previously declared variable by mouse click. Open the Insert Variable dialog box and select the name of the variable in the selection list. This dialog box can be opened via Insert Variable, the context menu or via the appropriate toolbar button.
Insert Declared Variable toolbar button

Figure 43: Variable selection

07/01 AWB2700-1305-GB

123

POU Editor Inserting function block variables If you are dealing with a function block in your selected variables it will be inserted with all inputs and outputs if you leave the default option FB Instances with Prototype active. Otherwise, only the instance name will be inserted in the instruction section. Set the function block parameters. You can make comments for individual lines of the instruction list. 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*). Subsequent variable declarations, changing variable declarations Variables not yet used can be edited and at the same time declared from the instruction section with Insert Variable (Variable or Function Block). Enter the new variable name as the search string the Insert Variables dialog. Define the scope and confirm this dialog and the subsequent prompt with OK. Assign a function block or data type to the Insert Variables Declaration dialog and acknowledge it with OK. The new variable is inserted in the declaration and instruction section.

124

07/01 AWB2700-1305-GB

Programming in IL Used, but so far undeclared variables marked with ??? in the tool tip can now be declared from the instruction section: To do this position the cursor in front of the name of the undeclared variable and open the Declaration Wizard, via function key F5 for example. Add the missing entries to the existing variable name. Testing POUs Check the syntax of the POU or a global data type by clicking the toolbar button, function key F10 or via File Syntax Check
Syntax check

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 44: Syntax check with error message

07/01 AWB2700-1305-GB

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 and a short error description. Up to 400 errors can be listed; if more than 400 errors have been found, the remaining error messages will not be shown until the first 25 have been rectified. Correct the errors in ascending line order. Double-click on each error message to display

125

POU Editor the source of the error in the IL Editor the cursor is positioned in the faulty line. If you require further help in rectifying a particular error, select the error message concerned and press F1. The POU is saved with the syntax check. You will be asked to enter a file name when it is checked and saved for the first time. After the syntax check is successfully completed, the tool tip of a variable, depending on the declaration, shows the data type or the prototype of a function block, see Figure 27 on Page 92. Saving and closing POU Save the POU by clicking the corresponding toolbar button.
Save 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 as 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 subfolders. Choose File Save As... to save a POU file under a new name. The save operation is carried out exclusively in the currently opened project, even if the POU was loaded from another project. Close the POU via File Close.
07/01 AWB2700-1305-GB

126

Programming in ST Programming in ST Overview Structured text, or ST for short, is a PASCAL-based programming language. In PLC programming, ST simplifies the programming of loops and alternative instructions and the programming of powerful command constructs using abstract commands. The instruction section of a POU created in ST consists of at least one statement or a sequence of statements. Statements consist of command constructs that are combined to form an executable function. Each statement must be terminated with a semicolon. The syntax rules to be observed when creating a POU in ST are described completely in the manual S40 Language Elements (AWB27001306-GB), in the chapter Programming in Structured Text (ST). ST and IL sequences can be combined inside a POU if the IL sequence or ST statement is properly terminated. However, a POU containing ST elements cannot be displayed in graphical languages LD and FBD or completely changed to IL.

07/01 AWB2700-1305-GB

127

POU Editor Creating a new POU in ST Requirement: The POU Editor and the desired POU type (program, function block, or function) are open. In order to reduce the declaration work required, the hardware configuration of your PLC should be created beforehand in the TOPOLOGY CONFIGURATOR. Click the appropriate toolbar button if the ST programming language has not yet been selected.
Using the ST Editor

Once this button is clicked, the language elements toolbar will provide ST operators.

Figure 45: Toolbar buttons for ST language elements

Inserting operators and functions Enter the statements in the instruction section of the POU. The operators and functions can be entered directly or taken from the language elements toolbar. When inserting the assignment operator via the toolbar button, you can insert the variable directly that is to be assigned to the expression.
Assignment operator

128

07/01 AWB2700-1305-GB

Click the F button on this toolbar or choose Insert Function... to open a dialog from which you can insert PLC-compatible functions for your ST instructions.

Programming in ST

Figure 46: Function selection

The file card tab provides the manufacturer-defined or, if applicable, user-defined functions or functions from imported libraries. Manufacturer-defined functions for the currently selected PLC are arranged according to functionality in folders. Select the desired function and click the OK button. The function is entered with the necessary syntaxrelated additions. Set the function parameters. You can quickly get instructions for this by selecting the function in the instruction section and pressing function key F1.

07/01 AWB2700-1305-GB

129

POU Editor Inserting variables You can enter the variable name manually or insert a previously declared variable by mouse click. Open the Insert Variable dialog box and select the name of the variable in the selection list. This dialog box can be opened via Insert Variable, the context menu or via the appropriate toolbar button.
Insert Declared Variable button

Figure 47: Variable selection

130

07/01 AWB2700-1305-GB

Programming in ST Inserting function block variables The Insert Variable dialog is opened via the FB button on the toolbar, by choosing Insert Variable..., or via the context menu. The FB will be inserted with all its operands if you leave the default option FB Instances with Prototype active. Otherwise, only the instance name will be inserted in the instruction section. The function block is entered with the possible syntax additions to the operands. Set the function block parameters. Variables not yet declared can be declared now from the instruction section with Insert Variables Declaration (appropriate data type). Inserting control statements Control statements enable the required program flow in your POU. Control statements consist of either selection statements, iteration statements and jump instructions. Selection statements (alternative statements): Selection statements that you can use to control the program can be inserted in your statements using the language element toolbar buttons.

Figure 48: Alternative statement buttons

07/01 AWB2700-1305-GB

131

POU Editor Iteration statement: Iteration statements are used for the control of loops. While, Repeat and For loops are used to repeat sections of your POU until the defined condition is fulfilled.

Figure 49: Iteration statement buttons

Jump statements: Jump statements cause the immediate exit of a loop (Exit statement) or from a POU (Return statement).

Figure 50: Jump statement buttons

How to check, save and close your POU is described on Page 125.

Programming in LD

Overview The graphical programming language LD originated from the field of electromagnetic relay systems and is therefore especially suited to the 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).

132

07/01 AWB2700-1305-GB

Programming in LD 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 be entered below the network number. LD networks consist of the graphical objects: Connections (horizontal and vertical lines), Contacts and coils, Jump instructions, Function and function block calls. You can declare variables in the Variables Editor which is common to all programming languages. You will find a detailed description of variable declaration on Page 106. Programs can always be written in IL, LD and FBD programming languages interchangeably. This means that you can create a program in LD, for example, and then display it or continue working in IL or FBD. While doing this, you must take note of the restrictions which are explained in the section Section Changing programming language from Page 175. To create a POU in LD click on the LD POU Editor in the instruction section, i.e. via the corresponding toolbar button.
Using the LD Editor

07/01 AWB2700-1305-GB

133

POU Editor Once this button is clicked, the language elements toolbar will provide LD operators. All programming steps in the LD Editor are available in the LD language element toolbar.

Figure 51: LD language element toolbar buttons

In addition to the language element 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 basic structure of a POU, i.e. the network sequence and structure of the individual networks are described below. Identifying networks as jump destinations as well as entering variable names and comments are discussed in later sections. Variable names and jump labels are initially assigned the designation undef_opd in the graphical view of the POU. These must then be replaced with the required variable names or jump labels.

134

07/01 AWB2700-1305-GB

Programming in LD Creating a new POU in LD Requirement: The POU Editor must be open. First select the Program POU type and declare the variable as described on Page 106. Click the LD Editor button and, if necessary maximise the LD Editor window. Move to the instruction section. Start LD network Choose Insert Start LD Network or click the corresponding toolbar button:
Start LD network button

The first network will appear in the instruction section with a contact and a coil. You can also carry out this action via the toolbar or context menu.

07/01 AWB2700-1305-GB

135

POU Editor Execution control (jumps) Click the Unconditional Jump to a Network Label button.
Unconditional Jump button

The jump symbol, the element for entering and editing the jump destination will appear in the new network.

Press the Enter key. The Name Element window in which you enter the jump destination will open.

Figure 52: Naming an element as jump destination

Displaying and inserting operators All operators are made available via the Sucosoft S40 language element toolbar buttons.

136

07/01 AWB2700-1305-GB

Programming in LD Inserting FB variables Position the cursor at the required location in the instruction section of your LD POU. Select the function block from a list of all declared variables which you can open from the Insert Variable... menu item or via the context menu. Select the instance of the required function block and click on OK. The graphical symbol for the function block will appear with all inputs and outputs 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. You can reproduce any number of graphic elements in a network; however, only one function block call per network. Inserting functions Functions cannot be entered in LD networks. Switch to FBD to enter a function. When changing later to LD, the function is shown as a rectangular FBD symbol (see Section Creating a new POU in FBD on Page 153).

07/01 AWB2700-1305-GB

137

POU Editor Editing POUs in LD Select the section of the POU you wish to modify. 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 an individual element. To select several 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 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. 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 several 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.
07/01 AWB2700-1305-GB

138

Programming in LD Inserting an additional network A new network can be inserted in front of or behind an existing network. Select the network marking point of an existing network behind which the new network is to be inserted. Add the new network via Insert Start LD Network..., the context menu or via the appropriate toolbar button.
Start LD network button

Deleting networks Select the network to be deleted. Press the DEL key or select Delete from the menu bar or the context menu. The selected network will be deleted.

07/01 AWB2700-1305-GB

139

POU Editor Selecting networks as jump destination A network can be selected as a jump destination for a jump operation programmed in another network. Position the cursor in the network you wish to select as a jump destination. Click the toolbar button:
Insert jump label button

The Edit Network Jump Label dialog will open.

Figure 53: Editing the LD network jump label

Enter the name of the jump label, in this case Label_2, in the cell and confirm by clicking OK. The jump label name will appear in the network header of the selected network.

Editing a logical sequence An LD start network consists of a contact and a coil. You can insert and edit logic sequences in this network.

140

07/01 AWB2700-1305-GB

Programming in LD Inserting AND sequences Select the point on the horizontal line in which the new contact is to be inserted.

Press the space bar and a series contact will be inserted. The AND operator can also be taken from the language element toolbar.

Inserting OR sequences Select the contact or the network area to which a parallel contact should be added.

The OR operator can also be taken from the language element toolbar. A new contact will be added parallel to the selected area.

07/01 AWB2700-1305-GB

141

POU Editor Inserting conditional coils Select the horizontal line directly before or after the existing output symbol.

Select the required conditional coil from the language element toolbar 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 select 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.

142

07/01 AWB2700-1305-GB

Programming in LD Converting the sequence type You can change the logic sequence of a mixed AND/ OR sequence by adding or deleting vertical connection lines between the parallel branches. 1. Adding vertical connection lines In order to add a vertical line the two lines to be connected must be selected. Use the mouse or the cursor keys to select the first point between the parallel branches you wish to connect. Press the Ctrl key and hold it down while selecting the second point. Release the Ctrl key.

Press the space bar The selected points will be connected; the logic sequence has changed:

07/01 AWB2700-1305-GB

143

POU Editor 2. Deleting vertical connection lines Select the vertical line you wish to delete.

Press the DEL key or select Delete from the menu bar or the context menu. The selected line will be deleted and the OR before AND sequence becomes an AND before OR sequence:

Negating jumps, contacts or coils Only individual selected elements can be negated. Select the element to be negated.

Press the space bar The selected element will be negated.


07/01 AWB2700-1305-GB

144

Programming in LD You can also carry out this action via the toolbar button.
Negate button

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. at least one valid network start must be left after deleting. In networks with conditional jump operations the entire logic sequence can be deleted. An unconditional operation will remain in the network. At least one contact must be retained in networks with coils.

07/01 AWB2700-1305-GB

145

POU Editor Naming elements The contacts and coils 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. Select the element for which you wish to enter an element name.
0001 undef_opd >>undef_opd

Press the Enter key. The Name Element dialog box will open.

Figure 54: Naming LD Elements

Or select the variable from a list of all declared variables which you can open from the Insert Variables... menu item, the toolbar button or via the context menu.
Insert Declared Variable button

146

07/01 AWB2700-1305-GB

Programming in LD Enter names with Jump operations A jump symbol must be completed by defining the jump destination. Select the jump symbol for which you wish to define a jump destination.

Press the Enter key.

Figure 55: Naming an LD element as jump destination

Enter the name of the jump destination and confirm by clicking OK or the Enter key.

Entering network comments Each network can be assigned a comment of several lines in length. Position the cursor in the network. Choose Network Comment... from the context menu or click the corresponding toolbar button:
07/01 AWB2700-1305-GB

Network Comment button

147

POU Editor The Network Comment window will open.

Figure 56: Network Comment LD

Enter the comments and confirm by clicking OK. The comments entered will appear in the network header beneath the network number.

Creating function blocks in LD Requirement: The POU Editor must be open, you must have selected Function Block as POU type and must have clicked the LD Editor button. The rules for creating function blocks in LD are the same as those for creating program POUs.

148

07/01 AWB2700-1305-GB

Programming in FBD Creating functions in LD Requirement: The POU Editor must be open, you must have selected Function and must have clicked the LD Editor button. The rules for creating functions in LD are the same as those for creating program POUs. How to check, save and close your POU is described on Page 125 .

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 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 recognises the following objects: Connections Execution control elements (jumps) Function block and function calls Operators Operators, functions and function blocks are shown as rectangular block symbols with connection lines for inputs on 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. 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 can be added

07/01 AWB2700-1305-GB

149

POU Editor except for pre-switching conditions in the form of contact elements. 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 Variables Editor. FBD networks consist of the following graphical elements described below: Network labels, Network comment and Network graphics. Network label Every network which is to be a jump destination for another network must begin with an alphanumeric identifier or an unsigned decimal integer which serves as a jump label. This label must not be confused with the consecutive 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 several lines by pressing the Enter key.

150

07/01 AWB2700-1305-GB

Programming in FBD Network graphics Network graphics consist of graphical elements (block symbols) with input connection lines on the left and output connection 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 Variables Editor common to the programming languages. You will find a detailed description of the variables declaration on Page 106. Programs can always be written in IL, LD and FBD programming languages interchangeably. 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 Section Changing programming language on Page 175. To create a POU in FBD activate the FBD POU Editor in the instruction section via the corresponding toolbar button.
Using the FBD Editor
07/01 AWB2700-1305-GB

Once this button is clicked, the language elements toolbar will provide FBD operators. All programming steps in the FBD Editor are available in the FBD language element toolbar.

151

POU Editor

Figure 57: FBD language element buttons

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 differences between LD and FBD are in the programming of logical operations with binary operands. In addition to the language element 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 basic structure of a POU, i.e. the network sequence and structure of the individual networks are described below. 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. These must then be replaced with the required variable names or jump destinations.

152

07/01 AWB2700-1305-GB

Programming in FBD Creating a new POU in FBD Requirement: The POU Editor must be open. First select the Program POU type and declare the variable as described on Page 106. Then click the toolbar button for FBD programming and move to the instruction section. Start FBD network Choose Insert Start FBD network or click on the toolbar button:

The first network will appear in the instruction section with a contact and an assignment symbol.

Execution control (jumps) Click the Unconditional Jump to a Network Label button.
Unconditional Jump button

The jump symbol, the element for entering and editing the jump destination will appear in the new network.
07/01 AWB2700-1305-GB

153

POU Editor

Displaying and inserting operators All operators are made available via the Sucosoft S40 language element toolbar buttons. Inserting FB variables Function blocks are treated as individual networks. Position the cursor in the required place in the instruction section of your FBD POU. Select the function block from a list of all declared variables which you can open from the Insert Variable... menu item or via the context menu.
Function block call button

Select the required function block and click on OK. 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. Assign parameters with the appropriate variable identifiers and connections.

154

07/01 AWB2700-1305-GB

Programming in FBD

You can reproduce any number of graphic elements in a network; however, only one function block call per network. Inserting functions Choose 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. Select the complete connection line behind which a function is to be inserted.

07/01 AWB2700-1305-GB

Open the Function dialog box with the appropriate toolbar button and select the function required.

155

POU Editor
Function block call button

The Function dialog box will open, in which manufacturer and user-defined functions or functions from a library are organised 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 58: Insert function FBD

156

07/01 AWB2700-1305-GB

Programming in FBD Select the required function or enter it directly into the entry field and click on OK. The graphical symbol for the function will be inserted behind the selected location.

An error message will inform you if you are trying to enter a function with incorrect syntax. Deleting function blocks or functions Select the function block or function and press the DEL key or select Delete in the menu bar or context menu. The selected graphical symbol will be deleted.

07/01 AWB2700-1305-GB

157

POU Editor Editing POUs in FBD In order to modify a POU you must first select the appropriate part. You can either 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, also in conjunction with the Shift key, to select the elements required. To select several 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 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. 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.

158

07/01 AWB2700-1305-GB

Programming in FBD To select several 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. Select the network marking point behind which the new network is to be inserted. Select 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, and via Operators...) an unconditional jump and an unconditional return. Deleting networks Select the network to be deleted. Press the DEL key or select Delete from the menu bar or the context menu. The selected network will be deleted.

07/01 AWB2700-1305-GB

159

POU Editor Selecting networks as jump destination A network can be selected as a jump destination for a jump operation programmed in another network. Position the cursor in the network you wish to select as a jump destination. Choose Insert Edit Network Jump Label or click the corresponding toolbar button:
Insert jump label button

The Edit Network Jump Label dialog will open:

Figure 59: Editing the FBD network jump label

Enter the name of the jump label, in this case Label_2, in the cell and confirm by clicking OK. The jump label name will appear in the network header of the selected network.

160

07/01 AWB2700-1305-GB

Programming in FBD 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, 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 selected. The new graphical symbol is inserted to the right of the selected position. 1. Inserting operators Select the connection line behind which you wish to insert a new operator, e.g. a logical AND operator.
0001 SUB Measuring Value_1 Measuring Value_2 ispositive Result :=

07/01 AWB2700-1305-GB

161

POU Editor Clicking the Insert AND function button in the language element toolbar will immediately transfer the sequence to the selected point.
Insert AND function

0001

SUB Measuring Value_1 Measuring Value_2 ispositive AND Result undef_opd :=

Other sequences are available (next to the AND button) by the pressing the cursor key.

Figure 60: List of logical sequences

2. Inserting functions See Section Inserting functions on Page 155.

162

07/01 AWB2700-1305-GB

Programming in FBD Deleting graphical symbols Selected graphical symbols can be deleted from a network. When a selected sequence symbol is deleted, only the graphical symbols at the topmost input upstream and the graphical symbols downstream are kept. Select the graphical symbol to be deleted.

Press the DEL key or select Delete from the menu bar or the context menu. The selected graphical symbol will be deleted.

07/01 AWB2700-1305-GB

163

POU Editor Inserting inputs The number of inputs can only be increased for some logic sequence symbols and the arithmetic operations ADD and MUL. Select the input behind which you wish to insert a new input.

Click the Add Input To Function button.


Add Input To Function button

An additional input is inserted after the selected input.

In order to insert an input at the bottom, select either the existing bottom input or the graphical symbol itself.
07/01 AWB2700-1305-GB

164

Programming in FBD 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. Select the input to be deleted.

Press the DEL key or select Delete from the menu bar or the context menu. The selected input will be deleted.

You can also select and delete several adjacent inputs.


07/01 AWB2700-1305-GB

165

POU Editor 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 Select the connection line in front of the output symbol.

Select the operator from the language element toolbar. The usable operators, organised by group, are listed below.

Logic group: for Boolean outputs: S, R

Branches group: for Boolean outputs: JMPC, JMPCN, RETC and RETCN

166

07/01 AWB2700-1305-GB

Programming in FBD

Assignments group: for Boolean outputs: ST for other data types: ST for bit patterns: STN (by negating an ST instruction via the One's Complement function or the space bar)

Select the required operator. The appropriate graphical symbol will be inserted above existing outputs.

2. Inserting outputs behind an existing output Select the output behind which you wish to insert the new output.

07/01 AWB2700-1305-GB

167

POU Editor

Select the operators as described above. Select the required operator. The appropriate graphical symbol will appear below the existing output.

168

07/01 AWB2700-1305-GB

Programming in FBD Deleting outputs Individual outputs or several adjacent outputs can be deleted. At least one output symbol must be left when outputs are deleted. Select the output range to be deleted.

Press the DEL key or select Delete from the menu bar or the context menu. The selected output range will be deleted.

07/01 AWB2700-1305-GB

169

POU Editor Negating inputs You can negate inputs assigned to Boolean data types or bit pattern data types. Select the input to be negated.

Press the space bar. The selected input will be negated. You can also carry out this action via the One's Complement button in the language element toolbar.

170

07/01 AWB2700-1305-GB

Programming in FBD Negating outputs You can negate outputs assigned to binary or bit pattern data types. This does not apply to S and R operators. Select the output to be negated.

Press the space bar. The selected output will be negated. You can also carry out this action via the One's Complement button in the language element toolbar.

07/01 AWB2700-1305-GB

171

POU Editor Naming elements The contacts and outputs must be completed by entering the 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 Select the input for which you wish to enter a variable name or a constant. Press the Enter key. The Name Element dialog box will open.

Figure 61: Name Element, FBD

Enter the variable name directly or via the Clipboard or enter the value of a constant and confirm with the OK button, or select the function block from a list of all declared variables which you can open via Insert ? Variable..., via the toolbar button or via the context menu. Confirm the entry with the OK button or the Enter key. 2. Naming outputs
07/01 AWB2700-1305-GB

Select the output for which you wish to enter a variable name. The remaining procedure is the same as described in the section Name input.

172

Programming in FBD Entering names with Jump operations A jump symbol must be completed by defining the jump destination. Select the jump symbol for which you wish to define a jump destination.

Press the Enter key. The operation is also available in the context menu. The Name Element dialog box will open.

Figure 62: Name element as jump destination, FBD

Enter the name of the jump destination and confirm with the OK button.

07/01 AWB2700-1305-GB

173

POU Editor Entering network comments Each network can be assigned a comment of several lines in length. Position the cursor in the network. Choose Network Comment... or click the corresponding toolbar button.
Network Comment button

The Edit Network Comment window will open.

Figure 63: Edit FBD Network comment

Enter the comment (you can switch lines by pressing the Enter key) and confirm with the OK button. The comments entered will appear in the network header beneath the network number.

174

07/01 AWB2700-1305-GB

Changing programming language

How to check, save and close your POU is described on Page 125.

Changing programming language

In general, IL, LD and FBD programming languages are interchangeable if the POU is syntactically correct. If not, an appropriate error message will be generated. IL and ST language elements can also be mixed, however, they must be terminated with an IL sequence or an ST statement, as well as being syntactically correct. ST language elements and elements of the LD and FBD graphical programming languages cannot be mixed. The programming language can be changed in the following way: Choose Options Programming Language IL/ FBD/LD/ST or Select the desired programming language via the toolbar button in the standard toolbar.

07/01 AWB2700-1305-GB

Figure 64: Language selection button

175

POU Editor 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 the Sucosoft syntax is correct. When converting programs of this kind into one of the graphical languages, a network with the message Network cannot be graphically displayed will be issued for each program section which cannot be converted. The instructions and statements concerned will be displayed in IL.

Figure 65: POU section which cannot be graphically displayed

The following examples are offered to help you solve any problems arising from conversion restrictions.

Conditional function block call A CALC or CALCN function block call that was programmed in IL cannot be displayed graphically.

176

07/01 AWB2700-1305-GB

Changing programming language Example:


(* Conditional call of the CTU counter function block when the palletizing production step is running *) LD Palettizing CALC Counter_3( CU := Lightbarrier, RESET := RES_button, PV := 120 | full := Q, := CV )

After changing to LD or FBD the program section appears as follows (it cannot be edited here).

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.
LDN Palletizing JMPC Label_4 CAL Counter_3( CU := Lightbarrier, RESET := RES_button, PV := 120 | full := Q, ) Label_4:

07/01 AWB2700-1305-GB

177

POU Editor After changing to FBD the program section appears as follows:

Intermediate storage within an IL sequence Intermediate storage within a sequence is possible in IL programming. Example:
(* AND-before-OR-sequence, only displayable in IL *) LD var1 OR ( var2 AND var3 ST AND_result (* Intermediate storage not displayable in LD/ FBD *) ) OR var4 ST OR_result

178

07/01 AWB2700-1305-GB

Changing programming language After changing to LD or FBD the program section appears as follows:

Solution:
(* AND-before-OR-sequence, LD/FBD compatible, Part1 *) LD var2 AND var3 ST AND_result (* AND-before-OR-sequence, LD/FBD compatible, Part2 *) LD var1 OR AND_result OR var4 ST OR_result

After changing to FBD the program section appears as follows:

07/01 AWB2700-1305-GB

179

POU Editor

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 to the respective IL lines if you change back into IL format, and will be placed at the beginning of the IL sequence. Example:
(* Counting the produced parts *) CAL Counter_4( (* Instance of the CTD function block*) CD := Part, (* Pulses from a light barrier *) Load := SetKey, PV := 50 (* Quantity in a packing unit *) | empty:= Q (* Counter elapsed, i.e. Packing full *):= CV ) 07/01 AWB2700-1305-GB

After changing to FBD the program section appears as follows:

180

Changing programming language

After returning to IL the program looks as follows:

07/01 AWB2700-1305-GB

181

POU Editor POU Info The POU Info... function in the Editor provides useful help when using 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. With an open POU choose File POU Info... and click the Prototype button in the dialog box that opens. The following figure will appear:

Figure 66: POU Info

182

07/01 AWB2700-1305-GB

The prototype is shown in the right-hand part of this figure, i.e. the interface of an FB or function type POU.

Converting POU types 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. Requirement: The POU whose type you wish to change is open in the POU Editor. When the POU type is converted, there are some declarations that cannot be converted. This applies to the scopes that are not available with the new POU type (e.g. input or output variables in the Program POU). The instruction section is nevertheless accepted unchanged. Choose File Convert POU Type. Select the desired POU type in the list box that opens showing the current POU type with a check mark and the change will be carried out. The new POU type will be displayed in the title line of the POU Editor.

Figure 67: Convert POU type

Switch the Variables Editor to Free mode via Options Variables Editor Free Mode in order to have the entire declaration section with all variable types in view. Check both the instruction and the declaration sections of your POU. Save the POU.
07/01 AWB2700-1305-GB

183

POU Editor You can also use this option to convert the return value of a function POU currently in process to another return value. Choose File Convert POU Type. In the list box that opens, where the Function... POU type is marked with a tick, select Convert Function Type... to open the Function Type window where you can select the new function type and confirm the selection by clicking the Accept button.The return value will be converted and the new value will then be displayed in the title bar of the POU Editor.

Figure 68: Convert function type

184

07/01 AWB2700-1305-GB

Opening/editing global types Opening/editing global types You can easily make declarations of complex types, such as structures, that 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 choosing File Open Global Types. You can make type declarations by combining derived and elementary data types within the keywords TYPE...END_ TYPE (See Derived Data Types in AWB2700-1306-GB). Remember that although this kind of type declaration is valid for all POU types, it is only valid for the selected PLC!

Figure 69: Global user-defined data types


07/01 AWB2700-1305-GB

Unlike derived data types that only have scope within the POU concerned, the data types formed here are global, i.e. their scope is within the entire project. They can thus be used, for example, as data types

185

POU Editor 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.

Cross-reference file

This shows a list of all declared variables for the current POU including the POU lines in which they are used. It also provides the physical address or location of directly represented variables. The POU cross-reference file is created via File Cross-Reference File. The updated cross-reference file is then shown in the Output window. Doubleclicking the line that contains the required variable in the cross-reference file will cause the POU Editor to move to the position in the instruction section where the variable was first used. Menu item Print in the context menu of the Output window can be used to document the cross-reference file.

Figure 70: POU cross-reference file

186

07/01 AWB2700-1305-GB

A POU cross-reference file list for all POUs listed in the current make file can be created via File CrossReference File in the NAVIGATOR. This kind of central cross-reference file list shows, for example, the global/external interrelationships between program and function block POUs.

Topology Configurator (Offline)

Basic principles

Structure The Topology Configurator supports two operating modes: Offline mode and Online mode. In Offline mode you can create your hardware system and enter the information required for the topology. The topology configuration is then compiled with the program it belongs to and loaded into the PLC. Online mode is used for commissioning the system. You can use the Test & Commissioning tool to carry out extensive diagnostics and test functions, such as wiring tests or network diagnostics. Online mode is described in further detail in chapter Test & Commissioning.

Offline mode The Topology Configurator allows you to create the hardware configuration of your automation system. The CPU is the hardware component that forms the basis of this configuration. Starting from the CPU unit (master PLC), the local and remote expansions of the automation system are defined and assigned parameters in the graphical user interface of the Configurator. The graphical Topology Configurator supports both Suconet K and AS-Interfacetopologies. PROFIBUS-DP, PROFIBUS-FMS and INTERBUS topologies are configured with their own configurators:

07/01 AWB2700-1305-GB

187

Topology Configurator (Offline)


Table 3: Overview of the configurators Configurator in Offline mode Configurator in Online mode (Test & Commissioning) Suconet K AS-Interface PROFIBUS-DP PROFIBUS-FMS INTERBUS Sucosoft S40 + CFG-DP Sucosoft S40 + CFG-Suconet-P Sucosoft S40 + CFG-CMD CFG-DP CFG-Suconet-P CFG-CMD Sucosoft S40

Plausibility checks The range of possible functions and the availability of cards and modules in the selection windows is determined by means of plausibility checks within the Topology Configurator. In this way the Configurator only offers the options that are permissible within the context defined. Tasks and considerations like complex current calculations, checks on I/O utilisation, the maximum number of connectable network lines, the permissible location of cards/modules, the memory requirement, the maximum number of LEs or cards/modules as well as syntax checks are handled by the Configurator automatically, thus ensuring that all configurations that are created are actually plausible.

188

07/01 AWB2700-1305-GB

Basic principles The Topology Configurator will propose a suitable even numbered byte address for the highest output byte address of all configured PS416-OUT-400/-410 output cards. However the Topology Configurator cannot detect if you assign a PS416-OUT-410 (8 outputs) with a possible odd numbered byte address that overlaps the even byte address of a PS416-OUT400. These kinds of overlaps should therefore be avoided if you have mixed the configurations of PS416-OUT-400 and PS416-OUT-410 output cards!

Starting the Topology Configurator Start the Topology Configurator via The NAVIGATOR menu: Tools Topology Configurator or click the appropriate icon in the Sucosoft toolbar of the NAVIGATOR:
Topology Configurator

07/01 AWB2700-1305-GB

189

Topology Configurator (Offline) Network types Suconet K network PLCs used in a networked system can be programmed via a point-to-point connection established between the programming unit and the PLC concerned. The data is exchanged via Suconet K in master-slave mode. With Sucosoft it is also possible to program and commission subordinate PLCs in the first network level via a so-called master PLC, which is connected to the programming unit via a normal programmer interface. These PLCs are stations on Suconet K network lines that are managed by the master. Only one cable is thus required for programming, maintenance and communication, and several PLCs can be accessed from one central programming system.

190

07/01 AWB2700-1305-GB

Basic principles AS-Interfacenetwork The Actuator-Sensor Interfaceis an open-standard and rugged fieldbus system which extends the networkability of automation devices down to the field level, i.e. the lowest process level. This is a single master system. There is therefore only one master for every AS-Interfacesubnetwork, which addresses the slaves in succession and carries out read or write data exchanges with them. This singlemaster system operates a typical cyclical polling of slaves, and ensures a defined reaction time. The AS-Interface bus also features a user-friendly and rugged connection system. Its open system capabilities are promoted and protected by the AS-InterfaceAssociation. The ASInterfaceAssociation also defines the so-called profiles which lay down the specifications for particular groups of similar network stations. AS-Interfaceslaves are defined by: the IO code, the ID code, a maximum of four initial parameters. IO code The number and division of inputs and outputs are specified by the IO code. The IO code is a parameter value between 0 and F. Up to four inputs and outputs can be selected. ID code The ID code identifies the device type and thus defines the meaning of the data and parameter bits. It is used to distinguish slaves with the same IO code. The ID code is for the generic AS-Interface components, which are the first 15 components of the Type selection window, and which can be selected with hex. 0 to F. 191

07/01 AWB2700-1305-GB

Topology Configurator (Offline) When configuring non-Moeller devices (generic AS-Interfacecomponents), the device is uniquely identified by its IO code and ID code. 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. PROFIBUS-DP network The PROFIBUS-DP fieldbus is one of three different versions, all of which are compliant with EN 50170. PROFIBUS was developed for high-speed communication in applications for industrial automation and building services. DP stands for decentralised periphery and is based on the RS 485 protocol for data transmission. It covers layers 1 and 2 of the ISO/OSI reference model for networks. The PROFIBUS-DP network is configured in Sucosoft with the Topology Configurator and the PROFIBUS-DP CFG-DP Configurator (see online manual AWB-C2700-1336GB).

192

07/01 AWB2700-1305-GB

Operations Operations Toolbar functions The Topology Configurator has a toolbar with all the functions required for creating a configuration.

New Configuration: 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.

Figure 71: Creating a new configuration

The PLC Type selection field shows all the installed CPU types available. You must select one of the available CPU types listed. Open Configuration: Loads an existing topology configuration into the configurator. Save Configuration: Saves the edited configuration in a configuration file with the extension .dcf in the Source folder of the current project.
07/01 AWB2700-1305-GB

Print Configuration: Opens the standard Sucosoft print dialog.

193

Topology Configurator (Offline) Graphical printing is not implemented in this version. It is possible, however, to print out the configuration in list form. The displayed topology can be printed out as a graphic by pressing ALT+PRINT SCREEN with the Configurator window active in order to copy the graphic to the Clipboard, from where it can be loaded into MicrosoftPAINT and printed out. Local Expansion:This adds a local expansion to the selected PLC or network station, i.e. directly on the device. A selection list will appear with all possible expansion devices for the current configuration.

Figure 72: Local Expansion dialog

194

07/01 AWB2700-1305-GB

The Preselection drop-down list box allows you to divide the available expansions into groups to simplify the selection of the possible components. The selected components will then be shown graphically in the configuration. The device designation and the relevant technical data are displayed in the field at the bottom of the dialog.

Operations Remote Expansion (in the Suconet K network): Expands a network module or a network-compatible device via Suconet K. A selection list will appear with all modules and devices for the current configuration.

Figure 73: Remote Expansion dialog box

The Preselection drop-down list box allows you to divide the available expansions into groups to simplify the selection of the possible components. The selected components will then be shown graphically in the configuration. The device designation and the relevant technical data are displayed in the field at the bottom of the dialog.

07/01 AWB2700-1305-GB

195

Topology Configurator (Offline) Remote expansion (in the AS-Interface network):To add a remote expansion to an ASInterfaceline, you have to add a master module as a local expansion in the topology configuration or open a configuration already containing an ASInterfacemaster. You can then add remote expansions to the AS-Interfacenetwork. For this select the AS-Interfacemaster module, such as LE4-505-BS1, or any device in the AS-Interfaceline behind which you wish to add a new AS-Interfacenetwork component. Open the Remote Expansion window by clicking the Remote Expansion button or choose Edit Remote Expansion. A list of possible expansion modules is shown:

196

07/01 AWB2700-1305-GB

Figure 74: Remote expansion in the AS-Interface network

Operations Select an 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 of the specified profile. To get a list of all so-called generic components, which can be used to describe any AS-Interface device, choose All Profiles in the Preselection list. The names of the generic types indicate the number of inputs and output, e.g. 2 INP/2 OUT. Choose a profile in the Preselection list if you want to limit your selection to devices with a particular profile. Choose the required device from the Type list box. When specifying a new device, you are automatically prompted with the next unused address in the Station number pop-up list. If there are unused addresses between two stations, these will be assigned first of all. Change this value if you wish to set another unused address. The Properties field shows the particular features of the selected components: Manufacturer:Manufacturer of the selected AS-Interface component IO code:Each type is assigned a special IO code which appears automatically. The code 0 to F indicates the number of inputs and outputs. ID code: Identification code of a station type. For generic AS-Interface components selectable from 0 - F.

07/01 AWB2700-1305-GB

197

Topology Configurator (Offline) Input/outputs:Shows the number of inputs and outputs as well as their position 0, 1, 2 or 3 for the selected device type. The position of the X determines the address of the respective input or output in the PLC program. For generic AS-Interface devices, you must specify the ID code listed in the manufacturers documentation. Confirm your entries by clicking OK. Save the topology configuration by choosing Configuration Save As.... Specify a name for the topology configuration in the File Name field. The file is saved with the file name extension .DCF as the new permanent configuration in the Source folder for the current project. Delete:Deletes a selected element.

Parameters:Assigns the device parameters (if appropriate). The values are set in the Parameters dialog. These dialogs will have a different appearance depending on the device type (see the following examples).

198

07/01 AWB2700-1305-GB

Operations Examples of Parameters dialogs

Figure 75: Parameters dialog for PS4-341-MM1

07/01 AWB2700-1305-GB

Figure 76: Parameters dialog for PS416-AIO-400 analog I/O card

199

Topology Configurator (Offline)

Figure 77: Parameters dialog for AS-Interface

Procedure for assigning parameters: Create a configuration or load an existing configuration file using the Open Configuration button or by choosing File Open.... The configuration will appear in the graphic window of the Configurator. Left-click the device or card/module for which you wish to change the parameters. Click the Parameters button or choose Edit Parameters.... Set the required parameters. Save the new settings.

200

07/01 AWB2700-1305-GB

Operations Change Display: Toggles between graphical and compressed display. In compressed mode, the device names are shown abbreviated and the user descriptions of the components are not shown. Changing views does not affect the configuration functions available.

Figure 78: Compressed display of a topology configuration

07/01 AWB2700-1305-GB

201

Topology Configurator (Offline) 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 O Inputs Outputs

I+O Total number of inputs and outputs 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 in the status line the theoretical bus cycle time for the selected network line. The figure shown is a typical value for trouble-free communication. Clicking the button once more hides the information again.

202

07/01 AWB2700-1305-GB

Operations Changing a topology configuration Requirement: For this a configuration file must already exist. Load the existing configuration file using the Open Configuration button or by choosing Configuration Open.... The configuration will appear in the graphic window of the Configurator. Proceed as follows to change a topology configuration. Changing parameter data Left-click the device or device/module for which you wish to change the parameters. Select the Parameters button or Edit Parameters.... Change the parameters as required. Save the new settings. Adding new local devices Select the device directly to the left of the position where you want to insert the new device. Open the Local Expansion window by clicking the Local Expansion button or choose Edit Local Expansion.... A list of possible expansion modules is shown. Select the required device from the list and click OK to confirm. 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 module numbers shown above the device concerned.
07/01 AWB2700-1305-GB

With the PS416 modular controller, if you add a device to an empty slot, there is no need for the Configurator to update existing device numbers.

203

Topology Configurator (Offline) Deleting local devices Select a device to be deleted. Click the Delete button or choose Edit Delete. This will delete the element. With PS416 modular PLCs empty slots will be shown instead of the deleted cards. These can be removed also by clicking the Delete button once more. If the device to be deleted is connected to other subordinate elements such as slaves or local expansion modules, they are deleted together with the local device. A warning prompt warns you that subordinate elements will be deleted and allows you to cancel deleting if required. Adding new remote devices Add a new remote device to the AS-Interface network as described in Section Remote expansion (in the AS-Interfacenetwork):To add a remote expansion to an AS-Interfaceline, you have to add a master module as a local expansion in the topology configuration or open a configuration already containing an AS-Interface master. You can then add remote expansions to the AS-Interfacenetwork. on Page 196. Select the device directly to the left of the position where you want to insert the new device. Open the Remote Expansion window by clicking the Remote Expansion button or choose Edit Remote Expansion.... A list of possible expansion modules is shown. Select the required device from the list and click OK to confirm. The new station is inserted below the selected station, whilst all other devices below are moved one position further downwards. The Configurator automatically updates the device numbers of all affected devices. 204

07/01 AWB2700-1305-GB

Operations Deleting a remote device Select the device to be deleted. A remote device is always connected directly to the line. Click the Delete button or choose Edit Delete. A warning prompt will warn you that deleting the device will also delete all local expansion devices assigned to it. Confirm or cancel the deletion as required. Replace component You can also change the type of master in an existing configuration by replacing the device concerned. Select the master (first device in the topology configuration). Choose Edit Replace. This will open a selection window with a list of possible masters. Select the required device and click OK to confirm. A message will appear to notify you that the set parameters are not accepted. Confirm this prompt. The new master will then be added. Set the master parameters if necessary.

07/01 AWB2700-1305-GB

205

Topology Configurator (Offline) Topology configuration with Suconet K Topology configuration A hardware system for a special application can be made up of different network lines and stations connected to them. In this Single-master system one master and up to 30 slaves are possible. The topology consists of all the lines and stations (see Fig. 83 on Page 228) defined in the topology configuration. This topology configuration is therefore the overall configuration for the entire hardware system, and may consist of several individual device configurations.

Device configuration The device configuration must be created for each intelligent station (station with CPU that can run a user program) separately. It consists of a file containing all the information required by the intelligent station in order to operate its local and remote components, i.e. all the information for the Parameters dialog, I/O addressing and communication. The file is saved with the file name extension .DCF in the project. The Sucosoft S40 Topology Configurator cannot display several device configurations at the same time. An example of a displayed device configuration is shown in Fig. 87 on Page 233.

206

07/01 AWB2700-1305-GB

Topology configuration with Suconet K A configuration file defines the following types of stations: the master all local components of the master PLC; they are later identified by line and station number 0. all remote components of the master PLC (network slaves). Network slaves are configured differently, depending on whether they have their own CPU or not: Configuration of a slave without CPU Only enter this slave, if necessary, with connected local components, in the master configuration. Suconet K automatically selects the appropriate telegram length for these slaves and addresses the data ranges addressed in the application. The receive and send data lengths (RD/SD) do not have to be set. Configuring a slave with a CPU (intelligent slave) This kind of slave runs its own user program and therefore has its own configuration. As well as being specified in the master configuration, a slave configuration must also be created for it. In the slave configuration enter the station and any connected local components. Also set the receive and send data lengths (RD/SD) from the point of view of the slave.

07/01 AWB2700-1305-GB

207

Topology Configurator (Offline) In the master configuration enter this slave on the line concerned. Only the basic unit is specified in the master configuration and not the local expansions. Also set the receive and send data lengths (RD/SD) for this slave from the point of view of the master. Setting send and receive parameters Receive and send data lengths (RD/SD) do not have to be defined in the Topology Configurator for Suconet K communication between master and slaves without their own CPU. Suconet K automatically selects the appropriate telegram length and addresses the data ranges addressed in the application. For Suconet K communication between master and intelligent slaves (slaves with their own CPU), the number of receive and send data bytes (RD/SD) must be set accordingly in both the master and slave configurations. This is carried out in the Parameters dialog for the intelligent slave concerned. This is necessary since the data to be exchanged between master and intelligent slaves is communication data. The master cannot access the I/O data of the intelligent slave directly.

208

07/01 AWB2700-1305-GB

Topology configuration with Suconet K Define send and receive data in the master configuration as follows: Send data is data that the master sends to the intelligent slave. Receive data is data that the master receives from the intelligent slave. The number of send data bytes defined in the slave configuration must correspond to the number of receive data bytes defined in the master configuration and vice versa (see diagram).
Master RD SD Line 1 Intelligent slave RD SD

RD = 5 SD = 2

RD = 2 SD = 5

The data exchange is initiated with the operands RD (Receive Data) for reading and SD (Send Data) for writing.

07/01 AWB2700-1305-GB

209

Topology Configurator (Offline) Addressing the slaves Each configuration component is displayed with a network and module address and the relevant component designation. A name up to twelve characters in length can also be assigned to each component. The Configurator shows the entry in the component designation (for example, see Fig. 89 on Page 235). The three-digit number sequence appearing above each configuration component is the card or module address. It is automatically generated when the component is added to the configuration. The address consists of the three elements for line number, station number and slot/module number. This three-digit address corresponds to the first three numbers of the variable address in the PLC program. For example, a module with the number sequence 1.3.7 is accessed in a PLC program with the variable address %Q1.3.7.0.0. Line Number: The line numbers are automatically assigned by the Topology Configurator and are numbered consecutively in ascending order from left to right, the first line being assigned the number 1. The master is always assigned line number 0. The number of network lines that can be connected depends on the type of master used. Station Number: The station numbers of the slaves are assigned in ascending order from the master, so that the master is assigned the number 0 and the first slave the number 1 etc.
07/01 AWB2700-1305-GB

210

Topology configuration with Suconet K Module Number: The module numbers are assigned in ascending order from left to right so that the basic unit is assigned the number 0 and the first local expansion module the number 1 etc. Power supply units are not included in the configuration.

Master - slave operation with Remote control All slaves that are configured as intelligent slaves in a Suconet K network can be set for Remote Control mode if required. In this mode, intelligent Suconet K slaves with their operating mode selector switch either in Run or Run M-Reset can be synchronised with the operating status of the master (Run or Halt). For this the Suconet master must be connected and its startup phase must have been completed. Warning! When Remote Control is active, the following special case must be taken into account in the event of a failure and subsequent restoration of the power supply due to the different times for the restart phases (see following table).

07/01 AWB2700-1305-GB

211

Topology Configurator (Offline)


Master operating status Restart phase of a slave in relation to the restart phase of the master... ...shorter Boot (during restart) Ready (transition state after restart) Run (automatically after Ready) Slave operating status: Run (when slave restart phase completed) Master connection: Disconnected Slave operating status: Ready Master connection: Connected Slave operating status: Run Master connection: Connected ...longer Slave restart phase

Slave restart phase Slave operating status: Run Master connection: Connected

In order to prevent undefined states occurring in the sections of the installation controlled by the slave, the running of the slave user program should be made dependent on the secure Run state of the master. The communication status byte of the master can be used to see whether the Suconet K master is connected and in Run status. Example declaration
VAR Master _Statusbyte AT %ISB0.0.0.1 :BYTE; Master_Run_Status AT %IS0.0.0.1.1:BOOL; Master_Net_Status AT %IS0.0.0.1.6:BOOL; END_VAR Example instruction: LD Master _Statusbyte EQ 0 JMPCN End . . . End:

212

07/01 AWB2700-1305-GB

Topology configuration with Suconet K Special note with PS4-101-DD1 and PS4-111-DR1 The PS4-101-DD1 and PS4-111-DR1 compact PLCs can be run both as active slaves or passive slaves on the Suconet K line. When used as an active slave, which is also commonly known as intelligent slave, these PLCs run a user program and communicate with the master via receive and send data (RD/SD). This must be defined in the Topology Configurator on the master and the slave. When configured as a passive slave, without a user program, these PLCs provide the master with remote I/O (I/Q, IA/QA) information. The physical outputs (Q), however, can only be forced on passive slaves. The activation of an output byte on active slaves has no effect.

07/01 AWB2700-1305-GB

213

Topology Configurator (Offline) Special note with PS4-300 Synchronous operation of the Suconet K interface (default setting) Use Synchronous mode when you wish to synchronise the user program cycle with the Suconet K cycle. In this way both cycles are started simultaneously. This operating mode is the same for the PS4-200. The following two cases must be noted: User program cycle > Suconet K cycle:After one Suconet K cycle has elapsed, the next Suconet K cycle will be missed until the currently running program cycle is completed. The data exchange with the Suconet K slaves is therefore slower than is possible for Suconet K. User program cycle < Suconet K cycle:If the Suconet K cycle is longer, i.e. the data in the communication buffer is not yet refreshed, only data that was previously used is available for the user program. If you have selected Synchronous mode, you can optimise access to Suconet K data by using the diagnostics bits NKD_1 to NKD_3 of the message byte (see manual Hardware and Engineering, PS4-300, AWB2700-1311-GB). These diagnostic bits are refreshed by the PS4-300 according to the number of configured Suconet K network lines and can be queried via the OS system function PLC_Message. A completed data exchange is indicated by the diagnostics bits for the duration of one program cycle.
07/01 AWB2700-1305-GB

214

Topology configuration with Suconet K If, for example, you have configured the PS4-341-MM1 with one Suconet K network line on its on-board SBI, this will refresh the NKD_1 bit. This can be used as follows for checking:
LD NKD_1 PLC_Message JCN ...

Depending on whether the PS4-300 is operating as Suconet K master or slave, a 1 at NKD_* bit will indicate the following: PS4-300 is master, NKD_1 = 1: data exchange with all slaves on line 1 has been completed. The receive data from all slaves is in the communications buffer, has been refreshed and can be read by the user program. The send data to the slaves can be overwritten by the user program. PS4-300 is slave, NKD_1 = 1: data exchange with the master of line 1 has been completed. The receive data in the communications buffer has been refreshed and can be read. The send data to the master in the communications buffer can be overwritten by the user program. When using the PS4-300 as Suconet K master with synchronous Suconet K mode, the maximum cycle time should not exceed 255 ms. Use Asynchronous mode if the program cycle and the Suconet K cycle should run independently, i.e. asynchronously. This has the same behaviour as the PS416. Data exchange is executed as quickly as possible for each station separately.
07/01 AWB2700-1305-GB

Operation as Suconet K slave If, for example, the power supply for all the Suconet stations of an installation has failed and has been restored, a PS4-300 running as a Suconet K slave

215

Topology Configurator (Offline) will consider itself as disconnected from the network if its restart phase is shorter than that of the master. After switching to Run the PLC will therefore set its DDK bit = 1. In this case the DDK bit signals a temporary fault that is cleared when the Suconet K master is restarted and the connection is completed. Configuration of send and receive data For problem-free Suconet K operation with a PS4-300 (as master and/or slave) you must not set 0 bytes send/receive data. If you do not require any data exchange, configure at least 1 byte of send data and 1 byte of receive data anyway.

216

07/01 AWB2700-1305-GB

Topology configuration with Suconet K Special note with PS416 Input and output cards As the digital I/O cards of the PS416 modular PLC are not addressed according to their slot location, there are two ways of describing cards: The digital cards can be selected and displayed individually. This method is useful if you wish to ensure that the actual configuration matches the visual display in the Configurator. This method, however, is not absolutely necessary. The digital I/O cards of one rack can be combined together and configured with a symbol. Depending on which method you choose, you will later be able to use a group display of all digital I/O or an I/O display for each individual card when using the Force/Display I/O function in the Test and Commissioning tool. Multi-processing Multi-processing is a configuration in which several PS416 controllers are interconnected and exchange data via the local parallel bus. The following important points must be taken into account: When several PS416-CPU-200/300/400 cards are used in one rack, the function block CPUDataExchange can be used to exchange data between the individual controllers. For this the function block is used in the master and in the slave CPUs. This requires the following PS416 system configuration: Slot 2: Master CPU; Slot 4/6/8/...: Slave CPUs; PS416-CPU

07/01 AWB2700-1305-GB

217

Topology Configurator (Offline) Data is exchanged via a special 2032 byte memory range. Write or read operations to this data range can be carried out via a function block call. The PLC fitted in slot 2 is the so-called master PLC and all other CPUs are slaves on the local bus. In a configuration with several local CPUs remember that only the master CPU (slot 2) or the first CPU slave (slot 4) fitted in the rack is able to access the I/ O cards. There is an additional restriction for the slave card fitted in slot 4. It can only access digital I/ O cards. All other CPUs are not able to access local I/O cards. This must be taken into account in the configuration files for the CPU cards.

218

07/01 AWB2700-1305-GB

Topology configuration with AS-Interface Topology configuration with AS-Interface The configuration of an AS-Interfacenetwork is basically the same as for a Suconet K network, in which the configuration is started with the bus master. Once this is completed you can then address individual slaves in an AS-Interfaceline transparently using the Moeller address notation. Configuration can be carried out in two ways: You can create a complete AS-Interface configuration offline in the Topology Configurator. You can just create a basic configuration offline. Sucosoft will then automatically detect the AS-Interfaceslaves on a line. With the first method you create a topology configuration to which you add the AS-Interface master to a network line and add the slaves as remote devices. This procedure is basically the same as for a Suconet K configuration, although the slaves of an AS-Interfaceline can be modified as required. The second method also requires a topology configuration with a locally specified AS-Interface master. Sucosoft uses this basic configuration to automatically detect online all active slaves on the AS-Interfacenetwork. 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-Interfaceline and allows the PLC in Run mode to access all inputs and outputs of the AS-I devices.
07/01 AWB2700-1305-GB

219

Topology Configurator (Offline) Topology configuration with PROFIBUS-DP A topology configuration containing Suconet K and PROFIBUS-DP networks requires the use of two network configurators. The global configuration is created with Sucosoft, whilst the DP network is configured with a separate configurator (CFG-DP configurator) as part of the overall configuration. This configurator is also supplied with Sucosoft. The Sucosoft Topology Configurator just displays the DP master that starts the DP network. This card or module organises and executes the data exchange between the user program of the superordinate PLC and all connected slaves. The CFG-DP Configurator is used to define the bus parameters of the PROFIBUS-DP network. It is also used for configuring and assigning slave parameters and defining the allocation to one or several DP master cards or modules. The diagnosis and monitoring of the DP network is carried out with the DP Configurator. The configuration of the PROFIBUS-DP network is loaded directly on the DP master card or module with the CFG-DP Configurator. If the DP master is an LE4-504-BS1 module you must specify in the Parameters dialog the name of the PROFIBUS configuration file created in the CFG-DP Configurator.

220

07/01 AWB2700-1305-GB

Topology configuration with PROFIBUS-DP Deviations between current and saved DP configuration When the user program is started, the current DP configuration of the DP master is registered by the system and saved as the permanent configuration. When the PLC is restarted after the power supply is switched on, the current configuration of the DP master is compared with the permanent configuration saved. The user program cannot start if any differences are detected. The PLC will then remain in Halt status.

Accessing the I/O of a PROFIBUS-DP slave PROFIBUS-DP slave I/O can be addressed via I or Q operands. For example, to access analog I/O use IW and QW to form the access address.

Syntax check of access addresses for PROFIBUS-DP slaves With the PS4-300 compact PLC the syntax of DP slave access addresses is checked during program generation. With the PS416 modular PLC the syntax of PROFIBUS-DP slave access addresses is not checked until the program is started.

07/01 AWB2700-1305-GB

221

Topology Configurator (Offline) Maximum number of modules per slave The PS416-NET-440 and LE4-504-BS1 PROFIBUSDP masters support up to 60 DP modules per slave. In other words up to 60 I/O entries can be made in the CFG_DP Slave Configuration dialog.

Behaviour of the DDK or KOM diagnostics bits DP master The KOM diagnostics bit (PS416) and DDK diagnostics bit (PS4-341-MM1) are only set in the master CPU for a PROFIBUS-DP line when the master is in Run status (for Suconet in Ready and Run status). DDK signals a deviation between the actual configuration and the set configuration for one or several slaves, for example, due to wire breaks or a missing slave configuration. DP slaves The KOM diagnostics bit (PS416) and DDK diagnostics bit (PS4-341-MM1 or PS4-2xx-MM1) are not set in the slave CPU if a DP slave card/module (PS416-NET-441 or LE4-504-BT1) is disconnected. When the slave user program is in Run status, the NoDPCommunication diagnostics bit can be used to determine whether the slave is correctly exchanging data with the master.

222

07/01 AWB2700-1305-GB

Topology configuration with PROFIBUS-DP Changing the DP configuration with CFG-DP If the PLC is in Run status when the DP configuration is downloaded to the master using CFG-DP, it will automatically be switched to Halt. In order to address the new DP I/O, the user program must be adapted, re-compiled and reloaded onto the CPU. The user program of a PS4-341-MM1 must always be re-compiled using the Generate All function.

Startup of a PROFIBUS-DP line of the PS416 modular PLC Depending on the number of slaves connected and the baud rate set, the time required to start a PROFIBUS-DP line may take longer than the start of the user program. This will cause the KOM bit to be set and the Error LED to light up on the PLC. In this case use the PS_ClearKomBit function block to reset the KOM bit and only evaluate the KOM bit in the program from then. Further information on the PROFIBUS-DP Configurator is available in the online documentation AWB-C2700-1336-GB.

07/01 AWB2700-1305-GB

223

Configuration examples

Example with a local configuration (PS4-200) The following local configuration without network expansion illustrates the procedure for creating a topology configuration. Topology
Module no.

0 PS4-200

1 LE

2 LE

3 LE

4 LE

5 LE

Figure 79: Configuration with PS4-200

The configuration example consists of: one PS4-201-MM1 compact PLC with different local expansion modules (LE4) for I/O expansion: LE4-108-XD1: 8 digital outputs LE4-206-AA1: 4 analog inputs/2 analog outputs LE4-108-XR1: 8 relay outputs LE4-116-DX1: 16 digital inputs LE4-116-DD1: 8 digital inputs/8 digital outputs

224

07/01 AWB2700-1305-GB

Configuration examples Procedure Create a new configuration file under a new file name, here DEVICE_A. Select from the list the PLC type to be configured, in this case PS4-201-MM1.

Figure 80: Creating a new configuration

Use the Local Expansion button or choose Edit Local Expansion... to configure all the modules of the basic unit by selecting and adding them from the list. Save the completed configuration. The file is saved with the configuration name local specified at the beginning in the Source folder for the current project. The complete configuration is shown in Fig. 81. Remember that the address assignment of the modules depends on the order in which they are entered (automatic address assignment).

07/01 AWB2700-1305-GB

225

Topology Configurator (Offline)

Figure 81: Device configuration for PS4-200 (local slaves)

Fig. 81 shows the 3-digit numbering of each configuration component, which is used as card or module addresses. They are automatically generated when components are placed in the overall system. The address consists of the three elements for line number, station number and slot/module number. This three-digit address corresponds to the first three numbers of the variable address in the PLC program. For example, a module with the number sequence 0.0.4 is accessed in a PLC program with the variable address %Q0.0.4.0.0. If required modules can be set using the Parameters button or via Edit Parameters.... The CPU of the master PLC is usually defined as network master.

226

07/01 AWB2700-1305-GB

Configuration examples To set the parameters of the master, left-click it and call up the Parameters dialog via the Parameters button or via Edit Parameters.... Change the parameters as required and save the new settings.

Figure 82: Parameters dialog for PS4-201-MM1

07/01 AWB2700-1305-GB

227

Topology Configurator (Offline) Example with PS4-300


Module no.

0 PS4-300 1 Line no.

1 SBI 2 1

2 LE

3 LE

4 LE

5 LE Device A

PS4-150

Device B 2

PS4-200 Station 1 1

SBI

LE

Device C

EM

Device E

EM

Device F

PS4-200

SBI 1 1

LE

LE

Device D

EM

Device G

Station 2 EM Device H

Figure 83: Topology for configuration example with PS4-341-MM1 (for key see opposite page)

228

07/01 AWB2700-1305-GB

POW

SBI

INP

AIO

Device I

Configuration examples The configuration example consists of: Device A: PS4-341-MM1 compact PLC with an integrated SBI in master mode. The basic unit is locally expanded with an additional SBI as master (e.g. LE4-501-BS1) and 4 local expansion modules (e.g. digital modules like LE4-116-XD1) Device B: PS4-141-MM1 compact PLC with an integrated SBI in slave mode. Device C: PS 4-201-MM1 compact PLC with an integrated SBI as master, an additional SBI as slave and one local expansion module. Device D: A PS 4-201-MM1 compact PLC with an integrated SBI as slave and an additional SBI as master and 2 local expansion modules. Devices E, F, G, H: Four expansion modules (EM...) as remote expansion modules (e.g. EM4-201-DX1) Device I: Rack without CPU with a power supply unit, an PS416-NET-400 E SBI card (E= expansion mode), a digital input card (PS416-INP-400) and an analog I/O card (PS416-AIO-400).
Key to Fig. 83: PS4-300 PS4-150 PS4-200 SBI EM
07/01 AWB2700-1305-GB

Compact PLC (PS4-341-MM1) Compact PLC (PS4-141-MM1) Compact PLC (PS4-201-MM1) Serial bus interface (e.g. LE4-501-BS1, PS416-NET-400 E) Expansion module (e.g. EM4-201-DX2, EM4-201-DX1) Local expansion module (e.g. LE4-116-XD1, LE4-116-DD1) Digital input card (PS416-INP-400) Analog I/O card (e.g. PS416-AIO-400)

LE INP AIO

229

Topology Configurator (Offline) Procedure Create the configuration as described in Section Topology configuration with Suconet K on Page 206. Ensure that a configuration file is created for each device with its own CPU. In this example this is necessary for devices A, B, C and D. First of all create a new configuration file for the master (compact PLC PS4-341-MM1) called Device A. This configuration should define the local and remote expansions accessible for this PLC, which are all the local expansion modules of device A, the PLC of device D (PS4-201-MM1), and device I. The slaves of device A's SBI module (device B and the SBI of device C) should also be defined in the configuration file for device A. Device B, the PLC of device D and the SBI of device C are slaves with their own CPU, i.e. they should be defined in the master configuration (device A configuration) without their local expansion modules.

230

07/01 AWB2700-1305-GB

Configuration examples Configuration of device A


PS4-300 SBI LE LE LE LE A

PS4-150

PS4-200

SBI

LE

EM

EM

PS4-200

SBI

LE

LE

EM

EM

POW

SBI

INP

AIO

Figure 84: Configuration of device A


07/01 AWB2700-1305-GB

The shaded elements in the graphic should be defined in the configuration for device A.

231

Topology Configurator (Offline) Create a new configuration file with the name DEVICE_A and choose the type of the CPU to be configured from the list (in this example PS4-341-MM1).

Figure 85: Creating a new configuration

Use the Local Expansion button to configure all the local modules of this PLC, in this case LE4501-BS1, LE4-116-XD1, etc. (see Fig. 86).

Figure 86: Local expansion of device A

232

07/01 AWB2700-1305-GB

Configuration examples Use the Remote Expansion function to configure all network stations that communicate with device A as slaves via Suconet K (see Fig. 87). These are the CPUs of device D (master configuration) and device I.

Figure 87: Device configuration of device A with view of line 1

Specify the number of send and receive data bytes to be exchanged between the CPUs of device A and D (see also Page 208 ): Select device D and open the Parameters dialog. Enter the number of send and receive data bytes (in the example SD = 9 bytes, RD = 7 bytes); i.e. the CPU of device A is to send 9 bytes of data to the CPU of device D and should receive 7 bytes of data from it.

07/01 AWB2700-1305-GB

233

Topology Configurator (Offline)

Figure 88: Setting send and receive data bytes

These values must later correspond to the configuration of device D (see Page 242). Select the LE4-501-BS1 module and define the slaves of line 2 (PS4-141-MM1, LE4-501-BS1) using the Remote Expansion function. The topology configuration will now show a compact PLC (device B) in the master configuration and the network module LE4-501-BS1 (SBI) of device C. A separate configuration file will be created later for device C since it has its own CPU. The device configuration for device A only has the SBI of device C in line 2. Fig. 89 shows the configuration of device A with the view of line 2.

234

07/01 AWB2700-1305-GB

Configuration examples

Figure 89: Device configuration of device A with view of line 2

As the CPU of device B is a slave on the Suconet K line, the receive and send data bytes must be set in the Parameters dialog for this slave (see also Page 208). The Topology Configurator shows the complete network line selected. The remaining lines are indicated by a short line underneath the module. In this example, if you select the master PLC (PS4-341-MM1), line 1 will be displayed whilst line 2 is shown with a short line underneath the LE4-501-BS1 module. If the SBI is selected that is the master of line 2, the slaves of line 2 are shown.
07/01 AWB2700-1305-GB

Save the completed configuration. This will be saved under the name DEVICE_A, as specified at the start.

235

Topology Configurator (Offline) Configuration of device B


PS4-300 SBI LE LE LE LE

PS4-150

PS4-200

SBI

LE

EM

EM

PS4-200

SBI

LE

LE

EM

EM

POW

SBI

INP

AIO

Figure 90: Device configuration of device B


07/01 AWB2700-1305-GB

236

Configuration examples The configuration of device B simply specifies the compact PLC. Create a new configuration for device B (slave configuration). The selected compact PLC PS4-141-MMI will appear in the New Configuration dialog. Set the PLC parameters in the Parameters dialog as a slave since it is a slave on the Suconet K line. For this set the Bus status option to Suconet K slave on the General Settings tab. The configuration indicates this with a short line above the module. In the Parameters dialog set the station address on the Suconet K Slave tab to the address set in the master configuration (in example station number 1). You must also set the number of send and receive data bytes (see Page 208). Save the completed configuration. This will be saved under the name DEVICE_B, as specified at the start.

07/01 AWB2700-1305-GB

237

Topology Configurator (Offline) Configuration of device C


PS4-300 SBI LE LE LE LE

PS4-150

PS4-200

SBI

LE

EM

EM

PS4-200

SBI

LE

LE

EM

EM

POW

SBI

INP

AIO

Figure 91: Device configuration of device C


07/01 AWB2700-1305-GB

238

Configuration examples The shaded elements in the graphic should be defined in the configuration for device C. For this create a new configuration for device C with the name DEVICE_C. In this configuration define the PS4-201-MM1 compact PLC, together with the SBI the LE4-104-XP1 local expansion module as well as remote expansion modules EM4-201-DX2 and EM4-201-DX1. In the Parameters dialog for the SBI set it for slave operation and set the correct station address, in this case station 2. Save the completed configuration. This will be saved under the name DEVICE_C, as specified at the start.

07/01 AWB2700-1305-GB

Figure 92: Configuration of device C

239

Topology Configurator (Offline) Configuration of device D


PS4-300 SBI LE LE LE LE

PS4-150

PS4-200

SBI

LE

EM

EM

PS4-200

SBI

LE

LE

EM

EM

POW

SBI

INP

AIO

Figure 93: Device configuration of device D


07/01 AWB2700-1305-GB

240

Configuration examples The shaded elements in the graphic should be defined in the configuration for device D. For this create a new configuration for device D with the name DEVICE_D (slave configuration). This configuration should define the PS4-201MM1 compact PLC, the local expansion modules LE4-116-XD1, LE4-116-DD1 and remote expansion modules EM4-101-AA1W33 (device G) and EM-111-DR1 (device H). In the Parameters dialog for the PS4-201-MM1 set the CPU as slave since this is a slave on line 1. Fig. 95 indicates this with a short line above the module. For this set the Bus Status option to Suconet K Slave on the General Settings tab. The configuration indicates this with a short line above the module. Set the station address and the number of send and receive data bytes on the Suconet K slave tab of the Parameters dialog:

07/01 AWB2700-1305-GB

241

Topology Configurator (Offline)

Figure 94: Parameters dialog for CPU of device D

Station Address: The address set here must be the same as the corresponding address in the master configuration (in the example station 1). Send and Receive Data: In accordance with the master configuration (see Page 234) you must set 9 bytes as receive data and 7 bytes as send data; i.e. the CPU of device D is to receive 9 bytes of data from the CPU of device A and send 7 bytes of data back to it. Save the completed configuration. This will be saved under the name DEVICE_D, as specified at the start.

242

07/01 AWB2700-1305-GB

Configuration examples

Figure 95: Device configuration of device D

The status line of the Configurator shows the I/O utilisation and the theoretical bus cycle time of the selected network line. This information can be activated or deactivated using the Display I/O Utilisation and Display Bus Cycle Time buttons or by choosing Display I/O Utilisation and Display Bus Cycle Time. If the topology is so extensive that it cannot be displayed completely, use the Change Display button or choose Display Compress to switch to a more compact display form.
07/01 AWB2700-1305-GB

243

Topology Configurator (Offline) Example with PS416


Slots

0 POW

2 PS416 CPU 1

4 S B I 2 1

5 A I N

6 A I O

7 I N P

8 O U T

Device A

Line no.

PS4-200

Device B

Station

0 POW 2 0 POW 2 PS416 CPU 4 A I N

2 S B I

3 A I N

4 A I O

Device C

5 A I O

6 I N P

7 O U T

8 S B I 1 1

Device D

EM 0

LE 1 Module no.

LE 2

Device F

Station 2

EM 0

LE 1 Module no.

LE 2

Device E

Figure 96: Topology for configuration example with PS416-CPU-400 (for key see opposite page) Key to Fig. 96:

244

07/01 AWB2700-1305-GB

Configuration examples
PS416-CPU Central processing unit, (e.g. PS416-CPU-400) PS4-200 SBI EM LE INP OUT AIO AIN PS4-201-MM1 compact PLC Serial Bus Interface, e.g. PS416-NET-400 E, PS416-NET-400 Expansion module, e.g. EM4-201-DX2 Local expansion module e.g. LE4-116-XD1, LE4-116-DD1 Digital input card, (e.g. PS416-INP-400) Digital output card, e.g. PS416-OUT-400 Analog I/O card, (e.g. PS416-AIO-400) Analog input card, (e.g. PS416-AIN-400)

The configuration example consists of: Device A: PS416 modular PLC as master with a power supply unit and an integrated SBI, an SBI card in master mode (PS416-NET-400), two analog (PS416-AIN-400, PS416-AIO-400) and two digital cards (PS416-INP-400, PS416-OUT-400) Device B: PS4-201-MM1 compact PLC Device C: Expander rack without CPU with a power supply unit, an PS416-NET-400 E SBI card (E= expansion mode), and two analog cards (PS416-AIN-400). Device D: PS416 modular PLC as slave with a power supply unit and an integrated SBI, two analog and two digital cards, as well as one SBI card in master mode Device E, F: Two remote expansion modules (EM...) each with two local expansion modules (LE...)

07/01 AWB2700-1305-GB

245

Topology Configurator (Offline) Procedure Create the configuration as described in Section Topology configuration with Suconet K on Page 206. Remember that a configuration file is created for each device with its own CPU. Configuration files must therefore be created for devices A, B, and D. First of all create a configuration file for the CPU of device A (PS416-CPU-400). This should describe the local and remote expansion modules that can be seen from the line/device views from the master. In this example, these are the I/O cards of the modular PLC device A, the connected stations in the Suconet K network of the master, as well as the slaves of the SBI module on device A. New configuration files must also be created for the PS416-CPU-400 modular PLC of device D and device B. These must be configured as slaves.

246

07/01 AWB2700-1305-GB

Configuration examples Configuration of device A


POW PS416-CPU S B I A I N A I O I N P O U T A

PS4-200

POW

S B I

A I N

A I O

POW

PS416-CPU

A I N

A I O

I N P

O U T

S B I

EM

LE

LE

EM

LE

LE

Figure 97: Device configuration of device A

The shaded elements in the graphic should be defined in the configuration for device A.
07/01 AWB2700-1305-GB

Create a new configuration file and file name DEVICE_A. Select from the list the CPU type to be configured, in this case PS416-CPU-400 on slot 2.

247

Topology Configurator (Offline)

Figure 98: Creating a new configuration for device A

Define the local expansion of the central rack with all the relevant cards. These are the PS416-NET-400 network card, the PS416-AIN-400 analog input card, the PS416-AIO-400 analog output card, the PS416-INP-400 digital input card and the PS416-OUT-400 digital output card. Set the local expansion parameters as required.

Figure 99: Local expansion modules of device A

248

07/01 AWB2700-1305-GB

Select the PS416-CPU-400 and configure the network station via Remote Expansion. These remote cards are the CPU of device D (PS416-CPU-400) (master configuration), the EM4-201-DX2 expansion module with the

Configuration examples connected local expansion modules LE4-116-DD1 and LE4-116-XD1.

Figure 100: Remote expansion of device A with view of line 1

The receive and send data for the CPU of device D (slave on Suconet K line) must be set in the Parameters dialog (see also Page 208). Now select the PS416-NET-400 and configure the network stations of the line via Remote Expansion. The stations concerned are the PS4-201-MM1 compact PLC (device B, master configuration) and the SBI of device C (PS416-NET-400 E) with the local expansion modules PS416-AIN-400 and PS416-AIO-400. The line is automatically assigned line number 2.
07/01 AWB2700-1305-GB

249

Topology Configurator (Offline)

Figure 101: Remote expansion of device A with view of line 2

The receive and send data for the CPU of device B (slave on Suconet K line) must be set in the Parameters dialog (see also Page 208 ). Save the completed configuration. This will be saved under the name DEVICE_A, as specified at the start.

250

07/01 AWB2700-1305-GB

Configuration examples Configuration of device B


POW PS416-CPU S B I A I N A I O I N P O U T

PS4-200

POW

S B I

A I N

A I O

POW

PS416-CPU

A I N

A I O

I N P

O U T

S B I

EM

LE

LE

EM

LE

LE

Figure 102: Device configuration of device B

The configuration of device B simply specifies the PS4-201-MM1 compact PLC.


07/01 AWB2700-1305-GB

For this create a new configuration for device B with the name DEVICE_B (slave configuration). The selected compact PLC PS4-201-MMI will appear in the New Configuration dialog.

251

Topology Configurator (Offline) Set the PLC parameters in the Parameters dialog as a slave since it is a slave on the Suconet K line. For this set the Bus status option to Suconet K slave on the General Settings tab. The configuration indicates this with a short line above the module. In the Parameters dialog set the station address on the Suconet K Slave tab to the address set in the master configuration (in example station number 1). You must also set the number of send and receive data bytes (see Page 208). Save the completed configuration. This will be saved under the name DEVICE_B, as specified at the start.

252

07/01 AWB2700-1305-GB

Configuration examples Configuration of device D


POW PS416-CPU S B I A I N A I O I N P O U T

PS4-200

POW

S B I

A I N

A I O

POW

PS416-CPU

A I N

A I O

I N P

O U T

S B I

EM

LE

LE

EM

LE

LE

Figure 103: Configuration of device D

07/01 AWB2700-1305-GB

253

Topology Configurator (Offline) As device D has its own CPU, it must be defined in a separate configuration. For this create a new configuration with the name DEVICE_D (slave configuration) and define all the local expansion modules (PS416-AIN-400, PS416-AIO-400, PS416-INP-400, PS416-OUT-400, PS416-NET-400) as well as the network stations of the network card (device F). Remember to configure the CPU of device D as a slave since it is connected to line 1 of device A. In Fig. 104 you will notice a short line above the CPU of device Dindicates that it is a slave. In the Parameters dialog set the station address on the Suconet K Slave tab to the address set in the master configuration (in example station number 1). You must also set the number of send and receive data bytes (see Page 208).

254

07/01 AWB2700-1305-GB

Configuration examples

Figure 104: Configuration of device D

In the configuration of device D also define the stations of device F since the expansion module EM4-201-DX2 is a network slave and does not have its own CPU. Save the completed configuration. This will be saved under the name DEVICE_D, as specified at the start.

07/01 AWB2700-1305-GB

255

Topology Configurator (Offline) Example with AS-Interfacenetwork (PS4-200


)

Module no. 0 PS4-200 1 Line no. 1 SBI 2 1 2 LE 3 LE Device A

4 INP/3 OUT

Device C

2 Station

ATI1 DNSASI

Device D

EM2-105-DX1 Device E

4 RMQ-M2CASI

Device F

Station

EM 0

LE 1 Module no.

LE 2

Device B

Figure 105: Topology for the configuration example with AS-Interfacenetwork (for key see opposite page)

256

07/01 AWB2700-1305-GB

Configuration examples
Key to Fig. 105:
l

PS4-200 SBI EM LE 4 INP/3 OUT ATI1-DNS-ASI EM2-105-DX1 RMQ-M2C-ASI

PS4-201-MM1 compact PLC Serial Bus Interface, e.g. LE4-505-BS1 Expansion module, e.g. EM4-201-DX2 Local expansion module e.g. LE4-116-XD1, LE4-116-DD1 Generic AS-Interfacedevice Inductive proximity switch in the AS-Interface Interface for connecting sensors and actuators in the AS-Interface Interface for connecting RMQ in the AS-Interface

The configuration example consists of: Device A: PS4-201-MM1 compact PLC. The basic unit is provided with an additional SBI local expansion in master mode (LE4-505-BS1) and two other local expansion modules such as digital modules Device B: Expansion module (EM...) with two local expansion modules Devices C, D, E, F: AS-Interfacestation Procedure Create the configuration as described in Section Topology configuration with Suconet K on Page 206. As the example only contains one CPU (master), define all stations in one configuration file. Choose Configuration New... and assign a new file name (in this example AS_INTER) to create a configuration with the master (PS4-201-MM1). Choose Edit Local Expansion... to insert the master module for the AS-Interfaceline (LE4-505-BS1) and add the local expansion modules (LE...).

07/01 AWB2700-1305-GB

257

Topology Configurator (Offline)

Figure 106: Configuration of an AS-Interfacenetwork

Select the PS4-201-MM1 master and use the Remote Expansion function to add the EM4-201-DX2 expansion module. Select the EM and add the local digital expansion modules.

Select the LE4-505-BS1 AS-Interfacemaster and use the Remote Expansion function to define

258

07/01 AWB2700-1305-GB

Figure 107: Remote expansion of the master with view of line 1

Configuration examples the slave stations of the network line (devices C, D, E, F).

Figure 108: AS-Interfacenetwork stations (line 2)

If the topology is so extensive that it cannot be displayed completely, use the Change Display button or choose Display Compress to switch to a more compact display form.
07/01 AWB2700-1305-GB

Save the completed configuration. This will be saved under the name AS_INTER, as specified at the start. The file is saved with the file name extension .DCF in your project. 259

Topology Configurator (Offline) Setting the parameters of the LE4-505-BS1 master module Select the LE4-505-BS1 module and use the Parameters button or choose Edit Parameters....

Figure 109: Setting the parameters of the AS-Interface master

Check the Enable Autoaddressing option if you want to be able to swap a faulty slave on the AS-Interfaceline with the system running without having to stop the PLC. Confirm your entry with OK. For the Enable Autoaddressing function to work you must ensure that the faulty slave is replaced with one of the same type that is set to the standard address 0 and has the same IO and ID code values. If Autoaddressing is activated, the LE4-505-BS1 master module will automatically set the address of the new slave to that of the faulty slave and resume data communication with it.

260

07/01 AWB2700-1305-GB

Configuration examples Changing the parameters for a device Left-click on the AS-Interfacedevice for which you wish to change the parameters. Click the Parameters button or choose Edit Parameters.... This will call up the Parameters window for the device concerned. Change the parameters as required. Select one of the available station numbers for the selected device from the Station Number list box. Assign a name up to 12 characters long in the Name box for the station concerned. The Properties field shows four check boxes under Initial Parameters with which you can modify operating parameters. Refer to the relevant documentation of the device concerned as to the meaning of the four parameters. With generic AS-Interfacestations, which have IO codes that are determined by the input/output configuration concerned, the ID code must be adapted to the specifications in the station's documentation. Save the new settings by clicking the Accept button. The window will remain open. Select other AS-Interfacestations from the topology configuration in order to check or modify their configuration data. Close the dialog with Exit when you are finished.

07/01 AWB2700-1305-GB

261

Topology Configurator (Offline) Example with PROFIBUS-DP network (PS416-CPU-300)


CFG-DP configuration software Slots Slots

0 POW

2 PS416 CPU 1 Line no. Suconet K 2

4 S B I

6 A I O

7 I N P

Device A

PROFIBUS-DP

PS4-300 1

SBI

LE

Device D

Station 1 EM Device B 2 EM Device E

Station 2 MI Device C 3 ZB Device F

Figure 110: Topology for configuration example with PROFIBUS-DP network PS416-CPU SBI PS4-300 EM MI ZB INP AIO Modular PLC with integrated SBI Serial Bus Interface: PROFIBUS-DP master: PS416-NET-440 PROFIBUS-DP slave: LE4-504-BT1

PS4-341-MM1 compact PLC Expansion module, e.g. EM4-101-AAB64, EM4-204-DX1 Display unit, e.g. MI4-101-KC1 Operator unit, e.g. ZB4-504 IF1 Digital input card, e.g. PS416-INP-400 Analog I/O card, e.g. PS416-AIO-400
07/01 AWB2700-1305-GB

262

Configuration examples The configuration example consists of: Device A: PS416 modular PLC with a power supply unit and an integrated SBI, DP master as SBI (PS416-NET-440), one analog and one digital card Device B: Analog expansion module (EM4-101-AA1B64) Device C: Text operator panel (MI4-101-KC1) as remote expansion of the master Device D: DP slave communication module (LE4-504-BT1) with compact PLC (PS4-300 CPU) and local expansion (LE4-108-XD1) Device E: IO module as DP slave (EM4-204-DX1) Device F:Operator unit ZB4-504-IF1 Procedure Create the configuration as described in Section Topology configuration with Suconet K on Page 206. For every device with a CPU create a separate configuration file and define in it the local and remote expansions. Configuration of device A Open the Sucosoft Topology Configurator and create a new configuration file and file name DEVICE_A. Select from the list the CPU type to be configured, in this case PS416-CPU-300 on slot 2. Add the PROFIBUS-DP master interface (PS416-NET-440), the analog I/O module and the digital input card as local expansions. The PROFIBUS-DP line is ordered in the line numbering of the Suconet K lines (line 2). Select the master and add the analog I/O module (EM...) and the text operator panel (MI4...) as remote expansions. 263

07/01 AWB2700-1305-GB

Topology Configurator (Offline) Save the configuration under the name DEVICE_A.dcf.

Figure 111: Device configuration of device A

264

07/01 AWB2700-1305-GB

Configuration examples Configuration of device D Create a new configuration for device D with the PS4-341-MM1 compact PLC, the PROFIBUS-DP slave and the digital expansion module (see Fig. 112). Save the configuration under the name DEVICE_D.dcf.

Figure 112: Configuration of device D

Configuring the DP line with CFG-DP Open the DP CFG-DP Configurator, in which the DP master (PS416-NET-440) and the connected slaves (EM4-204-DX1, ZB4-504-IF1) must be configured. Use the CFG-DP Configurator for the slave configuration. In this configuration, assign the modules and their data to the addresses of the process data image of the master. These addresses correspond to the addresses of the slaves in the Sucosoft user program. For a detailed description of the CFG-DP Configurator and how to use it refer to the electronic manual AWB-EM 2700-1336 GB. The manual (PDF file) and the Configurator are supplied with Sucosoft S40.

07/01 AWB2700-1305-GB

265

Topology Configurator (Offline) Save the configuration and transfer this to the PS416-NET-440 using the CFG-DP Configurator. The configurations created in the Sucosoft Topology Configurator for devices A and D are combined with the user program during compiling and then transferred to the master PS416-CPU-300 and PS4300. The PROFIBUS-DP configuration is not compared with the user program in the PS416-CPU until the first cold start. You can evaluate the diagnostics data of the PS416-NET-440 and the network slaves during operation via the diagnostics bytes or the PdpStationDiag function block in the user program of the PS416. When using a PS416 as the master, instead of the PS4, use the LE4-504-BS1 as the DP master. In this case, you must specify the file names of the PROFIBUS configuration created in the CFG-DP Configurator in the S40 Parameters dialog for the LE4 -504-BS1.

266

07/01 AWB2700-1305-GB

Configuration examples

Figure 113: Configuration in the PROFIBUS-DP Configurator CFG-DP

07/01 AWB2700-1305-GB

267

Topology Configurator (Offline) Complex configuration example (PS416-CPU-400)


CFG-DP configuration software Slots

0 POW

2 PS416 CPU 1

4 A I N

5 I N P 2

6 S B I

8 I N P

Device A PROFIBUS-DP 1 ZB Device F

Line no. 1

0 PS4-300

Module no. 1 2 SBI 1 1 LE

3 LE

Station Device B

2 3

EM

Device G

Station

AS-Interface

4 OUT/3 INP

PS4-300

SBI

Device H

ATI2DNS-ASI

3 Device C 2 MI Module no. 0 3 PS4-200 1 LE

KLAS44 MI4-CFG-1 configuration software

Suconet K

2 SBI 1 1 Device D

Station Module no. 0 4 EM 1 LE

Suconet K

EM

EM

2 LE Device E

Figure 114: Topology for complex configuration example (for key, see opposite page)

268

07/01 AWB2700-1305-GB

Configuration examples
Key to Fig. 114: PS416-CPU PS4-200 PS4-300 SBI Modular PLC with integrated SBI PS4-201-MM1 compact PLC PS4-341-MM1 compact PLC Serial Bus Interface: PROFIBUS-DP master: PS416-NET-440 PROFIBUS-DP slave: PS416-NET-441 AS-Interfacemaster: LE-505-BS1 Suconet K master: LE4-501-BS1 Expansion module, e.g. EM4-204-DX1, EM4-101-AAB64 MI4-471-TC1 display element ZB4-604-IF1 operating unit Digital input card (PS416-INP-400) Analog I/O card (PS416-AIO-400) Generic AS-Interfacedevice Inductive proximity switch Networkable load feeder system

EM MI ZB INP AIO 4OUT/3INP ATI2-DNS-ASI KLAS 44

The configuration example consists of: Device A: PS416 modular PLC as master with a power supply unit, a DP master as a local expansion (PS416-NET-440), two analog cards and one digital card Device B: PS4-300 (PS4-341-MM1) compact PLC with two local expansion modules and one master module for the AS-Interfacenetwork with connected slaves Device C: Touch panel as operator interface Device D: PS4-200 compact PLC (PS4-201-MM1) with a local expansion module and one Suconet master with connected expansion modules as slaves Device E: Digital expansion module (EM4-201-DX2) provided with two local expansion modules Device F: Operating device (ZB4-604-IF1) as PROFIBUS-DP slave

07/01 AWB2700-1305-GB

269

Topology Configurator (Offline) Device G: Expansion module (EM4-204-DX1) as PROFIBUS-DP slave Device H: DP slave as slave local expansion module with connected compact PLC Procedure The example shows a complex configuration with the Suconet K, PROFIBUS-DP and AS-Interface networks. The separate configurators must be used for the DP network and for the MI4-471-TC1 touch panel. DP network: Create the DP network using the CFG-DP Configurator. In this configuration define the master with the connected slaves and save it as a separate configuration file. The Sucosoft Topology Configurator will only show the master (PS416-NET-440) that opens the line and the slave (PS416-NET-441) that passes on the information from all DP network slaves to the master. The configuration for the DP line is loaded to the master PLC via the CFG-DP Configurator. Touch Panel: The configuration of the touch panel is carried out with the MI4-CFG-1 Configurator, which is used to create a separate configuration file. Load the configuration directly from the MI4-CFG-1 Configurator to the touch panel operating system. Suconet K, AS-Interface: Sucosoft is used for the configuration of the Suconet K networks and the AS-Interfacenetworks. This is where the configuration files for devices A, B, D, F and K, are created since these all include a CPU.
07/01 AWB2700-1305-GB

270

Configuration examples Example with multi-processing operation


Slots

0 POW

2 PS416 CPU 1 2 1

4 PS416 CPU

6 PS416 CPU 3 EM

8 CNT

10 I N P

12 O U T

Line no.

1 Station 2

EM

LE

EM

EM

EM

Figure 115: Topology for configuration example with multiprocessing operation PS416-CPU CNT INP OUT LE EM PS416-CPU-300, PS416-CPU-400 modular PLC PS416-CNT-200 counter card Digital input card (PS416-INP-400) PS416-OUT-400 digital output card LE4-116-DD1 local expansion module EM4-101-DD2/88, EM4-201-XD2, EM4-101-AA2B84, EM4-101-TX1 and EM4-111-DR1 expansion modules

07/01 AWB2700-1305-GB

271

Topology Configurator (Offline) The configuration example consists of: A PS416 modular PLC as central master in multiprocessing operation. Two other PLCs are connected to it via the local parallel bus. The digital output cards (PS416-INP-400, PS416-OUT-400) are addressed by the second PLC. The PS416-CNT-200 counter card is addressed by the master via the local bus. The master is connected to two remote expansion modules (EM4-101-DD2/88, EM4-201-XD1) via Suconet K. One expansion module is connected in turn to a digital local expansion module. Procedure Create the configuration as described in Section Topology configuration with Suconet K on Page 206. Create separate configurations for all three CPU cards. As described in Section Topology configuration with Suconet K remember that in a configuration with several local CPUs only the master CPU (slot 2) or the first CPU slave (slot 4) fitted in the PS416 rack is able to access the I/O cards. There is an additional restriction for the slave card fitted in slot 4. It can only access digital I/O cards. All other CPUs are not able to access local I/O cards. In this example the first slave CPU fitted in slot 4 is configured so that its device configuration contains the digital I/O cards. The master PLC defines the counter card in its configuration file.
07/01 AWB2700-1305-GB

The communication between several PS416-CPU-200/300/400 controllers in one rack is handled by the local bus using the CPUDataExchange function block. For this the function block is used in the master and in the slave CPUs.

272

Configuration examples Configuration of device 1


Master CPU Slave CPU1 Slave CPU2 0 POW 2 4 6 8 CNT 10 I N P 12 O U T

PS416 CPU PS416 CPU PS416 CPU

EM

EM

LE

EM

EM

EM

Figure 116: Configuration of the master CPU

The configuration of the master CPU contains all the CPU slaves and the cards of the remote Suconet K line. The counter card is also defined as a local expansion. Choose Configuration New... and create a new configuration under a new file name (DEVICE_1). Ensure that the master CPU (PS416-CPU-400) is set for slot 2.

07/01 AWB2700-1305-GB

273

Topology Configurator (Offline)

Figure 117: Creating a new configuration for device 1

Expand the master CPU with the local expansion slave CPUs (PS416-CPU-300, PS416-CPU-416) and counter card (PS416-CNT-200). Select the master CPU and configure the Suconet K network stations via Remote Expansion. The modules of Device 1 include both the EM4-201-DX2 expansion module with LE4-116-DD1 local expansion modules, and the EM4-101-AA2B84 expansion module.

274

07/01 AWB2700-1305-GB

Configuration examples

Figure 118: Configuration of device 1

Save the completed configuration. This will be saved under the name DEVICE_1, as specified at the start.

07/01 AWB2700-1305-GB

275

Topology Configurator (Offline) Configuration of device 2


0 POW 2 4 6 8 CNT 10 I N P 12 O U T

PS416-CPU PS416-CPU PS416-CPU

EM

EM

LE

EM

EM

EM

Figure 119: Configuration of device 2

Choose Configuration New... and create a new configuration under a new file name (DEVICE_2). Ensure that the first slave CPU (PS416-CPU-300) is set for slot 4.

Figure 120: Creating a configuration for device 2


07/01 AWB2700-1305-GB

276

Configuration examples Add the digital input card (PS416-INP-400) and the digital output card (PS416-OUT-400) as local expansions of the slave CPU. Select the PS416-CPU-300 and add the EM4-201-DX2 as a remote expansion module.

Figure 121: Configuration of device 2

Save the completed configuration. This will be saved under the name DEVICE_2, as specified at the start.

07/01 AWB2700-1305-GB

277

Configuration of device 3
0 POW 2 4 6 8 CNT 10 I N P 12 O U T

PS416-CPU PS416-CPU PS416-CPU

EM

EM

LE

EM

EM

EM

Figure 122: Configuration of device 3

Choose Configuration New... and create a new configuration under a new file name (DEVICE_3). Ensure that the second slave CPU (PS416-CPU-400) is set for slot 6.

Figure 123: Creating a new configuration for device 3


07/01 AWB2700-1305-GB

278

Configuration examples Select the PS416-CPU-400 and configure the Suconet K network stations via Remote Expansion. The remote cards of device 3 include both the EM4-101-TX1 and EM4-111-DR1 expansion modules.

Figure 124: Configuration of device 3

Save the completed configuration. This will be saved under the name DEVICE_3, as specified at the start.

07/01 AWB2700-1305-GB

279

280

07/01 AWB2700-1305-GB

Form Editor

Overview

The Form Editor allows you to create your own print forms, i.e. cover sheets and forms that you can use for printouts of topology and POU project files. You can: specify a range or area in which the project file is to be printed out draw graphic elements such as lines, circles or rectangles incorporate standard text and bitmaps create different variable placeholders for current data such as time, date or POU name with supplementary text if required make changes to the standard cover sheets and forms supplied with Sucosoft S40.

User interface

Open the Form Editor via the Tools menu in the NAVIGATOR or the corresponding button on the toolbar.
Form Editor

07/01 AWB2700-1305-GB

This will open the application window of the Form Editor. The menu bar and toolbar containing the editing buttons are shown below the title bar. Both toolbars can be arranged on your desktop as required. To do this, click the handle (double vertical line) of the toolbar and, with the mouse button depressed, drag it to the required position. This position will be saved when you exit the Form Editor.

281

282

ack to b Send ward g for Brin ent elem Edit p itma de B t Inclu d tex ndar r sta Ente e circl Draw ngle recta Draw line me Draw ct na proje tion Posi ame file n tion ber Posi num page tion Posi time tion Posi date tion e Posi rang rint ne p Defi lour ll c o ne fi r Defi olou ne c ne li ess Defi ickn ne th ne li Defi form Save m n for Ope form New

Form Editor

The following pages provide a detailed explanation of the toolbar buttons in context.

Figure 125: Form Editor application window

Figure 126: Toolbar

Toolbar

07/01 AWB2700-1305-GB

User interface Menu bar The Edit, Elements, and Options menus are provided in addition to the standard File, View, Windows and Help menus. Edit menu Delete All: Use this command to delete all the entries in the print form. Delete: Use this command or the Del button to delete an element selected in the print form. Elements menu All the menu items in this menu are available via the toolbar. They are explained in Section Functions of the Form Editor. Options menu Line Thickness: The Line thickness option is used to define the width of the lines of drawn elements, such as lines, circles or rectangles. Line Colour: The Line colour option is used to define the colour of the lines of drawn elements. This setting is also applied to standard texts and the project texts that appear at the placeholders and in the print range. The Fill colour setting applies to the background colour of graphic elements drawn and all texts. To obtain a coloured background, deactivate the Transparent option in the Fill Colour dialog box. Font: Use the Font option to define the font type, font style and font size of the standard text.
07/01 AWB2700-1305-GB

283

Form Editor Grid Lines: Activating this option will cause the grid lines to appear on the screen. It is normally activated, thus enabling the snap-to-grid function, which aligns all the elements inserted on the print form to the grid lines. The horizontal and vertical distance between the grid lines, and therefore the positioning possibility for elements, can be set at between 2 and 50 pixels using the Width numeric entry field. Deactivate the grid lines and the snap-to-grid function via the Grid lines checkbox if you wish to position the elements in the form without any restrictions.

Figure 127: Grid setting

Functions of the Form Editor

This section describes the range of functions of the Form Editor and shows how to design a new print form, edit an existing standard print form, use a new print form for a project printout.

284

07/01 AWB2700-1305-GB

Functions of the Form Editor Designing a new print form Requirement: A form must have been opened in the Form Editor either via File New or by clicking the appropriate icon. The standard form format is A4 portrait. All elements are printed with the settings which were in force when they were created. The Form Editor will decide on the basis of the form contents whether this should be printed out as a cover page or as a form. A print form will be saved as a form as soon as you define for it a print range in which the contents of your project file are to be printed. Page setup Choose File Page Setup... to select a different paper format or page layout if required. Defining the print range Choose Elements Print Range or click the appropriate icon to define the area on the form in which the contents of your project file should be printed.
Define print range

Define the size of this range by dragging the cursor with the mouse button depressed. The font and font size of the text entries in the subsequent printout will be the same as the setting when the print range was defined.
07/01 AWB2700-1305-GB

Refer to Section Editing an existing standard print form from Page 291for how to subsequently modify the text entries. The term 'text entry' refers to the project text inside the print range and the text that will appear at

285

Form Editor placeholders (e.g. date, project name etc.) when the print form is printed out. Inserting placeholders The Form Editor also provides placeholders for current data such as Date, Time and Page Number, or project data such as POU file name and project name. You should set the required font, font style and size via Options Font.... before inserting the placeholders and possibly adding a supplementary text. Entered text will then be shown with these font settings. Choose the placeholder required via the Elements menu or the placeholder buttons in the toolbar.

Figure 128: Placeholders buttons

Click the mouse at the required location in the print form and enter the supplementary text assigned for the placeholder in the entry field. Correct any entry errors via Backspace, and undo any operator error with Alt + Backspace. Close the text entry function by pressing Enter.

286

07/01 AWB2700-1305-GB

Functions of the Form Editor Editing standard text On every printout using this print form standard text will appear in the way it was edited. The Line colour option is also used to define the colour of the standard text in the printout. You should set the required font, font style and size via Options Font.... before editing the standard text. Entered text will then be shown with these font settings. Choose Elements Standard Text or click the Standard Text icon.
Standard text

Click the mouse at the required location in the print form and enter the standard text in the entry field. Correct any entry errors via Backspace, and undo any operator error with Alt + Backspace. Close the text entry function by pressing Enter. Press Esc to abort text entry. Double-click a text element to correct the standard text. The font, font style and font size of standard text can also be modified later: Choose Elements Edit Element, select the text element concerned and press the right mouse button.

07/01 AWB2700-1305-GB

Figure 129: Changing the font of standard text

287

Form Editor Drawing graphic elements To draw a rectangle, for example, select the required element from the toolbar or via Elements Rectangle. Use the mouse to define the start position of the graphic element in the print form. Define the size of this element by dragging the cursor with the mouse button depressed. Choose Elements Edit Element or click the appropriate icon to move an element with the mouse.
Edit element

Graphic elements, placeholders, and standard text fields can be provided with coloured backgrounds via Options Fill Colour... or by clicking the appropriate icon. Placing elements in the background/foreground Large elements such as page frames or bitmaps may cover smaller elements. These may then be no longer selectable or visible. In this case, the covering element must be positioned in the background or deleted.
Placing elements in the background/foreground

To edit a covered element:

288

07/01 AWB2700-1305-GB

Functions of the Form Editor Choose Elements Edit Element or press the appropriate button and then select the covering element. Now choose Elements Element in Background or press the appropriate button to position the element in the background. Edit the required element. If required you can then choose Elements Element To Foreground to restore the previous state. Loading bitmaps Choose Elements Bitmap or click the appropriate icon to copy the required bitmap to the Clipboard. Use the mouse cursor to locate the starting position of the bitmap in the print form and click to set it.
Load bitmap

Deleting elements Choose Elements Edit Element or click the appropriate button and then select the element to be deleted (standard text, placeholder, graphic element or bitmap). Delete the element via Edit Delete or press the Del button. All elements of a print form can be deleted via Edit Delete All.

07/01 AWB2700-1305-GB

289

Form Editor Print form preview Choose File Page Preview to check whether the design of the opened print form meets your requirements. The preview shows the form with all its elements. The text entries appear on the printed form. Exit the page preview by pressing the Esc button, clicking the Close button or by starting a print job. Saving print forms Choose File Save As... or click the appropriate icon to save the new form.
Save

This opens the Save As dialog.

Figure 130: Saving print forms

290

07/01 AWB2700-1305-GB

The Form Editor saves your print form under the name specified with the file extension wmf and offers the standard Forms folder in your current Sucosoft S40 application.

Functions of the Form Editor Only save the print form in the proposed Forms folder. Otherwise the print form will not be available later for the printing out of a project file in the Printer Setup dialog.

Editing an existing standard print form Requirement: A standard form, e.g. gbform1.wmf, an English form template, has been opened in the Form Editor via File Open or by clicking the appropriate icon. Changing the format of text entries Proceed as follows to change the font and font size of project text entries: Choose Elements Edit Element or click the appropriate icon. Double-click the mouse inside the print range and set the required format in the Font dialog box. The format of created standard texts is not changed in this way!

07/01 AWB2700-1305-GB

291

Form Editor Correcting or deleting standard text Choose Elements Edit Element or click the appropriate icon. Double-click the standard text to be changed. Correct or delete the text, for example, using the Del key. The font, font style and font size of standard text can also be modified later: Choose Elements Edit Element, select the text element concerned and press the right mouse button.

Figure 131: Changing the font of standard text

Repositioning elements in the form All the elements of a form can be subsequently repositioned. Choose Elements Edit Element or click the appropriate icon. Select the element concerned and drag it to the new location in the print form with the mouse button depressed.

292

07/01 AWB2700-1305-GB

Functions of the Form Editor Using a new print form for a project printout Choose the Print Setup dialog in the NAVIGATOR before printing a project file. Choose here the required print forms from the Form and Cover Sheet drop-down list boxes. Open the Printer Setup dialog:

Figure 132: Printer Setup dialog

Form: Select the form on which you wish to print out your document. Cover Sheet: Select the cover sheet required. Standard forms and cover sheets in English forms begin with GB. German begin with D, French with F, Italian with I and Spanish with E.

07/01 AWB2700-1305-GB

293

294

07/01 AWB2700-1305-GB

Test & Commissioning

Overview

You can activate the Test and Commissioning tool in the Navigator via Tools Test and Commissioning or via the button in the toolbar.
Test and Commissioning

With the Test & Commissioning tool you can: Define programming connections Test wiring Test PLCs Perform network diagnostics Test programs Force variable values. The main window of the Test & Commissioning tool provides several tools for these tasks that can be accessed by means of toolbar buttons.

07/01 AWB2700-1305-GB

Figure 133: Test & Commissioning tool with opened Connection List window

295

Test & Commissioning Defining programming connections In this step you define the connections between the programming device and the PLCs. This is further described on Page 313. Carrying out a wiring test This step is carried out with the Topology Configurator online. The wiring of the connections between the controller and the production plant can be checked. For this the PLC must be connected, must be provided with a valid configuration, and the CPU must be in Halt status. The wiring test is described on Page 343. Carrying out a PLC test This function is accessible via the CPU Status button in the main Test and Commissioning window. It allows you to carry out troubleshooting on the hardware components. This is further described on Page 361. Carrying out network diagnostics This step is carried out with the Topology Configurator online. This allows you to view the CPU diagnostics data of the connected PLC as well as all other network stations and devices connected to it via Suconet K or AS-Interface For this the PLC . must be connected, must be provided with a valid configuration, and the CPU must be in Run status. These functions are described on Page 379. Carrying out program tests A program test can be carried out online with the POU Editor. This allows you to display the states of the variables used in the program online in IL, ST, LD or FBD and modify the POU online if necessary. Switching between programming languages is possible offline, i.e. when the Status display is

296

07/01 AWB2700-1305-GB

User interface switched off, and online when the Status display is active. This function is further described on Page 384. Forcing variable values With the PS416 and PS4-300 controllers, you can also force variable values statically or dynamically in the Variables window when the PLCs are in the Run status. A description of how to force variables is provided on Page 398.

User interface

The main window of the Test & Commissioning tool is bordered at the top by the title bar , the optional menu bar , and the optional and user-definable toolbar with the relevant toolbar buttons , and by the optional status bar at the bottom.

Figure 134: Main Test & Commissioning window

07/01 AWB2700-1305-GB

297

Test & Commissioning You can activate the Connection List, Topology Configurator, Program and Variables windows via the menu bar or toolbar in the main window of the Test & Commissioning tool. The Connection List window is automatically opened by Sucosoft S40. The toolbar consists of individual toolbars with different functions that are available when the relevant Test & Commissioning window is activated. The individual toolbar elements can also be removed from the toolbar and positioned as required on the user interface. The Sucosoft S40 tool tips offer simple and quick information on the buttons of the toolbars. The content of the menu bar automatically adjusts to the Test & Commissioning window that is activated. Follow the points below in order to change between the different test and commissioning windows: Starting from the standard Connection List window which opens automatically, you can move to the Topology Configurator and Program windows provided that: A device with an active process running is connected. You have opened in your programming device the project containing the POUs and the program code file of the active process. The Variables window is opened first from the Program window, provided that variables were transferred to the Variables window in a POU that has been opened online. For safety reasons Sucosoft S40 does not allow you to transfer a different program to the connected

298

07/01 AWB2700-1305-GB

User interface device or disconnect it if other windows are opened as well as the Connection List window. You have unrestricted access to the device once you have closed all windows apart from the Connection List window.

Menu bar The Options, Window and Help menus are available in all of the four Test & Commissioning windows mentioned above and offer the same functions. Descriptions of functions that are not part of the standard Windows range of functions are already explained for the Sucosoft S40 Navigator and POU Editor tools. The Test & Commissioning tool functions are described in this chapter primarily with reference to the toolbar buttons. The following description of the menu bars therefore only refers to functions that are not explained by the toolbar buttons or are not selfexplanatory. Menu bar for the Connection List window. File menu: The File menu is used for saving and printing the connection list, for setting up the printer (see Page 39 and Page 40), and for quitting the Test & Commissioning tool via File Exit. Device menu: Apart from the following descriptions, the individual items of the Device menu are described in the appropriate chapters or with the descriptions of the buttons in the toolbar:
07/01 AWB2700-1305-GB

Connect, Disconnect....: These menu items are used to establish or terminate the connection between the programming device and the controller. Password...: Use this menu item to define or modify passwords for the PS4-300 or PS416 PLCs in order

299

Test & Commissioning to prevent unauthorised access. The password can consist of up to eight numbers and letters. Procedure: Choose Device Password, enter the required password, enter it again in the Confirm Password box and click OK to confirm the entry.

Figure 135: Password request on PS4-300 and PS416

Delete: Use this menu item to remove the selected connection definition for the relevant automation product from the connection list. Deleting is only possible for a connection definition that is not used to connect a device. New: This menu item is used to add another connection to the connection list with the standard entries for name, PLC type and interface. Copy: Use this menu item to copy the selected connection definition for the relevant automation product to the Clipboard. Paste: Use this menu item to add a connection definition to the connection list from the Clipboard.

300

07/01 AWB2700-1305-GB

User interface Menu bar for the Topology Configurator window The function description for the menu items of the Topology Configurator in online mode is explained with the toolbar buttons (see Page 306). Menu bar for the Program window. Program menu: The Program menu offers the following functions: Show Next Level: This function is used to show the lower levels of the displayed program, e.g. a function block instance. Instead of using this function you can double-click a level to show the next level required. Show/Hide Branch: This function is used to show/ hide all subordinate levels of the selected POU. Instead of using Program Hide Branch, you can also double-click RESOURCE to hide the branch again. Display/Modify POU: Use this menu item to open the POU Editor in Online mode, with the current POU active, i.e. in the foreground. Display menu: The Display menu offers the following functions: Instance Tree and POU Calls: This function displays both panes of the Program window (standard setting). The instance tree appears in the left window, and shows the structure of the user program starting from the resource. The right window shows the names of the POUs that are subordinate to the POU selected on the left, as well as any additional information.
07/01 AWB2700-1305-GB

Only Instance Tree/Only POU Calls: Each of these functions hides the other pane.

301

Test & Commissioning Menu bar in the Variables window To show variables in the Variables window, you first transfer them from a POU that you have opened online in the POU Editor (see Section Variables window on Page 393). Variables menu:The Variables menu offers the following functions: Show Next Level: This function is used to show the variables of the POU selected in the Variables list. These variables were entered in the Variables list beforehand in the POU Editor (online mode). Instead of using this function you can double-click a POU to show the next level required. Show/Hide Branch: This function is used to show/ hide the variables of the selected POU. Status Display: This function starts or closes the Status Display for the variables shown (see Section Variables window on Page 393). Delete: This function is used to remove the selected variables of a POU in the left or right panes from the variables list. When you delete the last variable shown of a POU, the POU is also removed from the variables list. The variables are only removed from the window, and are not physically deleted. Display menu: The Display menu offers the following functions: Variables List and Info: This function displays both panes of the Variables window (standard setting). The POUs are shown in the left window with the associated variables. The right window shows the names and any additional information on the variables that are subordinate to the POU selected on the left. Only Variables List/Only Info: Each of these functions hides the other pane (left or right). 302

07/01 AWB2700-1305-GB

User interface Decimal, Hexadecimal, Binary, BCD: These functions are used to select the required display format in the right Info pane for the selected variables. This changes the display of the Status column of the Info pane. The display of string variables can be disabled accordingly with ANSI, ASCII.

Toolbar Buttons in the Connection List window The Connection List window shows the configured connections for the individual device types, the different programming device interfaces or coupling types. Connect: This button connects the device to the selected connection (see Page 341). Disconnect: This button terminates the connection to the connected device (see Page 342).

07/01 AWB2700-1305-GB

303

Test & Commissioning CPU Status: This button opens the Status and Diagnostics function in which you can check the status of the CPU (see Page 361). Transfer/File Manager: This button opens the Transfer/File Manager dialog with a display of the programmer unit. Here you can transfer the operating system or programs from the programmer to the PLC or memory card. You can also compare a program in the PLC with a program on the programmer unit or memory card. With the Controller tab active, you can display a program loaded in the PLC, cold start it, and, depending on the type of PLC, delete it there or transfer it to the memory card. The Memory Card tab allows you to format the memory card, transfer a program from it to the PLC or delete a program on it (see Page 349). Program Status: This button opens the Status and Diagnostics dialog with the Program Status display. This shows the operating state of the CPU, and provides buttons for starting stopping and deleting the program (see Page 357). Display/Change Date/Time: Use this button to open the Display/Change Date/Time dialog. Requirement: Only the Connection List window must be opened in the T & C.

304

07/01 AWB2700-1305-GB

User interface

Figure 136: Display/Change Date/Time dialog

The left of the dialog allows you to set the date and time as required, or accept the settings from the PC by clicking the button on the left. Sucosoft S40 will calculate the weekday on the basis of the date shown on the left. The right of the dialog shows you the date and time of the real-time clock in the controller CPU. It is not possible to make settings here. Clicking the middle button transfers the values shown on the left to the PLC's CPU, together with the calculated weekday. Click the Close button to close the dialog.

07/01 AWB2700-1305-GB

305

Test & Commissioning Buttons in the Topology Configurator window All functions with the Topology Configurator in Online mode can be chosen using the buttons of the configurator.

Figure 137: Buttons in the Topology Configurator window (Online mode)

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: Writes to a file the topology configuration read from PLC. The standard Save As... dialog is shown on the screen. Compressed Display: Switches between graphical and compressed display. In the latter case, the device names are shown abbreviated and the user descriptions of the devices are not shown. Display CPU Status: Shows the CPU Status if a CPU is selected in the topology configuration. The information displayed includes operating state, switch position, 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.

306

07/01 AWB2700-1305-GB

User interface Display Network Diagnostics: This switches on or off the monitoring of the network status in the Online display of the Topology Configurator. In the event of a fault, devices with communication problems are shaded in red, network lines with communication problems are shown as dotted lines 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. Diagnostics information is shown for the currently selected device or module. The descriptions for the diagnostics bits are always shown in English. Display/Force I/O: This function is used for carrying out a wiring test in your system. This is used to display and to change values for inputs and outputs of up to 10 devices simultaneously. The response of your system can also be tested by setting outputs (see Page 343).

07/01 AWB2700-1305-GB

307

Test & Commissioning Buttons when using an ASi topology configuration If you have selected an Asi component in the Topology Configurator (Online mode), the relevant menu items of the Components menu and the relevant buttons will be made available.

Figure 138: ASi buttons in the Topology Configurator window (Online mode)

ASi Master Status: Use this button to obtain information on the status of the LE4-505-BS1 master module. ASi Slave Status: Use this button to view the configured and actual values of a slave. If the ASI Slave status is started from the actual configuration when the PLC is in Halt, you can assign a new station number to a slave or change the current parameters. ASi Actual Configuration: Use this button to view the configured and actual values of a station. ASi Permanent Configuration: Use this button to view the permanent configuration. The permanent configuration is the one created in the Topology Configurator, which was loaded into the PLC as part of the *.pcd file.

308

07/01 AWB2700-1305-GB

User interface Buttons in the Program window Display/Modify POU: Use this button to open the POU Editor online with the selected POU active, i.e. in the foreground. This button and the corresponding menu item are only available if you have selected a POU in the instance tree of the Program window. Information on how to make online modifications on the displayed POU or how to display variables is provided in Section Program test from Page 384. Variables window: Use this button to open the Variables window and display a previously created variables list. The window will remain empty if no variables have been transferred.

07/01 AWB2700-1305-GB

309

Test & Commissioning Buttons in the Variables window Status Display: This button starts or closes the Status Display for the variables shown. Enter Forced Status: Use this button to enter the forced value and the forcing mode for the selected variables (see Section Forcing variable values on Page 398). Force: Values that were defined beforehand with the Enter Forced Status button are forced with this button. The variables concerned must be listed beforehand in the variables list. Cancel Forcing: This button cancels forcing for selected variables. Cancel All: This button cancels forcing for all variables.

310

07/01 AWB2700-1305-GB

Commissioning Commissioning When calling the Test & Commissioning tool from the Navigator for the first time with a newly created project, you must create a new connection list.

Figure 139: Creating a connection list

Confirming your entry with OK will open the Test & Commissioning tool with the Connection List window. This connection list shows an initial connection with the standard settings for device name, device type (PLC type, according to the selection in the Navigator ) and programming device interface.

Figure 140: Connection List window

You can change the standard settings as follows: Click the Device Name field and assign a name for the PLC to be connected or click in the Interface field and select another programming device interface. A new connection can be created via Device New. You can remove an unnecessary connection via Device Delete. Once you have created a connection list, proceed with commissioning according to the flow diagram given below. The steps will now be described in detail.

07/01 AWB2700-1305-GB

311

Test & Commissioning


Define establish PRG - PLC connection, page 313

Operating system present?* Yes

No Transfer operating system or boot from memory card, page 350

PLC test? No Transfer to the PLC, page 352

Yes Check CPU status, display diagnostics bits, page 361

Yes

Other tests?

No

Wiring test? No Exit Online mode, page 403 Modify POU offline and compile, page 62 Start program, page 357

Yes Display/force inputs/outputs, page 343

Yes

Other tests?

No

Test POU, page 387

No

Modifications online possible? Yes Modify POU online, possible force variables, page 396

* for PS4-300/PS416

Test other POUs? No Clear connection, page 342

Yes

312

07/01 AWB2700-1305-GB

Commissioning Overview of programming connections Sucosoft S40 automatically offers a standard pointto-point programming connection for a direct connection to the PLC (see the following section). Sucosoft S40 also offers three other kinds of programming connections that can be selected and assigned parameters in the Connection List window: Multidrop programming connections, see Page 315 Programming connection via modem, see Page 316 Programming via Suconet K, see Page 334.

Point-to-point programming connection (directly to the PLC) 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. Click the Interface Parameters button.
Interface Parameters button

The Interface Settings dialog box will appear.

07/01 AWB2700-1305-GB

313

Test & Commissioning

Figure 141: Interface settings for PS416

Enter here the required interface parameters for your programming connection: Only when setting interface parameters for a PS416 can an address be selected in the CPU Address list box. This is necessary for multidrop programming connections, see Page 315 . With PS4-200 compact PLCs the maximum transfer rate is 9600 Baud! Activate the Connection Via Modem check box if you want to program the PLC remotely via a modem. The programming connection is made in this case via the public telephone network. Detailed information on remote diagnostics is provided in Section Programming connection via modem on Page 316. Choose File Save to save the connection list. Note! When working with several CPUs and one programming device cable, reconnect via the connection list in the Test and Commissioning window after you have replugged the cable. Otherwise the second CPU would operate with the internal data of the first.

After you have specified the transfer parameters, you can then establish the connection between the 314

07/01 AWB2700-1305-GB

Commissioning programming device and the controller by clicking the Connect button, i.e. connect the PLC.

Multidrop programming connections A multidrop connection can be used to connect several PS416s to a serial interface on your PC. For this you require a UM 1.2 (RS 232 RS 485) interface converter or a later model, as well as a multidrop cable. Multidrop cable This cable must be prepared as follows:
SUB-D socket, 9-pole SUB-D plug, 9-pole SUB-D plug, 9-pole

1 6

2 7

3 8

4 9

1 6

2 7

3 8

4 9

1 6

2 7

3 8

4 9

Connection Converter 3 4 5 7 9 --------------------------

Connection PS416 No. 1 3 2 1 8 6 --------------------------

Connection PS416 No. n 3 2 1 8 6

Figure 142: Preparation of the multidrop cable

07/01 AWB2700-1305-GB

Settings on CPU Push the PRG interface selector switch to the right for RS 485 bus operation. For each PLC connected to an interface via a multidrop connection set the individual CPU address via the DIP switches.

315

Test & Commissioning These switches are on the right of the CPU. The CPU must be removed from the rack before it can be set. The factory setting for the programming interface is address 1. If the CPU is either the first or last station on the bus, set the RS 485 bus terminating resistors to ON. The bus terminating resistors of all other CPUs must be set to OFF. Setting in the Test & Commissioning tool Specify a connection in the Connection List window for each connected PS416, and enter a different Device Name (see Fig. 140 on Page 311). Enter the appropriate CPU address for each connection under Interface Settings (see Fig. 141 on Page 314). This provides an unambiguous identification for each CPU. Select a baud rate of 9600 baud. Restrictions Multidrop programming connections are subject to the following restrictions: No more than 31 PS416 controllers can be connected to one interface in this way. The transfer rate is limited to 9600 baud. Subordinate PS4-200, PS4-150 or PS4-271 PLC types cannot be programmed via Suconet K.

Programming connection via modem


07/01 AWB2700-1305-GB

Data can be transferred between a PC and the PLC via the public telephone network using a modem. A PLC that is connected to the public telephone network via a modem can be diagnosed, for

316

Commissioning example, from a PC which is located in another town or country and also connected to a PC via a modem. You can also remotely operate and test a PLC via modem. For example you can remotely load program updates into the PLC, check the status of machines or carry out program diagnostics and remedy faults. All functions that can be carried out locally with the Sucosoft software can also be carried out remotely via modem. Requirements: Activate the Connection Via Modem check box in the Interface Settings dialog if you want to program the PLC remotely via a modem (see Fig. 144 on Page 321). To commission your modem you need the following components: Telephone connection (on PC and PLC) 2 modems (with manual)1) PC with available serial interface Connecting cables to the telephone socket and to the DTE. 1) Recommended modems tested by Moeller in pairs:
Manufacturer ke Westermo Type LOGEM LGH 28.8D1 and LOGEM 928 TD-32 (DC)

07/01 AWB2700-1305-GB

317

Test & Commissioning Modem requirements Data transmission on telephone line: Modulation from V32 (9600 Bit/s, full-duplex) Data security from MNP4 or V42 Data compression from MNP5 or V42 Data transmission to DTE: 9600 Bit/s 8N1 (or 8E1 with an earlier hardware version of PS416-CPU-xxx than V04). The modems must be run in Transparent mode, i.e. they must not automatically form blocks, checksums or make block repetitions. 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. In the case of a private telephone exchange (PBX) the modem can be connected to a separate telephone extension. Establishing a remote connection (Overview) Establish remote connection to a PLC by carrying out the following steps: Check the switch positions on the PC and PLC modem and change if necessary. Connect PC and PLC modems (Page 319) Initialise PC and PLC modem (Page 321 and Page 326) Establish the connection (Page 329), Terminate the connection (Page 331), Protection of PLC from unauthorized access (Page 332).

318

07/01 AWB2700-1305-GB

Commissioning Connecting the PC modem 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 via the telephone network (see Fig. 143 on Page 320). Connect the modem to your PC and to the telephone socket as described in the modem manual. 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 PLCs: PS4-141-MM1 PS4-151-MM1 PS4-201-MM1 from version 05 PS4-271-MM1 PS4-341-MM1 PS416-CPU-400 from version 04 PS416-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 for the PS4-200 series controllers (PS4-141/151-MM1, PS4-201/271-MM1) and the PS4-341-MM1 controller are identical but are different from those of the PS416 series (PS416-CPU-200/300/400).
07/01 AWB2700-1305-GB

More information on wiring and technical information can be found in the Appendix and in the following manuals:

319

Test & Commissioning AWB27-1208-GB (PS416) AWB27-1184-GB (PS4-200) AWB27-1311-GB (PS4-300). Connect up the PLC modem to the PLC and the telephone socket and switch on the modem. The modem will carry out a short self-test and is then ready for operation. LEDs on the modem are provided to indicate the modems status.

Figure 143: Connecting modem to PC and PLC

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 will not cause any hazardous conditions for persons or machinery.

320

07/01 AWB2700-1305-GB

Commissioning Initialising PC modem Start the Test & Commissioning tool. Define a connection to the required device in the connection list (see Page 303). Click the Interface Parameters button or choose Device Interface Parameters. Enter the correct CPU address and select the appropriate baud rate. Activate the Connection Via Modem check box in the Interface Settings dialog. The dialog will then include the options for modem setting:

Figure 144: Interface settings for PS4-201-MM1


07/01 AWB2700-1305-GB

The settings in the Modem Connection section in the above dialog box are used to configure your PC modem.

321

Test & Commissioning Baud rate: The Baud Rate drop-down list is used to choose the transfer speed between the programming PC and the PC modem. 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. 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. With remotely configurable modems this can be set via the standard terminal software or by sending modem AT commands from your PLC program using the SendATCommand function block. The SendATCommand function block is described in AWB2700-1306GB, Sucosoft S40, Language Elements. Further information on initialising the PLC modem is provided on Page 326. Timeout delay: The Timeout delay in ms entry field is used to define a standard delay time depending on the baud rate. This value defines the maximum time that Sucosoft waits for a response from the PLC. The suggested value depends 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 a connection: The so-called AT commands, which are used to issue commands to the modem, have been standardised to a certain extent by the Hayes company. The AT Commands for the Connection text field is used to enter the commands for establishing the modem connection. In this way you can use this entry field to transfer an initialisation string (see Appendix) to the modem before the command for establishing the connection is entered.

322

07/01 AWB2700-1305-GB

Commissioning Start the connection establishment by clicking on the Connect button or via Device Connect.
Connect

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. The standard AT command for a standard telephone connection is ATDP for pulse dial. Tone dialling is activated using the ATDT command. If pauses are necessary during the dialling process, this can be achieved by inserting the letter W within the number to be dialled. If your PC modem is connected to a private 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.

07/01 AWB2700-1305-GB

323

Test & Commissioning Examples: ATDP02286021414 Dial the telephone number 02286021414 from a direct telephone connection using pulse dialling. ATDT00W02286021414 Dial the telephone number 02286021414 from a PBX using tone dialling; wait for the outside line signal after dialling 00. ATX3DT1414 Dial the telephone number 0228 602 1414 from a PBX without a normal dial tone using tone dialling. If the modem can store configuration parameters, save your configuration with the command AT&W0. The command ATZ and a number can then be used to call this saved configuration, e.g. ATZ0. AT commands for terminating a connection: This field is used to enter the commands that are executed via Device Disconnect or via the Disconnect button.
Disconnect button

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.

324

07/01 AWB2700-1305-GB

Commissioning Connection Check via DCD line: The program will inform you if the connection to the PLC modem is established. Programming actions can only be carried out when the connection is valid. To use the Connection Check via DCD line function, the PC modem must be able to evaluate the status of the PLC modem carrier signal. The AT&C0 command cannot therefore be used for the PC modem, as it keeps the DCD signal permanently set. Display connection protocol: If you activate this check box, you will see a detailed log of each of the modem commands and reactions while the connection is being established. 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. Wait for connection in s: This field is used to enter the maximum time that Sucosoft should wait for the connection via 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. Choose File Save to save the connection list.

07/01 AWB2700-1305-GB

325

Test & Commissioning Initialising the PLC modem Several options are also available for initialising the modem and assigning parameters: Set the parameters once with a standard terminal program on your PC before connecting to the PLC. The configuration must then be stored in the modems non-volatile memory (Page 327 ). In a PS4-300 or PS416 program you can use the SendATCommand function block to address the modem and send it AT commands via the PRG interface (Page 329). If remote configuration is supported by your modem, you can configure the PLC modem from a remote PC through the telephone line. The transfer rate for the PC and PLC modems must be the same . This must be particularly observed when there has previously been a direct connection between the programming device and PLC. In this case, the transfer rate set there must be the initial setting of the PLC for the new modem connection. Depending on the functions available on the modem and the quality of the telephone network, the transfer rate must be reduced before the modem connection is established. A transfer rate of 9600 baud is suitable for most conditions. With the PS 4-200 compact controller, the baud rate should be set to 9600 baud only.

326

07/01 AWB2700-1305-GB

Commissioning Initialising with a standard terminal program: You can initialise the modem with a standard terminal program, (e.g. Hyperterminal or Telix). Connect the PLC modem temporarily to a free serial interface on your PC. Start the terminal program and configure it to use the serial interface to which the modem is connected. Configure the serial interface as follows: Serial interface: 9 600 baud, 8 data bits, 1 Stop bit, no parity Flow control: disable XON/XOFF or CTS/RTS Local echo: OFF Terminal type: VT100 or similar. Check whether the PLC modem is ready and connected up correctly. In your terminal program, switch to Terminal mode, type in the characters AT and press Enter. The modem is ready and connected up correctly if it responds with the characters OK. Enter the following modem AT commands in the order shown. They are necessary to configure the modem for use with the PLC. The initialisation string shown in the Appendix for LOGEM 928 and LOGEM LGH 28.8D1 modems (Page 423) is an example. Since the necessary commands are not completely standardised 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.

07/01 AWB2700-1305-GB

327

Test & Commissioning Store the configuration settings in the modems non-volatile memory. Use the AT command AT&W0 to store the configuration in user setting parameter set 0. 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 user setting parameter set 0 following power up or reset. Disconnect the modem from the PC and connect it to the programming interface of 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:
AT Command AT%C0 AT\N0 AT&U1 AT-J0 Meaning Disable data compression Disable automatic error correction Additional error protocols with V.32 (e.g. Trellis) Disable V.42 detection

328

07/01 AWB2700-1305-GB

Commissioning Initialising via the PLC program: Use the SendATCommand function block in your PLC program in order to send the appropriate AT commands. Output the AT commands in the first cycle following the cold start to ensure that the modem is always correctly initialised without further program actions. See the manual AWB2700-1306-GB Sucosoft S40, Language Elements for information on the SendATCommand function block and an example of its usage. Initialising via remote configuration: An example of this is shown on Page 426. Using the modem with a private telephone exchange (PBX):When connecting up the modem to a private telephone network, pay attention to nonstandard 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. Setting up a modem connection Requirements: The parameters of the required PLC connection have been set and the modem is properly connected to the PC and PLC. Ensure that the baud rates between the modem and the DTE (PC or PLC) are the same. Establish the modem connection between the programming device and the controller by clicking the Connect button. If you have activated the Display Connection Protocol check box, a successful connection establishment will be indicated by an appropriate message (in the following picture the plain text message CONNECT): 329

07/01 AWB2700-1305-GB

Test & Commissioning

Figure 145: Connection protocol window with connection established

Confirm the connection establishment log by clicking OK. Sucosoft S40 establishes the connection to the PLC in the same way as with direct point-to-point connections. All the options provided by the Test & Commissioning tool with a direct connection between a programming device and a PLC are also available with the modem connection. Use the Clear Connection button in the SucoTerminal dialog to clear an existing connection. The SucoTerminal dialog will continue to remain open.
07/01 AWB2700-1305-GB

Clicking the Cancel button instead of the Clear Connection button will both clear the existing connection and close the SucoTerminal dialog.

330

Commissioning Terminating a modem connection Requirement: Only the Connection List window must be opened in the main T & C window. Proceed as follows to terminate the remote connection to the PLC from the main Test & Commissioning window: Click the Disconnect button or choose Device Disconnect.
Disconnect button

The connection is also terminated when the T & C tool is closed. If you have activated the Display Connection Protocol check box, the connection termination will also be displayed in the SucoTerminal dialog:

07/01 AWB2700-1305-GB

331

Test & Commissioning

Figure 146: Connection termination log window

If the log window check box is disabled, you will only see a short message to indicate whether the connection termination was successful or not. 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. Password protection is the same for all modems used, but differs according to the controller type as follows:

332

07/01 AWB2700-1305-GB

Commissioning PS4-300: With these PLCs, the PLC program can be protected with a password. The password must be entered for all actions that change the program or PLC status. See Page 300 for information on entering the password. PS416: A password can be assigned to the controller irrespective of the individual program or the number of simultaneously loaded programs. The password is requested each time you connect to the controller. See Page 300 for information on entering the password.

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 previously specified telephone number. Some modems allow several callback telephone numbers to be configured. Note that this feature is not available for all modems and needs to be explicitly activated. The PC modem must be configured for automatic call answering to use this option.

07/01 AWB2700-1305-GB

333

Test & Commissioning Programming via Suconet K PLCs that are designed for use in a Suconet network 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. 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. Information on whether a particular PLC type can be programmed via Suconet is contained in the documentation of the respective PLC. Requirements: Programming via Suconet K requires the following:
Programming software Sucosoft S40 from version 2.1 Programming cable PLC type PS4: ZB4-303-KB1 PS416: PS416-ZBK-210 PS4-141-MM1/PS4-151-MM1 PS4-201-MM1 from V 05 PS4-271-MM1 PS4-341-MM1 PS416-CPU-300/PS416-CPU-400 from V 04 PS416-NET-400 from V 05
07/01 AWB2700-1305-GB

334

Commissioning

d e

Figure 147: Programming via Suconet K (PS4) PC with Sucosoft S40 programming software ZB4-303-KB1 programming cable Master: PS4-201-MM1 from version 05 Station 1: PS4-201-MM1 from version 05 Suconet K, line 1

07/01 AWB2700-1305-GB

If the master PLC is a PS4-200 series compact controller, you can only program subordinate PLCs (stations) of the same series, but not PLCs with a different programming protocol, such as PS4-300, PS416-CPU-xxx.

335

Test & Commissioning

b
CPU NET 400 POW

POW

CPU

Figure 148: Programming via Suconet K (PS416) PC with Sucosoft S40 programming software PS416-ZBK-210 programming cable Master PLC: PS416 with PS416-NET-400 Suconet K card from version 05 Station 1: PS416 Suconet K, line 1

336

07/01 AWB2700-1305-GB

Commissioning Including networked PLCs in the connection list Requirements: In order to program PLCs via a Suconet K network, the master CPU must be configured as the network master. 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: Connect the master PLC to the subordinate PLC or PLCs via Suconet K. Define the direct connection between the programming device and the master, device example in the example below. Add a new line in the connection list with Device New. Select the name of the master from the Interface pop-up list.

07/01 AWB2700-1305-GB

337

Test & Commissioning

Figure 149: Including networked PLCs in the connection list

Enter the required name for the subordinate PLC in the Device Name box. Enter the number of the network line of the master and the station number (address) of the subordinate PLC. To do this click the Line list box. The first time it is clicked the Line box will automatically show a 1, and the Station box a 0 (unaddressed slave). Choose File Save to save the connection list. 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 the central programming system via Suconet K, new CPUs are factory set with the station number 0 (unaddressed slave). Make the necessary entries in the Device Name, Line and Station boxes, as described above, and save the connection list. Connect the new PLC to the network and transfer a small dummy program containing a topology configuration with the required final station number for the new PLC. For this read Section Transferring the program from Page 352.

338

07/01 AWB2700-1305-GB

Commissioning The station numbers in the connection list are updated automatically after a program has been transferred successfully and the user has confirmed the update. Save the connection list via File Save. The following method allows you to configure an entire, new network from a single programming device without loading the final user programs at this stage: Requirements: The master is already defined in the 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 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. Connect the first slave PLC to the Suconet K network. Enter the temporary address 0 (unaddressed slave) in the connection list. Establish the connection between PC and PLC and transfer the dummy program with the associated topology configuration. Repeat the above steps for the remaining slave PLCs.

07/01 AWB2700-1305-GB

339

Test & Commissioning 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 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 be taking place through the same Suconet K connection simultaneously. Programming performance The time response when programming through a master controller and Suconet K depends 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.

340

07/01 AWB2700-1305-GB

Commissioning Transfer errors, when transferring 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.

Connecting and disconnecting a PLC Connecting a PLC Requirements: The serial programming cable is fitted between the PC and the PLC. With the PS416 controller, check the correct position of the interface switch on the CPU card: RS 232 cable PS416ZKB-210 RS 485 UM1.5 interface converter A connection list is available. Select the required connection in the connection list. Establish the connection between the programming device and the controller by clicking the Connect button.
07/01 AWB2700-1305-GB

Connect button

341

Test & Commissioning An established connection is displayed by the symbol of a connected plug in front of the device name:
Connection established symbol.

If the Save Settings on Exit in the Options menu is active, starting the Test & Commissioning tool will automatically cause the reconnection of all devices that were connected during the previous session. The Program and Topology Configuration windows that were active during the last session are also opened. Disconnecting a PLC Requirements: Only the Connection List window must be opened in the main T & C window. Select the required connection in the connection list. Terminate the connection by clicking the Disconnect button.
Disconnect button

342

07/01 AWB2700-1305-GB

Commissioning Wiring test Test the correct functioning of sensors and actuators (inputs and outputs) of your system by carrying out a wiring test. Start the wiring test via the Online Topology Configurator. The Online Topology Configurator reads from the PLC the topology configuration that was entered when the project was created and shows this in the Topology Configurator window. You can inspect the input and output values of the different modules, cards and devices, set the outputs of the PLC to defined states and thereby check the reaction of the system. Requirements: An operating system must have been loaded beforehand on the PLC (see Page 350). The PLC must be connected and must be provided with a valid configuration with the inputs and outputs to be tested. The topology configuration must have been compiled beforehand with a program POU. The contents of this POU is not important but is used to provide a loadable program code file. The load operation is described in the chapter Transferring the program from Page 352. The wiring test can only be carried out with the CPU in Halt, i.e. no program running. Activate the Connection List window in the main T & C window and then click the Topology button.
07/01 AWB2700-1305-GB

343

Test & Commissioning


Topology button

The Online Topology Configurator will open showing the topology stored in the PLC. The optional user descriptions are shown automatically if there is a configuration that matches the one read out. The relevant buttons are made available. The digital I/O cards of the PS416 are not addressed through the slot number. Accordingly, the digital I/O cards 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. If the PLC is in Halt, the inputs can be displayed and the outputs forced to defined states irrespective of the user program. In Run status the PS4 controller can display the current status of inputs and outputs, and the PS416 can display the current input states.

344

07/01 AWB2700-1305-GB

Commissioning Displaying I/O Requirements: The Topology Configurator window must be opened. Select the devices whose input and output values you want to inspect, or to change while the controller is in Halt. To select several components, hold down the Ctrl key and left-click the components required in the Online Topology Configurator. You can select up to 10 components simultaneously irrespective of which line or network they belong to.

Figure 150: Selecting components

In this example the PLC (PS4-341-MM1) and the digital expansion module (EM4) are selected. Click the Wiring Test button or choose Component Display/Force I/O.
07/01 AWB2700-1305-GB

Executing a wiring test

A window which shows the input and output areas of the selected devices together with the current input values is opened. 345

Test & Commissioning

Figure 151: Display/Force Inputs/Outputs dialog

The values of the analog inputs and outputs are shown in decimal format.

346

07/01 AWB2700-1305-GB

The example shows addresses I0.0.0.0.2 and I0.0.0.0.4 of the input status byte ISB and the addresses I0.0.0.0.0, I0.0.0.0.3 of the input word IW0. 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 top section of the window shows the inputs and outputs of the PS4-341-MM1 master.

Commissioning Forcing outputs Requirements: The Display/Force I/O window must be open. Warning! The outputs must only be activated under supervision otherwise this will produce uncontrolled switching states in the system controlled. 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. To force outputs select the appropriate bits of the output word concerned and click the Activate button to set the bits.
Activate button

Use the Deactivate function to abort the operation.


Deactivate button

Use the Delete function to delete the selected bit position again.
Delete button

Set bit positions are indicated as lit LEDs. The hexadecimal value resulting from the bit pattern is shown alongside the output word.
07/01 AWB2700-1305-GB

Figure 152: Display of forced outputs

347

Test & Commissioning The example shows the address 0.0.0.0.5 of output word QW0. It is also possible to assign a particular value to analog outputs in the same way as for digital outputs. For this select the outputs to be forced and enter the required value:

Figure 153: Forcing analog outputs

Accept the value entered by clicking with the mouse in the Display/Force I/O window. Click the Activate button to transfer the specified value to the PLC. 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.

348

07/01 AWB2700-1305-GB

Commissioning Transferring the operating system You can only start a transfer to the connected PLC from the Connection List window. Other requirements: The serial programming cable must be fitted between the PC and the PLC. A connection list must be available. The PLC must be connected. Only the Connection List window must be opened in the main T & C window. With PS4-300 or PS416 PLCs you can replace an operating system that is missing or replace an old one. In order to transfer an operating system you must open the Transfer/File Manager dialog: Click the Transfer/File Manager button.
Transfer/File Manager button

07/01 AWB2700-1305-GB

349

Test & Commissioning Programming Device PLC For this select the Programmer tab in the Transfer/File Manager dialog. Select for the transfer the operating system file (.osf) format in the File Format list box. The name of the relevant operating system file is shown under File Name. The Transfer/File Manager window for PS4-300 and PS416 controllers looks as follows:

Figure 154: Transfer/File Manager dialog

Transfer the selected operating system file by clicking the Transfer to PLC button.
Transfer to PLC button

350

07/01 AWB2700-1305-GB

Commissioning An operating system can only be downloaded when the PLC is in the Ready state. 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 the transfer is started. The transfer can take several minutes, depending on the baud rate of the connection. The Transfer progress indicator will open to show the progress of the load operation. After successful transfer, the green READY lamp lights on the CPU card to show that it is ready. Programming Device Memory Card Switching the PLC to Ready instead of Run will enable every operation that affects the memory card, e.g. a transfer or formatting step, to run about ten times faster. For this select the Programmer tab in the Transfer/File Manager dialog. Transfer the selected operating system file by clicking the Transfer to Memory Card button.
Transfer To Memory Card button

07/01 AWB2700-1305-GB

351

Test & Commissioning Transferring the program You can only start a transfer to the connected PLC from the Connection list. Other requirements: The serial programming cable is fitted between the programmer and the PLC. A connection list is available. The PLC is connected. In your programming device you have opened the project containing the POUs and the program code file. Only the Connection List window must be opened in the main T & C window. In order to transfer a program you must open the Transfer/File Manager dialog: Click the Transfer button.
Transfer button

Programming Device PLC For this select the Programmer tab in the Transfer/File Manager dialog. The File Format list box has the required format Program (*.PCD) as the default setting for transferring the program code file. The names of the executable PCD files are therefore shown under File Name.

352

07/01 AWB2700-1305-GB

Commissioning

Figure 155: Transfer/File Manager dialog

Transfer the selected program code file by clicking the Transfer to PLC button.
Transfer to PLC button

07/01 AWB2700-1305-GB

The following file names and extensions are reserved for Sucosoft and must not be used for other files: File names: 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.

353

Test & Commissioning Programmer Memory Card Proceed as described above. This time, however, click the Transfer to Memory Card button.
Transfer To Memory Card button

Special note with PS416 Defining startup behaviour: The Startup Behaviour window is used to define how the controller starts up when booting from a memory card or when loading programs from the memory card. With SRAM cards, this dialog opens directly after the transfer and with Flash cards after closing the Transfer/File Manager dialog:

Figure 156: Defining the startup behaviour of the memory card

AUTOSTART: The progam is automatically started after being loaded. LOAD: The program is loaded and not started. The startup behaviour is not set as active. A program can only be started from the programming device. NOT SET: the program is not loaded after the operating system has been loaded.

354

07/01 AWB2700-1305-GB

Commissioning Further information on this dialog is provided in the hardware description of the relevant controller. PLC Memory Card To transfer a program from a PS4-300 or PS416 controller to a memory card, select the Controller tab in the Transfer/File Manager dialog. Then transfer the selected program file by clicking the Transfer from PLC to Memory Card button.
Transfer from PLC to Memory Card button

Memory Card PLC Proceed as follows to transfer a program from a memory card to a PS4-300 or PS416 controller (this operation is not possible with the PS4-200): For this select the Memory Card tab in the Transfer/File Manager dialog. Then transfer the selected program file by clicking the Transfer From Memory Card to PLC button.
Transfer From Memory Card To PLC button

07/01 AWB2700-1305-GB

355

Test & Commissioning Formatting the memory card For this select the Memory Card tab in the Transfer/File Manager dialog. Then click the appropriate button.
Format Memory Card button

Comparing a program on the PC and the PLC Requirements: Only the Connection List window must be opened in the main T & C window. An executable program code file and a connection list must be available on the PC. The programming cable must be connected (or the network connection between the PC and the PLC is present). The connection between the PC and the PLC must be established. Click the Transfer... button in the main Test and Commissioning window. Open the Transfer/File Manager dialog and select the Programmer tab. Select the program to be compared in the selection list and click the Program Comparison button.
Program comparison between programming device and PLC

After a short time, a message will appear indicating whether the program in the PLC matches the program in the PC or not. Acknowledge the message with OK. Close the Transfer/File Manager window by clicking on Close.
07/01 AWB2700-1305-GB

356

Commissioning Comparing a program on the PC and the memory card Proceed as described above, but use instead the button for comparing programs on the PC and memory card.
Program comparison between programming device and memory card

Starting programs Starting or stopping programs from Sucosoft Use the Status and Diagnostics dialog to start a program from Sucosoft. Requirements: In your programming device you have opened the project containing the POUs and the program code file (pcd file). The PLC is connected. A pcd file (a user program) has already been transferred to the PLC. The CPU operating mode selector switch is in RUN or RUN M-RESET: RUN: a warm start or cold start can be carried out. RUN M-RESET: A cold start is possible. Only the Connection List window must be opened in the main T & C window. Activate the Connection List window in the main T & C window and then click the Program Status button.
07/01 AWB2700-1305-GB

Program Status button

The Program Status tab of the following Status and Diagnostics dialog shows the operating status of the

357

Test & Commissioning CPU, program information and the buttons provided for starting and stopping a program. Although the content of this dialog depends on the PLC concerned, the same functions apply for starting and stopping a program. These are therefore explained only using the example of PS4-300:

Figure 181: Status and Diagnostics dialog Click the Warm Start or Cold Start button. The program is started and the Run status will be indicated on the screen and on the CPU. The Halt button will be available. Click the Halt button to stop the program. The CPU status changes to Ready. The Cold Start and Warm Start buttons will be activated. 358

07/01 AWB2700-1305-GB

Commissioning Click Close to close the window. Starting or stopping the program without Sucosoft For PS4 controllers Depending on the position of the operating mode switch, the program will then start automatically as a cold start or warm start. When the operating mode selector switch is set to Run, pressing the Set button can trigger the startup behaviour set under Behaviour after NOT READY (PS4-200) or Startup Behaviour on Warm Start (PS4-300) in Generate Program Parameters... . For PS416 controllers You can only start a program without Sucosoft S40 (i.e. directly on the PLC) if you have assigned the attribute active to the program as the startup behaviour. Sucosoft always assigns this active attribute to the last transferred or last cold started program if this operation was carried out later. Depending on the position of the operating mode switch, the program will then start automatically as a cold start or warm start. If a memory card containing user programs has been inserted in the controller, the program startup behaviour when the controller is switched on is defined by the startup information which is stored on the memory card (see also Page 354). Booting the controller from the memory card For PS4-200 controllers 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.

07/01 AWB2700-1305-GB

359

Test & Commissioning For PS416/PS4-300 controllers 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 and then the program are transferred to the PLC before the program is then started. On the PS416 you can define the startup behaviour for booting from the memory card and also define which program should be started (see Page 354).

360

07/01 AWB2700-1305-GB

System diagnostics System diagnostics CPU status The Test & Commissioning tool offers support in checking the status of the CPU. This can be carried out during the program test or independently of the user program. Requirements: The serial programming cable is fitted between the PC and the PLC. The Test & Commissioning tool has been opened. The PLC is connected. A *.pcd file (a user program) has already been transferred to the PLC. Only the Connection List window must be opened in the main T & C window. Click the CPU Status button.

CPU Status button

The Status and Diagnostics dialog will open for the PLC type concerned with the CPU Status tab selected. This dialog provides information about the status of the connected CPU:

07/01 AWB2700-1305-GB

361

Test & Commissioning

Figure 157: CPU Status dialog for the PS4-200

362

07/01 AWB2700-1305-GB

System diagnostics

Figure 158: CPU Status dialog for the PS4-300

07/01 AWB2700-1305-GB

363

Test & Commissioning

Figure 159: CPU Status dialog for the PS416

These dialog fields display the following information about the connected CPU:

364

07/01 AWB2700-1305-GB

System diagnostics
CPU status CPU operating status RUN READY: NOT READY Information 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: The user program is running in the PLC; LED 2 (PS4) or the green RUN LED (PS416) are lit in the PLC image. The CPU is ready for operation but the user program is not being processed. LED 1 (PS4) or the green Ready LED (PS416) are lit on the PLC The running program or memory test has encountered fatal hardware or software errors. The user program cannot be run; the LED 3 (PS4) or the red Not Ready (PS416) are lit in the PLC image. Only PS4: The battery on the CPU or the memory card must be fitted or exchanged. LED 4 is lit in the PLC image. Only PS416: The battery on the CPU or the memory card must be fitted or exchanged. The red CHANGE LED is lit in the PLC image. Only PS416: An error occurred while the user program was running, such as: - 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 appropriate diagnostics bit is set in the program diagnostics status word. Confirming the diagnostics status word via a system cold start or a cold start of the user program will switch the PLC from the error status. Only PS416: The operating system is missing from the CPU; all LEDs flash on the PLC. Shows the position of the operating mode selector switch HALT, RUN or RUN_M_RESET on the CPU: HALT: The operating mode selector switch is set to HLT/Halt. RUN: The operating mode selector switch is set to RUN. RUN MARKER RESET: The operating mode selector switch is set to RUN_M_RESET. This shows the date and time of the real-time clock in the CPU. This shows the version and the identification code of the operating system in the CPU. This shows the available CPU memory for the user program and the capacity of the entire CPU memory. This shows information on the CPU's memory card if it is fitted. For PS416: Click the Information... button to get further information on the memory card.

BATTERY CHANGE ERROR

BOOT Switch position

Date/Time System information Memory size Memory card


07/01 AWB2700-1305-GB

365

Test & Commissioning CPU diagnostics Call up CPU diagnostics as follows: Activate the Connection List window in the main T & C window and then click the CPU Status button. Select the Status and Diagnostics dialog and then the CPU Diagnostics tab. The dialog shows the CPU diagnostics status word according to the type of PLC connected. The CPU diagnostics status word encodes 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/Reset button on the CPU with the operating mode selector switch set to HLT/Halt. The user program can then be restarted in two ways: Via the software using the buttons in the Program Status dialog, taking into account the position of the operating mode selector switch and the assigned startup behaviour of the program concerned.

366

07/01 AWB2700-1305-GB

System diagnostics By pressing the SET/Reset 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. For more information see Section Starting programs on Page 357. The second type of error are those that cause the assigned diagnostics bit to set but do not cause a Halt or Ready status. They are shown with the Indication attribute in the Category column. Such errors are not indicated by the LEDs on the CPU. After rectifying the error, the diagnostics bit can be acknowledged by pressing the SET/Reset button on the CPU or by clicking the Reset Diagnostics Bits button, depending on the CPU status. If the CPU is in Run and the operating mode selector switch is set to HLT/Halt when the SET/ Reset Diagnostics Bits button is pressed, the diagnostics bits are not reset but the program is stopped instead.

07/01 AWB2700-1305-GB

367

Test & Commissioning CPU diagnostics (PS4) Display the CPU diagnostics status word via the Status and Diagnostics dialog and the CPU Diagnostics tab.

Figure 160: PS4-200, CPU diagnostics status word

14 errors can be detected on the PS4-200. The CPU diagnostics status word encodes 14 events that can be diagnosed as errors (see following table).

368

07/01 AWB2700-1305-GB

System diagnostics

Figure 161: PS4-300, CPU diagnostics status word

22 errors can be detected on the PS4-300. The CPU diagnostics status word encodes 22 events that can be diagnosed as errors:

07/01 AWB2700-1305-GB

369

Test & Commissioning


Table 4: PS4 diagnostics status word Event ECT EDC EWD EPM EDR PS4-200 Cycle time exceeds the maximum value: Stop DC voltage failure due to short-circuit or overload in the basic unit. The outputs are reset by the hardware: Stop The CPU hardware watchdog signalled CPU failure (error category: Stop). 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). 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. Run-Time error. Error in the CPU during run time Run-time error. Error in the PLC user program (error category: Stop). during run time. For example, index for array access exceeds the array limits: Stop. 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 Navigator under Generate Program Parameters..., 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. 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 Navigator under Generate Program Parameters... 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. RAM memory in the PLC faulty (error category: Stop). Checksum error of operating system (error category: Stop). CPU real-time clock is faulty (error category: Stop). Timer failure: The timer on the CPU is faulty (error category: Stop). An attempt was made to execute an impermissible operation of the 80C167 microcontroller (error category: Stop).
07/01 AWB2700-1305-GB

PS4-300

ERT

ENR

EHM ECM ECL ETR EIL

EOS

Error in current OS40 discovered. Safe processing cannot be ensured (error category: Stop) Application destroyed (error category: Stop)

ECA DAC

Supply voltage dip. The supply voltage of the basic unit has failed temporarily (error category: Indication).

370

System diagnostics
DBM The CPU battery is faulty or empty: Replace the The CPU battery is faulty or empty (error battery: Indication 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. The error category is Indication in all other cases. If a memory card with a valid program cannot be found during the system start, the PLC will stay in Not Ready. Also see Startup behaviour after Not Ready on Section Starting or stopping the program without Sucosoft from Page 359. Backup not present. The backup automatically saved on the memory card is faulty or a Flash memory card is not fitted (error category: Indication). The memory module is not suitable for a program backup or for saving files. It occurs if the ZB4-128-SF1 or ZB4-160-SM1 memory modules are fitted.

DMC

DLK DLS DDK

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). Error local status. PLC digital outputs short-circuited or overloaded: Indication 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). SBI or network station error Network station error detected via Suconet K. The error can be localised by checking the diagnostics bytes of the network stations (error category: Indication)

DDS

Click Close to close the CPU Diagnostics dialog and return to the main Test and Commissioning window.

07/01 AWB2700-1305-GB

371

Test & Commissioning CPU diagnostics (PS416) Display the CPU diagnostics status word via the Status and Diagnostics dialog and the System Diagnostics tab. The CPU diagnostics status word of the PS416 has 13 diagnostics bits for indicating events that have caused errors.

Figure 162: PS416, CPU diagnostics status word

372

07/01 AWB2700-1305-GB

System diagnostics
Table 5: PS416, diagnostics status word DHM DCM DCL DBM RAM memory in the PLC faulty (error category: Stop). Checksum error of operating system (error category: Stop). CPU real-time clock is faulty (error category: Stop). 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. The battery on the memory card is faulty or empty: Indication. If a battery error is detected during a system cold start, the controller remains in Ready status the user program is not started. Supply voltage dip (error category: Indication) DC voltage failure due to short-circuit or overload in the basic unit. The outputs are reset by the hardware (error category: Stop) 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). Timer failure: The timer on the CPU is faulty (error category: Stop). The CPU hardware watchdog signalled CPU failure (error category: Stop). Faulty code (error category: Stop). Fatal software error (error category: Stop). Checksum error. This error is indicated if the code or data is faulty in the user program before a restart (error category: Stop)

DBC

DAC DDC

DAK

DTR DWA DIL DOS ACE

Click Close to close the CPU Diagnostics dialog and return to the main Test and Commissioning window.
07/01 AWB2700-1305-GB

Select another function or leave the Test and Commissioning tool via File Exit.

373

Test & Commissioning Program status Requirements: In your programming device you have opened the project containing the POUs and the program code file (pcd file). The PLC is connected. A pcd file (a user program) has already been transferred to the PLC, The CPU operating mode selector switch is in RUN or RUN_M_RESET position. Only the Connection List window must be opened in the main T & C window. Click the Program Status button.
Program status button

The Program Status tab of the following Status and Diagnostics dialog shows the operating status of the CPU, program information and the buttons provided for starting and stopping a program. Program Status (PS4) Although the content of this dialog depends on the PLC concerned, the same functions apply for starting and stopping a program. These are therefore explained only using the example of PS4-300:

374

07/01 AWB2700-1305-GB

System diagnostics

Figure 163: Program status (PS4-300)

07/01 AWB2700-1305-GB

375

Test & Commissioning

Figure 164: Program status (PS416) Program status CPU operating status BOOT RUN READY: Information This shows the current CPU status as follows: Only PS416: A system cold start is required, i.e. the operating system needs to be loaded in the CPU RAM memory. The user program is being processed in the CPU. This status is reached via a cold or warm start. The CPU is ready for operation but the user program is not being processed. A cold start or warm start can be started depending on the setting of the operating mode selector switch: a Cold start starts the user program with the initial 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. 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.

NOT READY

376

07/01 AWB2700-1305-GB

System diagnostics
Program status Switch position Information This shows the current position of the CPU operating mode switch as follows: - RUN: A warm or cold start is possible. - RUN M-RESET: A cold start with marker reset is possible. - HALT: PLC cannot be switched to RUN. The current program execution parameters are shown as follows: PS4 Name of user program in the PLC The version number of the program as set in the Code Generation function under Generate Program Parameters... Code size: the size of the executable code of the PLC user program The size of the data area for the user program The date and time of the program generation Program execution type: cyclical with the maximum permissible cycle time after which the PLC switches to Halt or periodic with the selected time interval (PS4-300, PS416) Startup behaviour after NOT READY When the PLC is in Run status, this displays the current cycle time Displays the minimum and maximum cycle time (PS4-300, PS416) Forcing active or inactive (only PS4-300). PS416 Program execution type: cyclical or periodic, with the associated cycle time or interval time Startup behaviour.

Program information

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 here. Program list box Only PS416: The program field contains information on the user program in the controller: Program name: Name of the user program. Program status: program status, e.g. started. This 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 PS416-CPU operating elements (operating mode selector switch and SET button) and without needing a programming device.

07/01 AWB2700-1305-GB

377

Test & Commissioning


Program status Information

Buttons of the Program Depending on the CPU status, the position of the operating mode selector switch Status dialog and the chosen program startup behaviour, the following buttons may be available: Cold start With a cold start the user program is started 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. Only PS4: The values of markers in the recipe marker range defined in the Code Generation tool under Generate Program Parameters... are retained following a cold start. Only PS416: 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 field.

Warm start

With a warm start the user program resumes 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 user program must be 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 Halt and pressing the Set button or by clicking the Halt button. If the program was stopped by switching to Halt, the operating mode selector switch must be set to Run again before it can be warm started. This stops a running user program. Only PS416: Deletes a deactivated user program from the PLC memory.

Halt Delete

Startup behaviour Only PS416: The status active means that the user program can be cold started on the memory card without a programming device (for information on the startup behaviour on the memory card also see Page 354). Starting and stopping Only PS416: the program via the Select the program name in the program list box and set the operating mode programming device: switch of the CPU to Run. Click the Cold Start button. The program is started, the RUN status will be indicated on the screen and on the PLC, the message "started" will be shown next to the program name in the Program field. The Halt button will be available. Click the Halt button to stop the program. The program will be shown to have halted, the Cold Start and Warm Start buttons will be activated. Click Close to close the window.
07/01 AWB2700-1305-GB

378

System diagnostics Network diagnostics The Online Topology Configurator allows you to carry out network diagnostics in order to check the network status of your system. The network diagnostics function can be used for all Suconet K and AS Interfacelines. Several network lines can be diagnosed and displayed at the same time. For this a program with a topology configuration must be loaded on the PLC and the connection to the PLC must be established. The graphical display of the Topology Configurator now shows additional information which allows you to quickly assess the status of the network communications and provides status messages for each individual component. Unlike the PS4, the digital I/O cards of the PS416 are not addressed through the slot number. Accordingly, the digital I/O cards 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. Requirements: A *.pcd file with the topology configuration to be tested must be provided in the PLC. The PLC must be connected. Activate the Connection List window in the main T & C window and then click the Topology button.
Topology button

07/01 AWB2700-1305-GB

The Topology Configurator window Device Name will open and the relevant buttons are made available. The Online Topology Configurator will open showing the topology stored in the PLC. The optional user descriptions of the individual components are shown

379

Test & Commissioning automatically if there is a configuration that matches the one read out. Click the Network Diagnostics button or choose Network Diagnostics in the Display menu to show or hide the display of network diagnostics information.
Network Diagnostics button

The graphical display of the topology configuration now includes additional information which indicates the status of the network communications. In the event of a network fault, devices with communication problems are shaded in red. Faulty network lines with communication problems are shown as dotted lines; and the master module which controls the line is marked with a lightning symbol. You can generate a diagnostics status for a network component in the following way: Select the components. Start the network diagnostics by clicking the appropriate button or via Component Diagnostics Status.
Diagnostics status button

The Diagnostics Status Device Name dialog shows the diagnostics bits of the module or device (see Page 383). You can create a text printout of the topology configuration with the network examined by choosing Configuration Print. The following example configuration for a PS4-300 illustrates the network diagnostics function in Sucosoft S40.

380

07/01 AWB2700-1305-GB

System diagnostics Example of a PS4-300 with a Suconet K network Requirements: The PS4-300 must be connected and the Test and Commissioning tool must be started. The topology configuration must be stored on the PLC, and must be read out and displayed in the Online Topology Configurator. Structure of the example configuration: Below is a configuration which was read from the controller. The Topology Configurator window (online) shows the topology configuration, i.e. the hardware configuration which was specified with the Topology Configurator during project development (offline).

Figure 165: Example configuration with PS4-300

Start the network diagnostics with the PLC connected, as described above.
07/01 AWB2700-1305-GB

381

Test & Commissioning

Figure 166: Network diagnostics with PS4-300

382

07/01 AWB2700-1305-GB

The example shows a topology configuration that was read from the PLC for network diagnostics. The master is marked with a lightning symbol. This means that there is fault in the network line it manages. The network line is shown dotted and the faulty modules (EPC335.1-K, PS4-341-MM1) are highlighted with a red background. Select any device and display the diagnostics status via Component Diagnostics Status. This will open the Diagnostics Status dialog for the selected device, showing the relevant diagnostics bits in English.

System diagnostics

Figure 167: Diagnostics status of EPC335.1-K

Refer to the manual of the device concerned for information on rectifying diagnosed errors. Note: The diagnostic bits of all devices in a topology configuration can be displayed even if there is no fault present.

07/01 AWB2700-1305-GB

383

Test & Commissioning Program test Overview A program test can be carried out in Online mode with the POU Editor. This allows you to display a POU in IL, LD, FBD or ST and change it online. Requirements: The Test & Commissioning tool must be open. The PLC must be connected. A pcd file (a user program) has already been transferred to the PLC. In your programming device you have opened the project containing the POUs and the program code file (pcd file) of the user program to be tested. The CPU operating mode selector switch is in RUN or RUN_M_RESET position. The program must have been started. The program running in the controller can be checked and modified online, i.e. while the program is running. One POU can be displayed together with the changing values of the variables. In addition, selected variables from several POUs can be displayed in a Variables window. The POU Editor is used in Online mode for modifying POUs and for displaying the status of variables. 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. An active process must be running in the PLC.
07/01 AWB2700-1305-GB

384

Program test Switching the POU Editor to online mode Activate the Connection List in the main Test & Commissioning window and click the Program button or choose Device Program.
Program button

The Program window will appear with the instance tree view.

Figure 168: Program window

The Resource (PLC) is displayed as the highest level of the program instance tree in the left window pane and the name of the Program POU is displayed as the next lower program level in the right pane. You can select the individual program components from the program structure tree (instance tree) via the menu items. You can also select the individual branches by clicking them with the mouse. If a selected program component instantiated function blocks and functions, they are marked with a plus sign next to their name. Double-click Resource in the left-hand window. The Program POU will appear in the left window.
07/01 AWB2700-1305-GB

Double-click the Program POU button. If function block POUs have been instantiated in a program POU, they are shown as the next level. Select the POU that you wish to check.

385

Test & Commissioning Click Display/Change POU


Display/Change POU

The POU Editor only opens in Online mode with the selected POU active, i.e. in the foreground. This POU is also indicated by the entry online in the title bar, by a red editor icon and a modified editor window with the possibility of displaying variables. The Online menu and the relevant buttons for displaying variable states are available. If you have made a modification to the POU, the button for activating this change will also be made available. Other POUs that may be open in the POU offline Editor are placed in the background and can be accessed via the corresponding file card at the bottom of the editor window. These POUs can be further processed offline, however, only if the following conditions apply. When moving from offline to online mode or vice versa whilst a POU is being processed, a POU is always opened with the settings that were saved the last time the POU was processed. If, for example, you have created your instructions in ST for a POU and made your declarations in Syntax mode, the POU is also opened with these settings when switching to online mode.

386

07/01 AWB2700-1305-GB

Program test

Figure 169: Online Editor with POU opened

Test POU Depending on the task at hand you can test the POU using: the Status display the Zoom window the Variables window

07/01 AWB2700-1305-GB

387

Test & Commissioning Status display Requirement: A POU must be opened in online mode. Choose Online Status Display in the POU Editor or click the Status Display button to enable or disable the Status display.
Status display

The variable states are shown in the declaration and instruction section. The Status display in the declaration section has the advantage that related variables can be shown clearly. In IL and ST the states of variables are shown in the status column of the instruction section.

Figure 170: POU Editor with Online POU in IL


07/01 AWB2700-1305-GB

388

Program test In LD and FBD binary variable states, i.e. current flow TRUE or FALSE are shown in colour. You can set the display colours you require via Options Settings Font Elements. The status of non-binary variables is shown underneath the contacts, output symbols or connection lines:

Figure 171: POU Editor with Online POU in LD

07/01 AWB2700-1305-GB

Figure 172: POU Editor with Online POU in FBD

389

Test & Commissioning The 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. The memory of the PS 4-200 can show a maximum of 255 bytes of status data. This means that one screen page can only show this number of bytes of status data. If more data can be shown this is indicated by ???. In this case, reduce the size of the window or scroll to reach an area with less data, so that less status data is requested and only the area required is shown. Displaying strings or time and data variables has a particularly large memory requirement. Choose Online Status Display again 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. In online mode you can also set bookmarks in the same way as in offline mode. For this position the cursor in the appropriate line and click the Set Bookmark button. The Status Display follows the jump from one bookmark to the next thus offering a simpler overview! Zoom window The Zoom window is a separate window of the status display in which you can show the states of complex variables You can also select variables in the instruction section and in the declaration section for displaying in the Zoom window. Unlike the Variables window display, you can only display variables of the currently active POU and cannot force any. Requirements: A textual language such as IL or ST must be selected.

390

07/01 AWB2700-1305-GB

Program test A POU must be opened in online mode and the Status Display function must have been switched on. All instruction lines containing several variables, e.g. within a complex data type, as function block parameters with assigned operands or in the form of several ST instructions are marked by Sucosoft with a red dot in the Bookmark column. In the Status column only the states of the first variables in this line are shown. The Zoom window is used for showing all variables in this instruction line.

07/01 AWB2700-1305-GB

391

Test & Commissioning Click a red dot. This will open the Zoom window. The variables list will be shown in the left pane in the form of a tree structure. This shows the variables of the selected instruction line. The variable values are continuously refreshed. The right pane of the Zoom window shows the variable value in the Status column and background information such as the type of the individual variables. You can use the Display menu item to change the structure of the Zoom window.

Figure 173: The Zoom window with array type variables

In order to display variables of another instruction line in the Zoom window, simply click on the red dot for this new line. In order to display variables of other instruction lines in the Zoom window, simply click on the red dot for this new line with the Ctrl key depressed. This is only possible when the instruction section is not scrolled.
07/01 AWB2700-1305-GB

The status values will remain frozen in the Status column as long as the window is open. The Zoom window is automatically closed when the Status Display is closed.

392

Program test Variables window The Variables window is a separate window of the Status Display in which you can show the states of complex variables You can also select variables in the instruction section and in the declaration section for displaying in the Variables window. Unlike the Zoom window, the Variables window allows you to show all project POUs, making the window ideal for troubleshooting tasks. You can thus use the Variables window to extend the variables of the POU shown online. You can also force variable values via the Variables window. Requirement: A POU must be opened in online mode, however, the Status Display function does not have to be active. Select the variables in the displayed program that you want to display in the Variables window. To do this, double-click a single variable in IL or ST or select one or several lines and then transfer them using the button or via Online Transfer Variables.
Transfer Variables button

If you are working in LD or FBD, select a variable first and then transfer it to the Variables window as described above. The Variables window opens in the background and can then be viewed after switching to the main Test and Commissioning window. If you have closed the Variables window again: Activate the Connection List window and then click the Variables window button.

07/01 AWB2700-1305-GB

393

Test & Commissioning


Variables window

Figure 174: Variables window with array type variables

Select an element that contains variables in the Variables list (left window). These are then displayed in the information section (right pane). Activate the Status display for the variables in the window via Variables Status Display or via the button.

394

07/01 AWB2700-1305-GB

Program test
Status Display button

The current states of the listed variables are displayed in both panes. Repeating the above step deactivates the Status Display in the Variables window. If you want to change the display format of one or more variables, first select one or several variables in the information section and then choose the required display format (binary, decimal, hexadecimal or BCD) in the Display menu of the main Test and Commissioning window. For each variable shown it is possible to set a different display format as required. Use the following procedure to delete selected variables from the Variables window: Select the variable to be deleted and then press the Del key or choose Variables Delete. Proceed as follows if you wish to transfer variables from other POUs (function blocks) to the Variables window: Return to the main Test & Commissioning window and then close the Program window. The activated online POU is switched to offline. Open the Program window again via Device Program or via the Open Instance Tree button.
Program button

07/01 AWB2700-1305-GB

Select another POU and repeat the steps of the variable transfer. You can use the Display menu to change the layout of the Variables window and the display format of selected variables.

395

Test & Commissioning The Variables window will open with the selected variables every time the Test & Commissioning tool is opened until it has been closed explicitly. Close the Test & Commissioning tool via File Exit.

Modifying POUs online Requirement: A POU must be opened in online mode. The following modifications to a POU are possible: Modifying and adding instructions for existing variables Deleting instructions Modifying and adding comments Modifying jumps and jump targets (jump labels) Inserting and deleting jumps and jump targets (jump labels) Assigning new jump labels Modifying the parameters of function blocks Adding new invocations of existing function block instances

396

07/01 AWB2700-1305-GB

Program test 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. The POU Editor allows the entry of special characters (e.g. , , etc.) in strings. These characters will appear as $ sequences in the Status Display if ASCII format was selected. To display these special characters change the display format to ANSI. Modify the POU in the same way as in the POU Editor working offline. Once you have modified the POU, the functions Online Activate and the Activate button in the toolbar become available.
Activate button

Choose Online Activate or click the corresponding button. The modifications made are updated in the POU, the program and in the PLC. If the message "Online modification could not be executed" is output after a modification has been activated, 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. If the online modification is too big for the program memory of PS 4-200 series controllers, a dialog box will appear in which you can confirm whether the

07/01 AWB2700-1305-GB

397

Test & Commissioning existing POUs should be rearranged online in the program memory. Close the Online Editor. Select a new POU from the structure tree in the Program window if you wish to check or modify another POU. Repeat the other steps. Forcing variable values With PS416 and PS4-300 controllers, you can assign a defined value to variables of elementary and complex data types while the controller is running (Run state). To do this first create a variable list as described earlier.

Figure 175: Variables window for PS4-300 and PS416

If you want to assign a particular value to a variable while the controller is running, this can be done in the Variables window in two different ways: static forcing and dynamic forcing.

398

07/01 AWB2700-1305-GB

Program test Warning! 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 a variable is forced dynamically, it is assigned a value once. This can, however, be changed again immediately by the user program. This means that sequences with these forced variables may not be necessarily executed with the forced value within a cycle. The timepoint of the forcing is the same as for static forcing, but in this case forcing takes place once only and not repeatedly. 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. In contrast, variables which are assigned to physical outputs are forced with the specified value at the end of the cycle. You can also transfer Variables of complex data types such as Array or Structure variables to the Variables window in the same way as described above (see Fig. 177 on Page 401). 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/01 AWB2700-1305-GB

399

Test & Commissioning Requirement: There must be a Variables window with a variable in the connection list. In the right Info section of the Variables window Click the Number fields (left column) of the lines with variables to be forced. With complex data types select the required array or structure element. The chosen entries are shown selected. Choose Variables Enter Forced Status or click the corresponding button.
Enter Forced Status button

Figure 176: Forced status

400

07/01 AWB2700-1305-GB

Change the format if necessary. Position the cursor in the Status field and enter the value to be forced. Choose the required forcing mode in the Mode panel and confirm your entries with OK. Repeat these steps for all the variables that you selected earlier.

Program test Choose Variables Enter Forced Status or click the Force button.
Force button

All selected variables are forced either statically or dynamically in accordance with your settings. With statically forced variables, the fields Name, and Status are shown with a coloured background and the windows status line displays the message Variable forced statically. In the variable list, these variables or variable elements are shown with a red background. This makes it easy to recognise which variables are forced.

Figure 177: Forcing variables

To cancel the static forcing of particular variables, select the required lines in the Information section and click on the Cancel Forcing button.
07/01 AWB2700-1305-GB

Cancel Forcing button

401

Test & Commissioning The Cancel All button is used to cancel the static forcing of all variables in the controller.
Cancel All button

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 modifications cannot be made while variables in the controller are being forced. Do not change offline parts of a program in which variables are forced, since the Variables window can then no longer be displayed. If you have made an online modification, a warning message will appear if you try to open the Variables window. 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:

402

07/01 AWB2700-1305-GB

Program test Quitting the online POU Editor Return to the main Test & Commissioning window via Alt + Tab and then close the Program window. The activated online POU is switched to offline for further processing. Alternatively, you can close the online POU directly in the POU Editor. In order switch from the POU Editor to a different T & C window you must first move to the main T & C window. Configuring the AS-Interfacenetwork online This step is carried out with the Topology Configurator online. This enables you to configure an AS-Interfacenetwork simply. For this the PLC must be connected, must be provided with a valid basic configuration, and the CPU must be in Halt status. Activate the Connection List window in the main T & C window and then click the Topology button. With an AS-Interfacenetwork a complete offline configuration is not necessarily required. Simply a basic configuration is required that contains an AS-Interfacemaster device. Sucosoft uses this basic dummy configuration to automatically detect online all active slaves on the AS-Interfacenetwork. Structure of the example configuration Below is a configuration which was read from a controller. It consists of a master (PS4-201-MM1), an LE slave (LE4-501-BS1) and an AS-Interfaceline that is managed by the AS-Interfacemaster module (LE4-505-BS1).
07/01 AWB2700-1305-GB

403

Test & Commissioning

Figure 178: Example configuration with AS-Interface

404

07/01 AWB2700-1305-GB

Program test Procedure 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 actual configuration. The starting 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 PS4 controller and an AS-Interfacemaster module LE4-505-BS1 or a functioning actual configuration which you want to extend. The basic configuration can be created in the normal way with PLC disconnected using the Topology Configurator. First compile the basic configuration with any (dummy) PLC program in the Code Generation tool and transfer it to the PLC. If all slaves on the AS-Interfaceline are addressed already, you can read in directly the new configuration in Configuration mode and save it. 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. It is transferred from the PLC to the AS-Interfacemaster. The new permanent configuration is needed by the PLC in RUN mode and for network diagnostics, and ensures that all inputs and outputs of the AS-Interfacedevices can be accessed.

07/01 AWB2700-1305-GB

405

Test & Commissioning Reading the actual configuration Requirements: The PS4 controller must be connected and the Test and Commissioning tool must be started. A topology which includes the AS-Interface master is already stored in the PLC. The PLC is in HALT mode. Click the Topology Configurator button or choose Device Topology in the menu to load the actual topology configuration from the PLC. Select the AS-Interfacemaster module and switch to Configuration mode by choosing Component Actual ASI Configuration.
Asi Actual Configuration button

Sucosoft S40 will switch to Configuration mode and will show the AS-Interfacemaster with an exclamation mark next to it. The associated AS-i line is shown as a dotted green line.

406

07/01 AWB2700-1305-GB

Program test

Figure 179: Configuration mode of an AS-Interface network

You cannot display online diagnostics information for individual modules when the AS-i master is in Configuration mode. The AS-Interfacemaster 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-Interfaceline contains slaves which have previously been assigned an AS-Interfaceaddress with a PG2-105-AD1 addressing device, they are shown correctly in the configuration.
07/01 AWB2700-1305-GB

Only one non-configured slave with a default address 0 must be connected, since otherwise an address conflict will occur.

407

Test & Commissioning 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. Saving the actual configuration Requirements: The actual topology configuration with the configured AS-Interfaceline is opened in the Online Topology Configurator window. Choose Configuration Save As... in the menu. Specify a directory in which you wish to save the actual configuration and enter 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.

408

07/01 AWB2700-1305-GB

Program test Editing the actual configuration Requirements: The PS4 controller must be connected and the Test and Commissioning tool must be started. A topology which includes the AS-Interface master is already stored in the PLC. The PLC is in HALT mode. 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. Select the AS-Interfacemaster module and switch to configuration mode by choosing Component Actual ASi Configuration in the menu. The Online Topology Configurator shows the actual configuration with the individual line slaves shown as generic symbols. The actual configuration of the AS-Interfaceline is shown in the Topology window as a green dotted line. Connect a new slave with the default address 0 to the AS-Interfaceline. Select the new slave displayed and click the ASi Slave Status button or choose Component ASI Slave Status... .
ASi Slave Status button

07/01 AWB2700-1305-GB

409

Test & Commissioning

Figure 180: AS-InterfaceSlave Status

You are automatically prompted with the next unused AS-i address in the New pop-up list in the Station number panel. If required, you can choose another address for the new station. The Configured Values section shows parameters for the specified station number from the stored (permanent) configuration. The Current Values section shows the current parameters for the specified station number which have been read online from the PLC. 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. 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.

410

07/01 AWB2700-1305-GB

Program test The AS-Interfacemaster LE4-505-BS1 parameters are automatically transferred from the configuration currently stored in the PLC. Select the other slaves in turn and set the parameters using the same procedure. Close the dialog with Exit when you are finished. Save the completed actual configuration as the new permanent configuration. Using the new permanent configuration In order to commission the PLC and start the communication on the AS-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 AWB27-1314 GB, which describes the AS-Interfacemaster LE4-505-BS1. Communication in the AS-Interface line starts when the PLC changes from Ready to Run mode. In Run mode, the master LE 4-505-BS1 will automatically switch to Protected mode. The AS-i master status can be displayed in Run and Ready modes as follows: Select the AS-Interfacemaster in the Online Topology Configuration window. Click the ASi Master Status button or choose Component ASI Master Status... .
07/01 AWB2700-1305-GB

ASi Master Status button

411

Test & Commissioning

Figure 181: ASi Master Status dialog

The following dialog then gives information on the operating mode (protected or configuration mode) and the setting of the Autoaddressing option. Network diagnostics with a PS4-300 and AS-Interfacenetwork. The following are required to carry out network diagnostics on an AS-Interface line An available PLC program which was transferred with a configuration of the AS-Interface master is loaded in the PLC. The connection has been established to the PLC. To show or hide the display of network diagnostics information, click the Network Diagnostics button or choose Display Network Diagnostics in the menu. The diagnostics covers the entire AS-Interface configuration. The states of components belonging to two different networks can be diagnosed.

412

07/01 AWB2700-1305-GB

Program test

Figure 182: Network diagnostics

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. To display diagnostics information for a particular device, select the device and click the Diagnostics button or choose Component Diagnostics Status.

07/01 AWB2700-1305-GB

413

Test & Commissioning

Figure 183: Status indication

The diagnostics status of individual modules cannot be displayed if an AS-Interfacenetwork is configured online and Sucosoft is in Configuration mode. Diagnostics is only carried out for AS-Interfacelines if the AS-Interface permanent configuration is displayed.

414

07/01 AWB2700-1305-GB

Program test 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.

Figure 184: Fault in AS-Interfacenetwork line

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.
07/01 AWB2700-1305-GB

415

Test & Commissioning If more AS-i slaves are connected to the AS-Interface line than are specified in the permanent configuration, 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 configuration. However, the master will report a configuration error. If the program is started by changing the PLC mode from Stop to Run using the Test & Commissioning Tool, the AS-Interfacemaster 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-Interface address for the slave must be assigned in the current configuration in the Test & Commissioning tool by choosing Component AS-i Slave Status in the menu. In contrast to the PLC mode change from Stop/ 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.

416

07/01 AWB2700-1305-GB

Appendix

Modem operation

Modem requirements Approved for connection to the public telephone network in your country or region, compatible with Hayes AT commands, suitable for asynchronous data communications Memory for a modem configuration. Parameter settings: 8 Data, No Parity, 1 Stop (8N1)

Frequently asked questions and problems relating to modems Dialing is not functioning and the modem is not accepting any AT commands. Make sure that the modem is switched on, modem and PC are connected via a cable, the modem is plugged in to the telephone socket. Make sure that the serial interface (COM Port) set in Sucosoft is the same as the one to which the modem is connected. Make sure that the speed set in Sucosoft is within the range in which the modem can automatically detect the baud rate. Make sure that no other program e.g. a FAX software is using the same interface.
07/01 AWB2700-1305-GB

Make sure that the modem connection cable is not faulty, and that the connection pin assignment is correct. Check this using another communication software.

417

Appendix Dialing is interrupted before dialing 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 authorised to make the required connection (e. g. authorised 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. The modem does not recognise the dial tone. After each dialing attempt, the modem returns the message NO DIAL TONE: In this case, your modem is probably connected to a private telephone exchange (PBX). Most PBXs require a prefix digit (e.g. 0) to get an outside line. In this case, your dialing sequence should be ATDT0W<number> for tone dialing or ATDP0W<number> for pulse dialing. Ensure that the modem waits for the dial tone before dialing. For this use the W parameter in the dial string. Example: ATDT 0W <Nummer> This dial tone is not present with connections within a private telephone exchange (PBX). In this case use ATX3DT<Number> or ATX3DP <Number>. After every dialing attempt the modem returns the message DELAYED CALL or DIAL LOCKED appears. 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 dialing 418

07/01 AWB2700-1305-GB

Modem operation attempt (e.g. if the party you are dialing 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 calls disabled If the modem is connected to a PBX, make sure that the telephone extension is authorised 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 dialing 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/01 AWB2700-1305-GB

419

Appendix Overview of the most important Hayes compatible AT commands


A &C0 &C1 D &D0 E Answer incoming call; Example: dialing the Moeller Mailbox: ATA DCD always active (carrier detect) DCD indicates when carrier is present (important if the Connection check via DCD is enabled). Dial/connection establishment Example Dial the Moeller mailbox: ATDT 0W0049 228 602 14 14 DTR status change is ignored by the modem (important for PLC side). Echo command to host (PC/PLC) Example: No command echo: ATE0 (important on PLC side) Command echo: ATE1 (important on PLC side) Abort connection Example Abort existing connection: ATH0 Set volume Example Low modem volume: ATL0 Check modem loudspeaker Example Modem loudspeaker on with connection establishment: ATM1 Pulse dialing Example Dial the Moeller mailbox: ATDP 0W0049 228 602 14 14 Output message codes No handshake for flow control Disable message code output Set and read internal modem registers Example Read the content of register 10: ATS10 Auto Answer Mode, i.e. calls are answered automatically (important on PLC side, here for example after 2 ring tones) DSR always active Tone dialing Example Dial the Moeller mailbox: ATDT 0W0049 228 602 14 14 Status signal in short form as number Dial tone handling Example Ignore dial tone/engaged tone: ATX0 Load modem configuration Example Load configuration profile 1: ATZ1
07/01 AWB2700-1305-GB

H L M P Q0 \Q0 Q1 S S0=2 &S0 T V0 V1 X Z

Status signal in plain text

420

Modem operation V.24 interface cable for modem operation The following table shows the pin assignments of the V.24 (RS 232 serial) interface for 9-pin and 25-pin connectors.
9-pole U* 5 3 2 6 8 9 1 4 25-pole 1 7 2 3 6 5 22 8 20 Abbrev iation GND SGND TxD RxD DSR CTS RI DCD DTR CCITT/ ITU-T 101 102 103 104 107 106 125 109 108 Function Direction Protective Ground Signal Ground Transmit Data PC/PLC > Modem Receive Data PC/PLC < Modem Data Set Ready PC/PLC < Modem Clear To Send PC/PLC < Modem Ring Indicator PC/PLC < Modem Data Carrier Detect PC/PLC < Modem Data Terminal Ready PC/PLC > Modem Request to Send PC/PLC > Modem

RTS

105

U* = Housing/Screen
07/01 AWB2700-1305-GB

421

Appendix Connecting the PLC with the PLC modem


PS4 PS416 25-pole connector <-----------------------------RxD TxD SGND --------------------> ----------3 2 7 <-------------------> ----------PLC modem 9-pole connector 2 3 5

8-pole 9-pole connector connector 2 5 3 2 3 5

RTS CTS

|-----> |<-----

4 5

|-----> |<-----

7 8

DTR DSR DCD

|-----> |<----|<-----

20 6 8

|-----> |<----|<-----

4 6 1

Please note the following when using the cable ZB4-303-KB1 for the PS4 series and/or the cable PS416-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. 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 which disable modem flow control.

422

07/01 AWB2700-1305-GB

Modem operation Configuration example using ke modems LOGEM 928 and LOGEM LGH 28.8D1 Switch positions The mode set is Software Mode, Basic setting 0: the configuration is set via the software, all switches are set to 0. Initialising the PC and the PLC modem The initialisation string can be transferred to both modems via a communication program with terminal operation. The PC modem can alternatively be initialised via AT commands for connection establishment via the Interface Parameters dialog in the T & C tool. The PLC modem can be initialised via the SendATCommand function block when it is connected to a PS416 or PS4-300. Initialisation string AT&F0&Y2\Q0&C0&D0&S0S50=23S51=7&W2 Meaning of AT commands:
Load basic setting 0 &F0

Load basic setting 8 (user setting 2) after POWER &Y2 ON Handshake selection = No flow control Set signal M5/109/DCD (receive signal/Data Carrier Detect) Set signal M1/107/DSR (Data Set Ready) Modulation and transmission procedure V.32 (fixed 9600 Bit/s, duplex) Transmission speed of the V.24 interface, 9600 Bit/s
07/01 AWB2700-1305-GB

\Q0 &C0

Ignore signal S1/108/DTR (Data Terminal Ready) &D0 &S0 S50=23 S51=7 &W2

Save user setting 2, acknowledge confirmation request -J Return-

The AT&V(n) commands enable the current modem configuration to be read and checked. This should be the following for the LOGEM LGH 28.8D1: 423

Appendix
Version F23 E1* &Y2 &I0 S00=001 S20=255 S60=000 S90=005 OK 4.06 D Option: No L1 M1 Q0 X4 V1 P \Q0 \G0 \A1 \C0 \L0 \N3 \X0 \K3 \B3 %C1 %E1 %M0 %R0 &L0 &X0 &G0 &M0 &C0 &D0 &H0 &R1 &S0 &T6 S01=000 S02=043 S03=013 S04=010 S05=008 S07=100 S08=002 S10=050 S12=045 S26=004 S28=000 S37=000 S39=017 S40=019 S45=000 S50=023 S51=007 S54=001 S61=000 S62=030 S63=006 S64=001 S65=004 S66=016 S67=000 S80=000 S81=000 S91=001 S100=042 S101=000 S102=000

*Enable Echo from modem to DTE with the command ATE1 on the PC modem and with ATE0 on the PLC modem.

Configuration example using the Westermo modem TD-32 Switch positions The following features are set via the switch positions: Dial-up line SW2, 2 to 7 not used 2-wire line 9600 baud 8 Bit/no parity V.32 to 9600 Bit/s

424

07/01 AWB2700-1305-GB

Modem operation Initialisation string AT&C1&F&Y0&K0\N5F8X3W1S00=01&W0 Meaning of AT commands: As the parity of this modem is permanently set via DIP switches, the parity in the communication software does not have to be changed after the initialisation string is sent. It is already set correctly to No Parity. Meaning of AT commands:
Load factory setting Load profile 0 after POWER ON Disable flow control Select MNP data security protocol Transmission procedure V.32 to 9600 or V.32 9600 Sends busy signal to DTE The established connection is displayed (speed/error correction) Activate automatic call answering Save configuration &F &Y0 &K0 \N5 F8 X3 W1 S00=01 &W0

The current modem configuration read using AT&V commands should look as follows:
at&v ACTIVE PROFILE: B0 E1 L1 M1 N0 Q0 T V1 W1 X3 Y0 &C1 &D0 &G0 &J0 &K0 &Q5 &R1 &S0 &T5 &X0 &y0 S00:001 S01:000 S02:043 S03:013 S04:010 S05:008 S06:009 S07:060 S08:002 S09:006 S10:020 S11:095 S12:050 S18:000 S25:005 S26:001 S36:004 S37:009 S38:020 S44:020 S46:138 S48:128 S95:000 ok

07/01 AWB2700-1305-GB

425

Appendix Initialise via remove configuration using a Logem 928 ke modem The remote modem can be initialised by the programmer via the local modem. For safety reasons, remote access is only possible in reliable mode, and register S45 = 1 must be set (see modem operating instructions) on the remote modem First start a reset, the set the local modem parameters and save this setting in the EEPROM:
ATZ ATF23 E1 L1 M1 Q0 X4 V1 T\Q0 \G0 \A1 AT\C0 \L0 \N2 \X0 \K3 %C0 %E1 %R0 AT&I0 &X0 &G0 &M0 &C2 &D0 &H0 &R1 &S1 &T5 AT&W

Then establish the connection to the remote modem and switch to Command mode on the local modem:
ATDT 00w0228,6022099 +++

Initiate the remote configuration with AT%F, but without entering a password. Set the remote modem parameters and save this setting in the EEPROM:
AT%F ATF255 S51=7 E0 L1 M1 Q1 X4 V1 T\Q0 \G0 \A1 AT\C0 \L0 \N3 \X0 \K3 %C1 %E1 %R0 AT&I0 &X0 &G0 &M0 &C2 &D0 &H0 &R1 &S1 &T5 AT&W

Start a reset, switch to Command mode and clear the connection for setting parameters.
ATZ +++ ATH0

Now establish the connection to the remote modem for exchanging user data.
ATDT 00w0228,6022099

426

07/01 AWB2700-1305-GB

Using several PS416-CPUs Using several PS416-CPUs By using several PS416-CPUs (Multi-processing) in one rack, the PS416-CPU can be used as a platform for additional technology applications. In this way, for example, a CPU can control the process whilst at the same time another CPU handles complex closed-loop control or positioning tasks. This ensures a faster and more efficient execution of the process. The data exchange between the CPU cards is organised by the CPUDataExchange function block. When several CPUs are used, the multi-drop connection is recommended (see Page 315).

Configuring a PS416 system The controller CPU or master CPU is fitted in slot 2/3. Additional technology cards or slave CPUs are fitted in slots 4/5, 6/7, 8/9 etc. This slot assignment must be observed. The CPU cards must be fitted in the rack without any gaps. Before commissioning carry out a current requirements calculation for all the cards fitted in the rack in order to ensure that the power supply unit is not overloaded. The current requirements of each card are provided in the relevant manual.

07/01 AWB2700-1305-GB

427

Appendix Assigning local inputs and outputs Word processing cards, such as analog input/output cards, counter cards and network cards can be addressed exclusively and controlled by the master CPU. The local (central) digital I/O can either be addressed by the master or by the slave CPU on slots 4/5. The allocation of CPU access to the local digital I/O is defined in the topology configuration created in Sucosoft S40 for every PLC. If the master CPU has access to the local digital I/O, the following configuration variations are possible:

Configuration of the master CPU on Configuration of the slave CPU on slot Configuration of the slave CPU on slot slot 2/3 4/5 6/7 Line 0 0 0 0 0 0 Rack 0 0 0 0 0 0 Slot 0 2 4 6 12 16 Type PS416INP/OUT PS416CPU PS416CPU PS416CPU PS416COM-200*) PS416NET-220*) Line 0 Rack 0 Slot 4 Type PS416CPU-400 Line 0 Rack 0 Slot 6 Type PS416CPU-400

*) Example of word-processing cards


07/01 AWB2700-1305-GB

428

Using several PS416-CPUs If the slave CPU has access to the local digital I/O, the following configuration variations are possible:
Configuration of the master CPU on Configuration of the slave CPU on slot Configuration of the slave CPU on slot slot 2/3 4/5 6/7 Line 0 0 0 0 0 Rack 0 0 0 0 0 Slot 2 4 6 12 16 Type PS416CPU PS416CPU PS416CPU PS416COM-200*) PS416NET-220*) Line 0 0 Rack 0 0 Slot 0 4 Type PS416INP/OUT PS416CPU-400 Line 0 Rack 0 Slot 6 Type PS416CPU-400

*) Example of word-processing cards

All other system configurations, especially the inclusion of word-processing cards in the topology configuration of a slave CPU or the simultaneous allocation of the digital I/O to the master and to the slave CPU can lead to undefined system states that can only be switched off by removing the battery, and switching off the PLC.

07/01 AWB2700-1305-GB

429

Appendix Addressing remote I/O via Suconet K Both the master CPU and the slave CPU can be connected to a Suconet K line via the on-board SBI interface and can thus access the remote I/O independently of each other.

Programming master and slave CPU Master and slave CPUs are programmed separately. Their programs run asynchronously to each other. If a master CPU or slave CPU switches to Ready, this has no effect on other CPUs. The data between the master and slave CPUs is exchanged via a special memory module which is programmed with the CPUDataExchange function block. In this data exchange, one side writes a defined data range whilst the other side reads it. One master CPU must always be present for the data exchange. Data exchange between slave CPUs is not possible. The data exchange is not synchronised so that a handshake procedure for the exchange must be written in the program. An application example of the CPUDataExchange function block is provided in the function block description in the manual AWB2700-1306-GB Sucosoft S40, Language Elements.

430

07/01 AWB2700-1305-GB

Glossary Glossary

Array

Variable consisting of several data elements of the same data type. Derived data type that is declared with the Keyword ARRAY. Unlike a structure, the individual elements of an array are addressed by an integer index (subscript), that can also be calculated whilst the application is running.

ARRAY

Keyword for declaring an Array.

AT

Keyword for declaring Directly represented variables (e.g.: Start AT %I0.0.0.1.2 : BOOL;).

Constant

Value that is directly defined and processed during program execution without being assigned to an identifier (e.g.: LD 100).

CONSTANT

Keyword for declaring a data element with a data content that cannot be changed. Can be used in conjunction with local and global variables (e.g.: VAR_GLOBAL CONSTANT).

Current result
07/01 AWB2700-1305-GB

Result of an operation. Corresponds to the contents of the working register.

Default value

Value that is automatically assigned a variable at the start of the program if no explicit initialisation is specified. 431

Appendix Derived data types Manufacturer and user-defined data types that are derived from Elementary Data Types and are assigned a new name. They are declared between the Keywords TYPE ... END_TYPE (e.g. structures, arrays).

Directly represented variable

Variable for representing a physical PLC address. Is identified in the declaration with the Keyword AT (e.g.: Start AT %I0.0.0.1.2 : BOOL;).

Elementary data types

Predefined data types identified by Keywords (e.g.: INT, BOOL, WORD).

Function

Program organisation unit, that can be used for recurring control task elements. A function can process several input parameters. Only one return value is supplied as a result. A function is a POU without a memory, i.e. the status values of the last call are not retained. A function therefore always supplies identical return values if the same input values are used.

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 as a result. The processed values are saved by the function block until the next call.

432

07/01 AWB2700-1305-GB

Glossary Global variable Variable, that is declared in the Program POU as VAR_GLOBAL and is available in all function blocks called in this POU. It must be declared in the function blocks that use this global variable as VAR_EXTERNAL.

Identifier

The name of a variable, data type, POU or jump label.

Initialisation value

Status value automatically assumed by a variable when the PLC is started. Variables can be initialised in the declaration section of a POU (e.g.: Value:INT:=100;).

Input variable

Variable for transferring a value to functions or function blocks. It is declared between the Keywords VAR_INPUT ... END_VAR.

Input/output variable

Variable that is read in a function block, processed, and output under the same name; also known as a passing parameter. The change of an input/output variable value in a function block automatically affects the variable of the invoking POU assigned to the Input/Output variable. Input/Output variables are declared in the function blocks between the Keywords VAR_IN_OUT ... END_VAR.

Instance
07/01 AWB2700-1305-GB

Use of a function block in a program or a function block. The creation of an instance reserves a data range for processing the function block. Several instances of a function block can be defined. Each instance is then assigned its own data range.

433

Appendix Keyword Unique combinations of characters (LD, CAL, VAR_GLOBAL, ...) that have a special, predefined meaning in a programming language and can only be used for this purpose. The meaning of a keyword cannot therefore be changed by a user definition.

Local variables

Variable which is only valid within the POU in which it was declared between the Keywords VAR ... END_VAR. This type of variable is not accessible outside of the POU and cannot therefore be overwritten accidentally.

Modem

Word formed from MOdulator and DEModulator. A modem modulates the digital signals from a computer converting them into analog signals for transmission over the telephone line. A modem also demodulates the analog signals received along the telephone line, converting them into digital signals. In the case of data transmission over the digital telephone network so-called ISDN terminal adapters are used instead of analog modems.

Output variable

Variable declared in the function block between the


Keywords VAR_OUTPUT ... END_VAR. The output

variable is the return value of the function block. The value can be processed by other POUs.

POU

Program Organisation Unit


07/01 AWB2700-1305-GB

Program

Higher-order structure level. The Program program organisation unit defines the starting point of the PLC application. Instructions can be executed within the program, or branches made to functions and function blocks.

434

Glossary Program organisation unit (POU) Self-contained program section for structuring an application. There are three types of POU: Program, Function and Function block. Consists of a declaration section and an instruction section.

RETAIN

Keyword for declaring a Retentive variable

Retentive variable

Local or global variables that retain their status value in the event of a restart after a voltage failure. The declaration of a retentive variable uses the Keyword VAR or VAR_GLOBAL with the Keyword RETAIN (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. Is used for declaring Global Variables within a function block.

VAR_GLOBAL

Keyword for declaring Global variables.

VAR_INPUT
07/01 AWB2700-1305-GB

Keyword for declaring Input variables.

VAR_IN_OUT

Keyword for declaring Input/output variables.

VAR_OUTPUT

Keyword for declaring Output variables.

435

Appendix Variable A data element of a specific data type for which the appropriate memory is reserved. A variable is addressed by its name ( Identifier). It is declared and possibly initialised in the declaration section of a POU.

Variable initialisation

Specification of an initial value of a variable in its declaration.

Variables declaration

In the variables declaration a data element is assigned a name, a data type and possibly a physical address and an initialisation value. If the variables have no explicitly assigned initialisation values, the Default value is used. The variable declaration is made in the declaration section of a POU.

Working register

Register in the central unit of a PLC. This saves the results of arithmetic, logical and I/O operations.

436

07/01 AWB2700-1305-GB

Shortcuts Shortcuts The POU Editor supports the following standard Windows shortcuts:
Shortcut Ctrl+O Ctrl+S Ctrl+Shift+S Ctrl+T Ctrl+P F10 Ctrl+Q Ctrl+Z Ctrl+Y Ctrl+X or Ctrl+Del Ctrl+C or Ctrl+Ins Ctrl+V or Shift+Ins Del Ctrl+A Ctrl+F Ctrl+H Ctrl+G Ctrl +I Ctrl+B Description File/Open POU File/Save POU File/Save All POU Files File/Open Global Types File/Print File/Syntax Check File/Cross-reference File Edit/Undo Edit/Restore Edit/Cut Edit/Copy Edit/Paste Edit/Delete Edit/Select All Edit/Find Edit/Replace Edit/Go To Help/Info Jumps between the associated parentheses ( ) or [ ] (only for declaration and instruction section). Switch between Free and Syntax mode Activate or open the Output window Delete Line Insert Line Moves the separator between the declaration section and instruction section alternately, so that one window half is reduced to the minimum width.

Ctrl+M Alt+2 Alt+Delete Alt+Ins Ctrl+Shift+Tab


07/01 AWB2700-1305-GB

437

Appendix
Shortcut F1 Description Calls the S40 Help with the POU Editor topic (Overview). The context-sensitive Help is activated if the cursor is in a POU or a Global Data Types window. Activates the context Help Moves to the line with the next bookmark. Moves to the line with the previous bookmark. Shows or hides the bookmark for the current line. Deletes all bookmarks in the window. Cascades the windows. Closes the current POU. Closes the POU Editor. Calls the Insert/Variables Declaration dialog. Tiles the windows vertically. Moves between the instruction and declaration section. Tiles the windows horizontally. Activates the next MDI window. Code Generation Moves the cursor to the start of the next word. Moves the cursor to the start of the previous word. Moves the cursor to the start of the current line Moves the cursor to the end of the current line. Moves the cursor to the start of the active window.
07/01 AWB2700-1305-GB

Shift+F1 F2 Shift+F2 Ctrl+F2 Ctrl+Shift+F2 Shift+F4 Ctrl+F4 Alt+F4 F5 Shift+F5 F6 and Ctrl + Tab Shift+F6 Ctrl+F6 F7 Ctrl+Arrow right Ctrl+Arrow left Home End Ctrl+Home Ctrl+End

Moves the cursor to the end of the active window

438

Index

A About ........................................................................... 182 Adding Local components .................................................... 203 Remote components ................................................ 204 Address ........................................................ 104, 113, 114 Addressing AS-Interfacestations .............................................. 197 Digital I/O cards ................................................ 217, 344 Suconet K stations ................................................... 210 Adjusting column width, Entry cells ............................... 96 All profiles .................................................................... 197 Alternative statements ................................................. 131 AS-Interfacenetwork .................................................. 191 Configuring online .................................................... 403 Asynchronous operation with PS4-300 ....................... 215 AT command sequences ............................................. 322 Attribute ....................................................... 103, 113, 114 Autoaddressing of ASi slaves ...................................... 260 AUTOSTART ................................................................ 354 B Basic settings ................................................................. 90 Battery change, indication ........................................... 365 Battery error ......................................................... 371, 373 BATTERY operating status .......................................... 365 Baud rate, Modem ....................................................... 322 Bookmarks Online mode ............................................................. 390 POU Editor ................................................................. 98 BOOT ................................................................... 365, 376 Booting, PLC from memory card ................................. 359 Bus status .................................................................... 252 Bus terminating resistors ............................................. 316 Buttons ASi Configurator ....................................................... 308 Topology Configurator ............................................. 306

07/01 AWB2700-1305-GB

439

Index
C CFG-DP ........................................................................ 223 CFG-DP Configurator ................................................... 220 CHANGE ...................................................................... 365 Change display, Topology Configurator ...................... 259 Changing Parameters ............................................................... 203 PROFIBUS-DP configuration .................................... 223 Program .................................................................... 396 Programming language ...................................... 99, 175 Suconet K configuration ........................................... 203 Changing display Topology configuration ............................................. 306 Changing display mode Topology configuration ............................................. 201 Changing parameters ................................................... 203 Changing programming language .......................... 99, 175 Changing windows in the T & C tool ............................ 298 Changing, to offline mode ............................................ 403 Checksum error .................................................... 370, 373 Coil Negating ................................................................... 144 Cold Start ..................................................................... 378 Colour setting ................................................................. 97 Comment ...................................................................... 116 Comments, line-oriented .............................................. 180 Commissioning ............................................................. 311 Flow diagram ............................................................ 311 Compare, configuration ................................................ 306 Comparing programs On PC and PLC ........................................................ 357 Complex data types ..................................................... 391 Compressed display (topology configuration) ............. 306 Conditional network output .......................................... 142 Configuration Compare ................................................................... 306 Open ......................................................................... 193 Print .......................................................................... 193 Save .......................................................................... 193 Configuration example Complex configuration ............................................. 268 Configuration with PS416 ......................................... 244 Local configuration ................................................... 224

440

07/01 AWB2700-1305-GB

Index
With PROFIBUS-DP network ................................... 262 With PS4-300 ........................................................... 228 Configurators, overview ............................................... 188 Connecting, PLC .......................................................... 341 Connection Aborted ..................................................................... 325 Add ........................................................................... 300 Removing ................................................................. 311 Via modem ............................................................... 314 Connection Check via DCD line ................................... 325 Connection establishment ........................................... 329 AT commands .......................................................... 322 Log ........................................................................... 325 Connection list Create ....................................................................... 311 Connection termination AT commands .......................................................... 324 Modem ..................................................................... 331 CONSTANT .................................................................. 114 Conventions, writing variable names ........................... 102 Convert function type .................................................. 184 Convert POU type ........................................................ 183 Converting the return value of a function .................... 184 Converting the sequence type ..................................... 143 CPU Address setting, on the device ................................. 315 Diagnostics ............................................................... 366 Display Status .......................................................... 306 Operating status ............................................... 365, 376 Status, PS416 ........................................................... 364 Status, PS4-200 ............................................... 362, 363 Cross-reference file ...................................................... 186 Current POU ............................................................. 100 D Data exchange, command ........................................... 209 Data retention destroyed ............................................. 370 Data types, derived ...................................................... 105 Date, display on the CPU ............................................. 365 DC voltage failure ................................................. 370, 373 Declaration blocks Sequence ................................................................. 119 Declaration of function blocks ..................................... 102

07/01 AWB2700-1305-GB

441

Index
Declaration section ............................................. 87, 89, 90 Free mode ................................................................. 118 Syntax mode ............................................................. 117 Declaration Wizard ....................................................... 109 Starting ..................................................................... 109 Declaring variables in Free mode ................................. 118 Defining startup behaviour, after program transfer ...... 354 Defining the print range (Form editor) .......................... 285 Delay time ..................................................................... 322 Delete User program ............................................................ 378 Deleting Elements ................................................................... 145 Elements from the topology ..................................... 198 Elements in the Form editor ...................................... 289 Empty slot ................................................................. 204 Graphical symbols .................................................... 163 Inputs ........................................................................ 165 Local components .................................................... 204 Network in FBD ......................................................... 159 Network in LD ........................................................... 139 Outputs ..................................................................... 169 Remote components ................................................ 205 Derived data types ....................................................... 105 Device configuration, Definition ................................... 206 Device name ................................................................. 311 Diagnostics Bit, PROFIBUS-DP stations ...................................... 222 Diagnostics bit .............................................................. 366 Diagnostics counter ..................................................... 366 Diagnostics status word ............................................... 366 Diagnostics, AS-Interface ........................................... 412 Dialling tone, not detected ........................................... 323 Disconnect, PLC .................................................. 331, 342 Disconnection ............................................................... 331 Display Faulty modules ......................................................... 380 Faulty network lines .................................................. 380 Display bus cycle time ................................................. 202 Display I/O utilisation .................................................... 202 Display mode, output window ...................................... 101 Dynamic forcing ........................................................... 399

442

07/01 AWB2700-1305-GB

Index
E Editing line ................................................................... 113 Element Deleting .................................................................... 145 Naming ............................................................. 146, 172 Entry cells, column adjustment ...................................... 96 ERROR ......................................................................... 365 Error Local configuration ................................................... 371 Network station ........................................................ 371 Remote configuration ............................................... 371 SBI ............................................................................ 371 Error message .............................................................. 125 Error report ................................................................... 100 Establishing a remote connection, Overview ............... 318 Establishment, modem connection ............................. 329 Example Configuration with AS-Interfacenetwork ................ 256 Configuration with multi-processing ........................ 271 Network diagnostics ................................................. 381 Example configuration, structure ................................. 403 Execution control ................................................. 136, 153 Expand topology Remote ..................................................................... 195 Expanding the topology Local ......................................................................... 203 Remote ..................................................................... 204 Expansion, remote ....................................................... 195 External variable ........................................................... 104 F Failure, CPU ................................................................. 370 Faulty code .................................................................. 373 FBD programming ....................................................... 149 File card tabs ................................................................. 89 File names, extensions, impermissible ........................ 353 Fill Colour ..................................................................... 283 Find ................................................................................ 93 Find undeclared variables .............................................. 93 Font .............................................................................. 283 Font setting .................................................................... 97 Forcing Analog outputs ......................................................... 348

07/01 AWB2700-1305-GB

443

Index
Cancel ....................................................................... 401 Outputs ............................................................. 307, 347 Special feature of PS4-100 ....................................... 213 Variable ..................................................................... 398 Forcing outputs ............................................................ 307 Formatting, memory card ............................................. 356 Formular-Editor ............................................................ 281 Free mode .................................................................... 118 Function Creating in LD ........................................................... 149 Inserting in FBD ........................................................ 155 Inserting in IL ............................................................ 121 Inserting in LD ........................................................... 137 Inserting in ST ........................................................... 128 POU ............................................................................ 86 Function blocks POU type .................................................................... 86 G Generic Types ........................................................................ 407 Generic components .................................................... 197 Global Variable ..................................................................... 104 Global data types ......................................................... 185 Go to ............................................................................... 93 Graphic elements ......................................................... 281 Drawing ..................................................................... 288 Graphical symbols Deleting ..................................................................... 163 Inserting .................................................................... 161 Grid Lines ..................................................................... 284 H Halt, user program ....................................................... 378 I ID code ................................................................. 191, 197 IL programming ............................................................ 121 Indication, error category ............................................. 367 Initial value .................................................................... 114 Initialise PLC modem via remote configuration ...................... 329

444

07/01 AWB2700-1305-GB

Index
Initialising PC modem ............................................................... 321 PLC modem ............................................................. 326 PLC modem via remote configuration ..................... 426 Input Deleting .................................................................... 165 Display .............................................................. 307, 345 Inserting .................................................................... 164 Negating ................................................................... 170 Variable ..................................................................... 103 Input/Output Access to PROFIBUS-DP slaves ............................. 221 Specifying for AS-Interfacecomponents ................ 198 Variable ..................................................................... 104 Insert Conditional network output ...................................... 142 Network in LD ........................................................... 139 Inserting AND function, FBD ................................................... 162 AND sequence in LD ................................................ 141 Control statements ................................................... 131 Functions in FBD ...................................................... 155 Functions in IL .......................................................... 121 Functions in ST ......................................................... 128 Graphical symbols .................................................... 161 Inputs ........................................................................ 164 Network in FBD ........................................................ 159 Operators in IL .......................................................... 121 Operators in ST ........................................................ 128 OR sequence in LD .................................................. 141 Output ...................................................................... 166 Variables in FBD ....................................................... 154 Variables in IL ........................................................... 123 Variables in LD ......................................................... 137 Variables in ST .......................................................... 130 Inserting AND function, FBD ........................................ 162 Inserting AND sequence, LD ........................................ 141 Inserting control statements ........................................ 131 Inserting operators, in IL ............................................................................... 121 ST ............................................................................. 128 Inserting OR sequence ................................................ 141 Instance ............................................................... 110, 154

07/01 AWB2700-1305-GB

445

Index
Instantiating .................................................................. 102 Instruction section .............................................. 87, 89, 91 IO code ................................................................. 191, 197 Iteration statements ...................................................... 132 J Jump destination .................................................. 140, 160 Jump operations .................................................. 147, 173 Jump statements .......................................................... 132 Jumps ........................................................................... 153 L Language element toolbar ............................................. 89 Language element toolbar buttons FBD ........................................................................... 152 LD ............................................................................. 134 Language elements toolbar ............................................ 99 Language selection ........................................................ 99 LD programming .......................................................... 132 Lightning symbol .......................................................... 380 Line colour .................................................................... 283 Line number ................................................................. 210 Line thickness ............................................................... 283 LOAD ............................................................................ 354 Loading bitmaps (Form editor) ..................................... 289 Loading the configuration file ....................................... 203 Local expansion ................................................... 194, 203 Local variable ............................................................... 105 Logical sequence ......................................................... 140 M Manufacturer AS-Interfacecomponent ......................................... 197 Function blocks, data types ..................................... 111 Functions .................................................................. 122 Manufacturer-defined function blocks, data types ...... 111 Markers .................................................................... 49, 55 Master .......................................................................... 334 Memory card Formatting ................................................................ 356 Information on ........................................................... 365 Menu bar, POU Editor .................................................... 92 Modem

446

07/01 AWB2700-1305-GB

Index
Connecting ............................................................... 319 Modem connection ...................................................... 316 Module number ............................................................ 211 Multidrop connection ................................................... 315 Multi-processing .................................................. 217, 427 N Name ............................................................................ 114 Negating Contact or coil in LD ................................................. 144 Inputs ........................................................................ 170 Outputs ..................................................................... 171 Negating a contact ....................................................... 144 Network Deleting in FBD ........................................................ 159 Deleting in LD ........................................................... 139 Inserting in FBD ........................................................ 159 Inserting in LD .......................................................... 139 Network comment ....................................... 147, 150, 174 Network communications, indicating status ................ 380 Network diagnostics ............................................ 379, 382 Display ...................................................................... 307 Example .................................................................... 381 Example with AS-Interface network ....................... 412 Network graphics ......................................................... 151 Network label ............................................................... 150 Network types .............................................................. 190 AS-Interface ............................................................ 191 Suconet K ................................................................. 190 New program POU ....................................................... 107 Not Ready ............................................................ 365, 376 NOT SET ...................................................................... 354 O Offline mode ................................................................. 187 Online Mode, Switching in the POU Editor ......................... 385 Modification, not possible ........................................ 402 Online mode ................................................................. 187 Online modification, not possible ................................ 397 Online POU FBD display .............................................................. 389 IL display .................................................................. 388

07/01 AWB2700-1305-GB

447

Index
LD display ................................................................. 389 Open, configuration ...................................................... 193 Operating mode selector switch, indication of setting .......................................... 365, 377 Operating system Display of version and identification code ................ 365 Not present (indication) ............................................. 365 Transferring ............................................................... 349 Output Deleting ..................................................................... 169 Display .............................................................. 307, 345 Forcing ...................................................................... 347 Inserting .................................................................... 166 Negating ................................................................... 171 Reset ......................................................................... 370 Variable ..................................................................... 103 Output window ............................................................. 100 Output window, display mode ..................................... 101 Overload ....................................................... 370, 371, 373 P Page Preview (Form editor) .......................................... 290 Page setup (Form editor) .............................................. 285 Parameters AS-Interfacemaster ................................................ 260 Device ....................................................................... 198 Procedure ................................................................. 200 Send and receive data .............................................. 208 Parameters dialog, examples ....................................... 199 Password Define ........................................................................ 299 PLC access ............................................................... 332 Pauses, during dialling process ................................... 323 PBX system .................................................................. 329 Physical address .......................................................... 114 Placeholders ................................................................. 281 Plausibility check, Topology Configurator .................... 188 PLC Local expansion ........................................................ 194 Remote Expansion .................................................... 195 Selecting a type ........................................................ 193 Point-to-point ............................................................... 313 Point-to-point connection ............................................ 313

448

07/01 AWB2700-1305-GB

Index
POU Creating in FBD ........................................................ 153 Creating in IL ............................................................ 121 Creating in LD ........................................................... 135 Creating in ST ........................................................... 128 Online modification .................................................. 396 Saving ............................................................... 119, 126 Structure ..................................................................... 87 Test ........................................................................... 385 Testing ...................................................................... 387 POU Editor Primary functions ....................................................... 88 Start ............................................................................ 88 User interface ............................................................. 89 POU Info ...................................................................... 182 POU type Function ...................................................................... 86 Function block ............................................................ 86 Program ...................................................................... 86 Print Configuration ............................................................ 193 Connection list ......................................................... 299 Print form Designing .................................................................. 285 Editing ...................................................................... 291 Save .......................................................................... 290 PROFIBUS-DP Configurator ............................................................. 220 Network .................................................................... 192 Topology configuration ............................................ 220 Program Changing .................................................................. 396 Comparing Programming device and PLC .............................. 356 Cycle time ................................................................... 48 POU type .................................................................... 86 Protecting ................................................................... 47 Starting ..................................................................... 357 Starting and stopping, via programming device ...... 378 Transfer .................................................................... 352 Version number .............................................. 47, 54, 60 Window .................................................................... 385 Program information

07/01 AWB2700-1305-GB

449

Index
PS4 ........................................................................... 377 Program memory, error ................................................ 370 Program name .............................................................. 377 Program startup ........................................................... 377 Program status ..................................................... 357, 377 PS4 ........................................................................... 375 PS416 ....................................................................... 376 Program test ................................................................. 384 Programming in FBD ....................................................................... 149 In IL ........................................................................... 121 in LD .......................................................................... 132 In ST .......................................................................... 127 Programming connection Multidrop. .................................................................. 315 Via modem ................................................................ 316 Via Suconet K ........................................................... 334 Programming performance, with Suconet K programming ............................................................ 340 Prototype ...................................................................... 182 Pulse dial ...................................................................... 323 R RAM memory faulty .............................................. 370, 373 Ready ................................................................... 365, 376 Real-time clock faulty ........................................... 370, 373 Receive data Parameters ............................................................... 208 Recipe range ............................................................ 50, 56 Remote configuration ................................................... 426 Remote control ............................................................. 211 Remote diagnostics ..................................................... 320 Remote expansion ....................................................... 204 AS-Interfaceline ...................................................... 196 Suconet K line ........................................................... 195 Remote operation ......................................................... 316 Replace .......................................................................... 93 Replacing, components ............................................... 205 Restore ........................................................................... 93 RETAIN ......................................................................... 114 Retentive marker reset ................................................. 370 Run ....................................................................... 365, 376 RUNTIME ERROR ................................................ 365, 370

450

07/01 AWB2700-1305-GB

Index
S Save Configuration ............................................................ 193 Print form .................................................................. 290 Save settings on exit .................................................... 402 Saving Connection list ......................................................... 299 POU .................................................................. 119, 126 Select POU elements in FBD .............................................. 158 POU elements in LD ................................................. 138 Selection statements ................................................... 131 Send and receive data, Configuration for PS4-300 ..... 216 Send data Parameters ............................................................... 208 SendATCommand ............................................... 322, 329 Settings Dialog ......................................................................... 96 Saving during online/offline change ......................... 386 Short-circuit ................................................. 370, 371, 373 Single master system ................................................... 191 Snap-to-grid function ................................................... 284 Software error .............................................................. 373 Special characters, in Status display ........................... 397 ST ................................................................................. 127 Standard Cover sheets ............................................................ 281 Forms ....................................................................... 281 Toolbar ....................................................................... 98 Standard terminal program, for initialising PLC modems ............................................................ 327 Start FBD network ....................................................... 153 Start LD network .......................................................... 135 Starting Topology Configurator ............................................. 189 User program ........................................................... 366 Startup phase, PROFIBUS-DP line .............................. 223 Startup, program .......................................................... 377 Static forcing ................................................................ 399 Station Address setting ........................................................ 252 Addressing ............................................................... 210 Local expansion ....................................................... 194

07/01 AWB2700-1305-GB

451

Index
Number ..................................................................... 210 Remote expansion .................................................... 195 Status display ............................................................... 388 Variables in the Variables window ............................ 394 Variables in the Zoom window ................................. 392 Stop, error category ..................................................... 366 Structured text ............................................................. 127 Suconet K Network .................................................................... 337 Network, Overview ................................................... 190 Slave, operating mode for PS4-300 ......................... 215 Suconet K network ....................................................... 337 Supply voltage dip ................................................ 370, 373 Switching Instruction section and declaration section ................ 91 ST in LD and FBD ..................................................... 127 Switching modes Syntax mode and Free mode ..................................... 90 Synchronous operation with PS4-300 ......................... 214 Syntax check ................................................................ 125 Access addresses with PROFIBUS-DP stations ...... 221 Syntax mode ................................................................ 112 System diagnostics ...................................................... 361 System information ...................................................... 365 T Text entries ................................................................... 285 Time, display on CPU ................................................... 365 Timeout delay ............................................................... 322 Timer failure .......................................................... 370, 373 Tool tip ........................................................................... 91 Toolbar ........................................................................... 97 Customize ................................................................... 97 POU Editor .................................................................. 89 Test & Commissioning .............................................. 303 Topology configuration Change ..................................................................... 203 Complex example ..................................................... 268 Example with AS-Interfacenetwork ........................ 256 Example with local configuration .............................. 224 Example with PROFIBUS-DP ................................... 220 Example with PROFIBUS-DP network ..................... 262 Example with PS416 ................................................. 244

452

07/01 AWB2700-1305-GB

Index
Example with PS4-300 ............................................. 228 Procedure ................................................. 206, 225, 246 Procedure with AS-Interface ................................... 257 Topology configuration with multi-processing ............ 271 Topology Configurator Adding components ......................................... 203, 204 Display ...................................................................... 201 I/O utilisation ............................................................ 202 Overview ................................................................... 187 Starting ..................................................................... 189 Structure ................................................................... 187 Transfer Operating system ..................................................... 349 Program .................................................................... 352 Transfer errors, when transferring to slave PLCs ........ 341 Transfer problems, with modem connection ............... 328 Transfer rate ......................................................... 314, 326 Transferring new variables ........................................... 110 Type ............................................................................. 114 Variable ..................................................................... 105 U Undo .............................................................................. 93 User program Faulty, indication ...................................................... 365 Starting ..................................................................... 366 User program memory, display ................................... 365 User-defined data types .............................................. 185 User-defined function blocks and data types .............. 111 User-defined functions ................................................ 122 V VAR .............................................................................. 105 VAR_EXTERNAL .......................................................... 104 VAR_GLOBAL .............................................................. 104 VAR_IN_OUT ................................................................ 104 VAR_INPUT .................................................................. 103 VAR_OUTPUT .............................................................. 103 Variable declaration ............................................... 95, 102 Elements ................................................................... 102 Examples for Free mode .......................................... 120 Free mode entry ....................................................... 118 User-guided entry .................................................... 112

07/01 AWB2700-1305-GB

453

Index
Variable editor .............................................................. 112 Variable name, conventions ......................................... 102 Variable states, display in the POU Editor ................... 388 Variable window Displaying complex variables ................................... 393 No display ................................................................. 402 Variables ....................................................................... 118 Address ..................................................................... 210 Changing .................................................................. 120 Changing the declaration .......................................... 124 Declaring from topology ........................................... 106 Declaring in Syntax mode ......................................... 113 Declaring later ........................................................... 124 Declaring with Declaration Wizard ............................ 109 Displaying complex (Zoom window) ......................... 390 Forcing ...................................................................... 401 Inserting in FBD ........................................................ 154 Inserting in IL ............................................................ 123 Inserting in LD ........................................................... 137 Inserting in ST ........................................................... 130 Voltage supply failed .................................................... 370 W Wait for connection in s ................................................ 325 Warm start .................................................................... 378 Watchdog ............................................................. 370, 373 Wiring test .................................................................... 343 Z Zoom window ............................................................... 390

454

07/01 AWB2700-1305-GB

List of revisions to manual AWB 2700-1305GB

Publication Date 06/98

Page 31 208209 211212 214/227 223 234 286

Subject Note Master Slave Operation with Remote Control Upper figure, Button description displayed NOT_READY Note second to last paragraph D, P, T Revision for version 4.0. Chapters 1, 2, 5 Incorporation of AWB2700-1337GB Table, VAR_IN_OUT Output Note Figure Note first two paragraphs after list, top 3rd note 2nd paragraph 4th paragraph Complete revision Revision for version 5.0

New

Change X X X X X X

Deleted

07/99

Entire manual

07/99 (reprint)

70 78 92 160 178 204 282 298 321

X X X X X X X X X X

05/00 07/01

Chap. 3, 5 Entire manual

07/01 AWB2700-1305-GB

S-ar putea să vă placă și