PCS7 APL Styleguide en EN en-US PDF
PCS7 APL Styleguide en EN en-US PDF
1
___________________
Preface
2
___________________
Basics
PCS 7
Libraries
APL Style Guide
Programming Manual
3
___________________
Specifications for block icons
4
___________________
Specifications for faceplates
Design specifications of the
5
___________________
APL
Creating project-specific
blocks in conformance with
APL
6
___________
A
___________________
Appendix
02/2012
A5E03860312-01
Legal information
Legal information
Warning notice system
This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent
damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert
symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are
graded according to the degree of danger.
DANGER
indicates that death or severe personal injury will result if proper precautions are not taken.
WARNING
indicates that death or severe personal injury may result if proper precautions are not taken.
CAUTION
with a safety alert symbol, indicates that minor personal injury can result if proper precautions are not taken.
CAUTION
without a safety alert symbol, indicates that property damage can result if proper precautions are not taken.
NOTICE
indicates that an unintended result or situation can occur if the relevant information is not taken into account.
If more than one degree of danger is present, the warning notice representing the highest degree of danger will
be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to
property damage.
Qualified Personnel
The product/system described in this documentation may be operated only by personnel qualified for the specific
task in accordance with the relevant documentation, in particular its warning notices and safety instructions.
Qualified personnel are those who, based on their training and experience, are capable of identifying risks and
avoiding potential hazards when working with these products/systems.
Trademarks
All names identified by are registered trademarks of Siemens AG. The remaining trademarks in this publication
may be trademarks whose use by third parties for their own purposes could violate the rights of the owner.
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software
described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the
information in this publication is reviewed regularly and any necessary corrections are included in subsequent
editions.
Siemens AG
Industry Sector
Postfach 48 48
90026 NRNBERG
GERMANY
A5E03860312-01
02/2012 Technical data subject to change
Table of contents
1
Preface ...................................................................................................................................................... 7
Basics ........................................................................................................................................................ 9
2.1
2.2
Application strategies...................................................................................................................10
3.2
3.3
4.2
4.3
4.4
4.4.1
4.4.2
4.4.3
4.4.4
4.4.5
4.4.6
4.4.7
5.2
5.2.1
5.2.2
5.2.3
5.2.4
5.2.5
5.2.6
Table of contents
Introduction ................................................................................................................................. 41
6.2
6.2.1
6.2.2
6.2.2.1
6.2.2.2
6.2.2.3
6.2.2.4
6.2.3
6.2.4
6.2.5
6.2.6
6.2.7
6.2.8
6.2.9
6.2.10
6.2.11
6.2.12
6.2.13
6.2.14
6.3
6.3.1
6.3.2
6.3.2.1
6.3.2.2
6.3.2.3
6.3.2.4
6.3.3
6.3.3.1
6.3.3.2
6.3.3.3
6.4
6.4.1
6.4.2
6.4.3
6.4.3.1
6.4.3.2
6.4.3.3
6.4.3.4
6.4.3.5
6.4.3.6
6.4.4
6.4.4.1
6.4.4.2
6.4.4.3
6.4.5
6.4.5.1
6.4.5.2
6.4.5.3
Table of contents
6.4.6
6.4.6.1
6.4.6.2
6.4.6.3
6.4.6.4
6.4.6.5
6.4.7
6.4.8
6.4.8.1
6.4.8.2
A
Appendix................................................................................................................................................ 129
A.1
Table of contents
Preface
Introduction
The "Advanced Process Library" (APL) is the standard library of PCS 7 for implementing
automation and process control solutions. The APL contains function blocks and the
associated faceplates. The faceplates have a uniform design with regard to the operating
and monitoring user interface.
The APL Style Guide provides the information, design specifications and rules that you
require to adapt project-specific blocks in conformance with APL. You will receive support in
these required adaptations by examples of actions.
After all this work has been completed, the adapted project-specific blocks will behave like
APL blocks.
Target group
The "APL Style Guide" is intended for persons who use standard APL blocks and who want
to additionally adapt project-specific blocks to the specifications of the APL.
Note
The APL Style Guide is not intended to help you in creating completely new technological
libraries.
Validity
The APL Style Guide is valid as of the following version of PCS 7: PCS 7 V8.0.
Project-specific faceplates created on the basis of the APL library of PCS 7 V8.0 retain
their validity.
The APL style guide is based on the use of PCS 7 template screens and the objects they
contain.
Preface
Content
The APL Style Guide supplements the Programming Manual SIMATIC; PCS 7 Process
Control System; Programming Instructions for Blocks.
The APL Style Guide has the following structure and contents:
Introduction
Contains information about the purpose of the Style Guide, the target group and the
requirements.
Basics (Page 9)
Contains additional information about the use of the Style Guide as well as practiceoriented applications with implementation strategies.
Specifications for block icons (Page 15)
Contains rules for structuring and configuring project-specific block icons.
Specifications for faceplates (Page 17)
Contains rules for structuring and configuring project-specific faceplates.
Design specifications of the APL (Page 31)
Contains general specifications for designing block icons and faceplates in conformance
with APL.
Creating project-specific block icons and faceplates
Contains the required actions for adapting the project-specific blocks:
Adapting AS blocks (Page 42) (creating structures and parameters)
Creating block icons (Page 72)
Creating faceplates (Page 85)
Basics
2.1
Basics
2.2 Application strategies
Loss of project-specific adaptations to APL faceplates and APL blocks after the APL has been
updated
Recommendation:
Use only renamed copies of the APL blocks for project-specific blocks in a project. This
approach prevents the creation of inconsistent versions of the APL when you update the
library.
When you adapt existing APL faceplates and APL block icons, these changes will be
overwritten by the new version when you update the APL.
2.2
Application strategies
Starting situation
In general the project-specific blocks differ from the APL blocks as follows:
Structure of the interfaces of the function blocks
Representation of information at the block icon
Design of the faceplates
Functions in the faceplate
Adaptations
The program code of the function blocks will remain nearly unchanged.
You adapt functions and interfaces of the project-specific blocks in conformance with
APL.
You have the following possibilities for creating project-specific faceplates:
You use, for example, the faceplate structure of an existing APL faceplate as the basis
for new faceplates.
You create new project-specific faceplates.
10
Basics
2.2 Application strategies
Template screens
The following template screens contain the screen objects and block icons you use for your
project-specific type:
"@PCS7ElementsAPL.PDL"
Contains screen objects for creating faceplates.
"@PCS7TypicalsAPL... .PDL"
Contains block icons and static screen objects for valves or motors for automatic
placement and updating of the objects.
"@TemplatesAPL... .pdl"
Contains block icons and static screen objects for valves or motors for manual placement
and updating of the objects.
Note
Versions of the "@PCS7...APL... .PDL" template screen in PCS 7 V8.0
PCS 7 V8.0 contains the following template screens in several versions:
Versions of "@PCS7TypicalsAPLV... .PDL"
@PCS7TypicalsAPLV7.PDL
@PCS7TypicalsAPLV8.PDL
Versions of "@TemplatesAPLV... .PDL"
@TemplatesAPLV7.PDL
@TemplatesAPLV8.PDL
In the manual, the objects of the "@PCS7TypicalsAPLV8.PDL" and
"@TemplatesAPLV8.PDL" template screens are used.
For additional information, refer to the chapter "Template screen for faceplates (Page 17)".
11
Basics
2.2 Application strategies
Flowchart
&UHDWHDFRS\RID
VXLWDEOH$3/IDFHSODWH
DQGUHQDPHLW
$UH
WKHQXPEHUDQG
W\SH
RIYLHZVLGHQWLFDOLQ
12
WKHIDFHSODWHV"
'RHVWKH$3/
EORFNFRQWDLQ
VXSHUIOXRXV
YLHZV"
<(6
12
'RHV
DGLIIHUHQW$3/
IDFHSODWHFRQWDLQ
WKHUHTXLUHGYLHZV"
<(6
<(6
5HPRYHVXSHUIOXR
XVYLHZVIURPWKH
$3/IDFHSODWH
$UH
WKHQXPEHUDQGW\SH
RIVFUHHQREMHFWV
LGHQWLFDOLQWKH
IDFHSODWHV"
12
$GGWKHUHTXLUHG
YLHZWRWKH$3/
IDFHSODWH
$GGDQHZYLHZWR
WKH$3/IDFHSODWH
<(6
12
'RHVWKH$3/
IDFHSODWHFRQWDLQ
VXSHUIOXRXV
VFUHHQREMHFWV"
<(6
5HPRYHVXSHUIOXR
XVVFUHHQREMHFWV
IURPWKH$3/
IDFHSODWH
12
'RHVWKH
#3&6(OHPHQWV$3/3'/
WHPSODWHILOHFRQWDLQWKH 12
UHTXLUHGVFUHHQ
REMHFWV"
<(6
&RS\WKHUHTXLUHG
VFUHHQREMHFWV
LQWRWKHFRUUHVSRQGLQJ
YLHZV
&UHDWHQHZVFUHHQREMHFWV
RQWKH
EDVLVRIWKH
#3&6(OHPHQWV$3/SGO
WHPSODWHILOH
<RXFDQUHSODFH
WKHSURMHFWVSHFLILF
IDFHSODWHZLWKWKH$3/
IDFHSODWH
12
Basics
2.2 Application strategies
Recommendation
Create a project-specific faceplate if possible on the basis of an existing APL faceplate.
Copy missing objects from the templates. Only create new screen objects or views
if you cannot find a suitable template in the APL.
13
Basics
2.2 Application strategies
14
Description
The "@PCS7TypicalsAPLV8.PDL" and "@TemplatesAPLV8.PDL" template screens contain
the preconfigured block icons and static screen objects. By means of drag-and-drop, apply
the required block icons and screen objects to your project-specific template screens.
Note
Regular updating of the template screen
Use only block icons from the following template screens for your process pictures:
"@PCS7TypicalsAPLV8.PDL"
"@TemplatesAPLV8.PDL"
The up-to-date block icons contained always conform to the correct style and design
specifications.
Content
The template screen contains the following objects:
Static symbols for the status display of motors and valves
Block icons in different variants for each faceplate of the APL
See also
Adapting block icons (overview) (Page 72)
3.2
Dimensions
An block icon has the following dimensions:
Width (without symbol): 101 pixels or 115 pixels
Width (with symbol): 115 pixels or 151 pixels
Height: variable
15
Structure
The following figure shows an example of the structure of a block icon:
1
2
3
See also
Adapting block icons (overview) (Page 72)
3.3
Recommendation
When you create project-specific block icons, use the block icons from the template screen
for block icons as a guideline.
16
Description
The template screen for faceplates contains preconfigured screen objects that you can dragand-drop into a project-specific faceplate view.
The template screen for faceplates is called "@PCS7ElementsAPL.PDL" and is stored by
default in the "GraCS" directory within the PCS 7 OS project.
Note
Regular updating of the template screen
Use only screen objects from the template screen "@PCS7ElementsAPL.PDL" for your
project-specific faceplates. This approach ensures that you always use the current screen
objects with the correct style and design specifications in your faceplates.
Content
The template screen contains the following objects
Text boxes and buttons for status displays
Buttons for calling the binary operating area
Analog value displays for displaying values from the process
Buttons for navigating between faceplates
Text boxes for labeling
Bar graphs
Buttons for navigating between faceplate views
Basic objects (additional information in the WinCC Information System)
Symbols of the APL (additional information in the APL online help)
See also
Arranging display and operating objects (Page 21)
17
4.2
Dimensions
Each view of a faceplate from the "Advanced Process Library" has the following dimensions:
Width: 440 pixels
Height: variable
Margin (top/bottom, right/left): 10 pixels
The specified width does not apply to views that contain a "WinCC AlarmControl" or
"WinCC TrendControl". In this case the width depends on the width of the control.
Structure
A faceplate of the "Advanced Process Library" has a two-column design with margin. If you
require a completely new view, use the basic design shown below. All views of the APL
faceplates use the following basic design for an empty faceplate view.
The following figure shows the grid of an empty faceplate view with the dimensions specified
in pixels.
"Status" area
18
4.3
Distance in pixels
19
The following figure schematically shows the distances displayed in the table:
6WDWLF7H[W
6WDWLF7H[W
See also
Structure of the standard view (Page 33)
Structure of the preview (Page 35)
Structure of the batch view (Page 36)
Structure of the limit value view (Page 37)
Structure of the parameter view (Page 38)
Structure of the ramp view (Page 39)
Arranging display and operating objects (Page 21)
APL Style Guide
20
4.4
4.4.1
Introduction
Screen objects from the template screen are often combined to a functional unit in the
faceplates, for example, the display of a process value with its permitted limits.
See also
Configuring the analog value display (Page 21)
Configuring an interlock (Page 24)
Configuring the display and changeover of the operating mode (Page 25)
Configuring the value specification with limit value display (Page 26)
Configuring a bar graph (Page 27)
Rules for the arrangement of screen objects in faceplates (Page 19)
Analog value operation with object APL_ANALOG_OP_DISPLAY (Page 102)
4.4.2
Use
Use an analog value display to display or enter analog values. If you also want to display a
value graphically, you will have to configure a bar graph. To establish a clear relationship
between the analog value display and the bar graph, use the bar color as the frame color of
the analog value display.
21
Use
APL_ANALOG_OP_DISPLAY
Blue (0000FF)
APL_ANALOG_OP_DISPLAY2
Green (00B500)
APL_ANALOG_OP_DISPLAY3
APL_TIME_OP_DISPLAY2
Red (FF0000)
Display of a duration
APL_ANALOG_OP_DISPLAY4
Requirement
Graphics Designer is open.
"@PCS7ElementsAPL.pdl" is open.
Faceplate view is open.
Procedure
Information on configuring an analog value display is available in the chapter
"APL_ANALOG_OP_DISPLAY analog value display (Page 98)".
See also
Arranging display and operating objects (Page 21)
Structure of a faceplate view (Page 18)
Configuring the highlighting of analog value displays (Page 23)
Analog value operation with object APL_ANALOG_OP_DISPLAY (Page 102)
22
4.4.3
Introduction
You have the following possibilities of highlighting an analog value display in the faceplate
view:
Highlighting by a different color
When you operate the analog value display, the inscription will be highlighted in color.
Passivated representation of analog values, for example, limit view of Alarm Limits; when
these are deactivated, they will be represented as passivated in the faceplate.
Note
Highlighting in color is also available for the "Checkbox" screen object in addition to the
analog value display.
The following table shows the objects for empty analog value displays:
Object type
Use
APL_ANA_EMPTY
Dark gray
(808080)
Display of an empty
analog value display
depending on the value of
a block input or output
APL_ANA_EMPTY2
APL_ANA_EMPTY3
Requirement
Graphics Designer is open.
"@PCS7ElementsAPL.pdl" is open.
Faceplate view is open.
Analog value display is configured.
Procedure
Proceed as follows to configure the highlighting of an analog value display:
To highlight an analog value display in color, select the analog value display.
In the configuration dialog, set the "Other > ShowSelectionBorder" attribute to "On".
To display an empty analog value display in addition to an analog value display, place the
empty analog value display at the same position as the existing analog value display.
Configure the relevant block input or output.
See also
Configuring the analog value display (Page 21)
ShowSelectionBorder (Page 98)
APL_ANALOG_OP_DISPLAY analog value display (Page 98)
23
4.4.4
Configuring an interlock
Use
Interlocks are process-related deactivations for a faceplate (e.g. motor).
Use
APL_FACEPLATE3
APL_LOCK_SYMBOL
APL_QUALITY_CODE2
APL_QUALITY_CODE3
Requirement
Graphics Designer is open.
"@PCS7ElementsAPL.pdl" is open.
Faceplate view is open.
Procedure
Proceed as follows to configure an interlock:
1. Copy the required fields from the "@PCS7ElementsAPL.pdl" template screen into your
faceplate view.
2. Set the following values to position the objects for the interlock:
Object
Position X
Position Y
Interlock button
284
Any
258
234
Result
The interlock is configured.
See also
Arranging display and operating objects (Page 21)
Structure of a faceplate view (Page 18)
24
4.4.5
Use
Displaying and changing the operating mode of aggregates.
The operating mode of a motor or valve is represented in the faceplate by a text box. A
separate operating area is provided for changing over the operating mode. Configure an
additional button so that the operator can open this operating area.
Requirement
Graphics Designer is open.
"@PCS7ElementsAPL.pdl" is open.
Faceplate view is open.
Procedure
Proceed as follows to configure the display and/or to change the operating mode:
1. Copy the required fields from the "@PCS7ElementsAPL.pdl" template screen to your
faceplate view.
For information about the individual properties of the "Display and operation" area, refer
to the section "Binary display with text boxes (Page 116)".
2. Set the following values to position the labeling field:
Object
Position X
Position Y
Labeling field
154
Any
284
401
Result
The operating mode changeover is configured.
See also
Arranging display and operating objects (Page 21)
Structure of a faceplate view (Page 18)
Binary value operation APL_OP_BUTTON (Page 109)
25
4.4.6
Use
To display a permitted range for a process value to the operator, you configure a limit value
display in addition to an analog value display. The limit value display consists of two
additional fields that you place above and below the analog value display.
Use the "Display range" object for the limit value display. Place the object with the name
"Display range" in the "Display and operation" area.
Rules
The following rules apply to value specifications with limit value display:
Include a maximum of two analog value displays in the limit value display, for example,
the "Setpoint" and the "Read back value".
Observe the following vertical distances between the fields:
Distance between limit value display and analog value display: 2 pixels
Distance between two analog value displays: 5 pixels
Requirement
Graphics Designer is open.
"@PCS7ElementsAPL.pdl" is open.
Faceplate view is open.
Procedure
Proceed as follows to configure a value specification with limit value display:
1. Copy the required objects from the "@PCS7ElementsAPL.pdl" template screen into your
faceplate view.
2. Set the following values to position the objects:
Object
Position X
Position Y
360
Any
154
360
26
See also
Arranging display and operating objects (Page 21)
Configuring the analog value display (Page 21)
Structure of a faceplate view (Page 18)
4.4.7
Use
Use a bar graph to display process values graphically. You use a vertical or horizontal bar
graph depending on the value you want to display.
The following table shows the bar graphs in the template screen and their use:
Object type
Use
APL_BAR_VERTIC_1
"Status" area
Green (00B500)
Process value
Additional value
Typical values: Quantity,
temperature
APL_BAR_VERTIC_2
"Status" area
Blue (0000FF)
APL_BAR_GRADIENT_1
"Status" area
Gray (707070)
APL_BAR_HORIZ_1
Brown (D27A00)
APL_BAR_HORIZ_2
APL_BAR_TEXT_E
"Status" area
Blue (0000FF)
APL_BAR_TEXT_R
"Status" area
Blue (0000FF)
APL_BAR_LINE_TEXT_E
Brown (D27A00)
APL_BAR_LINE_TEXT_R
Brown (D27A00)
27
Rules
The following rules apply for bar graphs:
Configure an associated analog value field for each bar graph:
Use the bar color for the frame of the analog value field.
Place the analog value field either below or next to the bar graph.
Vertical bar graph:
Insert a vertical bar graph in the "Status" area.
Position a vertical bar graph centered.
Position the objects for displaying the external setpoint and the target setpoint of the
setpoint ramp to the left of the vertical bar graph, if necessary.
Horizontal bar graph:
Insert a horizontal bar graph in the "Display and operation" area.
Position the objects for displaying the external setpoint and the target setpoint of the
setpoint ramp above the horizontal bar graph, if necessary.
Requirement
Graphics Designer is open.
"@PCS7ElementsAPL.pdl" is open.
Faceplate view is open.
Procedure
Proceed as follows to configure a bar graph:
1. Copy the required bar graphs from the "@PCS7ElementsAPL.pdl" template screen into
your faceplate view.
2. Make the following settings to align two bar graphs:
Target
Actions
Position the displays "E" and "R" to the left of the bar graph, if
necessary.
Position horizontal
bar graphs (one or
two) left-justified
with a distance of 2
pixels.
Position the displays "E" and "R" above the bar graph, if necessary.
28
See also
Arranging display and operating objects (Page 21)
Configuring the analog value display (Page 21)
Configuring the value specification with limit value display (Page 26)
Structure of a faceplate view (Page 18)
29
30
5.1.1
Introduction
All texts or numerical values that are displayed in a faceplate are considered "labeling". The
following objects contain text or numerical values:
Static text
Button
Analog value display
Specifications
The following specifications apply to all types of text in faceplates:
Font (FontName)
Arial
14 point
Bold (FontBold)
No
Italics (FontItalic)
No
Orientation (Orientation)
Horizontal
Y-alignment (AlignmentTop)
Centered
Object-specific specifications
The following object-specific specifications also apply:
Button
Underline (Underline)
No
X-alignment (AlignmentLeft)
Centered
Static text
X-alignment (AlignmentLeft)
Left
Right
Format (Format)
0.######
31
5.1.2
Introduction
The template screens for block icons and faceplates contain the screen objects with the
colors currently permitted.
HTML code
Use
Black
000000
Text
White
FFFFFF
Gray
808080
Red
FF0000
Green
00FF00
Blue
0000FF
Yellow
FFFF00
Brown
D27A00
Manipulated variable
If you require additional colors, preferably use the default color range of WinCC.
Permitted objects
Button
Horizontal bar graph, analog value display, faceplate view, block icon
32
5.2
5.2.1
Use
The operator operates and monitors the process in the standard view.
Grid
The following figure shows the typical structure of a standard view including the Xcoordinates of the grid:
The following table contains the X-coordinates in pixels for the arrangement of objects within
the grid:
"Position X"
Description
Rules
10
If there are two bar graphs, the object width of the two bar
graphs is calculated as follows:
116
33
"Position X"
Description
Rules
154
234
258
284
358
401
See also
Rules for the arrangement of screen objects in faceplates (Page 19)
34
5.2.2
Use
The preview shows the parameters that the OS operator can operate in the entire block.
Grid
The following figure shows the typical structure of a preview including the X-coordinates of
the grid:
The following table contains the X-coordinates in pixels for the arrangement of objects within
the grid:
"Position X"
Description
Rules
10
10/210
37/237
154
154/371
176/394
307
See also
Rules for the arrangement of screen objects in faceplates (Page 19)
35
5.2.3
Use
The batch view shows the status of the batch processing.
Grid
The following figure shows the typical structure of a batch view including the X-coordinates
of the grid:
The following table contains the X-coordinates in pixels for the arrangement of objects within
the grid:
"Position X"
Description
Rules
154
284
329
See also
Rules for the arrangement of screen objects in faceplates (Page 19)
36
5.2.4
Use
The operator specifies the limit values in the limit value view.
Grid
The following figure shows the typical structure of a limit value view including the Xcoordinates of the grid:
The following table contains the X-coordinates in pixels for the arrangement of objects within
the grid:
"Position X"
Description
Rules
10
63
154
See also
Rules for the arrangement of screen objects in faceplates (Page 19)
37
5.2.5
Use
In the parameter view the operator modifies the parameters (for example, for closed-loop
controllers).
Grid
The following figure shows the typical structure of a parameter view including the Xcoordinates of the grid:
The following table contains the X-coordinates in pixels for the arrangement of objects within
the grid:
"Position X"
Description
Rules
10
63
154
284
329
401
See also
Rules for the arrangement of screen objects in faceplates (Page 19)
38
5.2.6
Use
You control the ramp function in the ramp view.
Grid
The following figure shows the typical structure of a ramp view including the X-coordinates of
the grid:
The following table contains the X-coordinates in pixels for the arrangement of objects within
the grid:
"Position X"
Description
Rules
10
63
154
284
329
358
401
See also
Rules for the arrangement of screen objects in faceplates (Page 19)
39
40
Introduction
The following section provides information on creating you own blocks in conformance with
APL.
Requirement
You make changes to the AS block:
Adapting inputs and outputs of the AS blocks in conformance with APL
Adapting the block code for APL functions
Use the following as a source for the block icons:
Standard block icons of the APL
Use the following as a source for the faceplates:
Standard faceplates of the APL
Loss of project-specific adaptations to APL faceplates and APL blocks after the APL has been
updated
Recommendation:
Use only renamed copies of the APL blocks for project-specific blocks in a project. This
approach prevents the creation of inconsistent versions of the APL when you update the
library.
When you adapt existing APL faceplates and APL block icons, these changes will be
overwritten by the new version when you update the APL.
41
6.2
Adapting AS blocks
6.2.1
Section
42
6.2.2
Structures
6.2.2.1
Parameters as structures
APL blocks transfer individual parameters and structured parameters.
OS_Perm/OS1Perm
43
6.2.2.2
Syntax in SCL
The following example shows the declaration of the input parameters of the structure
"Analog value":
// Structure analog value
PV:
STRUCT
Value
: REAL := 0.0;
ST
: BYTE := 16#80;
END_STRUCT
// Value
// Signal Status
6.2.2.3
:= X1 + X2;
:= 16#78;
Procedure
Create data types in an SCL file as shown in the following example script. Define the
symbolic name of the data type as follows:
"Type
AnaVal"
DigVal"
or
"Type
44
Before you compile the SCL source, assign a UDT number to the symbolic names in the
symbol table.
Note
Reserved UDT numbers
The UDT numbers from 1 to 50 are reserved for the data types of the APL.
Figure 6-1
When compiling an SCL source file the user-defined data type is created and stored in the
block folder:
The symbolic name (for example DigVal) will be replaced by the user-defined data type
during compilation.
Note
Supply library
You only need the user-defined data types in the block folder to compile the blocks. These
user-defined data types do not have to be available in the supply library.
45
6.2.2.4
Rules
Note
Checking the syntax
The SCL compiler does not carry out a syntax check for the content between the quotation
marks of an S7_x attribute in the attribute branch.
Ensure that the syntax is observed and that the listing of the element names agrees in an
"S7_x" attribute.
The following rules apply to attributes:
Attributes with prefix "S7_" (without x)
These attributes apply to the entire structure.
Example: S7_visible,
S7_dynamik, S7_contact.
S7_m_c := 'true';
The expression specifies that you can create variables in the PCS 7 OS for this
structure.
S7_xm_c := 'High,true;Low,true;';
The expression specifies that the "High" and "Low" elements of the PV_OpScale
structure are created as variables for the PCS 7 OS.
Figure 6-2
Struct_5
46
Examples
// Example script "Struct_4":
// Create elements of structures as variables
PV
{S7_dynamic := 'true';
S7_visible
:= 'true';
S7_m_c
:= 'true';
S7_xm_c
:= 'Value,true;';
S7_xshortcut
:= 'Value,true;'}
: STRUCT
Value
: REAL := 0.0;
ST
: BYTE := 16#80;
END_STRUCT;
PV_OpScale {S7_m_c:='true';
S7_xm_c
S7_edit
S7_xedit
: STRUCT
High
Low
END_STRUCT ;
// Value
// Signal Status
:= 'High,true;Low,true;';
:= 'para';
:= 'High,para;Low,para;'}
: REAL := 100.0;
// High Value
: REAL := 0.0;
// Low Value
// PV - Bar Display Limits for OS
The following expression defines the measuring range of the curve control:
S7_xtrend:='Value,PV_OpScale.Low,PV_OpScale.High;
The following expression specifies that an archive variable for the short-term archive is
created when an instance is created:
S7_xarchive:='Value,shortterm;';
Requirement / property
S7_xm_c
S7_xshortcut
S7_xstring_0
S7_xstring_1
S7_xedit
S7_xqc
S7_xarchive
S7_xtrend
S7_contact
S7_visible
S7_dynamic
47
6.2.3
Status word
Status words (double words) are used for the display of status information in the APL
faceplates and APL block icons.
You add these status words to your AS block to use the OS objects.
Recommendation:
Use the SCL command "AT" to allocate the binary information into the double word. With the
"AT" command you can create a different view on data types or on the memory area of data
types in the data block.
Example:
In the following example "Status1" has been created as the output parameter of the DWORD
type:
VAR_OUTPUT
Status1 : DWORD;
Status1Bits AT Status1 : ARRAY[0..31] OF Bool;
"Status1Bits" is a view on the memory area of the double word "Status1" in the form of
an Array of Bool.
Use "Status1Bits" to address individual bits of this double word, for example, with the
following syntax: Status1Bits[0]:= True;
This instruction sets Bit 24 in the double word to TRUE. The assignment of the
corresponding bits is shown in the following section.
48
':25'LQ
EDWWHU\
%LW
%LW
:25'
%<7(
:25'
%<7(
%<7(
%<7(
'DWDLQ
ZRUNPHPRU\RUGDWDEORFN
':25'
%LW
%LW
%<7(
%LW
%LW
%<7(
%LW
%LW
%<7(
%LW
%LW
%<7(
We recommend that you use a user-defined data type (UDT) for the processing of individual
bits in a double word.
49
50
6.2.4
Memo view
The "AUTHOR" block attribute of the corresponding AS block has to start with the characters
"AdvLib". When the OS is compiled, OS-internal variables will be created for the memo view.
The variables required for memo view are:
"xxx.#TextPermanent" variable
"xxx.#StatusPermanent" variable
Additional information about the memo view is available in the online help of the Advanced
Process Library.
51
6.2.5
Procedure
Create the variable ST_Worst as an output parameter in the AS block, as shown in the
example script "ST_Worst".
You can accept the object in the faceplate overview and in the block icon without a change.
// Example script "ST_Worst": Creating a variable
ST_Worst
{S7_visible:'false';s7_m_c:='true'}
:BYTE := 16#80
; // Worst Signal Status
Description
InST
Num
SelPrio
Description
RetVal
Output of the best or worst Signal Status of the input structure InST
52
Script
// Example script: Declaration of the temporary variables
TempInST: STRUCT
b0 : BYTE;
b1 : BYTE;
b2 : BYTE;
b3 : BYTE;
b4 : BYTE;
b5 : BYTE;
b6 : BYTE;
b7 : BYTE;
b8 : BYTE;
b9 : BYTE;
b10 : BYTE;
b11 : BYTE;
b12 : BYTE;
b13 : BYTE;
b14 : BYTE;
b15 : BYTE;
END_STRUCT;
ST_Worst BYTE;
53
6.2.6
Procedure
Create a parameter for each measurement unit you want to display.
If you configure a value conforming to the standard IEC 61158 at the parameter, the
corresponding unit will be displayed. A corresponding table is available in the online help
of the APL.
If the value amounts to 0, the text entered in the "S7_unit" attribute will be displayed.
// Example script: Creating a parameter for the measurement unit
PV_Unit {
S7_m_c:='true';
S7_unit:='l/sec'
} : INT; //Unit
54
6.2.7
Creating parameters
In the case of OS-operable blocks it is advisable to create the "OS_Perm" or "OS1Perm"
parameter as a structure, as shown in the example script "OS_Perm" .
// Example script OS_Perm: parameter "OS_Perm" as a structure
OS_Perm
{S7_visible:='false'}
:STRUCT
Bit0: BOOL:=1;
//1 = Operator can enable
accumulation
Bit1: BOOL:=1;
//1 = Operator can switch off
accumulation
"
"
"
Bit31: BOOL:=0;
// Not used
END_STRUCT;
// Operator permissions
ArrOS_Perm AT OS_Perm :
ARRAY[0..3] of BYTE;
Compiling the OS
The "OS_PermOut" and "OS_PermLog" parameters have to be created as outputs. When
the OS is compiled, these parameters will be created as variables:
"OS_PermOut" variable (output double word)
The "OS_PermOut" output indicates whether an operation is generally enabled at the
block.
// Example script: "OS_PermOut" variable
OS_PermOut
{S7_visible:='false';S7_m_c:='true'}
:DWORD:=16#FFFFFFFF; //Parameterized Permissions
ArrOS_PermOut AT OS_PermOut : ARRAY[0..3] of BYTE;
55
View of structures
The "AT" command provides a view of the structures:
Structure
View
Form
Example
OS_Perm
ArrOS_Perm
ARRAYof BYTE
OS_PermOut
ArrOS_PermOut
ARRAYof BYTE
OS_PermLog
ArrOS_PermLog
ARRAYof BYTE
With these views you can transfer the "OS_Perm" input structure to the output double word.
// Example script "OS_PermLog":
Transferring the input structure to the output double word
//********************************************************************
// Copy Data from Structure OS_Perm to
//
DWORD OS_PermOut by means of AT command
//********************************************************************
ArrOS_PermOut[3]:=ArrOS_Perm[0];
ArrOS_PermOut[2]:=ArrOS_Perm[1];
ArrOS_PermOut[1]:=ArrOS_Perm[2];
ArrOS_PermOut[0]:=ArrOS_Perm[3];
Note
If you want to monitor a double word with the SCL command "AT" in the form of bit, byte or
word, observe the following points:
The High Byte and Low Byte are swapped in the word.
The High WORD and Low WORD are swapped in the double word.
To ensure that the bits of the structure in the output double word are stored correctly, they
have to be assigned as shown in the example script "OS_PermLog".
56
:=
:=
:=
:=
arrtmpDW_OS_Perm[0];
arrtmpDW_OS_Perm[1];
arrtmpDW_OS_Perm[2];
arrtmpDW_OS_Perm[3];
57
6.2.8
Feature parameter
Use the "Feature" parameter to program the behavior patterns of the block.
Procedure
Create the following structure:
// Example script: Parameter "Feature"
Feature S7_visible:='false';
S7_xedit:='Bit0,para;Bit1,para;Bit2,para;Bit3,para;'}
:STRUCT
Bit0: BOOL:=0; // common Featurebit not used in this block
Bit1: BOOL:=0; // common Featurebit not used in this block
Bit2: BOOL:=0; // common Featurebit not used in this block
"
"
Bit5: BOOL:=0;
// 1 = Alarm Output activ with 0,
// individual block specific Feature Bit
"
"
Bit31: BOOL:=0; // Not used
END_STRUCT; // Status of various features
Note
In the program part take into consideration the bits of the "Feature" parameter at the
positions at which you program the different behavior patterns.
58
6.2.9
{S7_visible
S7_m_c
S7_unit
:INT:=0;
:= 'false';
:= 'true';
:= ''}
// Unit of UserAna1
END_VAR
BEGIN
dwOutStatus1.X5:=NOT (UserAna1.ST=16#FF);
59
Copying an object
For displaying auxiliary analog values in the faceplate, copy the following object from the
template to your faceplate view:
APL_ANALOG_OP_DISPLAY (@PCS7ElementsAPL.pdl; Display analog Value; Setpoint)
Set the AnalogValue attribute to .UserAna1#Value..
Adapt the following attributes in the "Links" property as shown in the example picture.
Delete the connections to attributes not shown in the example picture.
Set the status word to "LinkTag1" and configure the appropriate bit at "BitIndex1" .
The script linked with the "LinkTag1" property controls the visibility of the display via
the "If changed" event.
Set the "LineColor" attribute in the "Color" property to black for displaying the frame.
60
6.2.10
:BOOL := false;
BatchID {S7_visible := 'false'; S7_m_c := 'true'}
:DWORD := 16#00;
BatchName {S7_visible := 'false'; S7_m_c := 'true'}
:STRING [32];
StepNo {S7_visible := 'false'; S7_m_c := 'true'}
:DWORD := 16#00;
Occupied {S7_visible := 'false'}
// Occupied by Batch
:BOOL := false;
6.2.11
Simulation
The following options are available for the simulation in APL blocks.
Block-external simulation
Block-internal simulation
For additional information, refer to the APL online help.
Take the following information into account for the block-internal simulation at blocks in
conformance with APL.
61
62
63
6.2.12
Procedure
Create the interface and the related program section in your block, as shown in the
OutOfService_1 example code.
Note the following information about the parameters.
Example script "OutOfService_1"
VAR_INPUT
OnOp
{S7_m_c:='true'; S7_link:='false'; S7_visible:='false'}
:BOOL := FALSE;
// 1=On Mode: On Mode by Operator
OosOp
{S7_m_c:='true'; S7_link:='false'; S7_visible:='false'}
:BOOL:=FALSE;
// 1=Oos Mode: Oos Mode by Operator
OosLi
{S7_dynamic:='true'}
:DigVal;
// 1=Oos Mode: Oos Mode by Field Signal
OS_Perm {S7_visible:='false'}
:STRUCT
Bit0: BOOL :=1;
// 1 = Operator can switch to On
Bit1: BOOL :=1;
// 1 = Operator can switch to OOS
END_Struct;
END_VAR
VAR_OUTPUT
OosAct
{S7_dynamic:='true';
S7_m_c:='true';
S7_xm_c:='Value,true;'}
:DigVal;
// Out of service is active
OnAct
{S7_dynamic:='true'}
:STRUCT
Value : BOOL := true;
// Value
ST
: BYTE := 16#80; // Signal Status
END_STRUCT;
// On Mode is active
END_VAR
VAR
SxOosLi :BOOL := FALSE;
END_VAR
64
65
66
6.2.13
Procedure
Copy the jump buttons and create the parameters "SelFp1" and "SelFp2" .
Jump buttons:
Jump button 1 is located in the standard view object name "csoFpBtnUser1" (object type
"APL_FACEPLATE").
Jump button 2 is located in the preview object name "csoFpBtnUser2" (object type
"APL_FACEPLATE").
Figure 6-3
SelFp1_1
Parameter:
The parameters are of the type ANY and can thus be interconnected to any parameter of
another block.
The parameters have the CFC attribute BLK_Jump.
67
Compiling the OS
If the BLK_Jump attribute is set as in the example script SelFp1_2", an OS-internal
variable "xxx.SelFp1#Jump" will be created for the instance during compilation of the OS.
If the parameter is interconnected, a text reference with the entry of the OS-tagname of
the interconnected block will be created.
The reference to the text reference is contained in the "xxx.SelFp1#Jump" variables.
Example script: Variables with reference to the text reference
SelFp1
{BLK_Jump:='1';S7_visible:='false'}
:ANY;
//Select Faceplate1
SelFp2
{BLK_Jump:='1';S7_visible:='false'}
:ANY;
//Select Faceplate2
SelFp1_2
OS block symbol
Attributes such as S7_string or S7_shortcut cannot be assigned to an Anypointer .
Instance-specific labeling of the buttons is stored in the block icon:
Properties -> UserButtonText1, UserButtonText2
Assignment of a text for labeling of a jump button from the CFC block
Option 1:
Example script: Creating a parameter of the type BOOL
SelFp1_3
{BLK_Jump:='1';
S7_m_c:='true';
S7_string_1:='Jump to xxx'
}
: BOOL; //Select Faceplate 3
SelFp1_3
1. Create a parameter of the type BOOL , for example, instead of an Anypointer, and assign
a text for labeling of the jump button to the S7_string1 attribute.
Note
After the parameter with the type BOOL has been created, the following will be possible.
The parameter can be interconnected exclusively to a parameter of the BOOL type.
As of PCS7 V7.1 SP1:
The parameter can be interconnected to an APL structure of the BOOL type.
68
1. Leave the Anypointer unchanged and assign the text for the labeling of the jump button to
an additional parameter such as "SelFp3Tx", as shown in the example script.
2. Adapt the user object "csoFpBtnUser1" as shown below:
Figure 6-4
SelFp1_5
3. Change the following line in the script connected to the attribute "BinText2":
Original script
szCaption = GetPropChar(pszParent, "BlockiconCollection",
"UserButtonText1");
Changed line:
Changed script
pszCaption = GetPropChar(lpszPictureName, lpszObjectName,
"BinLinkedText2");
69
6.2.14
Note
Make the following settings and interconnections:
Create the operation enable for operation at the corresponding bit in the "OS_Perm"
parameter.
Link the information from "MS_Release" to the corresponding status word.
70
Figure 6-5
Graphic MS_Release1
71
6.3
6.3.1
Section
The fundamental process that you use to create block icons in conformance with APL is the
same as the process for creating block icons of the standard library.
Procedure
1. Copy a block icon similar to your requirements from the "@PCS7TypicalsAPLV8.PDL"
template screen into your own screen (for example, @PCS7TypicalsMyLib.pdl).
2. Assign parameters to the attributes "type" and "Servername" as reference to the AS block
and to the faceplate you want to open.
3. Select the menu command User object > Edit in the shortcut menu.
You can add new objects to the block icon or move existing objects, etc.
4. Assign "speaking" object names to easily recognize the meaning of the objects in the
configuration dialog.
Note
When the size of the block icon changes, you will have to adapt the size of the internal
object "PolylineIcon" because it represents the border of the icon for "HighLightBlockIcon"
.
5. Select all objects that are part of the block icon and terminate the "Edit" mode.
6. In the configuration dialog apply the attributes of the new objects you want to dynamize to
the external interface of the block icon.
If several status displays access the same status word, combine them to one property
at the block icon.
7. Assign "speaking" names for the new attributes of the block icon.
Note
Always use the same text for the display name and the name of the attribute.
72
See also
Template screen for block icons (Page 15)
Block icon structure (Page 15)
73
6.3.2
6.3.2.1
Attribute
Meaning
FaceplatesDefaultPos
"FaceplatesDefaultPos" = No lets you specify the position of the faceplate you want to open.
OperationLevel1 ...
"OperationLevel1 ... 3" is used for the instance-specific setting of the operator authorization
levels.
OperationLevel3
You can choose between three operator authorizations: The assignment of the three levels to
the individual operations will be stored in the faceplate.
DirectOperationValue
DirectOperationValue is a property of the block icon. You specify the percentage values of the
two internal buttons for direct operation with the DirectOperationValue. The two outer buttons
are automatically determined with DirectOperationValue times the factor 5.
AnalogValueFormat1
AnalogValueFormat4
AnalogValueFormat1 4 is used to set the number format of the block icon and the faceplate.
UserButtonText1
UserButtonText1..2 is used to assign parameters to the instance-specific texts for the buttons
you use to open other faceplates (jump buttons).
UserButtonText2
74
6.3.2.2
Attribute
Meaning
TagNameDisplayed
"TagNameDisplayed" is the tag name shown in the block icon. In the plant hierarchy, you can
specify whether the full OS tag name or only parts of it are to be shown in the faceplate.
Type
"Type" is the reference used in the "@PCS7TypicalsAPLV8.PDL" template screen for the
"MonAnL" block type of this block icon in version 1.
Enter the name of the project-specific FB, for example "MyAPL_BL".
Tagname
"Tagname" contains the actual OS tag name that is sent to the faceplate.
Servername
"Servername" contains the corresponding faceplate type. Enter the name of the project-specific
faceplate type, for example ""PCS7 MyAPLFP Control"".
TypeID
75
Attribute
Meaning
TypeID
VersionID
ToolTipText
"ToolTipText" and tag name are always interconnected to the same internal object. This means that
the tag name is always displayed for the "ToolTipText" . The ToolTipText may not have assigned
parameters.
For additional information on the individual ToolTipText see Display of the block comment in the
ToolTipText of the V7 block icons (Page 123).
TagVisibleLink
The different block icons of the APL are available in the following versions:
Version in which it is possible to hide the tagname (usually as of Version 5 and higher).
The "@PCS7TypicalsAPLV8.PDL" template file has a "Show/hide Tag" button.
This button acts on the local computer variable "@local::@APLShowTag" through which the tag
name can be shown / hidden centrally.
76
6.3.2.3
Attribute
Meaning
TrendPictureName
You use the "TrendPictureName" to select the template screen for the trend
view.
The figure above includes the "@pg_apl_trendMonAnL.pdl" template screen
that contains two trend views:
TrendConfiguration12
The variable
for example,
".PV_Out#Value"
the TrendControl
always "_TrendCtrl1_"
Reserved
always "Reserved"
"PV_Out"
77
Attribute
Meaning
TrendColor1
...
TrendColor12
78
6.3.2.4
Attribute
Meaning
SignalStatus
DisplayedUnit1
UnitNumericValue1
UnitLinked1
"UnitNumericValue1" serves to display the measurement unit and is always linked with the integer
variable xx_Unit .
A script is connected to "UnitNumericValue1". This script has the following function:
At "UnitNumericValue1 = 0"
The script selects the text of the S7_unit attribute for the display of the measurement unit.
"UnitLinked1" interconnects with the OS-internal variable that references the WinCC text dictionary
xx_Unit#unit
The S7_xunit attribute is not supported during OS compilation.
Status1
Displays various binary information. "Status1" acts on several internal status displays.
Examples are: Operating mode or maintenance status "In progress".
OosAct
Indicates that the block is "Out of operation". The parameter acts on several internal objects. These
are switched to invisible at OosAct ="YES" . Take this fact into account when you install new
objects you want to display.
StatusPermanent
79
Note
"Display" property for new internally visible objects
Include the "Display" ("Visible") property in the configuration dialog of the user object for
new internally visible objects.
80
81
6.3.3
6.3.3.1
Preparation
The possibility of operation from the block icon was introduced with the APL.
To call up the operating dialog at the block icon, dynamize the event "Right mouse
click"(Release Right) with a script.
82
6.3.3.2
Recommendation
Use the operation of standard block icons of the APL as the copy template.
Procedure
You can implement the call of the operating dialog without a check of the operator
authorization as shown in the following example script:
Use the transfer parameter "1" for the global script "APL_OpenFaceplate" to specify that
the operating dialog is called.
In the transfer parameter "MFPIC" you specify the view in which the object you want to
operate is located.
The transfer parameter "MFOBJ" identifies the object you want to operate.
Note
The operator authorization does not have to be checked because the check is integrated
in the operating dialog.
Example script
Calling the operating dialog without checking the operator authorization
#include "apdefap.h"
void OnRButtonUp (char*lpszPictureName,
char*lpszObjectName,
char*lpszPropertyName,
UINT nFlags,
int x,
int y)
{
#define MFPIC "@PG_MyAPLFP_Standard.pdl"
#define MFOBJ "@csolOAnaHiAlm"
APL_OpenFaceplate(lpszPictureName,lpszObjectName,1,MFPIC,MFOBJ);
//1: MF=OP Dialog
}
83
6.3.3.3
Example script
Checking the operator authorization before calling up the operating dialog
#include "apdefap.h"
void OnRButtonUp
(char*lpszPictureName,
char*lpszObjectName,
char*lpszPropertyName,
UINT nFlags,
int x, inty)
{
#define BIT(i,status) (((unsigned long)status & (1<<i))!=0)
#define MFPIC "@PG_PidConL_Standard.pdl"
#define MFOBJ "@csolOAnaPV"
unsigned long value = (unsigned long)GetPropDouble(lpszPictureName,
lpszObjectName,"Status1");
BOOLxSimuOn=BIT(2,value);
if (xSimuOn)
{
APL_OpenFaceplate(lpszPictureName,lpszObjectName,1,MFPIC,MFOBJ);
}
}
Note
If you use copies of faceplates to create the function, you will have to adapt operations from
the block icon present in the script. You have to adapt the scripts because the names of the
faceplate view are entered permanently.
Example:
Source:
#define MFPIC "@PG_PidConL_Standard.pdl"
Changed to:
#define MFPIC "@PG_MyAPLFP_Standard.pdl"
84
6.4
Creating faceplates
6.4.1
Introduction
The example shows how to create a project-specific version on the basis of the APL
standard controller "PIDConL".
Procedure
Proceed as follows to create a faceplate in conformance with APL:
1. Copy the files of the suitable faceplate (for example PIDConL) from the templates in the
project.
2. Save the files under the corresponding name of your block or your faceplate version.
85
@PG_MyAPLFP.PDL
Overview
@PG_MyAPLFP_Overview.PDL
View selection
@PG_MyAPLFP_ViewToolbar.PDL
Standard view
@PG_ MyAPLFP_Standard.PDL
@PG_MyAPLFP_MyView.PDL
Global views
The following global views exist only once for all faceplate types.
Global view
Global screen
Alarm view
@PG_apl_message.pdl
Trend view
@PG_apl_trend.pdl
Batch view
@PG_apl_batch.pdl
Memo view
@PG_apl_memo.pdl
The views do not require a copy. If required, the global screens are addressed directly from
the view selection @PG_MyAPLFP_ViewToolbar.PDL .
86
6.4.2
Creating faceplates
Function
Section
Creating replicas
Adapting views
Standard view
Alarm view
Trend view
Batch view
Memo view
Specifying number formats for analog values instance-specifically per script (Page 95)
Global settings
87
6.4.3
Creating a faceplate
6.4.3.1
Procedure
The following properties must always be set:
1. Enter the new screen name, for example "@PG_MyAPLFP_Standard.PDL" in the
"Firstview" property of the "@Faceplate" object.
2. Enter the new screen name, for example "@PG_MyAPLFP_ViewToolbar.PDL" in the
"PictureName" property of the "ToolbarWindow" object.
3. Enter the name of the new faceplate type (server name), for example "MyAPLFP" in the
"BlockType" property of the "ObjCollection" object.
88
6.4.3.2
MSGLOCK
Batch occupied
Note
Using your own parameter name for the "worst signal status"
If you replace the parameter name "ST_Worst" with a different parameter name, you will also
have to adapt the parameter name in the two status displays lying over each other.
89
6.4.3.3
90
6.4.3.4
The object name of a button determines the name of the view that is called.
Example:
The button with the "Name"=MyView object serves to select the completely new created
view "@PG_MyAPLFP_MyView.PDL".
91
Procedure
Enter the corresponding text, for example "MyView" at the "ToolTip Text" attribute of the
button.
You can save your own screen for the button at the attributes "PictureStatus On" and
"PictureStatus Off".
The template screen contains a matching selection of buttons:
You can configure the view selection as shown in the following figure, for example, for the
example described in the Style Guide.
Adapt the entries at the "NEXT" object in the script.
To ensure that the last toolbar representation is displayed when a screen composition
is called, adapt the entries in the script at the "Screen selection" event of the
"@PG_MyAPLFP_ViewToolbar.PDL" screen.
Result
The figure above shows the objects lying in the foreground. These objects show the buttons
for selecting the views:
Standard view
Alarm view
MyView (own created view)
Trend view
Click the "..." button to change over the display. (Next).
The buttons for the selection of the views will be displayed:
Memo view
Batch view
APL Style Guide
92
6.4.3.5
93
Additional information
Additional information about the parameter assignment of the AS enable is available in the
following chapters:
Chapter "Binary value operation / PermissionTag"
Chapter "Analog value operation / Process-related enable".
94
6.4.3.6
Procedure
Adapt the script for the action at the screen selection attribute as follows:
Delete unused elements of the original or comment them out.
Assign analog values that are to be shown in formatted form to the corresponding analog
value format in the script, for example "AnalogValueFormat1", "AnalogValueFormat2" or
"AnalogValueFormat3".
Example code
The following figure shows the script for formatting analog values:
95
6.4.4
6.4.4.1
96
6.4.4.2
Attribute "VersionID"
The attribute "VersionID" is used to version the user objects.
The version is stored here in form of the date.
The representation is shown in the previous figure: 9.111301+006 means 13/11/2009.
Attribute "TypeID"
The "TypeID" attribute is an assignment number for user objects that are used in the APL
faceplates.
The "TypeID" can remain unchanged if you configure only unchanged APL user objects in
your structure.
If you change objects, for example, by including new internal objects, you should specify
a new "TypeID". The new "TypeID" must be > 2000 , because the
TypeID up to and including 1999 is reserved for the APL.
97
6.4.4.3
ShowSelectionBorder
Use the attribute "ShowSelectionBorder"=
when it is selected.
Yes
Individual design
You configure individual positions or sizes for the color marking by using the attributes that
are specified in the section "Specifications for APL standard objects".
6.4.5
6.4.5.1
98
99
Brief description of the attributes relevant for the analog value display.
Detailed description will follow.
Attribute
Brief description
Meaning
Unit
IntegerUnitTag
LinkedUnit
100
= 0;
IntegerUnitTag > 0; the script searches for the corresponding text in the measurement
unit table using the integer value. This table with standardized units will be stored in the
OS.
Note
The unit attribute "S7_xunit" is not taken into consideration during compilation of the OS,
if it has been created in the SCL source in a structure.
No OS-internal variable is created either.
Use the "UnitVisible" attribute to suppress the display of the measurement unit.
See also
Configuring the highlighting of analog value displays (Page 23)
101
6.4.5.2
Procedure
1. Copy the APL_ANALOG_OP_DISPLAY (@PCS7ElementsAPL.pdl; Display analog Value;
Setpoint) object from the template screen and insert the object into your faceplate view.
For information on positioning please refer to " ShowSelectionBorder (Page 98)".
2. Enter the object name in the screen selection script for a number format assignment.
You can find more information on this in the chapter "Number formats for analog values
(Page 95)"
3. Enter the object name in the "stUser" object of your faceplate for an update of the
operator authorization when the user changes.
102
Brief description of the attributes relevant for the analog value operation
Detailed description will follow.
Attribute
Brief description
Operating limits
The "AnaLinkHiLim" and "AnaLinkLoLim" properties are used to specify the operating limits
of the analog value operation. Decisive for the slider and the incremental operation.
103
Process-related enable
Use the "LinkTag3" attribute to interconnect the process-related enable for the operation.
Recommendation:
Use the "OS_PermLog" parameter.
Use "BitIndex4" to assign parameters to the bit in the double word (starting from Bit0) that
contains the enable.
The following is required if you do not want to connect a variable to the "LinkTag3"
attribute:
Parameterize the value in "LinkTag3" from -1 to +1.
Address the Bit0 with "BitIndex4".
User-specific enable
You set the user-specific authorization level at the "OperationLevel" attribute.
Authorization levels of the objects
1 = Process operation
2 = Higher order process operation
3 = Highest order process operation
104
Operating area
The type of operating area is selected by means of the"OpAreaPicture" attribute.
For normal analog value operation, there is the choice between
@PG_APL_OA_Analog100 -> without measuring range
@PG_APL_OA_Analog101 -> with measuring range
@PG_APL_OA_AnalogWithLimits -> with measuring range, slider, incremental
operation.
You determine the behavior after execution of the operation with the "OkOption" attribute.
In the case of simple analog value operation this is always 3.
In the "LinkedOp" tab (shown in the following figure) only the "LinkOp" property is of
importance, the remaining properties are reserves.
See also
General specifications in the screen @PG_MyAPLFP_Standard.pdl (Page 90)
Arranging display and operating objects (Page 21)
Configuring the analog value display (Page 21)
105
6.4.5.3
Bar graphs
The following section contains the properties of the bar graphs used in the APL faceplates
that you set with parameters:
Vertical bar graph for actual value with up to three limit value pairs
Vertical bar graph for setpoint with a limit value pair
Horizontal bar graphs
Vertical bar graph for actual value with up to three limit value pairs
1. Copy the "APL_BAR_VERTIC_1"(@PCS7ElementsAPL.pdl; Bar graph display) object
from the template screen and insert the object into your faceplate view.
2. Assign a meaningful object name.
106
In principle the same procedure applies here as for the APL_BAR_VERTIC_1 bar graph.
Differences here are the blue bar color and the display of only one limit value pair that
cannot be displayed / hidden event-controlled.
Using properties for displaying / hiding the limit value pairs
The following is required if you want to display or hide the limit value pair:
1. Apply a status word to the "StatusTag" property.
2. Create a script at the "StatusTag" property of the event.
You can use the corresponding script of the
APL_BAR_VERTIC_1(@PCS7ElementsAPL.pdl; Bar graph display) object as the copy
template.
The horizontal bar graphs are identical with the APL_BAR_VERTIC_1 bar graph apart from
the color and the horizontal position.
107
Meaning
Setting
Bar graph
"Value" property
Use the "Value" property to interconnect the analog value you want to display
in the bar.
"Colors" dialog
Specifying the
measuring value
range
"RangeHI" and
"RangeLO"
properties
Limit values
You can have limit values displayed at the bar with the following properties:
"AlarmHigh"
"WarningHigh"
"ToleranceHigh"
"AlarmLow"
"Warninglow"
"ToleranceLow"
The properties are represented as follows:
"StatusTag"
property
"StatusTag" property
See also
Configuring a bar graph (Page 27)
108
6.4.6
6.4.6.1
Procedure
1. Copy the APL_OP_BUTTON (@PCS7ElementsAPL.pdl; Open binary operation area;
Schaltflche unter "Normal") object from the template screen and insert the object into
your faceplate view.
For information on positioning please refer to " ShowSelectionBorder (Page 98)".
2. Assign a meaningful object name, such as "csoBtnAccEn".
3. Enter the object name in the ""stUser"" object of your faceplate to update the operator
authorization when the user changes.
For additional information refer to the chapter "General specifications in the screen
@PG_MyAPLFP_Standard.pdl (Page 90)".
109
Brief description
Links/ OkOption
Links/ OpAreaPicture
Selection of the operating area (for example, one row or two rows)
Links/ Caption
Links/ BinCount
Links/ BinLink1
Links/ BinAuthorizationLevel1
Links/ BinText1
Links/ BinLinkedText1
Links/ OpAreaHeading
Permission/ PermissionTag
Permission/ BinPermBitIndex1
The APL_OP_BUTTON object is designed so that you can create an operating dialog with
up to five buttons.
OkOption
The following items are specified with the "OkOption" property:
The written variable type
The behavior after execution of the operation
Parameter assignment
OkOption = 1
When the corresponding button is selected, a logical "1" is written to the binary variables
that are connected under BinLink1 to the maximum BinLink5.
OkOption = 2
Usage for the binary variables that have the logical values "0" and "1" written to them. In
this case the same variable is interconnected to BinLink1 and BinLink2.
A logic "1" is written to the variable connected under BinLink1.
A logic "0" is written to the variable connected under BinLink2.
BinLink3 to 5 do not have any meaning in this case.
OkOption = 4
Only with the object APL_OP_BUTTON3
An integer variable is interconnected to BinLink1.
The value that is configured in the "AnalogValue" property is written to the integer
variable interconnected to BinLink1.
OkOption = 5
The inverted value is written back to the binary value connected under BinLink1
(changeover function).
APL Style Guide
110
OpAreaPicture
At this property you configure an operating area with three or five buttons.
"@pg_apl_oa_binary103.PDL" Operating area with up to three buttons
"@pg_apl_oa_binary105.PDL" Operating area with up to five buttons
BinCount
Here you configure the number of buttons and used variable connections to BinLink1 to
BinLink5.
BinAuthorizationLevel1 .. 5
Use "BinAuthorizationLevel1 .. 5" to set an individual operator authorization level for the
individual operations.
BinText1 .. 5
Use "BinText1 .. 5" to configure the button labeling.
111
BinLinkedText1 .. 5
If you interconnect the corresponding internal OS variable to "BinLinkedText1 .. 5" , the
button labeling can be used by the S7_String0/1 configured at the block.
If no text is entered in S7_string, the text that is entered under BinText1 .. 5 will be used.
PermissionTag
The process-related enable is connected to this property. The double word "OS_PermLog" is
usually interconnected here.
Use "BinPermBitIndex1 .. 5" to assign parameters to the corresponding bit (starting from
Bit0) in the double word for the individual operations.
112
6.4.6.2
Check box
The following section describes the inclusion of a check box.
Procedure
1. Copy the APL_CHECKBOX (@PCS7ElementsAPL.pdl; Check box) object from the
template screen and insert the object into your faceplate view.
For information on positioning please refer to " ShowSelectionBorder (Page 98)".
2. Assign a meaningful object name, such as "APL_CHECKBOX_Reset".
3. In the "stUser" object in the screen @PG_MyAPLFP_Standard.pdl enter the object name
for an update of the operator authorization when the user changes.
For additional information refer to the chapter "General specifications in the screen
@PG_MyAPLFP_Standard.pdl (Page 90)".
Figure 6-6
CheckBox1
113
Brief description
Links/ OkOption
Links/ OpAreaPicture
Selection of the operating area (for example, one row or two rows)
Links/ BinCount
Links/ BinLink1
Links/ BinAuthorizationLevel1
Links/ BinLinkedText1
Links/ OpAreaHeading
Links/ LinkTag
Links/ BitIndex1
Permission/ PermissionTag
Permission/ BinPermBitIndex1
Bit address in the word for the process-related operator authorization for binary element
1
Properties
Property
Description
OKOption
You can use the APL check box with the "OKOption" property. The properties "BinLink1"
and "BinLink2" are evaluated through the usage of the "OKOption" property. The
following settings are possible:
BinAuthorizationLevel1
BinAuthorizationLevel2
Property "OKOption" =1
Two different variables are interconnected to the properties "BinLink1" and "BinLink2"
.
A logical 1 is written to these variables.
Property "OKOption" =2
The same variable (for example SP_RateOn, see CheckBox1 graphics) is
interconnected to the properties "BinLink1" and "BinLink2" .
You can set an individual operator authorization level for operations by using the
"BinAuthorizationLevel1 ..2" properties.
LinkTag
Use the "LinkTag" property to interconnect the variable for displaying the check mark in
the check box, logical 1 = check mark set.
BitIndex1
Use the "BitIndex1" property to parameterize the corresponding bit (starting from Bit0) in
the status word, if you have interconnected a status word to LinkTag.
BinText1 BinText2
BinLinkedText1 BinLinkedText2
114
PermissionTag
The "PermissionTag" property is used to interconnect the process-related enable.
Recommendation:
Use the double word "OS_PermLog".
Use "BinPermBitIndex1 .. 2" to assign parameters to the bit in the double word (starting
from Bit0) that contains the enable.
BinPermIndex1 is the operator authorization for logic 1 setting of the variable.
BinPermIndex2 is the operator authorization for logic 0 setting of the variable.
The following is required if you do not want to connect a variable to the "PermissionTag"
property:
Parameterize the value in "PermissionTag" from -1 to +1.
Address Bit0 at "BinPermBitIndex1 .. 2"
115
6.4.6.3
Procedure
1. Copy the APL_MULTI_TEXT2 (@PCS7ElementsAPL.pdl; Status display text; Manual)
object from the template screen and insert the object into your faceplate view.
2. Assign a meaningful object name.
Figure 6-7
MultiText2_1
Brief description
Links/ LinkTag
Links/ Caption
Links/ Text1 .. 6
Links/ LinkedText1..6
Text from the instance for the alternatives (only available with specific
versions)
Links/ BitIndex1..6
Links/ UsedBits
Links/ DefaultText
Colors/ State1BackColor
Colors/ State1FillColor
Colors/ State1FontColor
116
Brief description
LinkTag
BitIndex1
...BitIndex6
You parameterize the corresponding bits (starting from Bit0) in the status
word which display "Text1" to "Text6" at the "BitIndex1 ..6" properties.
LinkedText1...
LinkedText6
UsedBits
DefaultText
Use the property "DefaultText" to determine the text that will be displayed
when none of the addressed bits = 1. Permitted values are 1 to 6.
Example:
"DefaultText" = 4 and "UsedBits" = 3
If none of the bits addressed under BitIndex1 .. 3 is 1, then the text
configured under Text4 will be displayed.
Configure the colors for the individual texts in the "Colors" tab.
117
See also
Configuring the display and changeover of the operating mode (Page 25)
6.4.6.4
Procedure
1. Copy the APL_QUALITY_CODE<x>(@PCS7ElementsAPL.pdl; Symbol status display)
object from the template screen. Insert the object into your faceplate view.
2. Assign a meaningful object name.
3. Interconnect the variable whose signal status you wish to display with the "LinkTag1"
property and place your object in your view.
118
APL_QUALITY_CODE3
Like the APL_QUALITY_CODE2 display, but a yellow hand is displayed at Signal Status
16#60 .
119
6.4.6.5
Procedure
1. Copy the "StatusOSPerm_1" object from the template screen. Insert the object into your
faceplate view.
The object is an extended status display.
2. Assign a meaningful object name.
Figure 6-8
OS_Perm5
120
Figure 6-9
OS_Perm6
121
Example "OS_Perm7"
The complete display can be switched to invisible in the display of the "StatusOSPerm_2"
object (see figure "OS_Perm7") . To this purpose the corresponding bit in the status word is
interconnected to "Status3" and is configured in the configuration dialog of the extended
status display.
Figure 6-10
OS_Perm7
122
6.4.7
6.4.8
6.4.8.1
Procedure
1. Select the block icon.
2. Use the shortcut menu (right-hand mouse button) to open the configuration dialog.
3. Select the "Systems/ToolTipText" property in the Selected Properties list.
4. Delete "IOTagname.OutputValue" in the subordinate object.
5. In the "Objects" list select the user object (in the "ToolTipText2" screen the "MonAnl5"
object).
123
Figure 6-11
ToolTipText2
7. Click "OK".
8. Configure the following in the properties of the block icon:
The text ".#comment" in the "Systems" folder at the "ToolTipText" property for dynamics
see figure "ToolTipText3"
Figure 6-12
ToolTipText3
APL Style Guide
124
6.4.8.2
Multi-instance faceplates
A multi-instance faceplate is a faceplate that you use to access different block instances in a
CFC chart.
125
Figure 6-13
MultiInstanceFP_1
126
Figure 6-14
MultiInstanceFP_2
127
128
Appendix
A.1
Overview
Object type
TypeID
@Faceplate
APL_ANA_EMPTY
21
APL_ANA_EMPTY2
26
APL_ANA_EMPTY3
25
APL_ANALOG_OP_DISPLAY
20
APL_ANALOG_OP_DISPLAY2
24
APL_ANALOG_OP_DISPLAY3
27
APL_ANALOG_OP_DISPLAY4
28
APL_BAR_GRADIENT_1
74
APL_BAR_HORIZ_1
72
APL_BAR_HORIZ_2
73
APL_BAR_LINE
84
APL_BAR_LINE_TEXT_E
82
APL_BAR_LINE_TEXT_R
83
APL_BAR_TEXT_E
80
APL_BAR_TEXT_R
81
APL_BAR_VERTIC_1
71
APL_BAR_VERTIC_2
70
APL_BAR_VERTIC_3
75
APL_BLOCK_ICON
APL_CHECKBOX
40
APL_FACEPLATE
50
APL_FACEPLATE2
51
APL_FACEPLATE3
52
APL_INTLK_DISPLAY
100
APL_INTLK_FIRSTIN
102
APL_INTLK_OUTPUT
103
APL_INTLK_OUTPUT2
104
APL_INTLK_STATUS
101
APL_LOCK_SYMBOL
60
APL_MULTI_TEXT
10
APL_MULTI_TEXT10
19
129
Appendix
A.1 Type ID of the object types
Object type
TypeID
APL_MULTI_TEXT11
120
APL_MULTI_TEXT2
11
APL_MULTI_TEXT3
12
APL_MULTI_TEXT4
13
APL_MULTI_TEXT5
14
APL_MULTI_TEXT6
15
APL_MULTI_TEXT7
16
APL_MULTI_TEXT8
17
APL_MULTI_TEXT9
18
APL_OBJ_COLLECTION
APL_OP_BUTTON
30
APL_OP_BUTTON2
31
APL_OP_BUTTON3
32
APL_OP_BUTTON4
33
APL_OP_BUTTON5
34
APL_OP_OBJECT
APL_OP_PERMISSION
APL_PIN_BUTTON
APL_QUALITY_CODE
61
APL_QUALITY_CODE2
62
APL_QUALITY_CODE3
63
APL_RANGE_DIFF
91
APL_SYMBOL_MOTL
114
APL_SYMBOL_MOTREVL
111
APL_SYMBOL_MOTSPDCL
112
APL_SYMBOL_MOTSPDL
113
APL_SYMBOL_VLVMOTL
110
APL_TIME_OP_DISPLAY
22
APL_TIME_OP_DISPLAY2
23
APL_TIME_OP_DISPLAY3
29
APL_TIME_RANGE
90
APL_TIME_RANGE2
92
130