Manual Sucosoft
Manual Sucosoft
Sucosoft S40
Programming Software
07/01 AWB-C2700-1366GB
1st published 1999, edition 06/99
2nd published 2001, edition 07/01,
see List of Revisions on Page 3
© Moeller GmbH, Bonn
Author: Arno Dielmann
Editor: Thomas Kracht
Translator: Simultrans
Contents
– Deleting folders 25
– Importing a library structure 26
Editing libraries 27
– Inserting project modules in the library 28
– Deleting library modules from the library 29
1
Contents
Naming of variables 61
Index 62
2
Regarding this manual
List of Revisions Compared to the 06/99 edition, there have been the
following essential changes:
3
Conventions used in the
manual
4
1 S40 Program Library Manager
5
Overview
6
2 Application window of the Library
Manager
7
Window areas and user
elements
Window areas and user After starting, the application window of the Library
elements Manager is opened.
8
Window areas and user
elements
9
Window areas and user
elements
10
Window areas and user
elements
Status bar
The status bar is displayed right at the bottom of the
Library Manager and shows information on the
status of the program. Displayed from left to right
are:
The status of the Library Manager itself
The current path of the S40 library
The selected type of PLC.
The status bar contains a brief explanation of the
currently selected menu item.
The toolbar can be displayed or hidden using the
menu item ‹ View ➞ Status Bar› .
Context-sensitive menus
Depending on the current position of the mouse
pointer in the library window, you can use the right-
hand mouse button to open a context-sensitive
menu in which you can select frequently used
commands.
11
Window areas and user
elements
Keyboard operation
Most commands of the Library Manager can also be
initiated with shortcut keys. For example, you can
use the Ctrl + P key combination to directly print out
the library information.
You will find an overview of all the shortcut keys at
the menu item ‹ Help ➞ Keyboard› or by pressing
the F9 function key.
Help
You can call up Help in various ways in the Library
Manager:
Help on procedures using “Help ➞ Procedures”
The Help topics are listed there under Contents or in
the index.
Context-sensitive Help using F1
Here, you are provided with context-specific Help
regarding the dialog box or menu item on which the
mouse pointer is positioned. Information on how to
use the online Help is provided under “Help ➞ Using
Help”.
Direct Help using the question mark or F1
This is where you are provided with context-related
Help regarding a button, a list selection or another
input element within a dialog box, in so far as a Help
text would be appropriate.
A dialog box that offers Direct Help is indicated by
the question mark to the left of the “Close” box.
07/01 AWB-C2700-1366GB
12
Window areas and user
elements
13
3 Functions of the Library Manager
14
Structure of an S40 project
Structure of an S40 The POU function and function blocks are gathered
library together in libraries and structured as modules, with
the S40 Library Manager.
A library uses the PLC-specific object code of the
library modules. The library modules therefore have
to be present and must have been compiled into the
right form for the specific PLC. The type of PLC of a
library is entered when a new library is created.
07/01 AWB-C2700-1366GB
15
Structure of an S40 library
Functions
Functions can be created for frequently used PLC
tasks. A function can contain several input
parameters, but only one output parameter, i. e. the
processing can only return one data element as a
result. Functions cannot store information.
Function blocks
Function blocks can also be created for frequently
used tasks. In contrast to functions, function blocks
can supply several output operands as results and
store the values of variables from one call to the next.
Stored values can be reused when the function block
is called next time or can be overwritten by new
values.
16
Editing buttons
17
Creating, opening and
saving libraries
Creating, opening and The commands in the Library menu control the
saving libraries library functions at file level. Commands are provided
to create a new library, open an existing library or
save changes to an open library.
18
Creating, opening and
saving libraries
19
Creating, opening and
saving libraries
Opening a library
Requirement: there is already a library with project
files.
왘 Select ‹ Library ➞ Open› ... or click on the Open
button.
The dialog box “Open” is displayed.
20
Creating, opening and
saving libraries
Saving libraries
Requirement: A library must be open.
왘 Select ‹ Library ➞ Save› or click on the “Save”
button.
The current settings of the library are saved under the
file name you have assigned to the library and the file
name extension ‘lib’. This physical file name is what
you use for later import of a library in the
NAVIGATOR.
When the library is saved, a file with the library
structure is also created automatically. It is given the
same physical file name as the library and has the file
name extension “grs”. This file can be reused when
07/01 AWB-C2700-1366GB
21
Creating, opening and
saving libraries
Note
When updated libraries are saved, it can occur
that the system issues a warning under the
following circumstances:
A library that was created using a Library
Manager of version 1.x contains POUs with
more than 8 characters (long name).
The POUs of the library are retranslated using
the programming software Sucosoft S40
V5.0 or higher.
If you use the Library Manager Version 2.0 or
higher to update the library, this also uses long
names. For this reason, the library can then no
longer be edited using a Library Manager of
version 1.x.
07/01 AWB-C2700-1366GB
22
Structuring libraries
23
Structuring libraries
24
Structuring libraries
Renaming a folder
왘 In the library structure window, mark the folder
you wish to rename.
왘 Shortly after, click on the folder name again - do
not double click -
or
Select the menu item Library ➞ Folder ➞ Rename
or click on “Rename” in the context-sensitive
menu.
The cursor is positioned in the name field of the
folder.
왘 Enter the new name and press the Enter key. The
folder is displayed with the new name.
Deleting folders
A marked folder can be deleted from the library
structure window along with all of the library modules
contained in it.
왘 In the library structure window, click on the folder
you wish to delete.
왘 Select the menu item ‹ Library ➞ Folder ➞
Delete› or click on “Delete” in the context-
sensitive menu.
The folder structure is deleted from the library. The
basic project data is retained unmodified on the
diskette or hard disk.
07/01 AWB-C2700-1366GB
25
Structuring libraries
26
Editing libraries
Editing libraries You can use the commands from the “Edit” menu to
Insert project modules in the library
Delete library modules from the library
Set attributes for library modules and groups of
library modules
Display information from library modules and
Update libraries
Notes on editing
If you wish to select project or library modules for the
above editing steps, please proceed as follows.
Mark the project or library modules of your library in
the project module or in the library module window
by clicking with the mouse pointer. You can select
several modules at once by clicking on them while
pressing and holding the “Ctrl” or “Shift” key:
Hold down the Shift key if you wish to mark all
modules lying between the first module you
select and the second one.
Hold down the Ctrl key to individually switch on
and off the marking of each selected module.
07/01 AWB-C2700-1366GB
27
Editing libraries
28
Editing libraries
29
Editing libraries
30
Editing libraries
31
Editing libraries
Example:
You offer the user only those library modules for
selection which are publicly available and
documented. Subordinate auxiliary modules are
made invisible with the attribute “Hidden”.
Deactivated: a library module or a group of library
module can be deactivated.
The functions of deactivated modules can no
longer be used by the Sucosoft S40 user, but the
modules remain in the library (invisible).
The deactivated modules of a library can no
longer be called by the activated modules.
The attribute “Deactivated” for a group overwrites
the setting of the library modules it contains (see
Page 38).
32
Editing libraries
33
Editing libraries
Updating libraries
All modules of a library can be compared with the
data of the current S40 project and updated. If the
modules in the S40 project are of a more recent date
than those in the library, the Library Manager
replaces all modules on request.
왘 Open an existing library and select a library
folder.
왘 Select ‹ Edit ➞ Update› or click on “Update” in
the context-sensitive menu.
The library modules are updated.
If there are library modules missing in the associated
S40 project, or the interfaces of the newer functions
and function blocks do not match those of the library
modules, an error message is output and the
updating process is aborted. The library modules are
then not updated.
07/01 AWB-C2700-1366GB
34
Testing libraries
35
Protecting libraries
36
Protecting libraries
Hiding libraries
To suit the specific application for a finished S40
library, you can hide the entire library without having
to modify elements or structures of the library.
Merely the attribute “Hidden” of the library has to be
changed.
Procedure
왘 In the library structure window, mark the library
folder and then click in the context-sensitive
menu on “Attributes”. Or double-click in the
library structure window on the logical library
name.
The “Properties” dialog box appears.
왘 Select the attributes option “Hidden”.
37
Protecting libraries
Priorities
The flow diagram below shows the priorities in
assigning attributes. For example, if you have
assigned the attribute “Hidden” to your library, the
groups of library modules or the individual library
modules will also be hidden. Otherwise, this priority
does not apply. A library module with the attribute
“Hidden” is always hidden, even if the associated
group or library is not hidden.
No
Library module
hidden/deactivated?
Yes
Group of library No
modules hidden/
deactivated?
Yes
No
Library hidden?
Yes
38
Protecting libraries
place.
39
Setting the properties of a
library
Setting the properties The library properties contain all of the information
of a library required to identify a library. This includes the library
and author name as well as company name and
version number. In addition, a library can be
assigned its own help file via the properties and a
function for protection against unauthorised access
can be activated.
Displaying and changing library properties
왘 Click on ‹ Library ➞ Properties...› .
A dialog box for specifying the library properties
appears.
40
Setting the properties of a
library
41
Creating a library report
42
Documenting a library
Documenting a library So that the Sucosoft S40 user can effectively use
your library functions, the library has to be
documented. There are two ways of integrating a
description of the library modules into your library:
In the form of a description block of the POU
EDITOR
As a Windows Help file.
43
Documenting a library
44
Controlling the use of a
library using product code
Controlling the use of a You can use a product code to protect your S40
library using product library against unauthorised use. You identify your
code library in such a way that a later import into a
customer project is only possible after input of the
specific product code.
The product code that you create using the Product
Code Generator is given to the customer together
with the library and added to your internal customer
file.
You identify the library in the Library Manager using
the option “Query product code”.
More information on this topic can be found in the
Sucosoft S40 manual “Product Code Generator”
(AWB-C2700-1375D). The manual is only available
07/01 AWB-C2700-1366GB
45
Controlling the use of a
library using product code
46
Controlling the use of a
library using product code
agreement (optional).
Your licence agreement can be written in up to five
languages.
47
Controlling the use of a
library using product code
48
4 Example Library
49
Creating a new library
50
Creating a new library
51
Creating a new library
52
Creating a new library
53
Protecting the library
Protecting the library The user of the library is only to have use of library
modules in the folders cntBasicController and
cntLinearController, but not those in the folder
cntArithmetic.
To achieve this, the “cntArithmetic” folder must be
marked as “Hidden” and the completed library
protected against unauthorised access.
54
Protecting the library
55
Integrating the Windows
Help file
56
Working with several
libraries
Working with several You can also distribute project modules from the
libraries same field of application to several libraries. This
allows you to develop the libraries separately and
also operate them separately. The file names of
the libraries must be different from each other. The
logical library name and the folder names, on the
other hand, can be the same.
Example
In addition to your LControl.lib library, you should
create a further library from the field of control
engineering with discontinuous controllers, e. g. with
two-position and three-position controllers.
왘 To do this, create a new library under the name
“UControl.lib” and assemble the library.
왘 As folder name, enter “cntUControl”.
왘 Use “control engineering” again for the logical
library name.
If the libraries in Sucosoft are used, the functions and
function blocks of both libraries appear in the
Function Block dialog box of the POU EDITOR and in
the NAVIGATOR under the same tab.
07/01 AWB-C2700-1366GB
57
5 Naming conventions
58
Naming library elements
59
Naming library elements
60
Naming of variables
WORD w w_DigitalOutput
61
Index
A
Assign Help ID ............................................................... 32
Attributes
“Deactivated” ............................................................. 32
“Help ID” ..................................................................... 32
“Hidden” ..................................................................... 31
Author, entering name of ............................................... 41
C
Code .............................................................................. 41
Context-sensitive menus ............................................... 11
Conventions used in the manual ..................................... 4
Creating documentation ................................................ 43
D
Deactivated, see Attributes
Deactivating, see Protective function
Desktop .......................................................................... 10
Direct Help ..................................................................... 12
E
Entering the version number .......................................... 41
Example task ................................................................. 49
EXTERNAL variables, Use of ......................................... 16
F
File name
Logical .................................................................... 8, 58
logical ......................................................................... 20
Physical ...................................................................... 21
File name extension
grs .............................................................................. 21
lib ................................................................................ 21
Folders that you have created for various topics, see
07/01 AWB-C2700-1366GB
Library folders
Function ......................................................................... 16
Function block ............................................................... 16
62
Index
H
Help ................................................................................ 12
Help file
Integrating .................................................................. 43
Integrating (example) .................................................. 56
Specifying path and name ......................................... 41
Hidden, see Attributes
Hiding, see Protective function
I
ID, see Help ID
Importing a library structure ........................................... 26
Initial test of modules ..................................................... 35
Inserting project modules .............................................. 28
Inserting project modules (example) .............................. 52
K
Keyboard operation ....................................................... 12
L
Library
Creating ...................................................................... 18
Creating a new (example) ........................................... 50
Documentation ........................................................... 43
Example task .............................................................. 49
Naming conventions ................................................... 58
Opening ...................................................................... 20
Password protection (example) .................................. 55
Properties ................................................................... 40
Saving ......................................................................... 21
Selecting projects ....................................................... 19
Structuring .................................................................. 23
Structuring (example) ................................................. 51
Test of references ....................................................... 36
Updating ..................................................................... 34
Using several libraries ................................................ 57
Library folder
Creating ...................................................................... 24
07/01 AWB-C2700-1366GB
Deleting ...................................................................... 25
Length of name .......................................................... 24
Renaming ................................................................... 25
Library groups .................................................................. 9
63
Index
Library Manager
Multiple opening ......................................................... 14
Overview ....................................................................... 5
Start window ................................................................ 8
Library manager
Creating documentation ............................................. 43
Printing a report .......................................................... 42
Protective functions ................................................... 36
Library module
Hiding ......................................................................... 31
Object code ................................................................ 15
Library module window .................................................... 9
Library modules
Deactivating ................................................................ 32
Deleting ...................................................................... 29
Displaying code size ................................................... 33
Function ...................................................................... 16
Function block ............................................................ 16
Hiding (example) ......................................................... 54
Identifying by function with prefix .............................. 60
Information on ............................................................ 33
Initial test .................................................................... 35
Selecting ..................................................................... 27
Setting attributes ........................................................ 30
Updating ..................................................................... 34
Library name
Logical .............................................................. 8, 20, 58
Physical ...................................................................... 21
Library property ............................................................. 37
Library structure
Importing .................................................................... 26
Saving ......................................................................... 21
Window ........................................................................ 9
Licence ........................................................................... 41
M
Manuals .......................................................................... 13
Menu bar ........................................................................ 10
07/01 AWB-C2700-1366GB
N
Naming conventions ...................................................... 58
Library names ............................................................. 58
64
Index
O
Object files ....................................................................... 8
Operands, see variables
P
Password ....................................................................... 39
Password protection, see Protective function
Plausibility check of libraries .......................................... 36
Printing library data ........................................................ 42
Product code ................................................................. 45
Program POU ................................................................. 15
Project Module window ................................................... 8
Properties
Dialog window ............................................................ 40
Protective function
Overview ..................................................................... 36
Prototype of a module ................................................... 33
R
Readme .......................................................................... 13
S
S40 project ..................................................................... 14
Display path ................................................................ 11
Selecting ..................................................................... 19
Saving
Library ........................................................................ 21
Library structure ......................................................... 21
Shortcut keys ................................................................. 12
Sorting library modules .................................................... 9
Status bar ....................................................................... 11
Structuring, library ......................................................... 23
Symbol bar
Displaying ................................................................... 10
T
Test of references .......................................................... 36
Toolbar
07/01 AWB-C2700-1366GB
Buttons ....................................................................... 17
Type of PLC ................................................................... 41
65
Index
V
Variables, data types of ................................................. 61
Version ........................................................................... 41
07/01 AWB-C2700-1366GB
66