Professional Documents
Culture Documents
WINCC Configure Manual PDF
WINCC Configure Manual PDF
Configuration Manual
Manual
Volume 2
C79000-G8276-C140-01
All other product and system names in this manual are (registered) trademarks of their respective owners and
must be treated accordingly.
(The reproduction, transmission or use of this document or its (We have checked the contents of this manual for agreement
contents is not permitted without express written authority. with the hardware and software described. Since deviations
Offenders will be liable for damages. All rights, including rights cannot be precluded entirely, we cannot guarantee full
created by patent grant or registration of a utility model or agreement. However, the data in this manual are reviewed
design, are reserved.) regularly and any necessary corrections included in subsequent
editions. Suggestions for improvement are welcomed.)
Siemens AG 1994 - 1999 All rights reserved Technical data subject to change
C79000-G8276-C140-01
Printed in the Federal Republic of Germany Siemens Aktiengesellschaft
Table of Contents
1 Configuration - Examples ......................................................... 1-1
3UHIDFH
3XUSRVHRIWKHPDQXDO
The purpose of this manual is to show you the options open to you when configuring with
WinCC and it does this by means of the following sections:
• description of example project YDULDB
• description of example project SLFWXB
• description of example project H[DPSOHB
The Contents or Index will point you quickly and easily to the information you require.
This information is of course also available as an on-line document in HTML format and
with enhanced search functions.
You will find general information on effective and efficient configuration with WinCC in
the :LQ&&&RQILJXUDWLRQ0DQXDO3DUW.
5HTXLUHPHQWVIRUXVLQJWKLVPDQXDO
$GGLWLRQDO6XSSRUW
For technical questions, please contact your local Siemens representative at the responsible
branch office.
Their addresses can be found at the "Siemens Worlwide Appendix" of the "S7-300
Programmable Controller System, Hardware and Installtion Manual", in catalogs, and at
CompuServe ("go autforum").
You can also direct your questions to our Hotline, which can be reached at:
+49 (911) 895-7000 (Fax 7001).
,QIRUPDWLRQDERXW6,0$7,&3URGXFWV
Additionally, the SIMATIC Customer Support provides you with current information and
downloads helpful for the application of SIMATIC products. They can be reached:
• from the Internet at http://www.aut.siemens.de/support/html_00/index.shtml
• via the SIMATIC Customer Support Mailbox at +49 (911) 895–7100
• To access the mailbox, use a modem up to V.34 (28.8 kBaud). Set its parameters as
follows: 8, N, 1, ANSI, or dial-in via ISDN (x.75, 64 kBit).
The SIMATIC Customer Support can be reached by phone at +49 (911) 895–7000 and by
fax at +49 (911) 895–7002. Inquiries can also be made via Internet mail or to the above
mailbox.
&RQILJXUDWLRQ([DPSOHV
In this section of the manual, we describe configuration using WinCC on the basis of
sample projects. Taking into account the multitude of potential applications WinCC has to
offer, the projects described below are to be seen only as examples of what can be done
with WinCC.
1RWH
The projects have been configured for a resolution of 1024 x 768. If you would prefer to
start the projects with a resolution of 800 x 600, you must select the window attributes )XOO
6FUHHQand6OLGHU under &RQWURO&HQWHU→&RPSXWHU→3URSHUWLHV→3URSHUWLHV→
*UDSKLFV5XQWLPH.
The partitioning of the screen and the associated presettings and scripts associated with this
are described in more detail in Chapter /D\LQJRXWWKHVFUHHQ näher beschrieben.
1RWH
There is frequently more than just a single method of tackling a particular task. If a task can
be implemented by means of a direct link, you should DOZD\V choose this type of
dynamization, since this is the method which offers the best level of performance in
runtime.
The consequence of configuring a direct link for an event is that when this event occurs
during runtime, the valueof a source element (source) is taken over for a destination
element (destination). Sources can take the form of constants, tags or the attributes of the
objects in the picture, while the dynamizable attributes of objects, the dynamizable
attributes of the eigenen window and tags can be used as destinations.
The advantages of the direct link are to be found in the simplicity of configuration and in
the link's time response during runtime.
,QLWLDOL]DWLRQ
If required, initialization procedures are performed for the individual pictures. These
initialization procedures are configured under (YHQWV→ 0LVFHOODQHRXV → 2SHQ3LFWXUH.
7DJV3URMHFWYDULDBPFS
In this project, we will show you a number of ways of creating, changing and reusing
WinCC tags. There are three different types of tag in WinCC. ,QWHUQDOWDJV without process
driver connection, ([WHUQDOWDJV with process driver connection, and in the scripts, &WDJV.
In our examples, we will mainly be using LQWHUQDOWDJV and &WDJV.
The examples used for these topics are configured in the WinCC project entitled YDULDB.
&UHDWLQJJURXSLQJDQGPRYLQJWDJV
In WinCC, tags can be created in the &RQWURO&HQWHU under the items 7DJ0DQDJHPHQW and
'DWD7\SHV.
7DJPDQDJHPHQW
When processing large volumes of data and, consequently, a large number of tags, it is
advisable to organize these tags into groups. Only in this way is it possible to keep a track
of things in large-scale projects. The tag groups, however, do nothing toward ensuring the
uniqueness of the tags. This is done solely by means of the tag names.
8 8
6WHS 3URFHGXUHFUHDWLQJWDJVLQWKH7DJ0DQDJHPHQW
1 To create a tag group for LQWHUQDOWDJV, ' the item. Then 5 the subitem
,QWHUQDOWDJV that appears in order to open the pop-up menu. Select the 1HZ
*URXS item.
2 In the window that appears, enter a suitable name (e.g. button). A new group
8
symbol with the name you have just entered now appears in the right window of
the &RQWURO&HQWHU. If you now ' the ,QWHUQDOWDJV item, this group symbol
and name will also appear as a further subitem in the left window. In our sample
project, grouping has been carried out in accordance with the sequence of the
chapters.
3 8' 8
85
To create a tag in a tag group, the group symbol in the right window or
the corresponding symbol in the left window. Then this symbol to open the
pop-up menu and select the 1HZ7DJ item.
6WHS 3URFHGXUHFUHDWLQJWDJVLQWKH7DJ0DQDJHPHQW
4 On the *HQHUDO,QIRUPDWLRQ tab in the window that appears, enter a tag name.
Then select the GDWDW\SH you want from the list box immediately below. An
$GGUHVV does not have to be set for internal tags.
1RWH
The current status of the tag in the process image can be queried in the &RQWURO&HQWHU by
means of a tool tip while runtime is active.
'DWDW\SHV
8'
6WHS 3URFHGXUHFUHDWLQJWDJVE\PHDQVRIWKH'DWD7\SHVPHQXLWHP
6WHS 3URFHGXUHFUHDWLQJWDJVE\PHDQVRIWKH'DWD7\SHVPHQXLWHP
3 When you click the 2. button, you are returned to the *HQHUDO,QIRUPDWLRQ tab
in the 7DJSURSHUWLHV window under the Tag Management item.
0RYLQJWDJV
85
6WHS 3URFHGXUHPRYLQJWDJV
1 the tag in question to open the pop-up menu and select the &XW item.
2 Switch to the group to which the tag is to be moved. Open the pop-up menu in
this group and select 3DVWH.
The same procedure can also be used for several tags simultaneously.
1RWH
If you want to cut or delete tags in the Control Center, runtime must not be active.
If you require a large number of tags which should all have the same tag name but be
numbered consecutively, you only have to create one tag of this type. You can copy this tag
using the pop-up menu and then insert (paste) it as often as you want. The tags will be
numbered automatically in ascending order. You should take this possibility into account
when defining the name convention for tags.
([WHUQDOWDJV
Before you can create external tags in the Tag Management, you first have to configure a
connection to a programmable controller. You do not, however, have to install this
connection in the sense of hardware; all you have to do is install the desired communication
driver and configure the desired connection.
85
6WHS 3URFHGXUH
1 the Tag Management item to open the pop-up menu and select the $GG1HZ
'ULYHU item.
2 Select the driver you want from the list displayed and click the 2SHQ button. A
new subitem with the name of the driver appears in the left window of the
&RQWURO&HQWHU.
3 If you 8 8
' this new subitem, a further subitem appears. 5 this new subitem
to open the pop-up menu and select the 1HZ'ULYHU&RQQHFWLRQ item.
6WHS 3URFHGXUH
6WUXFWXUHWDJV
Structure tags are used to enable a larger number of different tags and tag types which form
a logical unit to be combined. These tag and tag types can then be addressed under one
name.
A structure tag consists of a number of individual tags, which can represent the most varied
out data types.
8
6WHS 3URFHGXUH
1 To create a new structure, 5 the 6WUXFWXUHWDJ item to open the pop-up menu
and select the 1HZ6WUXFWXUH7\SH item.
2 In the window that appears, 8 5 1HZ6WUXFWXUH and select 5HQDPH in the pop-up
menu that appears. Give the new structure a name.
3 You can then add a new structure element by clicking the 1HZHOHPHQW button.
8
6WHS 3URFHGXUH
4 By 5 the new element created, you can select its data type and enter its name.
For each structure element, you must define whether it refers to an internal or an
external tag. You conclude configuration and create the structure type by clicking
the 2. button.
1RWH
Once a structure type has been created, it cannot be reconfigured. The complete structure
type must be redefined.
A structure tag is created in the same way as all other types of tag, but the data type used
must be structure type created.
The name of the individual elements of the structure tag created is composed of the
structure name assigned when creating the tag and the element name assigned when
creating the structure type. The two are separated in the name by a dot.
,QFUHPHQWLQJGHFUHPHQWLQJDQGMRJJLQJ
8
In runtime, you access the examples that relate to these topics in
our YDULDB project by the button depicted above. The examples are configured in the
pictures YDULDBBFKDSWHUBSGO and YDULDBBFKDSWHUBDSGO.
'HILQLWLRQ
pressing a pushbutton). In the case of binary signals, this represents, as a rule, the triggering
of a device. With analog values, a set value can be changed by means of jogging.
7DVNGHILQLWLRQ
,PSOHPHQWDWLRQFRQFHSW
8
We implement changing of the set value by means of two buttons, which we create under
→; changing is event-driven. When the EXWWRQ is , the value of an LQWHUQDOWDJ is
changed to the extent of one increment. The increment is specified beforehand and cannot
be altered during runtime. The change in the set value is implemented by means of a &
DFWLRQ.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHFKDQJLQJDVHWYDOXHLQIL[HGVWHSV
5 Configure decrementation of the set value in the same way. In our example, we
use the object called %XWWRQ.
• In the LI inquiry, check whether the value of the tag is greater than 1300. If it is, 1400
will be specified as the upper limit. If the value of the tag is less than 1300, the
instruction in the HOVH branch is executed and the value is raised in this way by 100.
• The LQWHUQDOIXQFWLRQ 6HW7DJ':RUG then returns the changed value to the
6LBYDULDBEXWB tag.
1RWHVRQJHQHUDOXVH
The &DFWLRQV linked to the two EXWWRQV can be used after changes have been made to the
tag (internal or external), the limits and the increment.
7DVNGHILQLWLRQ
,PSOHPHQWDWLRQFRQFHSW
8
We implement changing of the set value by means of two buttons, which we create under
→; changing is event-driven. When the EXWWRQ is , the value of an LQWHUQDOWDJ is
changed to the extent of one increment. The increment is specified beforehand and cannot
be altered during runtime. The change in the set value is implemented by means of a SURMHFW
IXQFWLRQ.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHFUHDWLQJWKHSURMHFWIXQFWLRQ
• The function header with the name of the project function ,QF'HF9DOXH and the transfer
parameters. We use the same SURMHFWIXQFWLRQ for incrementing and decrementing.
• The declaration of the tag.
• When the function is called, it is not the tag to be processed that is transferred as the
transfer parameter, but only its address. The contents of this address are read into the
&WDJ Y.
• Using the VZLWFK statement, evaluate the information of the direction tag D.
• In the relevant FDVH branch, check the limit values and specify the maximum or
minimum value if the limit is exceeded.
• If the limit is not violated, change the current value.
• Transfer the current set value to the address of the tag to be processed.
the entry in the list box from the default value of 2s to 8SRQFKDQJH and change
the field type entry (7\SH) to 2XWSXW.
3 In the same picture, configure a button object under :LQGRZV2EMHFWV→%XWWRQ.
In our example, we use the object called %XWWRQ
4 To change the set value, create a &DFWLRQ by the object and selecting
3URSHUWLHV(YHQWV→0RXVH→3UHVVOHIW. This &DFWLRQ calls the SURMHFW
8
IXQFWLRQ ,QF'HF9DOXH and transfers the required parameters to it. The changes the
value of the tag each time the EXWWRQ is clicked with the . The limits are
specified as the transfer parameters when the SURMHFWIXQFWLRQ is called. They are
checked in the SURMHFWIXQFWLRQ.
5 Configure decrementation of the set value in the same way. In our example, we
use the object called %XWWRQ.
value=GetTagDWord("S32i_varia_but_04");
• Use the LQWHUQDOIXQFWLRQ 6HW7DJ':RUG to transfer the changed value to the LQWHUQDO
WDJ.
1RWHVRQJHQHUDOXVH
The SURMHFWIXQFWLRQ can be used immediately without any further changes being required.
In the &DFWLRQ used for calling the SURMHFWIXQFWLRQ, adapt the transfer parameters to suit
your own requirements.
→
8
You access the solutions to these subjects in our project called YDULDBby choosing the
two EXWWRQVwith the . They are configured in the picture with the name
SLFWXBBFKDSWHUBDSGO.
7DVNGHILQLWLRQ
,PSOHPHQWDWLRQFRQFHSW
We implement the button along event-driven lines by means of a button, which we create
under :LQGRZV2EMHFWV→%XWWRQ.
We visualize this implementation by means of a GLUHFWFRQQHFWLRQ and a &DFWLRQ.
1RWH
,PSOHPHQWLQJLQWKH:LQ&&SURMHFWGLUHFWFRQQQHFWLRQ
6WHS 3URFHGXUHKRZDEXWWRQZRUNV±GLUHFWFRQQHFWLRQ
1 Create a tag of type %LQDU\WDJ in Tag Management. In our example, we use the
tag called %,1LBYDULDBEXWB
2 In a picture, we configure :LQGRZV2EMHFWV→%XWWRQ. In our example, we use
the object called %XWWRQ
3 Configure a GLUHFWFRQQHFWLRQ for %XWWRQ under (YHQWV→0RXVH→3UHVVOHIW.
Connect the VRXUFH &RQVWDQW→ to the WDUJHW 9DULDEOH→%,1LBYDULDBEXWB.
Accept the settings by clicking the 2. button. Configure another GLUHFW
FRQQHFWLRQ under (YHQWV→0RXVH→5HOHDVHOHIW, but this time for the VRXUFH
&RQVWDQW→.
6WHS 3URFHGXUHKRZDEXWWRQZRUNV±GLUHFWFRQQHFWLRQ
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW&DFWLRQ
6WHS 3URFHGXUHKRZDEXWWRQZRUNV&DFWLRQ
1 Create a tag of type %LQDU\WDJ in Tag Management. In our example, we use the
tag called %,1LBYDULDBEXWB
2 In a picture, we configure :LQGRZV2EMHFWV→%XWWRQ. In our example, we use
the object called %XWWRQ
3 Under (YHQWV→0RXVH→3UHVVOHIW, generate a &DFWLRQ which sets the value of
the %,1LBYDULDBEXWB tag to . Under (YHQWV→0RXVH→5HOHDVHOHIW, generate
a further &DFWLRQ which sets the value of the %,1LBYDULDBEXWB tag to .
$QLPDWLRQRIRXUH[DPSOH
In our example, we use the button to animate the following color wheel.
action to PV. In this case, we do QRW dynamize the /LQH&RORU. The reason a &DFWLRQ
is linked to this property is that we require a trigger to start changing of the value. We
could also use a different property of the object instead of the .
• The current angle of rotation is changed in the LQWHUQDOWDJ called 6LBYDUDBEXWB.
1RWHVRQJHQHUDOXVH
The EXWWRQ with the GLUHFWFRQQHFWLRQ can be used after changes have been made to the tag.
→
You access the example that relates to this topic in our YDULDB project by
EXWWRQV depicted above. They are configured in the picture with the name
8 the two
SLFWXBBFKDSWHUBDSGO.
7DVNGHILQLWLRQ
,PSOHPHQWDWLRQFRQFHSW
We implement the changeover switch along event-driven lines by means of a button, which
we create under :LQGRZV2EMHFWV→%XWWRQ.
1RWH
,PSOHPHQWLQJLQWKH:LQ&&SURMHFWGLUHFWFRQQQHFWLRQ
6WHS 3URFHGXUHKRZDFKDQJHRYHUVZLWFKZRUNVGLUHFWFRQQHFWLRQ
1 Create a tag of type %LQDU\WDJ in Tag Management. In our example, we use the
tag called %,1LBYDULDBEXWB
2 In a picture, configure two buttons under :LQGRZV2EMHFWV→%XWWRQ. In our
example, we use the object %XWWRQ for switching on and the object %XWWRQ for
switching off.
3 Configure a GLUHFWFRQQHFWLRQ for %XWWRQ under (YHQWV→0RXVH→3UHVVOHIW.
Connect the VRXUFH &RQVWDQW→ to the WDUJHW 9DULDEOH→%,1LBYDULDBEXWB.
Accept the settings by clicking the 2. button. Configure a GLUHFWFRQQHFWLRQ
linked to %XWWRQ in the same way, but this time with the VRXUFH &RQVWDQW→.
4 The GLUHFWFRQQHFWLRQ under Events → Mouse → Mouse Action only
synchronizes the labeling on %XWWRQ and isn’t essential for the changeover switch
to be able to function.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW&DFWLRQ
6WHS 3URFHGXUHKRZDFKDQJHRYHUVZLWFKZRUNV&DFWLRQ
1 Create a tag of type %LQDU\WDJ in Tag Management. In our example, we use the
tag called %,1LBYDULDBEXWB
2 In a picture, configure a :LQGRZV2EMHFWV→%XWWRQ. In our example, we use the
object called %XWWRQ.
3 Under (YHQWV→0RXVH→3UHVVOHIW, generate a &DFWLRQ which negates the
status of the %,1LBYDULDBEXWB tag.
//flip tag
state = !GetTagBit("BINi_varia_but_16"),
SetTagBit("BINi_varia_but_16",(SHORT)state);
}
• The declaration of the VWDWH tag.
• The LQWHUQDOIXQFWLRQ *HW7DJ%LW reads out the value of the LQWHUQDOWDJ, inverts it and
returns it with 6HW7DJ%LW.
1RWHVRQJHQHUDOXVH
The button with the &DFWLRQ can be used after changes have been made to the tag.
Inversion of the LQWHUQDOWDJ can also be carried out without the &WDJ.
SetTagDWord("BINi_varia_but_16",(SHORT)!GetTagBit("BINi_varia_but_16
"));
7DVNGHILQLWLRQ
The value of a tag is to be changed. This changing of the value is to be restricted to fixed
limits. Changing of the value is to be performed using the mouse.
A tag value is to be changed by pressing a button. The value is to be changed only when the
button is pressed. The value set must be retained when the button is released.
,PSOHPHQWDWLRQFRQFHSW
PV. We are QRW dynamizing the position of the ,2ILHOG. The reason a &DFWLRQ is linked
to this property is that we want to implement changing of the value directly on the object.
In our sample project, we have also solved this problem by means of a JOREDODFWLRQ.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHLQFUHPHQWLQJGHFUHPHQWLQJ
1 Creating the tag in the Tag Management. In our example, we use the tags called
6LBYDULDBEXWBDQG6LBYDULDBEXWB
the list box from the default value of 2s to 8SRQFKDQJH and change the field type
entry (7\SH) to 2XWSXW.
3 In the same picture, configure a :LQGRZV2EMHFWV→%XWWRQ. In our example, we
use the object called %XWWRQ
4 To modify a setpoint at the click of a mouse, we create several GLUHFWFRQQHFWLRQV
8 8
at thisEXWWRQ. These GLUHFWFRQQHFWLRQVmodify the value of tag
6LBYDULDBEXWBevery time the EXWWRQ is chosen with the or R.
Set (YHQWV→0RXVH→3UHVVOHIW to incrementation ON (set tag to ). Set (YHQWV
→0RXVH→5HOHDVHOHIW to incrementation OFF (set tag to ). Set (YHQWV→
0RXVH→3UHVVULJKW to decrementation ON (set tag to ) and (YHQWV→0RXVH
5 The value of the 6LBYDULDBEXWB tag is changed by a &DFWLRQ for the object
,2)LHOG under 3URSHUWLHV→*HRPHWU\→3RVLWLRQ;.
if (count==1){ //inc
value++;
if (value>1400) (value=1400); //high limit
SetTagDWord("S32i_varia_but_00",value);
}//inc
if (count==2){ //dec
value--;
if (value<0) (value=0); //low limit
SetTagDWord("S32i_varia_but_00",value);
}//dec
}//if count
return(81); //x-pos
}
• The declaration of the &WDJV YDOXH and FRXQW.
• Evaluation of whether the EXWWRQ is pressed. If the EXWWRQ is not being pressed, the &
DFWLRQ is ended (to avoid unnecessary loading of the system).
• If the EXWWRQ is being pressed, the script inquires whether the value is to be incremented
or decremented. The value of the tag is changed depending on the result of this
evaluation.
• After the value has been changed, the limit value check is performed.
• Return the value configured for position X with UHWXUQ. It isn’t supposed to be changed.
1RWHVRQJHQHUDOXVH
The button with the GLUHFWFRQQHFWLRQV can be used after changes have been made to the tag
and in conjunction with the &DFWLRQ for the ,2ILHOG. The limits and tags must be adapted
in the &DFWLRQ.
7DVNGHILQLWLRQ
The value of a tag is to be changed. This changing of the value is to be restricted to fixed
limits. Changing of the value is to be performed using the mouse.
A tag value is to be changed by pressing a button. The value is to be changed only when the
button is pressed. The value set must be retained when the button is released.
,PSOHPHQWDWLRQFRQFHSW
8
It is to be implemented with the aid of a JOREDODFWLRQ.
8
When the button is pressed with the , the value of an LQWHUQDOWDJ is incremented by the
increment set; when the button is pressed with the R, the value of thistag is
decremented by the increment set. The value keeps changing as long as the button is
pressed. The increment is specified beforehand and cannot be altered during runtime.
The change in the value is displayed by means of a 6PDUW2EMHFWV→,2)LHOG. The output
value of the,2ILHOG is linked to the LQWHUQDOWDJ.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS
&UHDWLQJWKHSURMHFWIXQFWLRQ
6WHS 3URFHGXUHFUHDWLQJWKHSURMHFWIXQFWLRQIRULQLWLDOL]DWLRQ
void InitAction()
{
//function is used to generate external tags
}
• The declaration of the external &WDJV.
• This function must be executed once when the project is started and is then no longer
required. A good way of executing it is in the Start Picture, and this can be set under
(YHQWV→0LVFHOODQHRXV→2SHQ3LFWXUH.
6WHS
&UHDWLQJWKHJOREDODFWLRQ
6WHS 3URFHGXUHFUHDWLQJWKHJOREDODFWLRQ
DWORD value;
if ((count==1)||(count==2)){
//get current value
value = GetTagDWord(tagname);
if (count==1){ //inc
value = value+step;
if (value>high) (value=high); //high limit
}//if
if (count==2){ //dec
value = value-step;
if (value<low) (value=low); //low limit
}//if
SetTagDWord(tagname,value);
}//if
return(0);
}
• The declaration of the external &WDJ.
• Evaluation of whether the EXWWRQ is pressed. If the EXWWRQ is not being pressed, the &
DFWLRQ is ended (to avoid unnecessary loading of the system).
• If the EXWWRQ is being pressed, the script inquires whether the value is to be incremented
or decremented. The value of the &WDJYDOXH is changed depending on the result of this
evaluation.
• After the value has been changed, the limit value check is performed.
• Use the LQWHUQDOIXQFWLRQ 6HW7DJ':RUG to assign the new value to the tag to be
processed.
6WHS
&RQILJXULQJWKHEXWWRQV
6WHS 3URFHGXUHLQFUHPHQWLQJDQGGHFUHPHQWLQJXVLQJ*OREDO6FULSW
1 Creating the tag in the Tag Management. In our example, we use the tag called
6LBYDULDBEXWB
the list box from the default value of 2s to 8SRQFKDQJH and change the field type
entry (7\SH) to 2XWSXW.
3 In the same picture, configure a button object under :LQGRZV2EMHFWV→%XWWRQ.
In our example, we use the object called %XWWRQ
4 To modify a setpoint at the click of a mouse, we create several &DFWLRQV at this
8 8
EXWWRQThese &DFWLRQV provide the JOREDODFWLRQ, FRXQWHUSDVwith the relevant
parameters. This happens each time the button is clicked with the or R.
Set (YHQWV→0RXVH→3UHVVOHIW to incrementation ON, (YHQWV→0RXVH→
5HOHDVHOHIW to incrementation OFF, (YHQWV→0RXVH→3UHVVULJKW to
strcpy(tagname,"S32i_varia_but_04");
count = 1;
low = 0;
high =1400;
step = 1;
}
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• In the &DFWLRQV, change the tag and adapt the limit values and the increment.
• If this button is to be used in another project, the SURMHFWIXQFWLRQ ,QLW$FWLRQ and the
JOREDODFWLRQ FRXQWHUSDV must both be transferred over together with the button.
7KHRWKHUH[DPSOHVUHODWHGWRWKLVWRSLF
H[DPSOH
The functionality of this example is similar to that of example H[DPSOH. The basic
difference is that the increment can be changed during runtime.
Another difference is the dynamic changing of the increment when the increment is being
set. If the increment is > 20, the value is changed in steps of 10; if the increment is < 20, the
value is changed in steps of 1.
H[DPSOH
The functionality of this example results from combining H[DPSOH and H[DPSOH. The
value is changed with the help of the JOREDODFWLRQ FRXQWHUSDV.
H[DPSOH
The functionality of this example is similar to that of example H[DPSOH. The difference
here is in the mode of animation.
&KDQJLQJWDJYDOXHXVLQJ:LQGRZV2EMHFWV
8
In runtime, you access the solutions that relate to these topics in
our YDULDB project by the EXWWRQ depicted above. The examples are configured in the
picture named YDULDBBFKDSWHUBSGO.
7DVNGHILQLWLRQ
,PSOHPHQWDWLRQFRQFHSW
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHFKDQJLQJVHWYDOXHE\PHDQVRIDVOLGHU±GLUHFWFRQQHFWLRQ
1 Create a tag in Tag Management. In our example, we use the tag called
6LBYDULDBZLQB
6WHS 3URFHGXUHFKDQJLQJVHWYDOXHE\PHDQVRIDVOLGHU±GLUHFWFRQQHFWLRQ
6WHS 3URFHGXUHFKDQJLQJVHWYDOXHE\PHDQVRIDVOLGHU±GLUHFWFRQQHFWLRQ
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• Change the tag in the GLUHFWFRQQHFWLRQ.
• The value range of the 6OLGHU2EMHFW can be changed under 3URSHUWLHV→0LVFHOODQHRXV
→0D[LPXP9DOXH and0LQLPXP9DOXH. This can also be done under &RQILJXUDWLRQ
'LDORJ
7DVNGHILQLWLRQ
,PSOHPHQWDWLRQFRQFHSW
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHFKDQJLQJVHWYDOXHE\PHDQVRIDVOLGHU±WDJFRQQHFWLRQ
1 Create a tag in Tag Management. In our example, we use the tag called
6LBYDULDBZLQB
6LBYDULDBZLQB. Change the entry in the 8SGDWH list box from the default
value of 2s to 8SRQFKDQJH.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• Change the tag in theWDJFRQQHFWLRQ.
• The value range of the 6OLGHU2EMHFW can be changed under 3URSHUWLHV→0LVFHOODQHRXV
→0D[LPXP9DOXH and0LQLPXP9DOXH. This can also be done under &RQILJXUDWLRQ
'LDORJ.
7DVNGHILQLWLRQ
,PSOHPHQWDWLRQFRQFHSW
We implement this changing of the set value by means of an option group, which we create
under :LQGRZV2EMHFWV→2SWLRQ*URXS.
When one of the specified set values is selecting using the 8 , the value in an LQWHUQDOWDJ
is changed. The list of set values is specified and cannot be altered during runtime.
The change in the set value is displayed by means of a 6PDUW2EMHFWV→,2)LHOG. The
output value of the,2ILHOG is linked to the LQWHUQDOWDJ. The change in the set value is
implemented by means of a &DFWLRQ.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHFKDQJLQJVHWYDOXHXVLQJDQRSWLRQJURXS
1 Create a tag in Tag Management. In our example, we use the tag called
6LBYDULDBZLQB
field selected.
6WHS 3URFHGXUHFKDQJLQJVHWYDOXHXVLQJDQRSWLRQJURXS
1RWHVRQJHQHUDOXVH
The following adaptation must be made before the 2SWLRQ*URXS can be put to general use:
• Adapt the tag in the &DFWLRQ under (YHQWV→3URSHUW\7RSLFV→2XWSXW,QSXW→
6HOHFWHG%R[HV.
7DVNGHILQLWLRQ
Various objects are to be configured such that they can be shown and hidden by means of a
check box.
,PSOHPHQWDWLRQFRQFHSW
We implement this by means of a check box, which we create under :LQGRZV 2EMHFWV →
&KHFN%R[, and we use this check box to set individual bits in a tag. A number of objects
created under 6WDQGDUG 2EMHFWV → 3RO\JRQ are shown or hidden depending on these bits.
We display the binary output value of the FKHFN ER[ by means of a 6PDUW 2EMHFWV → ,2
)LHOG.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHLQSXWWLQJE\PHDQVRIDFKHFNER[
default value 3 to .
4 Select the index value 1 under 3URSHUWLHV→)RQW→,QGH[→. Enter the
appropriate text for the selected index under 3URSHUWLHV→)RQW→7H[W, this text
being the name of the object you want to control by selecting this field. In the
same way, configure the values for the remaining index inputs.
5 Under (YHQWV→3URSHUW\7RSLFV→2XWSXW,QSXW→6HOHFWHG%R[HV create a &
DFWLRQ which assigns the binary state of &KHFN%R[ to tag S32i_varia_win_03
6WHS 3URFHGXUHLQSXWWLQJE\PHDQVRIDFKHFNER[
the entry in the 8SGDWH list box from the default value of 2s to 8SRQFKDQJH.
Under 3URSHUWLHV→2XWSXW,QSXW, change the 'DWD)RUPDW to %LQDU\ and change
the Output Format to .
SetTagDWord("S32i_varia_win_03",value);
//first box selected
if (value&1) SetVisible(lpszPictureName,"Polygon1",1);
else SetVisible(lpszPictureName,"Polygon1",0);
//second box selected
if (value&2) SetVisible(lpszPictureName,"Polygon2",1);
else SetVisible(lpszPictureName,"Polygon2",0);
//third box selected
if (value&4) SetVisible(lpszPictureName,"Polygon3",1);
else SetVisible(lpszPictureName,"Polygon3",0);
//fourth box selected
if (value&8) SetVisible(lpszPictureName,"Polygon4",1);
else SetVisible(lpszPictureName,"Polygon4",0);
//fifth box selected
if (value&16) SetVisible(lpszPictureName,"Polygon5",1);
else SetVisible(lpszPictureName,"Polygon5",0);
//sixth box selected
if (value&32) SetVisible(lpszPictureName,"Polygon6",1);
else SetVisible(lpszPictureName,"Polygon6",0);
//seventh box selected
if (value&64) SetVisible(lpszPictureName,"Polygon7",1);
else SetVisible(lpszPictureName,"Polygon7",0);
}
• Set tag 6LBYDULDBZLQB to the new input state of the FKHFNER[.
• Control the visibility of the objects in accordance with the input state. The input state is
stored in the predefined tag YDOXH. To read out the respective bit, you have to perform
bit masking to the relevant bit.
1RWH
A simple example is shown in the SLFWXB project in the chapter entitled '\QDPLFV in
H[DPSOH. In this case, however, visibility is queried for each individual object by means of
the '\QDPLF'LDORJ.
1RWHVRQJHQHUDOXVH
The following adaptation must be made before the &KHFN%R[ can be put to general use:
• Adapt the tag and the object names in the &DFWLRQ under (YHQWV→3URSHUW\7RSLFV→
2XWSXW,QSXW→6HOHFWHG%R[HV.
%LWHGLWLQJLQZRUGV
8
You access the solutions that relate to these topics in our
YDULDB project by the EXWWRQ depicted above. The examples are configured in the
pictures YDULDBBFKDSWHUBSGO and YDULDBBFKDSWHUBDSGO.
'HILQLWLRQ
'LUHFWO\VHWWLQJDELWZLWKWKHDLGRIDFKHFNER[DQGGLUHFW
FRQQHFWLRQH[DPSOH
7DVNGHILQLWLRQ
The state of a bit in a word is to be changed when this bit is selected. We want to be able to
select several bits.
,PSOHPHQWDWLRQFRQFHSW
8
We implement changing of the bit states by means of a check box, which we create under
:LQGRZV2EMHFWV→&KHFN%R[. When we one of the fields of the &KHFN%R[, the bit
assigned to it in the LQWHUQDOWDJ is changed with the aid of a GLUHFWFRQQHFWLRQ.
The bit pattern is displayed by means of an I/O field created under 6PDUW2EMHFWV→,2
)LHOG. The output value of the ,2ILHOG is linked to an LQWHUQDOWDJ.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHGLUHFWO\VHWWLQJDELWZLWKWKHDLGRIDFKHFNER[DQGGLUHFW
FRQQHFWLRQ
6WHS 3URFHGXUHGLUHFWO\VHWWLQJDELWZLWKWKHDLGRIDFKHFNER[DQGGLUHFW
FRQQHFWLRQ
6WHS 3URFHGXUHGLUHFWO\VHWWLQJDELWZLWKWKHDLGRIDFKHFNER[DQGGLUHFW
FRQQHFWLRQ
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The tags must be adapted in the GLUHFWFRQQHFWLRQV.
7DVNGHILQLWLRQ
The state of a bit in a word is to be changed by entering its bit number and clicking a
EXWWRQ. Switching from 0 to 1 and vice versa.
,PSOHPHQWDWLRQFRQFHSW
We implement changing of the bit states by means of a button, which we create under
:LQGRZV2EMHFWV→%XWWRQ.
To enter the bit number and display the bit pattern, we use a 6PDUW2EMHFWV→,2)LHOG.
When we enter the bit number and 8 the EXWWRQ, the selected bit in an LQWHUQDOWDJ is
changed. The change is implemented by means of a &DFWLRQ.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHFKDQJLQJDELWLQDZRUG
6WHS 3URFHGXUHFKDQJLQJDELWLQDZRUG
3 Configure a second ,2ILHOG for displaying the bit states. In our example, we use
the object called ,2)LHOG. When configuring the ,2ILHOG, connect it to tag
8LBYDULDBVHWB. Change the entry in the 8SGDWH list box from the default
word = (WORD)(word|1<<pos);
SetTagWord("U16i_varia_set_08",word);
}
• Declare the &WDJV.
• Use the LQWHUQDOIXQFWLRQ *HW7DJ:RUG to read out the bit position entered and the
current value of the tag.
• The bit shift function (<<) is used to generate the corresponding bit mask. This is ORed
(|) bit-by-bit with the contents of the tag to be processed. The states of the other bits are
retained.
• Assign the new value to the LQWHUQDOWDJ.
word=(WORD)(word&~(1<<pos));
SetTagWord("U16i_varia_set_08",word);
}
• Declare the &WDJV.
• Use the LQWHUQDOIXQFWLRQ *HW7DJ:RUG to read out the bit position entered and the
current value of the tag.
• The bit shift function (<<) is used to generate the corresponding bit mask. This is
complemented with the operator (~) and ANDed (&) bit-by-bit with the contents of the
tag to be processed.
• Assign the new value to the LQWHUQDOWDJ.
word = (WORD)(word^1<<pos);
SetTagWord("U16i_varia_set_08",word);
}
• Declare the &WDJV.
• Use the LQWHUQDOIXQFWLRQ *HW7DJ:RUG to read out the bit position entered and the
current value of the tag.
• The bit shift function (<<) is used to generate the corresponding bit mask. This is
EXORed (^) bit-by-bit with the contents of the tag to be processed. The states of the
other bits are retained.
• Assign the new value to the LQWHUQDOWDJ.
7KHRWKHUH[DPSOHVUHODWHGWRWKLVWRSLF
H[DPSOH
The functionality of this example is similar to that of example H[DPSOH. The basic
difference is in the way the bit to be switched is selected. In this example, the bit is
switched by selecting an object which represents this bit. Each object is able to read out
which bit it is responsible for from its object name.
H[DPSOH
8
The functionality of this example is similar to that of example H[DPSOH. The difference
is that the bit is immediately toggled on being selected with the . Here too, the objects
are assigned to the bits by means of the Object name.
H[DPSOH
The functionality of this example is similar to that of example H[DPSOH. The difference
here is that an option group is used. Use of this object type means that only one bit can be
set in each data word.
,QGLUHFWDGGUHVVLQJRIWDJV
8
You access the solutions that relate to these topics in our
YDULDB project by the EXWWRQ depicted above. The examples are configured in the
picture named YDULDBBFKDSWHUBSGO.
7DVNGHILQLWLRQ
Various process values are to be displayed in an ,2ILHOG. The corresponding values are to
be selected by means of EXWWRQV.
,PSOHPHQWDWLRQFRQFHSW
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHLQGLUHFWDGGUHVVLQJE\PHDQVRIDGLUHFWFRQQHFWLRQ
6WHS 3URFHGXUHLQGLUHFWDGGUHVVLQJE\PHDQVRIDGLUHFWFRQQHFWLRQ
use the object called 6WDWLF7H[W. This object indicates which process value is
currently being displayed. The text in the object is automatically supplied by the
EXWWRQ.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The tag names must be adapted.
0XOWLSOH[GLVSOD\XVLQJLQGLUHFWDGGUHVVLQJDQGD&DFWLRQ
H[DPSOH
7DVNGHILQLWLRQ
Three different process values of a container are to be displayed. The same display is,
however, also to be set up for several containers. The relevant process values are to be
displayed by selecting the corresponding container.
,PSOHPHQWDWLRQFRQFHSW
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHPXOWLSOH[GLVSOD\ZLWKLQGLUHFWDGGUHVVLQJ
7[BYDULDBDGUB and select the box in the ,,QGLUHFW column. Select the
box.
5 In the same way, configure the other ,2ILHOGV, but connect each field to a
different address tag.
6 Configure an option group under :LQGRZV2EMHFWV→2SWLRQ*URXS. In our
example, we use the object called 2SWLRQ*URXS.
7 Select the index 1 under 3URSHUWLHV→)RQW→,QGH[. Enter the appropriate text
for the selected index under 3URSHUWLHV→)RQW→7H[W→&RQWDLQHU. In the
same way, configure the texts for the remaining index values.
8 Create a &DFWLRQ under (YHQWV→3URSHUW\7RSLFV→2XWSXW,QSXW→6HOHFWHG
%R[HV. This action describes the address tag depending on the field selected.
switch(value) {
case 2: {
strcpy(address1,"S32i_varia_adr_03");
strcpy(address2,"S32i_varia_adr_06");
strcpy(address3,"S32i_varia_adr_09");
}//case 2
break;
case 4: {
strcpy(address1,"S32i_varia_adr_04");
strcpy(address2,"S32i_varia_adr_07");
strcpy(address3,"S32i_varia_adr_10");
}//case 4
break;
default: {
strcpy(address1,"S32i_varia_adr_05");
strcpy(address2,"S32i_varia_adr_08");
strcpy(address3,"S32i_varia_adr_11");
}//default
break;
}//switch
SetTagChar("T16x_varia_adr_01",address1);
SetTagChar("T16x_varia_adr_02",address2);
SetTagChar("T16x_varia_adr_03",address3);
}
• Declaration of three &WDJV as an array of characters.
• Copy the tag names into the tags declared beforehand, in accordance with the input
state. The input state is stored in the predefined tag YDOXH.
• Assign the corresponding tag names to the address tags.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The tag names must be adapted.
7DVNGHILQLWLRQ
Various process values are to be displayed in an ,2ILHOG. The corresponding values are to
be selected by means of an 2SWLRQ*URXS.
,PSOHPHQWDWLRQFRQFHSW
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHLQGLUHFWDGGUHVVLQJE\PHDQVRID&DFWLRQ
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The tag names must be adapted.
7KHRWKHUH[DPSOHVUHODWHGWRWKLVWRSLF
H[DPSOH
The functionality of this example is to display the process values used in H[DPSOH.
6LPXODWLRQRIWDJV
8
You access the solutions that relate to these topics in our
YDULDB project by the EXWWRQ depicted above. The examples are configured in the
picture named YDULDBBFKDSWHUBSGO.
'HILQLWLRQ
The term VLPXODWLRQ refers to changing the contents of a tag without a process driver
connection. Simulation is performed using utility programs.
6LPXODWLQJDWULDQJXODURVFLOODWLRQE\PHDQVRID&DFWLRQ
H[DPSOH
7DVNGHILQLWLRQ
A triangular oscillation simulation with settable values for the maximum value and
minimum value is to be created. The plausibility of these values is to be verified as they are
entered. Simulation is to be started and stopped by means of a EXWWRQ. Another EXWWRQ is to
be used to reset the tag value to zero.
,PSOHPHQWDWLRQFRQFHSW
We implement starting of the simulation and initialization by means of two buttons, which
we create under :LQGRZV2EMHFWV→%XWWRQ. To display the tag value and to input the
maximum and minimum values, we will create three I/O fields under 6PDUW2EMHFWV→,2
)LHOG. If simulation is started while the maximum and minimum values set are identical, a
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHVLPXODWLQJDWULDQJXODURVFLOODWLRQE\PHDQVRID&DFWLRQ
2 Create two tags of type %LQDU\WDJ in Tag Management. In our example, we use
the tags called %,1LBYDULDBVLPB and %,1LBYDULDBVLPB.
3 Configure three I/O fields under 6PDUW2EMHFWV→,2)LHOG. In our example, we
use ,2)LHOG, ,2)LHOG and ,2)LHOG.
4 For object ,2)LHOG, create a WDJFRQQHFWLRQ to tag 6LBYDULDBVLPB under
3URSHUWLHV→2XWSXW,QSXW→2XWSXW9DOXH and set the trigger to 8SRQFKDQJH.
Change the 2XWSXW)RUPDW to . In the same way, configure ,2)LHOG, but
set tag 6LBYDULDBVLPB
, create a WDJFRQQHFWLRQ to tag
7RFKHFNWKHSODXVLELOLW\RI,2)LHOG
can take this picture from the sample project for use in your own projects; the
info text and title can be changed to whatever you want.
8 Configure a button under :LQGRZV2EMHFWV→%XWWRQ; in our example, we use
%XWWRQ. Create a further GLUHFWFRQQHFWLRQ under (YHQWV→0RXVH→3UHVVOHIW.
6WHS 3URFHGXUHVLPXODWLQJDWULDQJXODURVFLOODWLRQE\PHDQVRID&DFWLRQ
&DFWLRQIRUWDJVLPXODWLRQ
#include "apdefap.h"
long _main(char* lpszPictureName, char* lpszObjectName, char*
lpszPropertyName)
{
BOOL state;
static DWORD lowstore = 0;
static BOOL statestore = 0;
static DWORD r = 1;
static DWORD i = 0;
static DWORD box = 0;
int high,low;
if (state!=statestore) (box=0);
statestore=state;
//get limits
high=GetTagDWord("S32i_varia_sim_02");
low=GetTagDWord("S32i_varia_sim_03");
if (i==high) (r=0);
if (i==low) (r=1);
//init simulator if limit overflow
if ((i>high)||(i<low)){
(i=low);
(r=1);
}//if
//set new value
SetTagDWord("S32i_varia_sim_00",i);
}//if state
}//if (high!=low)
//set visible message box
if ((high==low)&&(state==1)&&(box==0)){
box++;
SetVisible("varia_3_chapter_05.PDL","dialog box",1);
}
return 80;//x-pos
}
• Declare tags.
• If %XWWRQ (init)has been pressed (clicked), set the tag value memory to the minimum
value stored, the counter direction to ascending, the value of the LQWHUQDOWDJ
6LBYDULDBVLPB to the minimum value stored and turn off the simulator.
WinCC provides its own simulation program, which can simulate tags using a number of
different methods. This simulation program must be installed using the 6HWXSH[H program
in the folder called 6PDUW7RROV→&&B6LPXODWRU on the WinCC CD.
7DVNGHILQLWLRQ
,PSOHPHQWDWLRQFRQFHSW
We will use a number of tags, which will be displayed in I/O fields created under 6PDUW
2EMHFWV→,2)LHOG and whose contents will be controlled by means of the tag simulator.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHVLPXODWLQJE\PHDQVRIDQH[WHUQDOSURJUDP
one described, you must ensure that the project in question is running in runtime
mode.
5 In the simulator, select tag 6LBYDULDBVLPB under the menu item (GLW→1HZ
7DJ from the Tag Management screen which appears. Select the ,QF tab and enter
the 6WDUW9DOXH and (QG9DOXH. In our example, the values and have been
used. Simulation is started by selecting the item DFWLYH. The value of the tag is
increased from 0 to 20, after which simulation is restarted at 0.
6 Proceed in the same way with tag 6LBYDULDBVLPB. In our example, the 6LQXV
tab has been selected and $PSOLWXGH set to , 2IIVHW to and 2VFLOODWLRQWLPH to
.
1RWH
In the sample project, you can use the flag icon to select the English or German version of
the tag simulator.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The tags to be simulated and the method of simulation must be customized to suit your
own requirements.
,PSRUWLQJH[SRUWLQJWDJV
8
You access the solutions that relate to these topics in our
YDULDB project by the EXWWRQ depicted above. The examples are configured in the
picture named YDULDBBFKDSWHUBSGO.
7DVNGHILQLWLRQ
The contents of Tag Management are to be read out by means of a utility program and
edited in the spreadsheet program Excel. The modified data is to be able to be imported
back into the WinCC project again. This procedure makes it possible to create a large
number of tags without any great effort.
,PSOHPHQWDWLRQFRQFHSW
To implement this in the project, we use two buttons which we create under :LQGRZV
2EMHFWV→%XWWRQ; these buttons are used to start the import/export program YDUBLPH[H[H
and H[FHOH[H. The path to each of these programs can be set by means of two I/O fields
created under 6PDUW2EMHFWV→,2)LHOG.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHLPSRUWLQJH[SRUWLQJWDJV
8
Select the cell and move the mouse pointer to the bottom right corner. Press and
hold down the and drag the mouse pointer downward to fill in the remaining
99 cells automatically.
8 In the second column, enter a
; in the third column, LQWHUQDOWDJ; in the fourth,
LPSH[S as the group name; in the fifth column, ; and in the sixth column, as
the code for an 8QVLJQHGELWYDOXH. In the remaining Columns, enter the value
. Fill in the remaining 99 lines automatically.
9 Open YDUBLPH[H[H again via the task bar and select the selection field ,PSRUW.
Then click ([HFXWH→2.. After completing import of the tags, exit the program.
10 100 new tags have now been created in Tag Management.
1RWH
Runtime doesn’t have to be active to enable the importing and exporting of tags.
8VLQJVWUXFWXUHWDJV
8
You access the solutions that relate to these topics in our
YDULDB project by the EXWWRQ depicted above. The examples are configured in the
picture named YDULDBBFKDSWHUBSGO.
'HILQLWLRQ
This data type enables you to generate a data structure that forms a logical unit. Structure
tags consist of various standard data types.
7DVNGHILQLWLRQ
Different states of a valve are to be displayed with the aid of a structure tag.
,PSOHPHQWDWLRQFRQFHSW
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHYDOYHFRQWUROE\PHDQVRIDVWUXFWXUHWDJ
8
1 Define a new structure tag in the &RQWURO&HQWHU. Select 1HZ6WUXFWXUH at 'DWD
7\SHV→6WUXFWXUH7\SHV using 5.
2 In the window that appears, 8 5 1HZ6WUXFWXUH and select 5HQDPH in the pop-up
8
menu that appears. The name YDOYH has been selected in our example. Add a new
structure element by clicking the 1HZHOHPHQW button. Then 5 this new
structure element and select the data type %,7.
6WHS 3URFHGXUHYDOYHFRQWUROE\PHDQVRIDVWUXFWXUHWDJ
3 Using 5HQDPH, change the name to DFWLYDWHG and select the selection field
LQWHUQDOWDJ. Define further structure elements as follows:
4 In Tag Management, create a tag of type YDOYH. In our example, we use the tag
called 678LBYDULDBVWUB. The following ELQDU\WDJV are created in this way.
off. Create a &DFWLRQIRU %XWWRQ, which turns the error bit on and off.
6 Under %XWWRQ, configure a &DFWLRQ under 3URSHUWLHV→*HRPHWU\→3RVLWLRQ
;, which simulates the external processes on the valve.
7 We then create three different pictures to display the on, off, and error states of
the valve. In our example, each of these pictures consists of two polygons created
under 6WDQGDUG2EMHFWV→3RO\JRQ. These are positioned one on top of the other
and shown or hidden depending on the state of the valve.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The structure type name and the comprising structure element types and structure
element names must be adapted.
• &DFWLRQV for simulating the external processes on the valve are not necessary in
practical applications.
6HULDOFRQQHFWLRQWR6
8
You access the solutions that relate to these topics in our
YDULDB project by the EXWWRQ depicted above. The examples are configured in the
picture named YDULDBBFKDSWHUBSGO.
7DVNGHILQLWLRQ
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHVHULDOFRQQHFWLRQWR6
2 Click the name of the driver with the 85, select 1HZ'ULYHU&RQQHFWLRQ and
give the connection a name on the *HQHUDO,QIRUPDWLRQ tab; in our example, we
use 3/&&RQQHFWLRQ. On the *URXSV tab, create a new group; in our example, we
use FRQQHFW.
3 On the 6HULDO5 tab, make the settings you want; in our example, the
standard values are set.
4 In the tag group, create three new tags of type 8QVLJQHGELWYDOXH. The tags
must be assigned an address in the PLC, this being set by means of the 6HOHFW
button. The type of format adaptation selected in our example is
:RUG7R8QVLJQHG:RUG. Tags 8ZBYDULDBFRQB, 8ZBYDULDBFRQB and
7KHRWKHUH[DPSOHVUHODWHGWRWKLVWRSLF
H[DPSOH
which the bit is set is, however, the external data word 8ZBYDULDBFRQB.
H[DPSOH
%LWHGLWLQJLQZRUGV. The tag in which the bit is set is, however, the external data word
8ZBYDULDBFRQB.
H[DPSOH
3LFWXUHFRQILJXUDWLRQ3URMHFWSLFWXBPFS
Assumption
The resolution of the graphics system being used is assumed to be 1024x768 pixels. This
resolution corresponds to the recommendations with regard to ergonomics for a graphics
system with a 17" monitor.
The examples used for these topics are configured in the WinCC project entitled SLFWXB.
1RWH
The password for logging in is the project name, SLFWXBA simpler way to log in is to
click /RJLQ in the title bar, click the input field 3DVVZRUG and then to confirm the input.
6FUHHQOD\RXWDQGFKDQJLQJSLFWXUHV
This chapter should show you a number of different ways of building and opening pictures.
The basic elements (start picture, overview section and buttons section) of the screen layout
are also used in the other projects.
/D\LQJRXWWKHVFUHHQ
7DVNGHILQLWLRQ
,PSOHPHQWDWLRQFRQFHSW
The screen is set to a resolution of 1024x768 pixels. We will divide the screen into three
sections. We will use two different layouts for the three sections.
Layout 1
Overview Area
Plant Representations
Button Area
Layout 2
/D\RXWSULQFLSOH
We use an empty start picture in which we then create 3 picture windows (overview,
buttons, plant). The pictures displayed in these picture windows can be swapped over
during runtime as required. This gives us a solution which is very flexible and simple to
modify.
Overview section
In the overview section, we configure a logo, a picture title, a clock with the date and time,
and an alarm line.
Buttons section
In the buttons section, we configure permanent buttons which will be displayed in every
picture and buttons which will be displayed depending on the plant picture displayed.
Plant section
In the plant section, we configure the respective plant pictures.
3LFWXUHFKDQJH
8
In runtime, you access the examples that relate to these topics in our SLFWXB project by
the button depicted above. The examples are configured in the pictures
SLFWXBBFKDSWHUBSGO and SLFWXBBFKDSWHUBDSGO.
2SHQLQJDSLFWXUHE\PHDQVRIDGLUHFWFRQQHFWLRQDQGGLVSOD\LQJ
WKHSLFWXUHQDPHH[DPSOH
7DVNGHILQLWLRQ
The picture in the picture window is to be changed by clicking a EXWWRQ with the mouse; this
change is to be executed with the aid of a direct connection.
,PSOHPHQWDWLRQFRQFHSW
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHRSHQLQJDSLFWXUHE\PHDQVRIDGLUHFWFRQQHFWLRQDQGGLVSOD\LQJ
WKHSLFWXUHQDPH
picture buildup.
Dynamize the object using a &DFWLRQ7KLV&DFWLRQ returns the current picture
name as the return value. The trigger we use for the &DFWLRQ is the 6WDQGDUG
F\FOH→K (low system load, no change).
Make sure that the symbol view function is selected by means of the EXWWRQ ,
so that a preview of the individual objects is displayed.
6WHS 3URFHGXUHRSHQLQJDSLFWXUHE\PHDQVRIDGLUHFWFRQQHFWLRQDQGGLVSOD\LQJ
WKHSLFWXUHQDPH
4 Configure two more pictures by saving the picture you have just configured once
again, but this time under the name SLFWXBBZLQGRZBSGO, and then saving this
picture under the name SLFWXBBZLQGRZBSGO ()LOH→6DYH$V). This gives us
two copies of SLFWXBBZLQGRZBSGONow insert the content you want into the
new pictures created. There’s no need to change the 6WDWLF7H[W object for
displaying the picture name.
5 Configure a new picture by selecting )LOH→1HZ. In this picture, configure a
picture window under 6PDUW2EMHFWV→3LFWXUH:LQGRZ. In our example, we use
3LFWXUH:LQGRZ. Adjust the size of the SLFWXUHZLQGRZ to the size of the pictures
6WHS 3URFHGXUHRSHQLQJDSLFWXUHE\PHDQVRIDGLUHFWFRQQHFWLRQDQGGLVSOD\LQJ
WKHSLFWXUHQDPH
Under 6RXUFH, select &RQVWDQW and click the now active button to display a
selection list of all the pictures available. Select the SLFWXBBZLQGRZBSGO
picture and under 7DUJHW, select 2EMHFWLQ3LFWXUH, 3LFWXUH:LQGRZ as the object
and 3LFWXUH1DPH as the property.
Accept the settings by clicking the 2. button.
6WHS 3URFHGXUHRSHQLQJDSLFWXUHE\PHDQVRIDGLUHFWFRQQHFWLRQDQGGLVSOD\LQJ
WKHSLFWXUHQDPH
8 Select the now configured %XWWRQ by clicking it with the 8 and duplicate the
object by means of (GLW→'XSOLFDWH. Repeat this procedure once more. We now
have two more buttons, %XWWRQ and %XWWRQ. Under (YHQWV→0RXVH→3UHVV
OHIW, modify the GLUHFWFRQQHFWLRQ configured. Change the 6RXUFH for %XWWRQ to
• In the latter case, read only the picture name out of the picture path and return this name
as the return value.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The object 6WDWLF7H[W can be transferred directly to any other SLFWXUHZLQGRZ. This
object is also suitable for being stored in the project library. In this way, it can quite
simply be inserted into any picture by means of drag&drop.
• The picture name to be displayed and the object name of the SLFWXUHZLQGRZ must be
adapted in the GLUHFWFRQQHFWLRQ for %XWWRQ.
• Pictures, picture contents and SLFWXUHZLQGRZV that are to be displayed must be laid out
as you need them. The height and width of the picture and the SLFWXUHZLQGRZ should
agree.
7DVNGHILQLWLRQ
The picture in the SLFWXUHZLQGRZ is to be changed by clicking a EXWWRQ with the mouse;
configuration of the button is to be performed by means of the '\QDPLF:L]DUG.
,PSOHPHQWDWLRQFRQFHSW
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHRSHQLQJDSLFWXUHE\PHDQVRIWKH'\QDPLF:L]DUG
8
In our example, we use the object called %XWWRQ. With the object selected, select
the 3LFWXUH)XQFWLRQV tab from the '\QDPLF:L]DUG and ' the 3LFWXUH
&KDQJHLQWKH:LQGRZ option. In the '\QDPLF:L]DUG on the page entitled 6HOHFW
WULJJHU, select 5LJKWPRXVHEXWWRQ and choose 1H[W to close the page. Fill in the
6WHS 3URFHGXUHRSHQLQJDSLFWXUHE\PHDQVRIWKH'\QDPLF:L]DUG
Click the EXWWRQ to display a list of the pictures available in the project. Close
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• Adapt the settings in the '\QDPLF:L]DUG to suit your own needs.
7DVNGHILQLWLRQ
The picture in the SLFWXUHZLQGRZ is to be changed by clicking a EXWWRQ with the mouse;
configuration of the EXWWRQ is to be performed by means of a C action.
,PSOHPHQWDWLRQFRQFHSW
8
To implement this control action, we use a button created under :LQGRZV2EMHFWV→
, which we click with the
%XWWRQ to change the picture displayed in the 6PDUW2EMHFWV
→3LFWXUH:LQGRZ. We will use the pictures from the previous example.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHRSHQLQJDSLFWXUHE\PHDQVRILQWHUQDOIXQFWLRQ
EXWWRQV; in our example, we use %XWWRQand %XWWRQ, which are equipped with
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The parameters of the LQWHUQDOIXQFWLRQ6HW3LFWXUH1DPH must be adapted to suit your
own needs.
6LQJOHSLFWXUHFKDQJHE\PHDQVRIWKH'\QDPLF:L]DUG
H[DPSOH
7DVNGHILQLWLRQ
,PSOHPHQWDWLRQFRQFHSW
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHVLQJOHSLFWXUHFKDQJHE\PHDQVRIWKH'\QDPLF:L]DUG
windows are performed there. By using the &DFWLRQ generated by the '\QDPLF
:L]DUG, the entire picture system displayed during runtime is replaced by the one
8
3 With the object selected, select the 3LFWXUH)XQFWLRQV tab from the '\QDPLF
:L]DUG and ' the 6LQJOHSLFWXUHFKDQJH option. In the '\QDPLF:L]DUG on
the page entitled 6HOHFWWULJJHU, select the /HIWPRXVHEXWWRQ list entry and choose
1H[W to close the page. Fill in the 6HWRSWLRQV page as follows:
of the pictures available in the project. Close the )LQLVKHG page by clicking
)LQLVK.
4 If the picture change is performed in the sample project, you can return to the
project by clicking the
button.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• Adapt the settings in the '\QDPLF:L]DUG to suit your own needs.
→
You access this example in our project SLFWXB by clicking the twoEXWWRQV.
7DVNGHILQLWLRQ
In contrast to the previous examples, clicking a EXWWRQ will in this case lead to the entire
picture being changed. This isn’t intended to just change the contents of a picture window; a
new picture is opened.
,PSOHPHQWDWLRQFRQFHSW
GLUHFWFRQQHFWLRQ.
8 to change the picture. The button is configure using a
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHVLQJOHSLFWXUHFKDQJHE\PHDQVRIDGLUHFWFRQQHFWLRQ
6WHS 3URFHGXUHVLQJOHSLFWXUHFKDQJHE\PHDQVRIDGLUHFWFRQQHFWLRQ
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The picture name to be displayed and the object name of the picture window must be
adapted in the GLUHFWFRQQHFWLRQ for %XWWRQ.
2SHQLQJDSLFWXUHE\PHDQVRIWKHREMHFWQDPHDQGDQLQWHUQDO
IXQFWLRQH[DPSOH
→
You access this example in our project SLFWXB by clicking the twoEXWWRQV.
7DVNGHILQLWLRQ
,PSOHPHQWDWLRQFRQFHSW
3LFWXUH:LQGRZ
8 to change the picture displayed in the 6PDUW2EMHFWV→
. We will use the pictures already configured in the previous example. The
names of these pictures comprise two components: a text section and a picture number.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHRSHQLQJDSLFWXUHE\PHDQVRIWKHREMHFWQDPHDQGDQLQWHUQDO
IXQFWLRQ
EXWWRQ and displays the picture you want in accordance with the agreed name
conventions.
3 Duplicate %XWWRQ twice and change the object names to %XWWRQ and %XWWRQ.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The &DFWLRQ for the EXWWRQ and assignment of the object name must be adapted to be in
accordance with your own name conventions. Make sure that these name conventions
are always strictly observed, both in object names and picture names, in order to
guarantee perfect accessing of the picture you want to open.
2SHQLQJDSLFWXUHE\PHDQVRIWKHREMHFWQDPHDQGDWDJ
FRQQHFWLRQZLWKGLVSOD\RIWKHSLFWXUHQDPHH[DPSOH
→
You access this example in our project SLFWXB by clicking the twoEXWWRQV.
7DVNGHILQLWLRQ
,PSOHPHQWDWLRQFRQFHSW
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHRSHQLQJDSLFWXUHE\PHDQVRIWKHREMHFWQDPHDQGDWDJ
FRQQHFWLRQZLWKGLVSOD\RIWKHSLFWXUHQDPH
5 Duplicate %XWWRQB twice and change the object names to %XWWRQB and %XWWRQB.
6 In the picture, configure a static text (6PDUW2EMHFWV→6WDWLF7H[Wabove 3LFWXUH
:LQGRZ; in our example, we use the object 6WDWLF7H[W. Change 3URSHUWLHV→
the 6WDWLF column and create a WDJFRQQHFWLRQ to tag 7[BVHOHFB. Set updating
to take place 8SRQFKDQJH. Deleting the static entry prevents an incorrect text
from being output at the moment of picture buildup.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The&DFWLRQ for the EXWWRQ and assignment of the object name must be adapted to be in
accordance with your own name conventions. Make sure that these name conventions
are always strictly observed, both in object names and picture names, in order to
guarantee perfect accessing of a picture you want to open.
6KXWGRZQ:LQ&&DFFHVVSURWHFWLRQ
8
You access the examples that relate to this topic in our SLFWXB project by the EXWWRQ
depicted above. The examples are configured in the picture named SLFWXBBFKDSWHUBSGO.
7DVNGHILQLWLRQ
Two EXWWRQV are to be used by means of the mouse to select two windows via which either
runtime or the complete system is shut down.
,PSOHPHQWDWLRQFRQFHSW
To implement this control action, we use two buttons created under :LQGRZV2EMHFWV→
%XWWRQ, each of which displays a picture in the 6PDUW2EMHFWV→3LFWXUH:LQGRZ when we
8
click it with the . In the individual pictures, two buttons created under :LQGRZV2EMHFWV
→%XWWRQ are to enable either the corresponding system function to be called or the
procedure to be canceled.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
1 Configure a picture that is to be used to shut down (exit) runtime; in our example,
we use picture SLFWXBBZLQGRZBSGO.
2 In this picture, configure a button under :LQGRZV2EMHFWV→%XWWRQ; in our
8
example, we use %XWWRQ.With the object selected, select the 6\VWHP)XQFWLRQV
tab from the '\QDPLF:L]DUG and ' the ([LW:LQ&&RU:LQGRZV option. In
8
the '\QDPLF:L]DUG on the page entitled 6HOHFWWULJJHU, select /HIWPRXVHEXWWRQ
and 1H[W. On the 6HWRSWLRQV page, select ([LW:LQGRZV. Close the )LQLVKHG
4 Configure another picture that is to be used to shut down the system; in our
example, we use picture SLFWXBBZLQGRZBSGO.
5 In this picture, configure a :LQGRZV2EMHFWV→%XWWRQ. In our example, we use
8
the object called %XWWRQ. With the object selected, select the 6\VWHP)XQFWLRQV
tab from the '\QDPLF:L]DUG and ' the ([LW:LQ&&5XQWLPH option. In the
8
'\QDPLF:L]DUG on the page entitled 6HOHFWWULJJHU, select /HIWPRXVHEXWWRQ and
3LFWXUH:LQGRZ, which, however are tiled. Adjust the size of the SLFWXUH
ZLQGRZV to match the size of the pictures just configured. If the SLFWXUHZLQGRZV
the entire picture can be displayed. Enter the respective picture names under
3URSHUWLHV→0LVFHOODQHRXV→3LFWXUH1DPH. Change 3URSHUWLHV→
Accept the settings by clicking the 2. button. In the same way, create a GLUHFW
FRQQHFWLRQ for %XWWRQ, but set the WDUJHW to 2EMHFWLQ3LFWXUH→3LFWXUH
:LQGRZ→'LVSOD\.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The pictures for shutting down the system and runtime can be applied directly to other
projects.
• The object names in the GLUHFWFRQQHFWLRQV of the SLFWXUHZLQGRZV which make up the
EXWWRQV for calling the picture windows must be changed.
7DVNGHILQLWLRQ
A picture should only be able to be changed by means of two EXWWRQV if the user has the
appropriate authorization.
,PSOHPHQWDWLRQFRQFHSW
To implement this control action, we use two buttons created under :LQGRZV2EMHFWV→
%XWWRQ, each of which displays a picture in the 6PDUW2EMHFWV→3LFWXUH:LQGRZ when we
8
click it with the . The necessary settings for assigning user authorization are to be made
in the 8VHU$GPLQLVWUDWRU editor.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
85
6WHS 3URFHGXUHDFFHVVSURWHFWLRQORJLQE\PHDQVRIDVWDQGDUGER[
2
Click the EXWWRQ to create a new user group and give it a name; in our
8
authorization level &KDQJHSLFWXUH under line 9. This authorization level is
8
assigned to the VHUYLFH group. For this, select the group with . In the table
containing the authorization levels, ' the SLFWXUHFKDQJH line in the (QDEOH
column.
An authorization level assigned to a group or a user is identified by a red dot in
the (QDEOH column.
4
With the VHUYLFH user group selected, click the EXWWRQ and create a new user.
User ZLOOL having the password SLFWXB was used in the example project. The
&RS\JURXSVHWWLQJVDOVR check box is selected in order to transfer the
6WHS 3URFHGXUHDFFHVVSURWHFWLRQORJLQE\PHDQVRIDVWDQGDUGER[
0LVFHOODQHRXV→2SHUDWRU&RQWURO(QDEOH to 1R.
8
8 Selectthe tab labeled 0LVFHOODQHRXV on %XWWRQ for an object selected in the
'\QDPLF:L]DUGand ' 2SHUDEOHLIDXWKRUL]HG. Close the '\QDPLF:L]DUG by
choosing )LQLVK. Apply the same procedure to %XWWRQ.
9 In tag management, create the system tag #&XUUHQW8VHUof type WH[WWDJELW
FKDUDFWHUVHW with a length of 20 characters. This tag is automatically assigned
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The names of the user groups and the users, the logins and the passwords (user levels)
must be adapted.
2SHUDWRU&RQWURO(QDEOHORJLQLQDVHSDUDWHGLDORJER[
H[DPSOH
7DVNGHILQLWLRQ
Runtime should only be able to be exited by means of a EXWWRQ if the user has the
appropriate authorization. A dialog box for logging in is to pop up when a EXWWRQ is clicked.
,PSOHPHQWDWLRQFRQFHSW
For implementation we use two buttons created under :LQGRZV2EMHFWV→%XWWRQ; with the
first button a picture window, created under 6PDUW2EMHFW→3LFWXUH:LQGRZ, is opened for
logging on upon clicking 8 . The second button is to be used to shut down runtime.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
DVHSDUDWHGLDORJER[
1 In the 8VHU$GPLQLVWUDWRU editor, create a new user group and give it a name; in
our example, we use the name XVHU. Under line 10, define a new authorization
level with the name 5XQWLPHHQG (= Exit runtime). This authorization level is
assigned to the XVHU group. Create a user for the group.
User XOULFK having the password SLFWXB was used in the example project.
2 In a picture, configure two buttons under :LQGRZV2EMHFWV→%XWWRQ. In our
example, we use the objects called %XWWRQ and %XWWRQ.
3 Under object %XWWRQ, configure the call for a picture window created under
6PDUW2EMHFWV→3LFWXUH:LQGRZ to be used to exit runtime; in our example, we
use 3LFWXUH:LQGRZ
4 Under 3URSHUWLHV→0LVFHOODQHRXV→8VHUOHYHO, select the authorization level
5XQWLPHHQG for the object %XWWRQ and change 3URSHUWLHV→0LVFHOODQHRXV→
2SHUDWRU&RQWURO(QDEOH to 1R.
in Tag Management.
6 Configure a picture window under 6PDUW2EMHFWV→3LFWXUH:LQGRZ. In our
example, we use the object called 3LFWXUH:LQGRZ. Change 3URSHUWLHV→
*HRPHWU\→:LQGRZ:LGWK to and 3URSHUWLHV→*HRPHWU\→:LQGRZ
DVHSDUDWHGLDORJER[
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The names of the user groups and the users, the logins and the passwords (user levels)
must be adapted.
6KRZLQJDSLFWXUHZLQGRZ
8
You access the examples that relate to this topic in our SLFWXB project by the EXWWRQ
depicted above. The examples are configured in the picture named SLFWXBBFKDSWHUBSGO.
7DVNGHILQLWLRQ
A picture window is to be shown and hidden again by means of two EXWWRQV for clicking.
,PSOHPHQWDWLRQFRQFHSW
To implement this control action, we use two buttons created under :LQGRZV2EMHFWV→
%XWWRQ, to show and hide the picture displayed in the 6PDUW2EMHFWV→3LFWXUH:LQGRZ
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHVKRZLQJDQGKLGLQJIURPRXWVLGHDSLFWXUHZLQGRZ
1 Configure a picture that is to be shown and hidden, e.g. a help text or an info box.
In our example, we use SLFWXBBZLQGRZB, a pure info box without any
additional control elements.
2 In another picture, configure a 6PDUW2EMHFWV→3LFWXUH:LQGRZ with the same
geometric dimensions as the picture created before. In our example, we use
3LFWXUH:LQGRZ Change 3URSHUWLHV→*HRPHWU\→:LQGRZ:LGWK to and
6WHS 3URFHGXUHVKRZLQJDQGKLGLQJIURPRXWVLGHDSLFWXUHZLQGRZ
4 In the same way as for %XWWRQ, configure a direct connection for %XWWRQ under
(YHQWV→0RXVH→3UHVVOHIW. Enter the value as the &RQVWDQW.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The picture name to be displayed and the object name of the SLFWXUHZLQGRZ must be
adapted in the GLUHFWFRQQHFWLRQV for %XWWRQ and %XWWRQ.
• The picture SLFWXBBZLQGRZB can be integrated directly into another project, where
its title and information text are changed.
6KRZLQJIURPRXWVLGHDQGKLGLQJIURPLQVLGHDSLFWXUHZLQGRZ
H[DPSOH
7DVNGHILQLWLRQ
,PSOHPHQWDWLRQFRQFHSW
To implement this control action, we use two buttons created under :LQGRZV2EMHFWV→
%XWWRQ, to show and hide the picture displayed in the 6PDUW2EMHFWV→3LFWXUH:LQGRZ
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHVKRZLQJIURPRXWVLGHDQGKLGLQJIURPLQVLGHWKHSLFWXUHZLQGRZ
1 Configure a picture that is to be shown and hidden, e.g. a help text or an info box.
In our example, we use picture SLFWXBBZLQGRZB, an info box with an
additional button → which will be used to hide the picture. In our example, this is
%XWWRQ.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The picture name to be displayed and the object name of the SLFWXUHZLQGRZ must be
adapted in the GLUHFWFRQQHFWLRQ for %XWWRQ.
• The picture SLFWXBBZLQGRZB can be integrated directly into another project, where
its title and info text are changed. There is no need to make any changes to the GLUHFW
FRQQHFWLRQ under %XWWRQ.
7DVNGHILQLWLRQ
,PSOHPHQWDWLRQFRQFHSW
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHWLPHFRQWUROOHGKLGLQJRIDSLFWXUHZLQGRZ
1 Configure a picture that is to be shown and hidden, e.g. a help text or an info box.
In our example, we use the picture SLFWXBBZLQGRZB, a pure info box without
any additional control elements. To implement time-controlled hiding of the
object called *UDSKLF2EMHFW at 3URSHUWLHV→*HRPHWU\→3RVLWLRQ;,
configure a &DFWLRQ. This &DFWLRQ can be positioned anywhere, since only a
WULJJHU is required. Set VHFRQG as the trigger.
//count time
i++;
//if maximum time is reached
if (i>5) SetVisible("pictu_3_chapter_03.PDL","Picture Window3",0);
return 0;
}
• Declare the static &WDJ. This tag retains its value during the time the picture is open.
• Incrementing of the static &WDJ each time the program is called.
• When it has exceeded the value 5, that is, after 5 seconds if the trigger has been set to 1
second, the SLFWXUHZLQGRZ is hidden.
• The return value is the X position of *UDSKLF2EMHFW, since the &DFWLRQ is attached to
this property and the property itself is not to be changed.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The picture name to be displayed and the object name of the SLFWXUHZLQGRZ must be
adapted in the &DFWLRQ for %XWWRQ.
• The picture SLFWXBBZLQGRZB can be integrated directly into another project, where
its title and info text are changed. The time until the picture is hidden can be defined in
the &DFWLRQ under *UDSKLF2EMHFW either by changing the trigger or by changing the
condition in the LI statement itself.
6KRZLQJDSLFWXUHZLQGRZZKLOHKROGLQJGRZQWKHULJKWPRXVH
EXWWRQH[DPSOH
7DVNGHILQLWLRQ
85
85
A SLFWXUHZLQGRZ is to be shown while the is pressed and held down on a EXWWRQ, and
is to be hidden again when the is released.
,PSOHPHQWDWLRQFRQFHSW
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHVKRZLQJDSLFWXUHZLQGRZZKLOHKROGLQJGRZQWKHULJKWPRXVH
EXWWRQ
1 Configure a picture that is to be shown and hidden, e.g. a help text or an info box.
In our example, we use the picture SLFWXBBZLQGRZB, a pure info box without
any additional control elements.
2 In another picture, configure a 6PDUW2EMHFWV→3LFWXUH:LQGRZ with the same
geometric dimensions as the picture created before. In our example, we use
3LFWXUH:LQGRZ Change 3URSHUWLHV→*HRPHWU\→:LQGRZ:LGWK to and
2. button.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The picture name to be displayed and the object name of the SLFWXUHZLQGRZ must be
adapted in the GLUHFWFRQQHFWLRQV for %XWWRQ.
• The picture SLFWXBBZLQGRZB can be integrated directly into another project, where
its title and information text are changed.
You access this example by 8 the EXWWRQ depicted above. The example is configured in
the picture named SLFWXBBFKDSWHUBDSGO.
7DVNGHILQLWLRQ
An info (instruction) box is to be shown (pop up) if a tag exceeds the value 100; an
emergency box is to be shown if it exceeds 150.
,PSOHPHQWDWLRQFRQFHSW
To implement this control action, we use a slider object created under :LQGRZV2EMHFWV→
6OLGHU2EMHFW to input the tag value and an I/O field created under 6PDUW2EMHFWV→,2
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
8
example, we use the object called ,2)LHOG. With the object selected, select the
3LFWXUH)XQFWLRQV tab from the '\QDPLF:L]DUG and ' the 'LVSOD\
8
,QVWUXFWLRQ%R[ option. In the '\QDPLF:L]DUG on the page entitled 6HOHFW
follows:
fallen below, the static &WDJ ’i’ has been reset to zero.
• If 150 is exceeded, show the emergency box with the&DFWLRQ generated by the '\QDPLF
:L]DUG. If 150 is exceeded, the emergency box is initially shown again; if 150 is fallen
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The tag name in the &DFWLRQ under ,2)LHOG must be adapted.
• The text displayed in the info and emergency boxes must be adapted to suit your own
needs.
You access this example by 8the EXWWRQ depicted above. The example is configured in
the picture named SLFWXBBFKDSWHUBDSGO.
7DVNGHILQLWLRQ
When aEXWWRQ is clicked with the 8 , a dialog box is to be displayed to enable you to enter
a text. The text entered is displayed in the picture.
,PSOHPHQWDWLRQFRQFHSW
7H[W to display the text. An I/O field created under 6PDUW2EMHFWV→,2)LHOG is used to
enter the text in the dialog box, and two buttons created under :LQGRZV2EMHFWV→%XWWRQ
are used apply or cancel the input.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHVKRZLQJDGLDORJER[IRUHQWHULQJWH[W
RQ([LW to <HV. This means that the Return key doesn’t have to be pressed to
ZLQGRZ to match the size of the picture just configured. If the picture window is
6WHS 3URFHGXUHVKRZLQJDGLDORJER[IRUHQWHULQJWH[W
SLFWXBBZLQGRZBSGO.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• Picture SLFWXBBZLQGRZBSGO can be used directly for entering text. The &DFWLRQV
under the EXWWRQV, however, must be adapted to your own tag names.
=RRP
8
You access the examples that relate to this topic in our SLFWXB project by the EXWWRQ
depicted above. The examples are configured in the picture named SLFWXBBFKDSWHUBSGO.
7DVNGHILQLWLRQ
A SLFWXUHZLQGRZis to be shown and hidden again by means of two EXWWRQV for clicking.
When opened, the picture is to be shown small. The size of the picture is to be adjustable by
means of another EXWWRQ.
,PSOHPHQWDWLRQFRQFHSW
To implement this control action, we use two buttons created under :LQGRZV2EMHFWV→
%XWWRQ, to show and hide the picture displayed in the 6PDUW2EMHFWV→3LFWXUH
:LQGRZ when we click one of them with the 8 . Two further buttons created under
:LQGRZV2EMHFWV→%XWWRQ are used to enlarge and reduce the size of the picture.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHFKDQJLQJSLFWXUHJHRPHWU\EHWZHHQWZRVL]HV
1 Configure a picture that is to be shown and hidden. In our example, we use the
picture with the name SLFWXBBFKDSWHUB (the start picture of picture project
SLFWXB.
which has a geometry of 859*698, is adapted to the size of the picture window.
Under 3URSHUWLHV→0LVFHOODQHRXV→3LFWXUH1DPH, select the picture with the
name SLFWXBBFKDSWHUB. Change 3URSHUWLHV→0LVFHOODQHRXV→'LVSOD\ to
1R.
3 In the same picture, configure two more button objects under :LQGRZV2EMHFWV
→%XWWRQ. In our example, these are %XWWRQ and %XWWRQ. Configure a GLUHFW
FRQQHFWLRQ for %XWWRQ under (YHQWV→0RXVH→3UHVVOHIW. Connect the VRXUFH
3UHVVOHIW and configure a &DFWLRQ which reduces the SLFWXUHZLQGRZ, then hides
Accept the settings by clicking the 2. button. Under %XWWRQ, select (YHQWV→
0RXVH→3UHVVOHIW and configure a &DFWLRQ which hides %XWWRQ and %XWWRQ,
6WHS 3URFHGXUHFKDQJLQJSLFWXUHJHRPHWU\EHWZHHQWZRVL]HV
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The object names in the GLUHFWFRQQHFWLRQV under %XWWRQ must be adapted.
• The object names and the picture dimensions to be set must be adapted in the &DFWLRQV
for %XWWRQ, %XWWRQ and %XWWRQ.
H[DPSOH
7DVNGHILQLWLRQ
A SLFWXUHZLQGRZ is to be shown and hidden again by means of two EXWWRQV for clicking. In
addition, the size of the picture is to be made steplessly adjustable by means of a VOLGHU
REMHFW.
,PSOHPHQWDWLRQFRQFHSW
To implement this control action, we use two buttons created under :LQGRZV2EMHFWV→
%XWWRQ, to show and hide the picture displayed in the 6PDUW2EMHFWV→3LFWXUH
:LQGRZ
2EMHFWV
when we click one of them with the 8, and a slider object created under :LQGRZV
→6OLGHU2EMHFW, with which we change the size of the picture.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHFKDQJLQJWKHSLFWXUHJHRPHWU\VWHSOHVVO\
VPRRWK]RRP
1 Configure a picture that is to be shown and hidden. In our example, we use the
picture named SLFWXBBZLQGRZBSGO, whose width:height ratio is 2:1.
2 In another picture, configure a picture window under 6PDUW2EMHFWV→3LFWXUH
:LQGRZ; in our example, we use 3LFWXUH:LQGRZ. Change 3URSHUWLHV→
3 In the same picture, configure two more button objects under :LQGRZV2EMHFWV
→%XWWRQ. In our example, these are %XWWRQ and %XWWRQ. Configure a GLUHFW
FRQQHFWLRQ for %XWWRQ under (YHQWV→0RXVH→3UHVVOHIW. Connect the VRXUFH
8LBSLFWXB]RRPB.
6WHS 3URFHGXUHFKDQJLQJWKHSLFWXUHJHRPHWU\VWHSOHVVO\
VPRRWK]RRP
the picture is opened. Without this initialization, the value of the tag would
remain 0 until the object 6OLGHU2EMHFW is operated for the first time. If the
%XWWRQ object were operated, 3LFWXUH:LQGRZ with the dimensions 0x0 would
be visibly set.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The tag name in the GLUHFWFRQQHFWLRQ under 6OLGHU2EMHFW must be adapted.
• The tag names in the G\QDPLFGLDORJV under 3LFWXUH:LQGRZ must be adapted. The
multiplier must be adapted to the width:height ratio used.
&RQILJXULQJDGMXVWDEOHSLFWXUHJHRPHWU\E\PHDQVRIWKHSURSHUWLHV
GLDORJH[DPSOH
7DVNGHILQLWLRQ
A SLFWXUHZLQGRZ is to be able to be dragged to any size using the mouse. In addition, the
picture is to be able to be moved to any position on the screen. It can be maximized and
hidden by clicking a EXWWRQ.
,PSOHPHQWDWLRQFRQFHSW
To implement this control action, we use two buttons created under :LQGRZV2EMHFWV→
%XWWRQ, to show and hide the picture displayed in the 6PDUW2EMHFWV→3LFWXUH:LQGRZ
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHFRQILJXULQJDGMXVWDEOHSLFWXUHJHRPHWU\E\PHDQVRIWKH
SURSHUWLHVGLDORJ
1 Configure a picture that is to be shown and hidden. In our example, we use the
picture with the name SLFWXBBFKDSWHUB (the start picture of picture project
SLFWXB.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The picture name to be displayed and the object name of the SLFWXUHZLQGRZ must be
adapted in the GLUHFWFRQQHFWLRQV for %XWWRQ and %XWWRQ.
• The picture shown in 3LFWXUH:LQGRZ must be adapted.
2SHUDWRUSDQHOV
8
You access the examples that relate to this topic in our SLFWXB project by the EXWWRQ
depicted above. The examples are configured in the picture named SLFWXBBFKDSWHUBSGO.
7DVNGHILQLWLRQ
,PSOHPHQWDWLRQFRQFHSW
click the button with the8 , and two more EXWWRQV which are used in the operator panel
for performing the switching operation and for closing the panel.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
3 Under the second EXWWRQ, in our example %XWWRQ, configure a &DFWLRQ which
reverses the status of the binary tag %,1LBSLFWXBLQSXWB.
4 In another picture, configure a picture window under 6PDUW2EMHFWV→3LFWXUH
:LQGRZ; in our example, we use 3LFWXUH:LQGRZ. Change 3URSHUWLHV→
+HLJKW to . In order to display the window with a border and make it movable
1R.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The object name of the picture window to be opened must be adapted in the GLUHFW
FRQQHFWLRQ for %XWWRQ.
• The tag name in the &DFWLRQ under %XWWRQ in the operator panel must be adapted.
7DVNGHILQLWLRQ
,PSOHPHQWDWLRQFRQFHSW
8
click the button with the , and three more EXWWRQV which are used in the operator panel
for performing the switching operation and for closing the panel.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
'LVSOD\
+HLJKW to . In order to display the window with a border and make it movable
SLFWXBBZLQGRZB.
to theWDUJHW 2EMHFWLQ3LFWXUH→3LFWXUH:LQGRZ→'LVSOD\.
Accept the settings by clicking the 2. button.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The object name of the picture window to be opened must be adapted in the GLUHFW
FRQQHFWLRQ for %XWWRQ.
• The tag names in the GLUHFWFRQQHFWLRQV under %XWWRQ and %XWWRQ in the operator
panel must be adapted.
7DVNGHILQLWLRQ
,PSOHPHQWDWLRQFRQFHSW
click the button with the8 , and two more EXWWRQVwhich are used in the operator panel for
performing the switching operation and for closing the panel.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHELQDU\VZLWFKLQJRSHUDWLRQZLWKDFNQRZOHGJHPHQW
1 Create two tags of type %LQDU\WDJ in Tag Management. In our example, we use
%,1LBSLFWXBLQSXWB and %,1LBSLFWXBLQSXWB. %,1LBSLFWXBLQSXWB is to
+HLJKW to . In order to display the window with a border and make it movable
SLFWXBBZLQGRZB.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The object name of the SLFWXUHZLQGRZ to be opened must be adapted in the GLUHFW
FRQQHFWLRQ for %XWWRQ.
• The tag names in the GLUHFWFRQQHFWLRQV under %XWWRQ in the operator panel must be
adapted.
• The tag name in the &DFWLRQ under %XWWRQ in the operator panel must be adapted.
7DVNGHILQLWLRQ
,PSOHPHQWDWLRQFRQFHSW
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHDXWRPDWLFLQSXWFKHFN
1 In Tag Management, create a tag of type %LQDU\WDJ, which contains the current
state of the valve. in our example, we use %,1LBSLFWXBLQSXWB.
2 Create two tags of type 8QVLJQHGELWYDOXH. In our example, these are
8LBSLFWXBLQSXWB and 8LBSLFWXBLQSXWB. The first of these two tags
contains the set value for the container fill level, the second the actual value.
3 Configure a picture with three buttons created under :LQGRZV2EMHFWV→%XWWRQ
and one I/O field created under 6PDUW2EMHFWV→,2)LHOG. In our example, we
use %XWWRQ, %XWWRQ and %XWWRQ and the object ,2)LHOG The picture we use
is SLFWXBBZLQGRZBSGO.
4 For object ,2)LHOG, create a WDJFRQQHFWLRQ to tag 8LBSLFWXBLQSXWB under
3URSHUWLHV→2XWSXW,QSXW→2XWSXW9DOXH and set the trigger to 8SRQFKDQJH.
5 We assume the container has a maximum fill level of 40 liters. The,2ILHOG must
therefore only accept inputs between 0 and 40. To set these limits, set 3URSHUWLHV
→/LPLWV→/RZ/LPLW9DOXHWR and 3URSHUWLHV→/LPLWV→+LJK/LPLW9DOXH
WR.
ZLQGRZ to match the size of the picture just configured. If the SLFWXUHZLQGRZ is
6WHS 3URFHGXUHDXWRPDWLFLQSXWFKHFN
if (state==TRUE) {
level1=GetTagWord("U16i_pictu_input_04");
level2=GetTagWord("U16i_pictu_input_05");
level2++;
if (level2>=level1) {
SetTagBit("BINi_pictu_input_06",FALSE);
}//if
if (level2<=level1) {
SetTagWord("U16i_pictu_input_05",level2);
}//if
}//if
return(80);
}
• Reading in the valve state.
• When the valve is opened, the actual and set values of the fill level are read in.
Increment the actual value. When the actual value has reached the set value, close the
valve. Set the tag which contains the actual value.
• The return value is the width of the object.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The tag names and the limits of the ,2ILHOG in picture SLFWXBBZLQGRZB must be
adapted to suit your own needs.
You access this example in our SLFWXB project by 8 the EXWWRQ depicted above. The
example is configured in the picture named SLFWXBBFKDSWHUBDSGO.
7DVNGHILQLWLRQ
,PSOHPHQWDWLRQFRQFHSW
8
click it with the . The amounts of liquid to be filled into the container are entered by
means of three I/O fields created under 6PDUW2EMHFWV→,2)LHOG. In addition, we use two
buttons created under :LQGRZV2EMHFWV→%XWWRQ, one to apply the settings in the,2
ILHOGV, the other to cancel the inputs and close the operator panel.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHHQKDQFHGDXWRPDWLFLQSXWFKHFN
1 In Tag Management, create two tags of type %LQDU\WDJ, which contain the
current states of the valves via which the container is filled. In our example, we
use %,1LBSLFWXBLQSXWB and %,1LBSLFWXBLQSXWB
2 Create four tags of type 8QVLJQHGELWYDOXH; in our example, these are
8LBSLFWXBLQSXWB, 8LBSLFWXBLQSXWB, 8LBSLFWXBLQSXWB, and
8LBSLFWXBLQSXWB. The first two contain the set values for the container fill
in the ,2ILHOGV.
4 Configure a picture with two buttons created under :LQGRZV2EMHFWV→%XWWRQ
and three I/O fields created under 6PDUW2EMHFWV→,2)LHOG. In our example, we
use %XWWRQ and %XWWRQ and ,2)LHOG, ,2)LHOG, and ,2)LHOG. The picture
we use is SLFWXBBZLQGRZBSGO.
5 For ,2)LHOG, create a WDJFRQQHFWLRQ to tag 8LBSLFWXBLQSXWB under
3URSHUWLHV→2XWSXW,QSXW→2XWSXW9DOXH and set the trigger to 8SRQFKDQJH.
’Upon change’.
6WHS 3URFHGXUHHQKDQFHGDXWRPDWLFLQSXWFKHFN
display whether the maximum fill level is exceeded or not. Under 6WDWLF7H[W,
which contains the error message, change 3URSHUWLHV→0LVFHOODQHRXV→
'LVSOD\ to 1R.
ZLQGRZ to match the size of the picture just configured. Under 3URSHUWLHV→
SLFWXBBZLQGRZBSGO.
6WHS 3URFHGXUHHQKDQFHGDXWRPDWLFLQSXWFKHFN
tmp1=GetTagWord("U16i_pictu_input_11");
tmp2=GetTagWord("U16i_pictu_input_12");
if (tmp1>GetTagWord("U16i_pictu_input_07")){
SetTagWord("U16i_pictu_input_07",tmp1);
SetTagBit("BINi_pictu_input_09",TRUE);
}//if
if (tmp2>GetTagWord("U16i_pictu_input_08")){
SetTagWord("U16i_pictu_input_08",tmp2);
SetTagBit("BINi_pictu_input_10",TRUE);
}//if
}
• Reading in the tag values that have been entered in the ,2ILHOGV.
• If the value entered exceeds the current set value, it is transferred to the set value and
the valve is turned on.
a=GetTagWord("U16i_pictu_input_11")+GetTagWord("U16i_pictu_input_12")
;
if (a<=) {
SetOperation("pictu_5_window_15.PDL","Button1",1);
SetVisible("pictu_5_window_15.PDL","Static Text5",0);
SetVisible("pictu_5_window_15.PDL","Static Text6",1);
}//f
else {
SetOperation("pictu_5_window_15.PDL","Button1",0);
SetVisible("pictu_5_window_15.PDL","Static Text5",1);
SetVisible("pictu_5_window_15.PDL","Static Text6",0);
}//if
}
• Reading in the sum of the tag values that have been entered in the,2ILHOGV.
• If the sum of the value entered exceeds the maximum fill level of the container, %XWWRQ
is made inoperable and 6WDWLF7H[W, which contains the error message, is displayed.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The tag names and the limits of the,2ILHOG in picture SLFWXBBZLQGRZB must be
adapted to suit your own needs.
7DVNGHILQLWLRQ
One operator panel is to be able to be displayed by clicking several different EXWWRQV. If the
SLFWXUHZLQGRZ is opened by clicking a EXWWRQ, it can be used to control a valve assigned to
the respective EXWWRQ. The operator window is as a rule displayed next to the EXWWRQ used to
call the window. It can, however, also be anchored at any position.
,PSOHPHQWDWLRQFRQFHSW
2EMHFWV→6WDWXV'LVSOD\.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHPXOWLSOHRSHUDWLRQ
1 In Tag Management, create tags of type %LQDU\WDJ, which contain the current
states of the valves. The number of tags required depends on the number of
valves. In our example, we use tags %,1LBSLFWXBPXOWLB, %,1LBSLFWXBPXOWLB,
%,1LBSLFWXBPXOWLB, and %,1LBSLFWXBLQSXWB.
6WHS 3URFHGXUHPXOWLSOHRSHUDWLRQ
%,1LBSLFWXBPXOWLB and set the trigger in the 8SGDWH list box to 8SRQFKDQJH.
Click the $GG button to add another state. For state , select picture SXWBXSEPS,
and for state , picture SXWBGRZQEPS.
question and returns an appropriate text as the return value. Under 3URSHUWLHV→
&RORUV→)RQW&RORU, create a &DFWLRQ which controls the font color in
ZLQGRZ to match the size of the picture just configured. In the 3URSHUWLHV→
0LVFHOODQHRXV window, change the attributes 0RYDEOH and %RUGHU to <HV. Under
SLFWXBBZLQGRZBSGO.
EXWWRQ and assigns the corresponding tag name to the address tag. Depending on
whether the picture is anchored or not, the picture is either positioned on the right
next to the button that calls it or not.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• Adapt the object and tag names to suit your own needs. Make sure you observe the
name conventions. The button number must be able to be uniquely assigned to the tag
number to be switched.
'\QDPLFV
8
You access the examples that relate to this topic in our SLFWXB project by the EXWWRQ
depicted above. The examples are configured in the picture named SLFWXBBFKDSWHUBSGO.
7DVNGHILQLWLRQ
The color of a text is to change through various colors depending on the value of a tag.
,PSOHPHQWDWLRQFRQFHSW
6WDQGDUG2EMHFWV→6WDWLF7H[W.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHFRORUFKDQJH
Under (YHQWV→3URSHUW\7RSLFV→0LVFHOODQHRXV→3URFHVV'ULYHU
&RQQHFWLRQ, create a GLUHFWFRQQHFWLRQ to tag 6LBSLFWXBG\QB.
to 8SRQFKDQJH.
4 Create a G\QDPLFGLDORJ under 3URSHUWLHV→&RORUV→)RQW&RORU. In the
([SUHVVLRQ)RUPXOD field, set tag 6LBSLFWXBG\QB and set the trigger to 8SRQ
FKDQJH. In the 'DWD7\SH field, select $QDORJ and add 4 value ranges by means of
trigger to 8SRQFKDQJH. In the 'DWD7\SH field, select $QDORJ and add a value
range by means of the $GG button. Set the value ranges as follows.
6WHS 3URFHGXUHFRORUFKDQJH
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The value ranges and tag used in the G\QDPLFGLDORJV must be adapted.
7DVNGHILQLWLRQ
The texts attached to different objects are to be changed automatically depending on the
state of a tag. The tool tip text is likewise to be changed.
,PSOHPHQWDWLRQFRQFHSW
button created under :LQGRZV2EMHFWV→%XWWRQ, to turn a valve on and off. A static text
created under 6WDQGDUG2EMHFWV→6WDWLF7H[W displays whether the valve is on or off.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHWH[WH[FKDQJH
1 Create a tag of type %LQDU\WDJ in Tag Management. In our example, we use the
tag called %,1LBSLFWXBG\QB.
2 Configure a button under :LQGRZV2EMHFWV→%XWWRQ. In our example, we use the
object called %XWWRQ. Under (YHQWV→0RXVH→3UHVVOHIW, generate a &DFWLRQ
which negates the status of the %,1LBSLFWXBG\QB tag.
3 Create a G\QDPLFGLDORJ under 3URSHUWLHV→0LVFHOODQHRXV→7RROWLS7H[W. In
the ([SUHVVLRQ)RUPXOD field, set tag %,1LBSLFWXBG\QB and set the trigger to
8SRQFKDQJH. In the 'DWD7\SH field, select the %RRO option. In the 7RROWLS7H[W
column, enter the text FORVH next to the valid range <HV758( and the text RSHQ
next to 1R)$/6(.
4 Configure an object of type 6WDQGDUG2EMHFWV→6WDWLF7H[W. In our example, we
use the object called 6WDWLF7H[W. Create a G\QDPLFGLDORJ under 3URSHUWLHV→
)RQW→7H[W. In the ([SUHVVLRQ)RUPXOD field, set tag %,1LBSLFWXBG\QB and set
the trigger to 8SRQFKDQJH. In the 'DWD7\SH field, select the %RRO option. In the
7RROWLS7H[W column, enter the text RSHQ next to the valid range <HV758( and
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The texts and tag used in the G\QDPLFGLDORJV must be adapted to suit your own needs.
7DVNGHILQLWLRQ
,PSOHPHQWDWLRQFRQFHSW
To implement this control action, we use a picture window created under 6PDUW2EMHFWV→
3LFWXUH:LQGRZ, whose position we control by means of a tag. We change the value in the
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHDQLPDWLRQRIPRYHPHQW
SLFWXBBFKDSWHUB.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The expressions for calculating the bit position must be adapted in the G\QDPLFGLDORJV
to suit your own needs.
• The tag name must also be adapted.
6KRZLQJDQGKLGLQJREMHFWVE\PHDQVRIELWHYDOXDWLRQ
H[DPSOH
7DVNGHILQLWLRQ
Objects are to be shown and hidden depending on a specific bit position in a tag value.
,PSOHPHQWDWLRQFRQFHSW
We implement this by means of a check box, which we create under :LQGRZV 2EMHFWV →
&KHFN %R[, and we use this check box to set individual bits in a tag. Several polygons
created under 6WDQGDUG 2EMHFWV → 3RO\JRQV are displayed or hidden depending on these
bits.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHVKRZLQJDQGKLGLQJREMHFWVE\PHDQVRIELWHYDOXDWLRQ
trigger to 8SRQFKDQJH. In the 'DWD7\SH field, select the %LW option. Click the
button to call bit selection and select the first bit.
5 Follow the same procedure for the other SRO\JRQREMHFWV and change the bit
number for each one.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The tag names and picture position must be adapted in the G\QDPLFGLDORJV to suit your
own needs.
8
You access the following examples that relate to the Dynamics chapter in our SLFWXB
project by the button depicted above. The examples are configured in the picture named
SLFWXBBFKDSWHUBDSGO.
7DVNGHILQLWLRQ
,PSOHPHQWDWLRQFRQFHSW
To implement this control action, we use a status display created under 6PDUW2EMHFWV→
6WDWXV'LVSOD\ to display two pictures. Two buttons created under :LQGRZV2EMHFWV→
%XWWRQ are used to move this status display in two different directions.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHDQLPDWLRQRIPRYHPHQWE\PHDQVRID&DFWLRQ
1 In Tag Management, create three tags of type %LQDU\WDJ; in our example, we use
tags %,1LBSLFWXBG\QB, %,1LBSLFWXBG\QB and %,1LBSLFWXBG\QB.
2 Create a status display under 6PDUW2EMHFWV→6WDWXV'LVSOD\. In our example,
we use the object called 6WDWXV'LVSOD\. Under &RQILJXUDWLRQ'LDORJ, select
tag %,1LBSLFWXBG\QB and set the trigger to 8SRQFKDQJH. Add another status.
Set picture )HUUDULEPS under state and picture )HUUDULEPS under state by
means of drag&drop.
//forward
if (GetTagBit("BINi_pictu_dyn_07")&&(a<652)) {
a+=20;
SetTagBit("BINi_pictu_dyn_05",(SHORT)!GetTagBit("BINi_pictu_dy
n_05"));
}
//rewind
if (GetTagBit("BINi_pictu_dyn_06")&&(a>-0)) {
a-=10;
SetTagBit("BINi_pictu_dyn_05",(SHORT)!GetTagBit("BINi_pictu_dy
n_05"));
}
//return x-position
return a;
}
• Define a tag of type VWDWLFLQW and initialize it with the current X position of the object.
• Check whether %XWWRQ is clicked and if the X position is greater than 652. If yes,
increase the value that contains the X position by 20. Then change the picture displayed
in 6WDWXV'LVSOD\.
• Check whether %XWWRQ is clicked and if the X position is less than -200. If yes, decrease
the value that contains the X position by 10. Then change the picture displayed in 6WDWXV
'LVSOD\.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The principle of animation can be adopted.
7DVNGHILQLWLRQ
An object is to change its position on the screen when changes are made to a tag. Separate
tags are to be used for the X and Y positions. Configuration is to be implemented using the
'\QDPLF:L]DUG.
,PSOHPHQWDWLRQFRQFHSW
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHFUHDWHDQLPDWLRQRIPRYHPHQWE\PHDQVRIDZL]DUG
8
&LUFOH. With the object selected, select the 6WDQGDUG'\QDPLFV tab from the
'\QDPLF:L]DUG and ' the 0RYH2EMHFW option. Select 7DJ as the trigger. On
the 6HWRSWLRQV page, select tag 6LBSLFWXBG\QB for the X direction and tag
6LBSLFWXBG\QB for the Y direction. Enter and as the low and high
limits for formatting, respectively. On the next page, specify the picture area
within which the object is to be moved. Close the Finished ! page by clicking
)LQLVK.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The settings made in the '\QDPLF:L]DUG for animation of the movement must be
adapted to suit your own needs.
7DVNGHILQLWLRQ
The color of an object is to change smoothly from a dark to a light shade as a tag value
changes.
,PSOHPHQWDWLRQFRQFHSW
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUH
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The color values are coded by specifying values for red, green and blue. 8 bits are
reserved for each of these values in the 24-bit color value. In our example, the tag has
been shifted 8 bits to the left and therefore represents the green value. If this isn’t done,
the color will change from black to red; if the tag is shifted 16 bits, from black to blue.
7DVNGHILQLWLRQ
,PSOHPHQWDWLRQFRQFHSW
To implement this control action, we use a status display created under 6PDUW2EMHFWV→
6WDWXV'LVSOD\, in which we display different pictures one after the other after turning on
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHDQLPDWLRQRIPRYHPHQWE\PHDQVRIDVWDWXVGLVSOD\
1 Create a tag of type %LQDU\WDJ in Tag Management. In our example, we use the
tag called %,1LBSLFWXBG\QB.
2 Create a status display under 6PDUW2EMHFWV→6WDWXV'LVSOD\. in our example,
we use the object called 6WDWXV'LVSOD\. Under &RQILJXUDWLRQ'LDORJ, select
tag %,1LBSLFWXBG\QB and set the trigger to 8SRQFKDQJH. Add another status.
Set picture 6PLOLEPS under state and picture &RROEPS under state .
3 For 6WDWXV'LVSOD\, create a &DFWLRQXQGHU (YHQWV→0RXVH→3UHVVOHIW,
which negates the state of tag %,1LBSLFWXBG\QB.
4 Configure another status display under 6PDUW2EMHFWV→6WDWXV'LVSOD\; in our
example, we use 6WDWXV'LVSOD\. Under 3URSHUWLHV→6WDWH→&XUUHQW6WDWXV,
configure seven more statuses with the respective pictures. For each status,
change the %DVLF3LFWXUH7UDQVSDUHQW&RORU attribute to :KLWH and the %DVLF
3LFWXUH7UDQVSDUHQW&RORU2Q to <HV. Statuses through are each assigned one
if (GetTagBit("BINi_pictu_dyn_09")) {
if (b==0) a++;
else a--;
if (a==7) b=1;
if (a==0) b=0;
}
return a;
}
• Declare two tags of type VWDWLFLQW and initialize them with zero.
• When animation is activated, run through tags 0 through 7 and then begin at 0 again.
• Return this tag as the return value.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The principle of animation can be adopted.
• 6WDWXV'LVSOD\ can be integrated into other projects in the form of a switch object if the
status pictures and the tag name are adapted.
/DQJXDJHVZLWFK
8
You access the examples that relate to this topic in our SLFWXB project by the EXWWRQ
depicted above. The examples are configured in the picture named SLFWXBBFKDSWHUBSGO.
7DVNGHILQLWLRQ
The runtime language is to be able to be changed by means of one button for each language
set.
,PSOHPHQWDWLRQFRQFHSW
To implement this control action, we use three buttons, which we can take ready-configured
from the library when creating them under :LQGRZV2EMHFWV→%XWWRQ.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHFKDQJHUXQWLPHODQJXDJH
8
/LEUDU\→%XWWRQV/DQJXDJH subfolder and drag the EXWWRQV you require to the
3UHVVOHIW, which executes the language change to the language in question. The
8
DFWLRQ required. To do this, select the EXWWRQ to be used for the additional
language and then ' the /DQJXDJH6ZLWFK option in the 6\VWHP)XQFWLRQV tab
of the '\QDPLF:L]DUG. You can then select the language you want in the
'\QDPLF:L]DUG.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• Carry out the desired language settings in the '\QDPLF:L]DUG.
'LDORJER[IRUFKDQJLQJWKHUXQWLPHDQG&RQWURO&HQWHUODQJXDJH
H[DPSOH
7DVNGHILQLWLRQ
A EXWWRQ is to be created, which when clicked calls a dialog box in which one of the
languages set can be selected.
,PSOHPHQWDWLRQFRQFHSW
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHGLDORJER[IRUFKDQJLQJWKHUXQWLPHDQG&RQWURO&HQWHU
ODQJXDJH
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• Picture SLFWXBBZLQGRZBSGO can be integrated directly into another project without
any changes.
:RUNLQJZLWKRXWDPRXVH
8
You access the examples that relate to this topic in our SLFWXB project by the EXWWRQ
depicted above. The examples are configured in the pictures SLFWXBBFKDSWHUBSGO,
SLFWXBBFKDSWHUBDSGOand SLFWXBBFKDSWHUBESGO.
7DVNGHILQLWLRQ
,PSOHPHQWDWLRQFRQFHSW
To implement these control actions, we use four buttons created under :LQGRZV2EMHFWV→
%XWWRQ. They are used to display the dialog boxes. They can be operated on the keyboard
when the runtime cursor is activated. Select the EXWWRQ you want to operate with the TAB
key. Further, a hot key is assigned to every button.
Three picture windows created under 6PDUW2EMHFWV→3LFWXUH:LQGRZ are used to display
the dialog boxes.
&RQILJXULQJFXUVRUFRQWURO
8
6WHS 3URFHGXUHFRQILJXULQJFXUVRUFRQWURO
examples.
To switch between 7DE2UGHU$OSKD&XUVRU, set 6+,)7$, and set 6+,)75 for
turning the runtime cursor on and off.
3 Do not set any keys in the segment &XUVRUFRQWURONH\V. If they are required in
6WHS 3URFHGXUHFRQILJXULQJFXUVRUFRQWURO
the examples, they are set by means of an API function. This is performed
because several control concepts are shown in the examples. Normally, a certain
control concept is selected for a project and set here.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHFRQILJXULQJFRQWUROE\PHDQVRIKRWNH\V
settings performed.
Further, configure static text under 6WDQGDUG2EMHFWV→6WDWLF7H[W, the font
attributes of which have been set in the dialog boxes. In our example, we use the
object called 6WDWLF7H[W.
3 Configure another picture, which will be used as a dialog box for setting colors.
In our example, we use the picture named SLFWXBBZLQGRZBSGO.
In this picture, configure a :LQGRZV2EMHFWV→2SWLRQ*URXS. In our example,
we use the object called 2SWLRQ*URXS. 3URSHUWLHV→*HRPHWU\→1XPEHURI
)LHOGV is set to . This means it is possible to select four different colors.
&DFWLRQ which changes the color of the lettering as a function of the value of the
invisible.
%XWWRQis used as the (6&EXWWRQ. At (YHQW→0RXVH→0RXVH&OLFN, create a
6WHS 3URFHGXUHFRQILJXULQJFRQWUROE\PHDQVRIKRWNH\V
6WHS 3URFHGXUHFRQILJXULQJFRQWUROE\PHDQVRIKRWNH\V
The EXWWRQ is further provided with a hot key. In our example, this is the function
key ).
8 Configure a picture which is to be used as a dialog box for creating different font
attributes. In our example, we use the picture named SLFWXBBZLQGRZBSGO.
In this picture, configure a :LQGRZV2EMHFWV→&KHFN%R[. In our example, we
use the object called &KHFN%R[. 3URSHUWLHV→*HRPHWU\→1XPEHURI)LHOGV is
set to . It should be possible to choose the attributes EROG, LWDOLF, XQGHUVFRUH and
ERUGHU.
6WHS 3URFHGXUHFRQILJXULQJFRQWUROE\PHDQVRIKRWNH\V
the dialog box to the currently set values. Further, the 3LFWXUH:LQGRZ object is
displayed.
The EXWWRQ is further provided with a hot key. In our example, this is the function
key ).
11 Configure a further picture which is to be used as a dialog box for setting the font
sizeSmart-Objekt. In our example, we use the picture named
SLFWXBBZLQGRZBSGO.
displayed. This color is set in the JUDSKLFREMHFW as the picture transparent color
at 3URSHUW\→3LFWXUH→3LFWXUH7UDQVSDUHQW&RORU. Further, the SURSHUW\→
3LFWXUH→3LFWXUH7UDQVSDUHQW&RORU2Q has to be set to<HV. The bitmap used is
displayed below.
6WHS 3URFHGXUHFRQILJXULQJFRQWUROE\PHDQVRIKRWNH\V
The EXWWRQV are operated solely by means of the (17(5 and (6& hot keys. If,
however, (17(5is pressed, the value entered in the ,2ILHOG is applied to tag
8LBSLFWXBFXUVRUB simultaneously.
The EXWWRQ is further provided with a hot key. In our example, this is the function
key ).
15 At object %XWWRQ, create a &DFWLRQ that resets the settable properties of the
object called 6WDWLF7H[W to the presettings. The EXWWRQ is provided with hot key
).
bFirst=TRUE;
return 100;
}
• The first time the function is triggered, the focus is set to its own object. The &DFWLRQ is
called once per hour. The focus is set only once, however.
• This &DFWLRQ is located at the 3URSHUW\→*HRPHWU\→3RVLWLRQ; of object 2SWLRQ
*URXS in the picture called SLFWXBBZLQGRZBSGO It is executed once every hour.
PDLRTSetCursorKeys(255,255,255,255,0,0,NULL, (LPVOID)1,NULL);
}
• Selection of the picture called SLFWXBBFKDSWHUBSGO applies a cursor setting by means
of API-function 3'/576HW&XUVRU.H\V. The first four parameters of the function
contain the key codes for the keys required for up and down, and for left and right
movements.
• In the present example, the WIN key for all four directions of movement is selected in
order to disable cursor movement by means of the keyboard. Movement of the runtime
cursor is therefore allowed only by means of the TAB in the set TAB order.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• If you are working with a number of windows, you must define in the &RQWURO&HQWHU a
key combination for switching between these windows. In the present example, the
control concept was chosen, however, so that switching from one dialog box to another
is neither possible nor necessary on the keyboard.
• The key combinations and hot keys used must be adapted to suit your own needs.
• The present control concept has been designed so that no specific arrow keys are used to
move the runtime cursor but simply TAB. However, the arrow keys are used by default
to operate option groups and check boxes.
8
The present example is obtained in the picture called SLFWXBBFKDSWHUBSGO using the key
combination &75/: or by choosing the top button with . It is configured in the
picture with the name SLFWXBBFKDSWHUBDSGO.
7DVNGHILQLWLRQ
Text has to be entered using the arrow keys on a keyboard projected in a picture. The
different characters have to be selected with the arrow keys.
It shall be possible to set cursor behavior at runtime in a dialog box. It shall be possible to
open the dialog box by operating a hot key.
,PSOHPHQWDWLRQFRQFHSW
A ready-made keyboard from the library is used for the implementation. It is personalized.
A picture window created at 6PDUW2EMHFWV→3LFWXUH:LQGRZ is used to display the dialog
box. A button created at :LQGRZV2EMHFW→%XWWRQ provided with a hot key is used to
display the dialog box. TheEXWWRQ itself is not displayed at runtime, however.
,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
6WHS 3URFHGXUHLPSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
1 In tag management, create two tags of the 8QVLJQHGELWYDOXH type for storing
cursor behavior. In the example we use the tags 8LBSLFWXBFXUVRUB and
8LBSLFWXBFXUVRUB.
4 Performing settings for cursor control. With the exception of the keyboard keys,
all the objects have to be removed from the TAB order. The order does not have
to be set since operation is intended to be performed with the arrow keys rather
than the TAB key.
The arrow keys for cursor control are set in a &DFWLRQ at (YHQWV→
0LVFHOODQHRXV→2SHQ3LFWXUH.
8
5 It should be possible to set the cursor behavior in a dialog box.
This will normally already have been performed in the &RQWURO&HQWHU. Use 5
8
to open the shortcut menu at the item &RPSXWHU and select 3URSHUWLHV. In the
&RPSXWHUOLVWSURSHUWLHV dialog box that appears, the 3URSHUWLHV button. Then
select the *UDSKLFV5XQWLPH tab. You can choose between three different settings
in the &XUVRUFRQWUROEHKDYLRU box.
6WHS 3URFHGXUHLPSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
6 Create a new picture to be used as a dialog box. In our example, we use the
picture named SLFWXBBZLQGRZBSGO.
Configure three status displays at 6PDUW2EMHFWV→6WDWXV'LVSOD\V in this
picture. In our example these are the objects called 6WDWXV'LVSOD\, 6WDWXV
'LVSOD\ and 6WDWXV'LVSOD\. The &RQILJXUDWLRQGLDORJER[ is used to set for
every VWDWXVGLVSOD\ one bitmap which displays the pressed state of a button, and
one bitmap which displays the non-pressed state of a button. 6WDWH is intended
to display the pressed button, while VWDWH is intended to display the non-pressed
state.
At 3URSHUWLHV→6WDWH→&XUUHQW6WDWXV, create in each case a G\QDPLFGLDORJ
ER[ that control the current status of tag 8LBSLFWXBFXUVRUB. This tag contains
values are:
• 0...Normal
• 1...Normal without roll-back
• 10...Extended
7 In the same picture, configure two button objects under :LQGRZV2EMHFWV→
%XWWRQ. In our example, we use the objects called %XWWRQ and %XWWRQ.
behavior. Following that, the cursor behavior is changed using the API function
3'/576HW&XUVRU.H\V. The value stored in the 8LBSLFWXBFXUVRUBtag
corresponds to the numerical value demanded by the function for specific cursor
behavior. Further, the focus is set to the $EXWWRQ and the separate window is
switched to become invisible.
%XWWRQis used as the (6&EXWWRQ. At (YHQWV→0RXVH→0RXVH$FWLRQ, create a
&DFWLRQ that sets the focus to the $EXWWRQ and hides its own window..
6WHS 3URFHGXUHLPSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
At object %XWWRQ, create a &DFWLRQ which writes the value for the currently set
cursor behavior to the 8LBSLFWXBFXUVRUB tag and makes the 3LFWXUH:LQGRZ
object visible.
The EXWWRQ is further provided with a hot key. In our example this is the key
combination &75/(. The 3URSHUWLHV→0LVFHOODQHRXV→'LVSOD\ settings are
set to 1R. This means the button itself is not visible but the configured hot key is
effective.
might be used.
• To design the object for mouse operation too, a further &DFWLRQ has to be created at the
Mouse Click event - without key code query, however.
//close window
SetVisible("pictu_3_chapter_08a.PDL","Picture Window1", FALSE);
}
• Load the DLL containing the 3'/576HW&XUVRU.H\V function.
• The selected cursor behavior is stored in the 8LBSLFWXBFXUVRUB tag.
• Perform the cursor setting with the AP function 3'/576HW&XUVRU.H\V. The first four
parameters of the function contain the key codes for the keys required for up and down,
and for left and right movements. The sixth parameter transfers the required cursor
behavior to the function. This is already contained, in properly coded form, in the
8LBSLFWXBFXUVRUB tag.
• The focus is again set to the $EXWWRQ of the keyboard and the dialog box is closed.
• Upon the event Open Picture, the function called 3'/576HW&XUVRU.H\V is called and
the cursor behavior is set to normal. Loading of the DLL is already performed at this
time. It does not have to be reloaded. This is mentioned again for the sake of
completeness, however.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The key combinations and hot keys used must be adapted to suit your own needs.
• Two other keyboards are available in the library. These are a keyboard for entering
numerals and one for numbers and characters. They are in the same way as the keyboard
used in this example.
8
The present example is obtained in the picture called SLFWXBBFKDSWHUBDSGO using the
key combination &75/: or by choosing the top button with . It is configured in the
picture with the name SLFWXBBFKDSWHUBESGO.
7DVNGHILQLWLRQ
Various control actions are to be performed in a plant picture without using a mouse.
Values are to be input and a number of switching operations performed.
,PSOHPHQWDWLRQFRQFHSW
I/O fields created under 6PDUW2EMHFWV→,2)LHOG, and valves are to be able to be turned
on and off.
,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
6WHS 3URFHGXUHLPSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
1 In tag management, create six tags of the VLJQHGELWYDOXH type for performing
and storing inputs. In our example we use the tags 6LBSLFWXBFXUVRUB to
6LBSLFWXBFXUVRUB.
6WHS 3URFHGXUHLPSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
7 With the exception of the EXWWRQV provided with hot keys, all the other objects are
removed from the TAB order.
Set the order of selection of the ,2ILHOGV with the TAB key by choosing (GLW→
7$%2UGHU→$OSKD&XUVRU→2UGHU from the menu.
8
8 In the &RQWURO&HQWHU, set a key combination for fore toggling between the Tab
Orders and the alpha cursor. 5 &RPSXWHU to call the shortcut menu and choose
8
6WHS 3URFHGXUHLPSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
6+,)75.
1RWH
You can exit the example just described by choosing the following button or by pressing
(6&.
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The key combinations and hot keys used must be adapted to suit your own needs.
• Only the red-colored control elements are provided with functions. The other elements
do not have functions. The whole picture represents a diagram of operator panel 6LPDWLF
23.
6KRZLQJDQGKLGLQJLQIRUPDWLRQ
8
You access the examples that relate to this topic in our SLFWXB project by the EXWWRQ
depicted above. The examples are configured in the picture named SLFWXBBFKDSWHUBSGO.
In many plant pictures, it sometimes makes sense if certain items of information are not
constantly displayed in the picture, but can be shown when required or when specific events
occur.
7DVNGHILQLWLRQ
Certain objects or object groups in a picture are to be able to be hidden by the user.
,PSOHPHQWDWLRQFRQFHSW
To implement this control action, we use a picture in which several valves are displayed.
Each valve is assigned a button created under :LQGRZV2EMHFWV→%XWWRQ which is used to
control the valve, a static text created under 6WDQGDUG2EMHFWV→6WDWLF7H[W with the name
of the valve, and a group object which displays the state of the valve. In addition, the
picture also depicts containers whose fill levels are displayed by means of I/O fields created
under 6PDUW2EMHFWV→,2)LHOG. All I/O fields, all buttons and all static texts can be
shown and hidden by clicking the corresponding one of the buttons created for this purpose
under :LQGRZV2EMHFWV→%XWWRQ.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHVKRZLQJDQGKLGLQJREMHFWV
1 In Tag Management, create three tags of type %LQDU\WDJ, which control the
visibility of the various object groups. In our example, we use
%,1LBSLFWXBLQIRB, %,1LBSLFWXBLQIRB, and %,1LBSLFWXBLQIRB.
2 In Tag Management, create further tags of type %LQDU\WDJ, which contain the
current states of the valves. The number of tags required depends on the number
of valves. In our example, we use %,1LBSLFWXBLQIRB through
%,1LBSLFWXBPXOWLB; we have, then, configured a total of 11 valves.
3 To display the valves in their open state, configure an object under 6WDQGDUG
2EMHFWV→3RO\JRQ, which has the shape of a valve. Under 3URSHUWLHV→&RORUV
6WHS 3URFHGXUHVKRZLQJDQGKLGLQJREMHFWV
7 Position the closed valve over the second UHFWDQJOH and position it in the
foreground. Then position the JURXSREMHFW generated under Step 6 over this and
position it in the foreground. Now group these three objects. This new JURXS
REMHFW can then be copied to enable you to configure the remaining valves
tag value.
9 Configure a static text for each valve under 6WDQGDUG2EMHFWV→6WDWLF7H[W,
which contains the name of the valve.
10 Configure a number of containers whose fill levels are displayed by means of I/O
fields created under 6PDUW2EMHFWV→,2)LHOG.
11 Configure three objects under :LQGRZV2EMHFWV→%XWWRQ. In our example, we
use the objects called %XWWRQ, %XWWRQ, and %XWWRQ. For %XWWRQ, create a &
DFWLRQ under (YHQWV→0RXVH→3UHVVOHIW, which negates the value of tag
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The basic method of showing and hiding objects can be adopted.
• The method of displaying the valves can be adopted directly.
7DVNGHILQLWLRQ
,PSOHPHQWDWLRQFRQFHSW
We implement this by means of an OLE Control object which we create under 6PDUW
2EMHFWV→2/(&RQWURO and which is used to display an OCX object. We also use two
static texts created under 6WDQGDUG2EMHFWV→6WDWLF7H[W to display the date and the time.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHGLVSOD\LQJWKHGDWHDQGWLPH
generates a time display which you now only have to adjust to the size and type
of display you want.
2 Configure an object of type 6WDQGDUG2EMHFWV→6WDWLF7H[W. In our example, we
use the object called 6WDWLF7H[W. Create a &DFWLRQ under 3URSHUWLHV→)RQW→
7H[W, which reads out the current computer or system time and returns this as the
time(&timer);
ptm=localtime(&timer);
p=SysMalloc(9);
sprintf(p,"%02d:%02d:%02d",ptm->tm_hour,ptm->tm_min,ptm->tm_sec);
return(p);
}
• WLPH WLPHU returns the current system time in seconds.
• ORFDOWLPH WLPHU returns a pointer to the system time structure.
• 6\V0DOORF reserves a memory area.
• VSULQWI generates a text consisting of a static segment and several numerical segments.
time(&timer);
ptm=localtime(&timer);
p=SysMalloc(9);
sprintf(p,"%02d:%02d:%02d",ptm->tm_mday,ptm->tm_mon,ptm->tm_year);
return(p);
}
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The 6PDUW2EMHFWV→2/(&RQWURO can be directly applied.
• The &DFWLRQV at 6WDQGDUG2EMHFWV→6WDWLF7H[W can be directly applied.
&RQILJXULQJPHVVDJHV
8
You access the examples that relate to this topic in our SLFWXB project by the EXWWRQ
depicted above. The examples are configured in the picture named SLFWXBBFKDSWHUBSGO.
7DVNGHILQLWLRQ
Specific messages are to be output depending on the tag state. These messages are to be
output depending on changes of state in bits and limit violations. In addition, automatic
picture changes are to be enabled in the event of an error.
All messages are to be displayed in a message picture. In an overview picture, messages are
to be displayed selectively.
,PSOHPHQWDWLRQFRQFHSW
To implement this control action, we use two application windows created under 6PDUW
2EMHFWV→$SSOLFDWLRQ:LQGRZ, in which we display the message pictures. In addition, we
also use three slider objects created under :LQGRZV2EMHFWV→6OLGHU2EMHFW and a check
box created under :LQGRZV2EMHFWV→&KHFN%R[, with which we enter values and
simulate error messages.
,PSOHPHQWLQJLQWKH:LQ&&SURMHFW
6WHS 3URFHGXUHFRQILJXULQJPHVVDJHV
8
4 Open the $ODUP/RJJLQJ editor in the &RQWURO&HQWHU by clicking it with the
5.
5 Select menu item )LOH→6WDUW0HVVDJH:L]DUG and close the first page of the
6WHS 3URFHGXUHFRQILJXULQJPHVVDJHV
they are and close the page by clicking 1H[W. On the page entitled &UHDWLQJD
/LQH, leave the settings as they are and close the page by clicking 1H[W. On the
page entitled 0HVVDJH:LQGRZV, leave the settings as they are and close the page
by clicking 1H[W. On the page entitled 3UHVHWWLQJ&ODVVHV, leave the settings as
they are and close the page by clicking 1H[W. On the page entitled &KRRVLQJ
$UFKLYHV, select the 6KRUW7HUP$UFKLYH)RU0HVVDJHV and close the page by
6WHS 3URFHGXUHFRQILJXULQJPHVVDJHV
tab, select 'LVSOD\6WDWXV%DU, set %RWWRP in the $OLJQPHQW section, and under
(OHPHQWV2I7KH6WDWXV%DU, select 'DWH and 7LPH. In the 7RROEDU tab, select
but deselect the &LW\&DOOIXQFWLRQV check box. Close the window by clicking 2..
10 Define messages in the table window. To do this, 8 5 the 1XPEHU column and
click $SSHQG1HZ/LQH. Enter (UURU in the &ODVV column and $ODUP in the 7\SH
column. In the (YHQWWDJ column, select tag 8LBSLFWXBPHVVDJHB and under
(YHQWELW, set the bit number . Enter EUHDNGRZQ as the PHVVDJHWH[W and SXPS
as the ORFDWLRQ. Configure further messages in the same way, using (UURU and
:DUQLQJ also as message types. These are all generated by individual bits of the
We use the following color scheme for the message type )DLOXUH:
We use the following color scheme for the message type :DUQLQJ:
:LQGRZ.
2 In the picture in which the VOLGHUREMHFWV and the FKHFNER[HV are also configured,
configure a picture window (6PDUW2EMHFWV→3LFWXUH:LQGRZ). In our example,
we use 3LFWXUH:LQGRZ and set SLFWXBBZLQGRZBSGO as the picture name.
3 To implement a /RRSLQ$ODUP, create a SURMHFWIXQFWLRQ in the *OREDO6FULSW
editor, which uses the name of the picture in which the error has arisen as the
transfer parameter. In our sample project, this is the function
$ODUP3LFWXUH&KDQJH. The $ODUP/RJJLQJ editor uses the 2SHQ3LFWXUH function
by default.
8
4 Create three alarm lines which react, for example, to a limit value inquiry. In our
example, these are messages through . ' in the /RRSLQ$ODUP column and
set the picture name. The picture set is the one in which the corresponding tag,
whose limit value is monitored, is displayedThe function$ODUP3LFWXUH&KDQJH
is selected as the function name at 3URMHFWIXQFWLRQ. If a relevant error now arises
during runtime, you can click the button (’Short-Term Archive’) in the
toolbar of the message window to execute a picture change in the picture.
8
example, we use the template 2YHUYLHZPHVVDJH. Select 0HVVDJHZLQGRZ
WHPSODWHV, 5 it, and then click 1HZ. In the *HQHUDO,QIRUPDWLRQ tab, enter
the window name and the window title. In our example, we have chosen
2YHUYLHZPHVVDJH as the window name and DODUPV as the window title. Select
right. This means that only messages of type $ODUP are displayed in the overview
window.
6WHS 3URFHGXUHFRQILJXULQJDPHVVDJHZLQGRZLQWKHRYHUYLHZVHFWLRQ
In
the 0HVVDJH/LQH tab, set the format entitled 0HVVDJHOLQHH[DPSOH. The
3DUDPHWHUV, 6WDWXV%DU and 7RROEDU tabs can be applied unchanged.
can be displayed.
3 In the overview picture, configure a button object under :LQGRZV2EMHFWV→
%XWWRQ. In our example, we use the object called %XWWRQ. For this button, create a
1RWHVRQJHQHUDOXVH
The following adaptations must be made before this button can be put to general use:
• The tag names and message texts must be adapted.
• The color coding of the message types must be adapted to suit your own needs.
$GGLWLRQDO)XQFWLRQVLQ:LQ&&3URMHFW
H[DPSOHBPFS
This project presents examples to the 7DJ/RJJLQJ, $ODUP/RJJLQJ and 5HSRUW'HVLJQHU
editors.
The examples to this subject are configured in the H[DPSOHB WinCC project.
7DJ/RJJLQJ
8
In runtime, the examples can be selected by clicking on the button displayed above with the
. The examples are configured in the pictures H[BBFKDSWHUB3'/ to
H[BBFKDSWHUBI3'/.
*HQHUDO,QIRUPDWLRQ
7DJ/RJJLQJ contains functions for the transfer of data from external and internal WinCC
tags. This data can be archived in several ways. In runtime, the data can be displayed in
trend or table form.
6LPXODWLRQRI3URFHVV9DOXHV
For the simulation of process values that are archived by 7DJ/RJJLQJ in the example
project, a project-internal simulator is available. This simulator is activated by clicking on
the corresponding button on the toolbar.
The simulator enables you to supply three distinct internal tags with sinus wave profiles. An
additional tag is supplied with the sum of the individual tag values. The profiles of the tag
values are displayed in a small trend window.
Below the trend window are three lines consisting of input and output elements. Each of the
lines corresponds to a trend profile.
The first I/O field allows you to change the amplitude of a trend. The second I/O field sets
the frequency of the trend in oscillations per minute. Check boxes allow you to stop each
trend simulation. The last I/O field displays the current trend amplitude.
The tags *BH[BWOJB,*BH[BWOJB and *BH[BWOJB are supplied with values. The
tag *LBH[BWOJB is supplied with the sum of these three tags. If the simulator is
deactivated, all tag values will be set to zero again.
7DVN'HILQLWLRQ
,PSOHPHQWDWLRQ&RQFHSW
To archive the displayed data, create a cyclic-continuous process value archive in the 7DJ
/RJJLQJ editor.
&UHDWLRQRID3URFHVV9DOXH$UFKLYH
6WHS 3URFHGXUH&UHDWLRQRID3URFHVV9DOXH$UFKLYH
On the third page, set the tags to be archived via the button. In the
example, the tags *BH[BWOJB,*BH[BWOJB and *BH[BWOJB were
6WHS 3URFHGXUH&UHDWLRQRID3URFHVV9DOXH$UFKLYH
8
4 The right window will display the entry of the newly created archive. Open the
properties dialog box of the archive by 5 on this entry.
archiving when the system is started and no separate function is needed to enable
the archive. The data itself can be used by any user and is not subject to special
access protection.
No special action is executed while the archive starts. A special action, for
example, could inform you about the status of an archive.
6WHS 3URFHGXUH&UHDWLRQRID3URFHVV9DOXH$UFKLYH
DUFKLYH that is, executed automatically whenever the short-term archive is full. In
With these settings, 1000 data records are archived to the hard drive. Once this
maximum number of data records has been reached, the oldest archive entries are
replaced by the new ones.
8 In the $UFKLYH7DJ tab, the basic properties of the tag can be set. The process tag
has already been set in the Wizard. You can assign a unique name as the 1DPHRI
WKH$UFKLYH7DJ, in the example, the name of the corresponding process tag is
6WHS 3URFHGXUH&UHDWLRQRID3URFHVV9DOXH$UFKLYH
used.
In the 6XSSO\LQJ7DJV box, 6\VWHP has been selected and the $UFKLYLQJDW6\VWHP
6WDUW has been HQDEOHG. &\FOLF&RQWLQXRXV has been set as the $UFKLYLQJ7\SH.
These settings define that the acquisition of data is started together with the
system and performed in constant time cycles until the system is shut down.
Additionally, the archived value is not to written to any tag.
6WHS 3URFHGXUH&UHDWLRQRID3URFHVV9DOXH$UFKLYH
10 In the 'LVSOD\ tab, the transfer range of the tag into the archive is set. In the
example, 1R'LVSOD\/LPLWDWLRQ is set.
11 In the (YHQWV tab, the example uses no action in the '\QDPLF box to change the
archiving cycle.
12 The settings made have to be incorporated into the two other archive tags. To do
so, carry out step 7 to 11 for each of the two archive tags.
1RWH
The presettings made by the Archive Wizard for the process value archive and the archive
tags can be changed via $UFKLYHV→3UHVHWWLQJV→3URFHVV$UFKLYH and $UFKLYHV→
3UHVHWWLQJV→$QDORJ7DJ.
7UHQG'LVSOD\&RQILJXUDWLRQ
8
6WHS 3URFHGXUH7UHQG'LVSOD\&RQILJXUDWLRQ
6WHS 3URFHGXUH7UHQG'LVSOD\&RQILJXUDWLRQ
4
The button allows you to add two additional trends. The names of these
trends are displayed in the &KRRVH2EMHFW box.
6WHS 3URFHGXUH7UHQG'LVSOD\&RQILJXUDWLRQ
6 In the 7DJ tab, the archive tag displayed by the trend is selected. In the example,
the *BH[BWOJB tag from the =.B3URFHVV9DOXH$UFKLYHB archive is used.
7 In the ;$[LV tab, the properties of the time axis are set.
Enter 7LPH as the /DEHO of the axis.
Select the 8SGDWH check-box from the 6FDOLQJ box. This determines that the trend
6WHS 3URFHGXUH7UHQG'LVSOD\&RQILJXUDWLRQ
is displayed dynamically. The end time of the trend display corresponds to the
archiving time of the last archived data record. Newly collected tag values are
immediately incorporated into the display.
Select the 7LPH5DQJH check-box and the 0LQXWH entry from the list-box. No
changes are needed for the date of the )URP range. These settings determine that,
in runtime, the endpoint of the displayed time range is always one minute in
addition to the current time.
If the 7LPH5DQJH check-box is not selected, the displayed time range is
determined by the time difference resulting from the IURP and WR dates. However,
this is only the case if the 8SGDWH check-box has been selected.
6WHS 3URFHGXUH7UHQG'LVSOD\&RQILJXUDWLRQ
9 For this example, filling out the &RORU/LPLW9DOXHV tab is not necessary. The
setting options of this tab are described in the example $UFKLYLQJLI9DOXHLV
([FHHGHGH[BBFKDSWHUBE3'/ in the table 7UHQG'LVSOD\&RQILJXUDWLRQ.
10 Carry out step 5 to 8 for the two other trends. Since shared X and Y axes have
been selected, the corresponding tabs do not have to be filled out, again.
However, the 7UHQG'LVSOD\ property is an exception to this.
The trend color, as well as the archive tag to be displayed, must be changed
correspondingly.
Apply the settings made by clicking on 2. and save the changes made in the 7DJ
/RJJLQJ editor via )LOH→6DYH.
1RWH
In the example project, the password protected online configuration, configured in step 3,
can be accessed via the login name FRQWUROOHU and the password 7DJ/RJJLQJ. A new user
logging in is only recognized by 7DJ/RJJLQJ after a new picture has been selected. The
procedures for setting up a new user and new authorization levels are explained in the
corresponding chapters of the manual 6KXWGRZQ:LQ&&DFFHVVSURWHFWLRQ.
The "Login" dialog box is opened via the [Ctrl+O] key combination. This key combination
can be set in the +RW.H\V tab of the project’s properties dialog box.
,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
If this is not the case, select the "Computer" entry in the &RQWURO&HQWHU via a 8
and open the &RPSXWHU3URSHUWLHV6WDUWXS7DE by clicking on the button
from the dialog’s toolbar. Click on the button to open the
&RPSXWHU3URSHUWLHV dialog box. In the 6WDUWXS tab, select the 7DJ/RJJLQJ
5XQWLPH check-box.
1RWH
In runtime, the ruler window will be displayed just below the configured DSSOLFDWLRQ
ZLQGRZ. The lower left corner of the DSSOLFDWLRQZLQGRZ will correspond to the upper left
corner of the ruler window. The width of these two windows is identical.
*HQHUDO$SSOLFDWLRQ1RWHV
7DVN'HILQLWLRQ
,PSOHPHQWDWLRQ&RQFHSW
To archive the data to be displayed, a cyclic-selective process value archive is created in the
7DJ/RJJLQJ editor.
To control the archive, a project function is needed that starts and stops the archiving
process.
&UHDWLRQRID3URFHVV9DOXH$UFKLYH
6WHS 3URFHGXUH&UHDWLRQRID3URFHVV9DOXH$UFKLYH
as well as a 6WRS(YHQW, in the (YHQWV tab. In the example, the project function
=6B3$B6WDUW is set as the 6WDUW(YHQW.
In the &\FOH field, enter PV as the $FTXLVLWLRQ cycle and
PV as the
$UFKLYLQJ cycle. Accept the presettings for the remaining settings.
if (GetTagBit("BINi_ex_tlg_00"))
return TRUE;
else return FALSE;
}
• The function supplies the value TRUE or FALSE depending on the status of the internal
tag %,1LBH[BWOJB.
• This function is called by 7DJ/RJJLQJ for every archiving cycle. It determines, via the
return value, if archiving takes place or not (TRUE = archive).
7UHQG'LVSOD\&RQILJXUDWLRQ
6WHS 3URFHGXUH7UHQG'LVSOD\&RQILJXUDWLRQ
As the &RORU, the example uses the background color of the picture (RGB Value
231/207/199). Accept the presettings for the remaining settings.
3 No inputs need to be made in the 2SHUDWRU$XWKRUL]DWLRQ field.
4
The button allows you to add two additional trends. The trends will then be
displayed in the &KRRVH2EMHFW window.
Select the first trend.
In the *HQHUDO,QIRUPDWLRQ tab, 7UHQG is displayed as the 1DPHRIWKH7UHQG. In
the 'LVSOD\ field, select the 'LVSOD\7UHQG and 'LVSOD\7UHQGV6WDJJHUHG check-
boxes. This determines that a separate graph is drawn for each trend. The
presettings can be accepted for the remaining settings.
In the 7DJ tab, the *BH[BWOJB archive tag from the
=6B3URFHVV9DOXH$UFKLYHB archive is selected.
,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
1 In Tag Management, two internal tags of the %LQDU\7DJ type are created. In the
example, the %,1LBH[BWOJB and %,1LBH[BWOJB tags are used.
2 Creation of a new picture, in the example, this is the H[BBFKDSWHUBD3'/.
In this picture, a 6PDUW2EMHFW→$SSOLFDWLRQ:LQGRZ is configured. Select 7DJ
/RJJLQJ as the window content and the =6B3$B7UHQGWHPSODWHB trend window
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
tag to .
4 Configure a second 6PDUW2EMHFW→6WDWXV'LVSOD\ following the procedure
described in step 3. In the example, this is the 6WDWXV'LVSOD\ object. It will
control the archiving process.
The object is connected to the %,1LBH[BWOJB tag and uses the $UFKLYHEPS /
$UFKLYHLQYEPS bitmaps.
5 To be able to navigate in the archive while the update is stopped, replicas of the
four navigation buttons of the standard toolbar are required.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
Perform the same steps for %XWWRQ using the %,1LBH[BWOJB tag.
1RWH
The implementation of the buttons for time selection and print preview are explained in
greater detail in the 5HSRUW'HVLJQHU chapter, example 3ULQW2XWWKH7UHQG:LQGRZ
LQ5XQWLPHH[BBFKDSWHUBD3'/.
TlgTrendWindowPressStartStopButton("ZS_PA_Trendtemplate_00");
SetTagBit("BINi_ex_tlg_06",(SHORT)!GetTagBit("BINi_ex_tlg_06"));
}
• Calling the standard function 7OJ7UHQG:LQGRZ3UHVV6WDUW6WRS%XWWRQ has the same effect
as clicking on the 6WRS*R%XWWRQ of the standard toolbar. The transfer parameter
indicates the name of the template to which the function call is referring to.
• Toggles the %,1LBH[BWOJB tag to save the current status of the template.
C-Action at Button4
#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char*
lpszPropertyName)
{
TlgTrendWindowPressFirstButton("ZS_PA_Trendtemplate_00");
}
• Calling this standard function has the same effect as clicking on the )LUVW'DWD5HFRUG
button of the standard toolbar. The functions used at the other buttons are:
• 7OJ7UHQG:LQGRZ3UHVV3UHY%XWWRQ
• 7OJ7UHQG:LQGRZ3UHVV1H[W%XWWRQ
• 7OJ7UHQG:LQGRZ3UHVV/DVW%XWWRQ
1RWH
For each button of the standard toolbar there exists a corresponding standard function,
which simulates the activation of that button. A detailed description of all functions can be
found in the manual of the *OREDO6FULSW editor.
*HQHUDO$SSOLFDWLRQ1RWHV
7DVN'HILQLWLRQ
A process value is to be stored once in the archive at the time of exceeding a set limit value.
The stored values are to be displayed in a table. The progress of the process value is to be
displayed as a trend.
The table content should only be displayed if the user has the appropriate authorization
level. The option of entering values directly into the table should also be authorization
protected. The "System Login" dialog box should be accessible by a button. The example
uses FRQWUROOHU and XVHU as the user names, and WDJORJJLQJ as the password.
The toolbar and status must first be created in the *UDSKLFV'HVLJQHU. The status bar should
contain the name of the currently logged in user.
,PSOHPHQWDWLRQ&RQFHSW
To archive the displayed data, create an acyclic process value archive in the 7DJ/RJJLQJ
editor.
To implement the graphical display, two DSSOLFDWLRQZLQGRZV are used. One displays the
trend and the other the table window. The WUHQGZLQGRZWHPSODWH and the WDEOHZLQGRZ
WHPSODWH to be displayed are created in the 7DJ/RJJLQJ editor.
:LQGRZV2EMHFWV→%XWWRQ.
To control the archive, a project function is created. This function triggers the archiving if
the process value exceeds a set limit value.
&UHDWLRQRID3URFHVV9DOXH$UFKLYH
6WHS 3URFHGXUH&UHDWLRQRID3URFHVV9DOXH$UFKLYH
1 Create a new 3URFHVV9DOXH$UFKLYH with the archive wizard. In the example, the
archive was named $=B3URFHVV9DOXH$UFKLYHB.
The tag to be archived was *LBH[BWOJB. In the example project, this tag is
supplied with the sum of the three sinus wave profiles by the simulator.
2 In the properties dialog box of the process value archive, set the size of the
archive to data records. As DXWKRUL]DWLRQOHYHO for read and write access, set
two levels which must first be created in the 8VHU$GPLQLVWUDWRU editor.
#define TAG_LIMIT 55
value = GetTagDouble("G64i_ex_tlg_04");
if (value<=TAG_LIMIT) overflow=FALSE;
if ((value>TAG_LIMIT)&&(overflow==FALSE))
{
state=!state;
overflow=TRUE;
}
return state;
}
• The tag to be archived is read. In an LI structure, the value overflow flag RYHUIORZ is
reset, if the tag value is below the limit value.
• If the value is exceeded and the previous function call did not detect a value overflow,
the status of the return value will be negated and the value overflow flag RYHUIORZ be
set.
• This function is automatically invoked by 7DJ/RJJLQJ. Archiving is performed if WKH
UHWXUQYDOXHVWDWXVRIWKHIXQFWLRQGLIIHUVIURPWKHSUHYLRXVFDOO (on the other hand,
7DEOH'LVSOD\&RQILJXUDWLRQ
8
6WHS 3URFHGXUH7DEOH'LVSOD\&RQILJXUDWLRQ
As the &RORU, the example uses the background color of the picture (RGB Value
231/207/199). Accept the presettings for the remaining settings.
6WHS 3URFHGXUH7DEOH'LVSOD\&RQILJXUDWLRQ
7UHQG'LVSOD\&RQILJXUDWLRQ
6WHS 3URFHGXUH7UHQG'LVSOD\&RQILJXUDWLRQ
As the &RORU, the example uses the background color of the picture (RGB Value
231/207/199). Accept the presettings for the remaining settings.
4 No inputs need to be made in the 2SHUDWRU$XWKRUL]DWLRQ field.
5 In the *HQHUDO,QIRUPDWLRQ tab, 7UHQG is displayed as the 1DPHRIWKH7UHQG. In
the 'LVSOD\ field, select the 'LVSOD\WUHQG check-box. Choose blue as the color of
the trend.
In the 7DJ tab, the *LBH[BWOJB archive tag from the
=.B3URFHVV9DOXH$UFKLYHB archive is selected.
LQWHUSRODWHGWUHQG. This display type allows you to better emphasize areas, where
value overflows have occurred. Accept the presettings for the remaining settings.
In the &RORU/LPLW9DOXHV tab, set as the upper limit value. Select the color red.
This will display in red all parts of the trend which have exceeded the value of
55. Accept the presettings for the remaining settings.
6WHS 3URFHGXUH7UHQG'LVSOD\&RQILJXUDWLRQ
6 Click on 2. to apply all the settings made. Save the changes made in the 7DJ
/RJJLQJ editor via )LOH→6DYH.
,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
1 In Tag Management, two internal tags of the %LQDU\7DJ type are created. In the
example, the %,1LBH[BWOJB and %,1LBH[BWOJB tags are used. Additionally, the
#&XUUHQW8VHU tag of the type 7H[W7DJ%LW&KDUDFWHU6HW, with a length of
characters, is required. This tag is automatically supplied with the current user
name by the system.
2 Creation of a new picture, in the example, this is the H[BBFKDSWHUBE3'/.
In this picture, a 6PDUW2EMHFW→$SSOLFDWLRQ:LQGRZ is configured. In the
example, this is the $SSOLFDWLRQ:LQGRZ object. Select 7DJ/RJJLQJ as the
window content and the $=B3$B7DEOHWHPSODWH as the 7HPSODWH.
3 To control the update, a 6PDUW2EMHFW→6WDWXV'LVSOD\ is configured. In the
example, this is the 6WDWXV'LVSOD\ object.
Via the &RQILJXUDWLRQ'LDORJ%R[, this object is connected to the %,1LBH[BWOJB
tag and triggered upon change. The states and are created and assigned to the
corresponding pictures. In the example, the bitmaps VWRSWOJEPS and VWRSJR
WOJEPS are used.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
the update of the table window is always initiated at the selection of the picture.
This is realized by a &$FWLRQ at (YHQWV→0LVFHOODQHRXV→2SHQ3LFWXUH of the
H[BBFKDSWHUBE3'/ picture object, which sets the status of the tag to .
The status of the %,1LBH[BWOJB tag should always be zero at the opening of the
picture, since the editability of the table windows is always turned off at the
selection of the picture. This is realized by expanding the &$FWLRQ at (YHQWV→
0LVFHOODQHRXV→2SHQ3LFWXUH of the H[BBFKDSWHUBE3'/ picture object.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
%XWWRQ object. This button accesses the 6\VWHP/RJLQ dialog box. To do so,
create a &$FWLRQ at (YHQWV→0RXVH→3UHVV/HIW, which calls the required API
function.
1RWH
The usage and changing of data is password protected. In the example project, access to the
archive data is gained via the login name XVHU and the password WDJORJJLQJ. Via the login
name FRQWUROOHU and the password WDJORJJLQJ, changes to the data can also be made.
The procedures for setting up a new user and new authorization levels are explained in the
corresponding chapters of the configuration manual.
TlgTableWindowPressEditRecordButton("AZ_PA_Tabletemplate");
SetTagBit("BINi_ex_tlg_07",(SHORT)!GetTagBit("BINi_ex_tlg_07"));
}
• Calling the standard function 7OJ7UHQG:LQGRZ3UHVV(GLW%XWWRQ has the same effect as
clicking on the (GLW%XWWRQ of the standard toolbar. The transfer parameter indicates the
name of the template to which the function call is referring to.
• Toggles the %,1LBH[BWOJB tag to save the current status of the edit function.
C-Action at Button4
#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char*
lpszPropertyName)
{
TlgTableWindowPressFirstButton("AZ_PA_Tabletemplate");
}
• Calling this standard function has the same effect as clicking on the )LUVW'DWD5HFRUG
button of the standard toolbar. The functions used at the other buttons are:
• 7OJ7UHQG:LQGRZ3UHVV3UHY%XWWRQ
• 7OJ7UHQG:LQGRZ3UHVV1H[W%XWWRQ
• 7OJ7UHQG:LQGRZ3UHVV/DVW%XWWRQ
• 7OJ7DEOH:LQGRZ3UHVV2SHQ'OJ%XWWRQ
• 7OJ7DEOH:LQGRZ3UHVV2SHQ7LPH6HOHFW'OJ%XWWRQ
• 7OJ7DEOH:LQGRZ3UHVV6WDUW6WRS%XWWRQ
C-Action at Button5
#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char*
lpszPropertyName)
{
PWRTLogin(1);
}
• Integration of the DLL which contains the API function 3:57/RJLQ.
• Call of the API function for opening the 6\VWHP/RJLQ dialog box.
*HQHUDO$SSOLFDWLRQ1RWHV
7DVN'HILQLWLRQ
A process value is to be acquired cyclically and its mean, maximum and minimum values
are to be generated every 10 seconds. These values are to be stored in the configured
archive.
The stored values are to be displayed in a table. This table is created in the *UDSKLFV
'HVLJQHU editor. A table has to be created in the Graphics Designer if the standard tools of
,PSOHPHQWDWLRQ&RQFHSW
To archive the data, create a cyclic-continuous process value archive in the 7DJ/RJJLQJ
editor.
To implement the graphical display, each line of the table uses, depending on the type of
data to be displayed, either a 6WDQGDUG2EMHFW→6WDWLF7H[W or a 6PDUW2EMHFW→,2)LHOG
.
The data is read from the database table of the appropriate archive via API functions.
&UHDWLRQRID3URFHVV9DOXH$UFKLYH
6WHS 3URFHGXUH&UHDWLRQRID3URFHVV9DOXH$UFKLYH
*LBH[BWOJB tags. The archived values are to be written into these tags (in
addition).
2 Create a new 3URFHVV9DOXH$UFKLYH with the archive wizard. In the example, the
archive was named =.B3URFHVV9DOXH$UFKLYHB.
As the archiving tag, the *LBH[BWOJB tag was selected three times.
3 In the properties dialog box of the process value archive, set the size of the
archive to data records. Accept the presettings for the remaining settings.
4 In the *HQHUDO,QIRUPDWLRQ tab of the first process tag’s properties dialog box,
enter 0D[LPXP9DOXH as the 1DPHRIWKH$UFKLYH7DJ. In the $OVRSXWDUFKLYHG
YDOXHLQWDJ field, select the *LBH[BWOJB tag. This tag allows you to react to
check-box. This causes the selected tag to be acquired every 500ms and be
archived every 10s. The largest value is archived that occurred during the 10s
period.
6WHS 3URFHGXUH&UHDWLRQRID3URFHVV9DOXH$UFKLYH
,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
1 In Tag Management, two internal tags of the %LQDU\7DJ type are created. In the
example, these are the %,1LBH[BWOJB and )/$*B7DEOH*HW2XWSXW9DOXH tags.
2 Create a project function which instructs 7DJ/RJJLQJ to transfer data from the
archive to another function (callback function). This function is called once for
each data record and receives information about that data record in the form of a
special structure type. The transferred data is stored in a static array of this
structure type.
In the example, the (QXPHUDWH6XSHU$UFKLYH'DWD and *HW$UFKLYH'DWD&DOOEDFN
functions are used.
This example uses two external C tags.
• extern int dwSize
• extern WORD wOffset
These tags must be set up while the project is started. To do so, a separate project
function is used. The call of this function is integrated into the &$FWLRQ at (YHQWV
→0LVFHOODQHRXV→2SHQ3LFWXUH of the H[BBVWDUWSLFWXUHB3'/ start picture.
In the example, this function is named &UHDWH([WHUQDO.
3 Creation of a new picture, in the example, this is the H[BBFKDSWHUBE3'/.
The user defined table should be able to display 10 lines. To display data in the
first column, 10 (one for each line) 6WDQGDUG2EMHFWV→6WDWLF7H[WV are used,
which display the time and date. For the additional columns, 6PDUW2EMHFWV→
,2)LHOGV are used.
As object names in the first column, use 6WDWLF7H[W to 6WDWLF7H[W, where the
number defines the line. The numbering is from bottom to top, since the last line
contains the most current data.
The ,2)LHOGV use code numbers as their name. The first digit indicates the
column number, the following digit the line number.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
archive has received new data and this data has been read.
Corresponding to that, create a &$FWLRQ for each ,2)LHOG at 3URSHUWLHV→
2XWSXW,QSXW→2XWSXW9DOXH. This function also has the task to read the data
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
time(&Time);
TimeStruct = localtime(&Time);
sysTo.wYear = (WORD)(TimeStruct->tm_year+1900);
sysTo.wMonth = (WORD)(TimeStruct->tm_mon+1);
sysTo.wDay = (WORD)(TimeStruct->tm_mday);
sysTo.wHour = (WORD)(TimeStruct->tm_hour);
sysTo.wMinute = (WORD)(TimeStruct->tm_min);
sysTo.wSecond = (WORD)(TimeStruct->tm_sec);
sysFrom.wYear = 1997;
sysFrom.wMonth = 1;
sysFrom.wDay = 1;
sysFrom.wHour = 0;
sysFrom.wMinute = 0;
sysFrom.wSecond = 0;
Call(&GAD,(PVOID)0);
return FALSE;
}
else {
fRet=TLGGetArchiveData(lpszArchiveName,lpszVarName1,
sysFrom,sysTo,GetArchiveDataCallback,
(PVOID)1,0,&Error);
if (fRet==FALSE)
printf("Error: %s\r\n",Error.szErrorText);
fRet=TLGGetArchiveData(lpszArchiveName,lpszVarName2,
sysFrom,sysTo,GetArchiveDataCallback,
(PVOID)2,0,&Error);
if (fRet==FALSE)
printf("Error: %s\r\n",Error.szErrorText);
fRet=TLGGetArchiveData(lpszArchiveName,lpszVarName3,
sysFrom,sysTo,GetArchiveDataCallback,
(PVOID)3,0,&Error);
if (fRet==FALSE)
printf("Error: %s\r\n",Error.szErrorText);
Call(&GAD,(PVOID)4);
dwSize=GAD.dwFlags;
TLGDisconnect( NULL );
return TRUE;
}
}
• Definition of the values for the start and end time, between which the data is to be read
from the archive. A fixed time is set for the start time and the current system time for
the end time.
• Initialization of the callback function via the help function &DOO. This function calls the
*HW$UFKLYH'DWD&DOOEDFN function, which sets a value of 0 for the OS8VHU parameter.
Callback Function
BOOL GetArchiveDataCallback (PTLG_GETARCHIVEDATA lpGAD, PVOID
lpUser)
{
static int i1 = 0;
static int i2 = 0;
static int i3 = 0;
WORD wRecordNumber;
WORD wColumnNumber;
int User;
User=(int)lpUser;
if ((User==1)||(User==2)||(User==3))
{
switch(User)
{
case 1 : if (i1<=100) {GAD1[i1]=*lpGAD; i1++;} break;
case 2 : if (i2<=100) {GAD2[i2]=*lpGAD; i2++;} break;
case 3 : if (i3<=100) {GAD3[i3]=*lpGAD; i3++;} break;
}//switch
}//if ((User==1)||(User==2)||(User==3))
if (User==0)
{
i1=0;
i2=0;
i3=0;
memset(&GAD1[0],0,sizeof(TLG_GETARCHIVEDATA)*100);
memset(&GAD2[0],0,sizeof(TLG_GETARCHIVEDATA)*100);
memset(&GAD3[0],0,sizeof(TLG_GETARCHIVEDATA)*100);
}//if (User==0)
if (User==4)
{
lpGAD->dwFlags=i1;
}//if (User==4)
if (User==7)
{
wRecordNumber=lpGAD->stTime.wMonth;
wColumnNumber=lpGAD->stTime.wDay;
switch(wColumnNumber)
{
case 0 : lpGAD->stTime.wYear = GAD1[wRecordNumber].stTime.wYear;
lpGAD->stTime.wMonth = GAD1[wRecordNumber].stTime.wMonth;
lpGAD->stTime.wDay = GAD1[wRecordNumber].stTime.wDay;
lpGAD->stTime.wHour = GAD1[wRecordNumber].stTime.wHour;
lpGAD->stTime.wMinute =
GAD1[wRecordNumber].stTime.wMinute;
lpGAD->stTime.wSecond =
GAD1[wRecordNumber].stTime.wSecond;
break;
case 1 : lpGAD->doValue=GAD1[wRecordNumber].doValue;
break;
case 2 : lpGAD->doValue=GAD2[wRecordNumber].doValue;
break;
case 3 : lpGAD->doValue=GAD3[wRecordNumber].doValue;
break;
default : break;
}//switch
}//if (User==7)
return TRUE;
}
• Declaration of three static counter variables: i1, i2 and i3.
• Declaration of three static arrays consisting of structures of the type
TLG_GETARCHIVEDATA. The archive values are stored in these arrays.
• If the transfer parameter OS8VHU contains the value 1, 2 or 3, the function has been called
by Tag Logging. In this case, the transferred structure OS*$' will be stored in the
corresponding archive.
• If the transfer parameter OS8VHU contains the value 0, an initialization run has been
performed. The counter variables are then set to 0 and space is reserved for the arrays.
• If the transfer parameter OS8VHU contains the value 4, the number of stored values is
requested. This number is then stored in the transferred structure as the structure
member GZ)ODJV.
• If the transfer parameter OS8VHU contains the value 7, the stored tag value of an ,2)LHOG
or 6WDWLF7H[W object is requested. From which position of the table the tag is requested,
is determined by the transferred structure via the VW7LPHZ0RQWK and VW7LPHZ'D\
structure members.
int nRecordNumber;
WORD wColumnNumber;
extern WORD wOffset;
char szObject[5];
TLG_GETARCHIVEDATA GAD;
PVOID lpUser7 = 7;
char szTime[20] = "";
int nObjectNumber;
extern DWORD dwSize;
wColumnNumber=0;
nObjectNumber=atoi(lpszObjectName+15);
nRecordNumber=(dwSize-nObjectNumber-wOffset);
GAD.stTime.wMonth=(WORD)nRecordNumber;
GAD.stTime.wDay=wColumnNumber;
GetArchiveDataCallback(&GAD,lpUser7);
sprintf(szTime,"%02d.%02d.%d
%02d:%02d:%02d",GAD.stTime.wDay,GAD.stTime.wMonth,GAD.stTime.wYear,G
AD.stTime.wHour,GAD.stTime.wMinute,GAD.stTime.wSecond);
return szTime;
}
• The VW7LPHZ0RQWK and VW7LPHZ'D\ structure members of the *$' structure to be
transferred are supplied with the column number or calculated data record number. The
object name contains information about the data record number.
• The *HW$UFKLYH'DWD&DOOEDFN function is called with a OS8VHU transfer parameter value
of 7, i.e. a value is requested.
• The date value of the transferred structure *$' is stored in the VW7LPH structure
member. From this, the text to be displayed is formed. The text is returned to the
property via UHWXUQ.
extern dwSize;
int nRecordNumber;
WORD wColumnNumber;
extern WORD wOffset;
char szObject[5];
TLG_GETARCHIVEDATA GAD;
PVOID lpUser = 7;
strcpy(szObject,"");
sprintf(szObject,"%c",lpszObjectName[0]);
wColumnNumber=(WORD)atoi(szObject);
nRecordNumber=(dwSize-atoi(lpszObjectName+1)-wOffset);
if (nRecordNumber<0) return 0;
GAD.stTime.wMonth=(WORD)nRecordNumber;
GAD.stTime.wDay=wColumnNumber;
GetArchiveDataCallback(&GAD,lpUser);
return GAD.doValue;
}
• The column and line numbers are determined from the object name. The VW7LPHZ0RQWK
and VW7LPHZ'D\ structure members of the *$' structure to be transferred are supplied
with the column number or calculated data record number.
• The *HW$UFKLYH'DWD&DOOEDFN function is called with a OS8VHU transfer parameter value
of 7, i.e. a value is requested.
• The tag value of the transferred structure *$' is stored in the GR9DOXH structure
member and is used as a return value.
1RWH
The toolbar contains the button to set the parameters of the table. This button accesses
a dialog box that allows you to set the colors of the various table elements. A short
description on this topic can be found in the example 'LDORJ%R[HVIRU6HWWLQJ&RORUV
H[BBFKDSWHUBF.
*HQHUDO$SSOLFDWLRQ1RWHV
7DVN'HILQLWLRQ
8
The switching operations of three motors are to be stored in an archive. If a motor is
selected via , a table containing the switching operations for a time period of one day
will be displayed. Only one table can be shown at a time.
,PSOHPHQWDWLRQ&RQFHSW
To archive the data to be displayed, create a cyclic-continuous process value archive for
three binary tags in the 7DJ/RJJLQJ editor. Create a separate table window template for
each tag.
To realize the graphical display, a 6PDUW2EMHFW→3LFWXUH:LQGRZ is used, which displays
a different picture depending on the selected motor. Each of the pictures contains a 6PDUW
2EMHFW→$SSOLFDWLRQ:LQGRZ, which will display the table window template.
&UHDWLRQRID3URFHVV9DOXH$UFKLYH
6WHS 3URFHGXUH&UHDWLRQRID3URFHVV9DOXH$UFKLYH
1 Creation of four tags in "Tag Management". In the example, these are the
%,1LBH[BWOJBP,%,1LBH[BWOJBP and %,1LBH[BWOJBP tags of the %LQDU\7DJ
enter 0RWRU2II for 6WDWH and 0RWRU2Q for 6WDWH. In the &\FOH field, set the
$UFKLYLQJ to
PV.
6WHS 3URFHGXUH&UHDWLRQRID3URFHVV9DOXH$UFKLYH
7DEOH'LVSOD\&RQILJXUDWLRQ
6WHS 3URFHGXUH7DEOH'LVSOD\&RQILJXUDWLRQ
6WHS 3URFHGXUH7DEOH'LVSOD\&RQILJXUDWLRQ
settings made.
5 Table templates must also be created for the two other archive tags. Follow the
previous configuration steps. The only difference lies in the selection of the tags.
The example uses the names =.B3$B7DEOHWHPSODWHBE and
=.B3$B7DEOHWHPSODWHBF for the other templates.
,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
1 A separate picture must be created for each table template. In the example, these
are the H[BBDSSOLFDWLRQB, H[BBDSSOLFDWLRQB and H[BBDSSOLFDWLRQB
pictures.
Each of these pictures contains a 6PDUW2EMHFW→$SSOLFDWLRQ:LQGRZ. For each
of these objects, 7DJ/RJJLQJ is set as the :LQGRZ&RQWHQW and one of the
previously created table templates as the 7HPSODWH. The geometry of the pictures
is tuned to the geometry of the $SSOLFDWLRQ:LQGRZV.
2 Creation of a new picture, in the example, this is the H[BBFKDSWHUBG3'/
picture.
3 The motors to be displayed each consist of a 6WDQGDUG2EMHFW→&LUFOH, a
6WDQGDUG2EMHFW→3RO\JRQ and a 6WDQGDUG2EMHFW→6WDWLF7H[W. The
8LBH[BWOJB tag.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
*HQHUDO$SSOLFDWLRQ1RWHV
7DVN'HILQLWLRQ
,PSOHPHQWDWLRQ&RQFHSW
To archive the displayed data, create a cyclic-continuous process value archive in the 7DJ
/RJJLQJ editor. To archive at every full minute, a new &\FOH7LPH needs to be set up. This
cycle time is started at a precisely defined time. The archiving is triggered by this cycle.
To display the data, a table template is created. This template is displayed in the *UDSKLFV
'HVLJQHU via a 6PDUW2EMHFW→$SSOLFDWLRQ:LQGRZ.
&UHDWLQJDQHZ&\FOH7LPH
85
1 Open the 7DJ/RJJLQJ editor from the &RQWURO&HQWHU.
Create a new 7LPHU by on this point in the navigation window.
&UHDWLRQRID3URFHVV9DOXH$UFKLYH
6WHS 3URFHGXUH&UHDWLRQRID3URFHVV9DOXH$UFKLYH
1 Create a new 3URFHVV9DOXH$UFKLYH with the archive wizard. In the example, the
archive was named =.B3URFHVV9DOXH$UFKLYHB.
For the archiving, the tags *BH[BWOJB, *BH[BWOJB and *BH[BWOJB
are selected. In the example project, these tags are supplied with values by the
simulator.
6WHS 3URFHGXUH&UHDWLRQRID3URFHVV9DOXH$UFKLYH
In the properties dialog box of the process value archive, accept the presettings
displayed by the wizard.
2 In the properties dialog box of the first process tag’s 3DUDPHWHUV tab, select
6HFRQG as the $FTXLVLWLRQ cycle in the &\FOH field. As $UFKLYLQJ, set * PLQ
The presettings can be accepted for the remaining settings of the first tag.
For the remaining archive tags, carry out the same steps described above.
7DEOH'LVSOD\&RQILJXUDWLRQ
6WHS 3URFHGXUH7DEOH'LVSOD\&RQILJXUDWLRQ
6WHS 3URFHGXUH7DEOH'LVSOD\&RQILJXUDWLRQ
settings made.
5 Carry out step 3 to 4 for the second and third column. However, the &ROXPQ
+HDGLQJ and $UFKLYH7DJ must be adapted.
In the example project, the colors of the individual columns have been adapted to
the colors used in the simulator window for the individual trends.
,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
1RWH
A brief explanation about the other configuration settings made for the
H[BBFKDSWHUBH3'/ picture in the *UDSKLFV'HVLJQHU can be found in example
%DU*UDSK'LVSOD\H[BBFKDSWHUBH.
*HQHUDO$SSOLFDWLRQ1RWHV
7DVN'HILQLWLRQ
,PSOHPHQWDWLRQ&RQFHSW
To archive the displayed data, create a cyclic-continuous process value archive in the 7DJ
/RJJLQJ editor. To export the archive and for locking/enabling the archive, separate project
&UHDWLRQRID3URFHVV9DOXH$UFKLYH
6WHS 3URFHGXUH&UHDWLRQRID3URFHVV9DOXH$UFKLYH
1 Create a new 3URFHVV9DOXH$UFKLYH with the archive wizard. In the example, the
archive was named =.B3URFHVV9DOXH$UFKLYHB.
The tag to be archived was *LBH[BWOJB. In the example project, this tag is
supplied with the sum of the three trend profiles by the simulator.
2 In the properties dialog box of the process value archive, set the size of the
archive to data records. As the $FWLRQIRU([SRUWLQJWKH6KRUW7HUP$UFKLYH,
the project function $FWLRQ)RU([SRUWLQJ$UFKLYH is set.
7UHQG'LVSOD\&RQILJXUDWLRQ
6WHS 3URFHGXUH7HQG'LVSOD\&RQILJXUDWLRQ
6WHS 3URFHGXUH7HQG'LVSOD\&RQILJXUDWLRQ
In the ;$[LV tab, select the 8SGDWH check-box in the 6FDOLQJ field and deselect the
remaining check-boxes.
In the 6HOHFWLRQ field of the <$[LV tab, deselect the $XWRUDQJH check-box. Enter
as the 6WDUW and as the (QG value. As the 7UHQG'LVSOD\, select 6WHSSHG
nPathLen=strlen(szProj);
nFileLen=strlen((strrchr(szProj,\\)+1));
strncat(szFile,szProj,nPathLen-nFileLen);
sprintf(szFileName,"%s%s",szFile,"ArchiveBackUp.CSV");
lpszFileName=&szFileName[0];
time(&Time);
TimeStruct = localtime(&Time);
ibs.sysFrom.wYear = 1997;
ibs.sysFrom.wMonth = 1;
ibs.sysFrom.wDay = 1;
ibs.sysFrom.wHour = 0;
ibs.sysFrom.wMinute = 0;
ibs.sysFrom.wSecond = 0;
ibs.sysTo.wYear = (WORD)(TimeStruct->tm_year+1900);
ibs.sysTo.wMonth = (WORD)(TimeStruct->tm_mon+1);
ibs.sysTo.wDay = (WORD)(TimeStruct->tm_mday);
ibs.sysTo.wHour = (WORD)(TimeStruct->tm_hour);
ibs.sysTo.wMinute = (WORD)(TimeStruct->tm_min);
ibs.sysTo.wSecond = (WORD)(TimeStruct->tm_sec);
TLGDisconnect( NULL );
}
• Determination of the project path
• Generation of the name of the file into which the archive is exported to. This name also
contains the path.
• Determination of the system time.
• Definition of the start and end time, between which the archiving times of the data to be
exported are lying.
• Establishment of a connection to 7DJ/RJJLQJ via the 7/*&RQQHFW function.
• Determination of the size of the data to be exported via the 7/*%DFNXS6L]H function.
This value is stored in an internal tag.
• Exporting of the archive via the 7/*%DFNXS function and setting of the %,1LBH[BWOJB
binary tag, which makes the export visible.
,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
1 In Tag Management, three tags of the %LQDU\7DJ type are created. In the
example, the %,1LBH[BWOJB,%,1LBH[BWOJB and %,1LBH[BWOJB tags are used.
In addition, the 8LBH[BWOJB tag of the 8QVLJQHG%LW9DOXH type is
required.
2 Creation of a new picture, in the example, this is the H[BBFKDSWHUBI3'/.
In this picture, a 6PDUW2EMHFW→$SSOLFDWLRQ:LQGRZ is configured. In the
example, this is the $SSOLFDWLRQ:LQGRZ object. Select 7DJ/RJJLQJ as the
window content and the =.B3$B7UHQGWHPSODWHBas the 7HPSODWH.
3 The implementation of a toolbar has already been explained in detail in the
$UFKLYLQJLI9DOXHLV([FHHGHGH[BBFKDSWHUBE3'/ example. This chapter
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
8LBH[BWOJB tag. The number value contains the size of the exported data.
if (fRet==FALSE)
printf("Error in TLGConnect(...)\r\n");
else
{
fRet=TLGLockArchive (NULL,lpszArchiveName,bLock,&Error );
if (fRet==FALSE) printf("Error in TLGLockArchive(...)
[%s]\r\n",Error.szErrorText);
TLGDisconnect( NULL );
}
}
• Establishment of a connection to 7DJ/RJJLQJ.
• Call of the 7/*/RFN$UFKLYH function. The E/RFN transfer parameter decides whether the
archive is to be locked or enabled.
*HQHUDO$SSOLFDWLRQ1RWHV
$ODUP/RJJLQJ
8
In runtime, the examples to this topic can be selected by clicking on the button displayed
above with the . The examples are configured in the pictures H[BBFKDSWHUB3'/ to
H[BBFKDSWHUBG3'/.
*HQHUDO,QIRUPDWLRQ
The $ODUP/RJJLQJ editor is responsible for acquiring and archiving messages. It contains
functions for accepting messages from processes, and for preparing, displaying,
acknowledging, and archiving them.
This is how $ODUP/RJJLQJ supports the search for causes of errors.
7DVN'HILQLWLRQ
Four motors are to be monitored by $ODUP/RJJLQJ. Errors within motors are displayed by
setting various bits in tags assigned to each motor. The message states of the motors are
stored in separate internal tags. Depending on the message state, the display of the motor is
to be changed.
The messages are to be displayed in a message window. The message window’s toolbar and
status bar are realized using standard tools.
,PSOHPHQWDWLRQ&RQFHSW
6HWXSRIWKH5HTXLUHG7DJV
6WHS 3URFHGXUH6HWXSRIWKH5HTXLUHG7DJV
Four tags serve as status tags. In the example, these are the 8LBH[BDOJB,
8LBH[BDOJB,8LBH[BDOJB and 8LBH[BDOJB tags. The remaining tags
*HQHUDO,QIRUPDWLRQ
A message consists of several message blocks. These message blocks can be divided into
three groups:
• 6\VWHP%ORFNV: These blocks contain system data assigned by $ODUP/RJJLQJ. This
includes date, time, report ID, etc.
• 3URFHVV9DOXH%ORFNV : These blocks contain the values transmitted from the process,
e.g. critical fill levels, temperatures, etc.
• 8VHU7H[W%ORFNV: These blocks contain texts which provide general information and
aid the understandability, e.g. error explanations, message sources, point of error, etc.
0HVVDJH%ORFN&RQILJXUDWLRQ
85
6WHS 3URFHGXUH0HVVDJH%ORFN&RQILJXUDWLRQ
8
2 Selection of the required message blocks. Open the &RQILJXUH0HVVDJH%ORFNV
dialog box via 0HVVDJH%ORFNV 5.
By 8'
0HVVDJH
on one of the three entries in the $YDLODEOH0HVVDJH%ORFNVLQWKH
window, the already selected message blocks become visible.
6WHS 3URFHGXUH0HVVDJH%ORFN&RQILJXUDWLRQ
the button allows you to display the dialog box for adding
message blocks. In the example, the following message blocks are used:
• System Blocks
• Date
• Time
• Number
• User Text Blocks
• Message Text
• Point of Error
6WHS 3URFHGXUH0HVVDJH%ORFN&RQILJXUDWLRQ
The button moves a message block highlighted in the left window to the
8
right window, and thus selects it. Clicking on 2. applies the settings made.
In the &RQILJXUH0HVVDJH%ORFNV dialog box, if a block is selected using , the
6WHS 3URFHGXUH0HVVDJH%ORFN&RQILJXUDWLRQ
8
If one of the three sub-entries, 6\VWHP%ORFNV, 8VHUWH[W%ORFNV or 3URFHVV9DOXH
8
%ORFNV, is selected with the , the right window will display the selected
message blocks. 5 on the displayed icons and then selecting properties,
accesses the 0HVVDJH%ORFNV dialog box. Message blocks can also be deleted this
way.
8
85
If the 0HVVDJH%ORFNV entry in the left window has been selected with the ,
8
on one of the icons displayed in the right window, allows you to access the
add/remove or properties dialog box. ' on one of the displayed icons in the
right window, will display the message blocks it contains.
6HWXSRIDQHZ0HVVDJH/LQH)RUPDW
6WHS 3URFHGXUH6HWXSRIDQHZ0HVVDJH/LQH)RUPDW
85
1 The $ODUP/RJJLQJ editor must still be open.
Create a new message line format by on the 0HVVDJH/LQH)RUPDW entry.
the 1XPEHU, 'DWH, 7LPH, 3RLQWRI(UURU and 0HVVDJH7H[W message blocks via the
button.
The move XS and move GRZQ buttons allow you to change the order of the
selected message blocks.
Clicking on 2. applies the settings made and exits the dialog box.
2 If the 0HVVDJH/LQH)RUPDW entry is selected with the
display all available message line formats.
8 , the right window will
6WHS 3URFHGXUH6HWXSRIDQHZ0HVVDJH/LQH)RUPDW
*HQHUDO,QIRUPDWLRQ
The message window template defines the structure, display and operation of a message
window. Additionally, the template defines if the message window should display the
current messages or the message archive.
6HWXSRI0HVVDJH:LQGRZ7HPSODWH
6WHS 3URFHGXUH6HWXSRI0HVVDJH:LQGRZ7HPSODWH
template is configured with 7LWOH. If no text is entered in the window title entry
field, the content of the :LQGRZ entry field is used as the :LQGRZ7LWOH.
As the :LQGRZ7\SH, select 0HVVDJH:LQGRZ.
The 6HOHFWLRQ is performed after the single messages have been configured.
6WHS 3URFHGXUH6HWXSRI0HVVDJH:LQGRZ7HPSODWH
3 In the 0HVVDJH/LQH tab, a message line format is selected. In the example, the
/LQHB message line format has been selected.
A new message line format can be created by clicking on the 1HZ button.
6WHS 3URFHGXUH6HWXSRI0HVVDJH:LQGRZ7HPSODWH
lines.
In the 6HOHFWLRQ field, select 1R6HOHFWLRQ. This defines that - in runtime - single
messages can only be selected by using buttons on the toolbar, not with the
mouse.
Select the /LQH7LWOH and &ROXPQ7LWOH check-boxes.
Select the $XWR6FUROOLQJ check-box.
6WHS 3URFHGXUH6HWXSRI0HVVDJH:LQGRZ7HPSODWH
6 In the 7RROEDU tab, select the 'LVSOD\7RROEDU check-box. In the $OLJQPHQW field,
select 7RS. The following .H\ERDUG)XQFWLRQV are used:
• Display Process Message Window
• Single Acknowledgement
• Group Acknowledgment
• Auto-Scroll On/Off
• Beginning of the List
• End of the List
• Next Message
• Previous Message
6WHS 3URFHGXUH6HWXSRI0HVVDJH:LQGRZ7HPSODWH
8' 85 or
dialog box.
on the appropriate icon opens the &RQILJXUH0HVVDJH:LQGRZV
6WHS 3URFHGXUH6HWXSRI0HVVDJH:LQGRZ7HPSODWH
1RWH
The creation of a new message window template can also be performed using the wizard.
The wizard allows you to make the most important settings.
All settings made so far in $ODUP/RJJLQJ can also be performed, in a very simplified and
abbreviated form, by the Message Wizard. This wizard is activated via the menu points )LOH
→6WDUW0HVVDJH:L]DUG. However, for a detailed configuration, the dialog boxes described
in this example are necessary.
The creation of a message system using the Message Wizard is described in chapter
&RQILJXULQJPHVVDJHV.
6HWXSRI6LQJOH0HVVDJHV
6WHS 3URFHGXUH6HWXSRI6LQJOH0HVVDJHV
1 In the $ODUP/RJJLQJ editor, the lower part of the window is called the table
8
window. In this window, the individual messages are configured, and the already
configured ones displayed. By 5, new lines can be added.
8
however, the settings are made via the 6LQJOH0HVVDJH dialog box. This dialog
box is accessed via a 5 on the corresponding message line.
to 1. This bit is reset, once the message has been cleared. The ninth bit of the tag
contains the $FNQRZOHGJH6WDWXV of the message. If the message has not been
acknowledged, the bit has the status of 1. If the message has been acknowledged,
the bit has the status of 0.
A 16-bit status tag can represent the states of 8 single messages. The low-byte
always contains the &DPH,Q:HQW2XW6WDWHV, the high-byte the $FNQRZOHGJH
6WDWHV
6WHS 3URFHGXUH6HWXSRI6LQJOH0HVVDJHV
3 In the 7H[W tab, enter ,QWHUORFN(UURU as the 0HVVDJH7H[W and 0RWRU as the
3RLQWRI(UURU. No ,QIRWH[W is used.
5 The other three motors also require three message lines each.
6WHS 3URFHGXUH6HWXSRI6LQJOH0HVVDJHV
The (YHQW7DJV, $FNQRZOHGJH7DJV and 6WDWXV7DJV, as well as the texts for the
3RLQWRI(UURU, must be adapted for each motor.
6 The configured message window template should only display messages that
refer to one of the four motors. Therefore, a selection must be made in the
properties dialog box, *HQHUDO,QIRUPDWLRQ tab, of the created message window
template.
To do so, open the appropriate properties dialog box. In the *HQHUDO,QIRUPDWLRQ
tab, clicking on the accesses the 6HWWKH6HOHFWLRQ dialog box.
Message block selections are made in this dialog box. In the example, only
messages with a message number from 1 to 12 are to be displayed. That is, the
selection is concerned with the 1XPEHU system block.
8'
8
A on the 6\VWHP%ORFNV folder displays all available system blocks. By
selecting a block with the , all possible selections are displayed in the right
side of the window. For the 1XPEHU system block, a 6WDUW9DOXH and a 6WRS9DOXH
can be entered - the message numbers lie in this range.
In the example, is entered as the 6WDUW9DOXH and as the 6WRS9DOXH.
Close the properties dialog box by clicking on 2.. If a selection has been made,
a check-mark will be displayed next to the "Selection" button. The
&RQILJXUH0HVVDJH:LQGRZV dialog box is also exited by clicking on 2..
&RQILJXUDWLRQRIWKHRIWKH0HVVDJH&RORU6FKHPHV
6WHS 3URFHGXUH&RQILJXUDWLRQRIWKHRIWKH0HVVDJH&RORU6FKHPHV
1 The configured single messages are of the (UURU message class and the )DLOXUH
message type.
8
8'
on the 0HVVDJH&ODVVHV entry to display all available message classes in the
8' 85
right window. on the message class icon (UURU to display all available
message types. or on the message type icon )DLOXUH opens the 7\SH
dialog box.
2 In the 7\SH dialog box, a color scheme can be defined for each message state.
In the example, the following color schemes have been used:
Came In: Text Color = yellow, Background Color = orange
Went Out: Text Color = orange, Background Color = light gray
Acknowledged: Text Color = white, Background Color = orange
6WHS 3URFHGXUH&RQILJXUDWLRQRIWKHRIWKH0HVVDJH&RORU6FKHPHV
3 The configurations made in $ODUP/RJJLQJ are saved via the )LOH→6DYH menu
points.
,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
The motors are to change color whenever an error message is displayed or this
message is being acknowledged. The colors are to correspond to the ones used
for the came in, went out and acknowledged message states.
To do so, create a &$FWLRQ for the 6WDWLF7H[W at 3URSHUWLHV→&RORUV→)RQW
&RORU, which changes the font color depending on the current state of the motor’s
status tag.
In the same manner, create a &$FWLRQ for the &LUFOH at 3URSHUWLHV→&RORUV→
%DFNJURXQG&RORU.
At 3URSHUWLHV→*HRPHWU\→1XPEHURI%R[HV enter .
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
After placing the object in the picture, the :LQGRZ&RQWHQWV dialog box is
displayed. Select the $ODUP/RJJLQJ entry. Close the dialog box by clicking on
2..
8
of the &RPSXWHU3URSHUWLHV dialog box.
If this is not the case, select the "Computer" entry in the &RQWURO&HQWHU via a
and open the &RPSXWHU3URSHUWLHV6WDUWXS7DE by clicking on the button
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
5XQWLPH check-box.
state=GetTagDWord ("U16i_ex_alg_02");
if ((state&1)||(state&2)||(state&4))
return 0x80FF;
else
return 0xFFFFFF;
}
• This &$FWLRQ adds dynamics to the background color property of the &LUFOH assigned to
the first motor.
• The 8LBH[BDOJB status tag assigned to the first motor is read. The low-byte of this
tag contains the came in/went out message states. This means that a message is pending
and the circle’s background color is set to orange (hex 80ff) if the first, second or third
bit of this tag is set to 1. If the message goes out again, the background color will be set
to white (hex ffffff).
• This &$FWLRQ is triggered upon the change of the 8LBH[BDOJB status tag.
state=GetTagDWord ("U16i_ex_alg_02");
if ( ((state&1)&&(state&256)) || ((state&2)&&(state&512)) ||
((state&4)&&(state&1024)) )
return 0xFFFF;
else if ((state&1)||(state&2)||(state&4))
return 0xFFFFFF;
else if ((state&256)||(state&512)||(state&1024))
return 0x80FF;
else return 0x800000;
}
• This &$FWLRQ adds dynamics to the font color property of the 6WDWLF7H[W assigned to the
first motor.
• The 8LBH[BDOJB status tag assigned to the first motor is read. The low-byte of this
tag contains the came in/went out message states, the high-byte the acknowledged
message states. In the case of an unacknowledged, pending message, the font color will
be set to yellow (hex ffff). In the case of an acknowledged message, the font color will
be set to white (hex ffffff). In the case of an unacknowledged, but went out message, the
font color will be set to orange (hex 80ff). In the normal state, the font color is dark blue
(hex 800000).
• This &$FWLRQ is triggered upon the change of the 8LBH[BDOJB status tag.
*HQHUDO$SSOLFDWLRQ1RWHV
7DVN'HILQLWLRQ
The pressure and temperature values of three containers are to be monitored by $ODUP
/RJJLQJ. If the monitored analog values approach the critical zone, warnings are to be
generated. If the values reach the critical zone, alarms are to be generated. The occurrence
of an alarm should also be indicated optically and acoustically in the *UDSKLFV'HVLJQHU.
A user-friendly message window layout should be used. That is, a custom toolbar should be
configured. The table should have a user-defined color scheme.
,PSOHPHQWDWLRQ&RQFHSW
2EMHFWV→6WDWXV'LVSOD\V.
6HWXSRIWKH5HTXLUHG7DJV
6WHS 3URFHGXUH6HWXSRIWKH5HTXLUHG7DJV
1RWH
6HWXSRIDQHZ0HVVDJH:LQGRZ7HPSODWH
6WHS 3URFHGXUH6HWXSRIDQHZ0HVVDJH:LQGRZ7HPSODWH
2 Since a new message block has been configured, a new message line format is
needed. The /LQHB format, created in the first example, can not be used
85
anymore.
Create a new message line format by on the 0HVVDJH/LQH)RUPDW entry.
the 1XPEHU, 'DWH, 7LPH, 3RLQWRI(UURU, 0HVVDJH7H[W and 9DOXH message blocks
6WHS 3URFHGXUH6HWXSRIDQHZ0HVVDJH:LQGRZ7HPSODWH
been configured.
In the 0HVVDJH/LQH tab, select the /LQHB message line format.
In the 3DUDPHWHUV tab, the appearance of the message window is defined. In the
6HSDUDWLRQ/LQHV field, select the +RUL]RQWDO and 9HUWLFDO check-boxes. In the
6HOHFWLRQ field, select /LQH. This determines that in runtime individual message
lines can be selected using the mouse if $XWR6FUROOLQJ is turned off. Deselect the
/LQH7LWOH and &ROXPQ7LWOH check-boxes. Select the $XWR6FUROOLQJ check-box.
In the 6WDWXV%DU and 7RROEDU tabs, deselect the check-boxes for displaying the
status bar and toolbar.
Close the dialog box by clicking on 2..
*HQHUDO,QIRUPDWLRQ
6HWXSRIDQHZ0HVVDJH&ODVV
85
6WHS 3URFHGXUH6HWXSRIDQHZ0HVVDJH&ODVV
Clicking on the button adds a new message class. The dialog box is
closed by clicking on 2..
2 8
8
on the 0HVVDJH&ODVVHV entry to display all available message classes,
including newly created ones, in the right window. 5 on one of the message
class icons to open the &RQILJXUH0HVVDJH&ODVVHV dialog box.
Select one of the two new message types from the 0HVVDJH7\SHV field and
display its properties by clicking on the button.
Enter &RQWDLQHU$ODUP as the name of the first message type. The color scheme
of the individual message states is as follows:
Came In: Text Color = black, Background Color = red
Went Out: Text Color = black, Background Color = green
Acknowledged: Text Color = black, Background Color = orange
Enter &RQWDLQHU:DUQLQJ as the name of the second message type. The color
scheme of the individual message states is as follows:
Came In: Text Color = yellow, Background Color = blue
Went Out: Text Color = blue, Background Color = RGB(207,163,146)
Acknowledged: Text Color = white, Background Color = blue
6WHS 3URFHGXUH6HWXSRIDQHZ0HVVDJH&ODVV
6WHS 3URFHGXUH6HWXSRIDQHZ0HVVDJH&ODVV
6HWXSRI6LQJOH0HVVDJHV
85
6WHS 3URFHGXUH6HWXSRI6LQJOH0HVVDJHV
2 In the 3DUDPHWHUV tab, select &RQWDLQHU(UURU as the message class and &RQWDLQHU
$ODUP as the message type. In the 7KLV0HVVDJH field, select the ,V6LQJOH
In the 7DJ$FWLRQ tab, a tag can be set for the 9DOXH process value block.
However, since the message is generated by an analog alarm, the first process
value block of the message line is automatically supplied with the limit value
which triggered the message.
Apply the settings made by clicking on the 2. button.
3 The just created message monitors the pressure in the first of three containers.
Three additional message lines must be configured for the first container.
Proceed as described in step 2. Create an additional message of the &RQWDLQHU
(UURU message type. Enter &ULWLFDO7HPSHUDWXUH as the 0HVVDJH7H[W and change
field of the 3DUDPHWHUV tab (of the 6LQJOH0HVVDJH dialog box). All messages
pertaining to container 1 use the same status tag. Their status bits, though, must
be adapted.
4 The other two containers also require four message each.
6WHS 3URFHGXUH6HWXSRI6LQJOH0HVVDJHV
5 The configured message window template should only display messages that
refer to one of the three containers. Therefore, a selection must be made in the
properties dialog box, *HQHUDO,QIRUPDWLRQ tab, of the created message window
template.
To do so, open the appropriate properties dialog box. In the *HQHUDO,QIRUPDWLRQ
tab, clicking on the accesses the 6HWWKH6HOHFWLRQ dialog box.
For the 1XPEHU system block, enter as the 6WDUW9DOXH and as the 6WRS
9DOXH.
Close the properties dialog box by clicking on 2.. If a selection has been made,
a check-mark will be displayed next to the "Selection" button. The
&RQILJXUH0HVVDJH:LQGRZV dialog box is also exited by clicking on 2..
&RQILJXUDWLRQRI$QDORJ$ODUPV
6WHS 3URFHGXUH&RQILJXUDWLRQRI$QDORJ$ODUPV
2 85 on the $QDORJ$ODUP entry and select "New" to open the 3URSHUWLHV dialog
box of the tag. In this dialog box, a new tag for the analog alarm can be selected.
Set the 8LBH[BDOJBW tag, which contains the temperature value of the first
container, as the 7DJWREHPRQLWRUHG. The $0HVVDJHIRUDOO/LPLW9DOXHV check-
box is not selected. Keep as the 'HOD\7LPH.
Close the dialog box by clicking on 2..
6WHS 3URFHGXUH&RQILJXUDWLRQRI$QDORJ$ODUPV
8
3 In the right window, the icon of the new tag to be monitored will be displayed.
5 on this icon and select "New" to open the 3URSHUWLHV dialog box of the limit
values. In this dialog box, a new limit value can be assigned to the tag.
6WHS 3URFHGXUH&RQILJXUDWLRQRI$QDORJ$ODUPV
For the same tag, set a second limit value. In the /LPLW9DOXH field, select 8SSHU
/LPLW again. Enter in the /LPLW9DOXHRU7DJ entry box. Enter as the
1XPEHU in the 0HVVDJH field. This is the warning message for the first container
,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
2EMHFW objects.
,2)LHOG assigned to the first 6OLGHU. In the same manner, assign an ,2)LHOG to
each 6OLGHU.
3 The display of the individual containers is accomplished via the 7DQN smart
object from the global library. In the example, these are the 7DQN, 7DQN and
7DQN objects.
In the example, these objects contain no dynamics. They only serve display
purposes.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
The %XWWRQ object replaces the button for the horn acknowledgement. Create a
&$FWLRQ at (YHQWV→0RXVH→0RXVH$FWLRQ, which calls the
parameter, enter the name of the message window template. This button
acknowledges the central signaling device. Using a 6PDUW2EMHFW→*UDSKLF
2EMHFW, which is placed on top of the button, this button can be made
inoperational. This occurs, if no signal is present at the tag triggering the central
signaling device.
9 Additionally, configure a %XWWRQ for single acknowledgement, a %XWWRQ for group
acknowledgement and a %XWWRQ for calling the infotext dialog box. The
corresponding standard functions are:
2Q%WQ6LQJO$FNQSV]0VJ:LQ
2Q%WQ9LVLEOH$FNQSV]0VJ:LQ
2Q%WQ,QIRSV]0VJ:LQ
10 As replacement for the button turning the auto-scroll function on/off, a 6PDUW
2EMHFW→6WDWXV'LVSOD\ is used. In the example, this is the 6WDWXV'LVSOD\
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
object.
state=GetTagWord("U16i_ex_alg_01");
• If the central signaling device is triggered, 758( is returned to the property, that is, the
horn is also displayed optically.
• This &$FWLRQ is triggered upon the change of the tag triggering the central audible
indicator.
char szProjectName[MAX_PATH];
CMN_ERROR Error;
char szSoundFilePath[MAX_PATH] = "";
char szSoundFile[MAX_PATH] = "Hupe.wav";
if (GetFlashFlashPicture(lpszPictureName,lpszObjectName)) {
if (DMGetRuntimeProject( szProjectName, MAX_PATH, &Error)) {
strncat(szSoundFilePath,szProjectName,strlen(szProjectName)-
strlen(strrchr(szProjectName,\\)+1));
strcat(szSoundFilePath,szSoundFile);
//MessageBeep((WORD)-1);
PlaySound(szSoundFilePath,NULL,SND_FILENAME| SND_ASYNC);
}
}
return 56;
}
• Loading of the ZLQPPGOO. This DLL contains the function for playing sound files.
• If the 6WDWXV'LVSOD\ object is flashing, the +XSHZDY file, located in the project folder,
is played. To do so, the project folder and file path must be determined via the
'0*HW5XQWLPH3URMHFW function.
WORD state1,state2,state3;
WORD count = 0;
static WORD Scount = 0;
state1=GetTagWord("U16i_ex_alg_01");
state2=GetTagWord("U16i_ex_alg_04");
state3=GetTagWord("U16i_ex_alg_07");
if (state1)
{
if ((state1&1)||(state1& 256)) count++;
if ((state1&2)||(state1& 512)) count++;
if ((state1&4)||(state1&1024)) count++;
if ((state1&8)||(state1&2048)) count++;
}
if (state2)
{
if ((state2&1)||(state2& 256)) count++;
if ((state2&2)||(state2& 512)) count++;
if ((state2&4)||(state2&1024)) count++;
if ((state2&8)||(state2&2048)) count++;
}
if (state3)
{
if ((state3&1)||(state3& 256)) count++;
if ((state3&2)||(state3& 512)) count++;
if ((state3&4)||(state3&1024)) count++;
if ((state3&8)||(state3&2048)) count++;
}
if ((count==MAX_LINES)&&(Scount==(MAX_LINES+1)))
{
Scount=count;
SetTagBit("BINi_ex_alg_03",
(SHORT)!GetTagBit("BINi_ex_alg_03"));
return (2+LINE_HEIGHT+LINE_HEIGHT*count);
}
else if (count<=MAX_LINES)
{
Scount=count;
return (2+LINE_HEIGHT*count);
}
else
{
Scount=count;
return ((LINE_HEIGHT*MAX_LINES)+2);
}
}
• Definition of the line height and the maximum number of lines to be displayed.
• Input of the status tags of the three containers.
• Determination of the number of messages visible in the window.
• Calculation of the window height. If all messages do not fit in the message window, the
message window will temporarily be expanded beyond its maximum size. This allows
the scroll bars to be removed if auto-scroll is deactivated. If the message window
contains fewer lines than can be displayed, the height of the window is calculated by
multiplying the number of lines by the line height. If the number of lines is greater than
the maximum value, a maximum height is preset.
*HQHUDO$SSOLFDWLRQ1RWHV
7DVN'HILQLWLRQ
Several processes are to be monitored via a message window. If a message comes in, a
button on the toolbar should allow you to jump to the window in which the error occurred.
The message window is created using the standard tools of the $ODUP/RJJLQJ editor, that
is, the standard toolbar and status bar are used.
,PSOHPHQWDWLRQ&RQFHSW
A message window template is created in $ODUP/RJJLQJ. This example will use the
messages and pictures created in the previous examples. A project function is required that
executes a picture change if the /RRS,Q$ODUP button on the toolbar is pressed.
In the *UDSKLFV'HVLJQHU, the message window is displayed using a 6PDUW2EMHFW→
$SSOLFDWLRQ:LQGRZ. No additional objects are needed.
1RWH
The configurations carried out in the previous two examples are considered complete. They
will not be described again, however, this example is based on them.
,PSOHPHQWDWLRQRIWKH([DPSOH
6WHS 3URFHGXUH,PSOHPHQWDWLRQRIWKH([DPSOH
In the 6WDWXV%DU tab, select the 'LVSOD\6WDWXV%DU check-box and %RWWRP from
the $OLJQPHQW field. As the (OHPHQWVRIWKH6WDWXV%DU, select 'DWH, 7LPH,
1XPEHURI0HVVDJHVLQWKH:LQGRZ, /RFN and 6HOHFWLRQ.
In the 7RROEDU tab, select the 'LVSOD\7RROEDU check-box and 7RS from the
6WHS 3URFHGXUH,PSOHPHQWDWLRQRIWKH([DPSOH
$OLJQPHQW field. As elements of the toolbar, select everything but the keys for
'LVSOD\3URFHVV0HVVDJH:LQGRZ , 'LVSOD\6KRUW7HUP$UFKLYH, 'LVSOD\
6HTXHQFH$UFKLYH and &LW\&DOO)XQFWLRQV.
6FULSW editor. In the message window’s toolbar, the button for /RRSLQ$ODUP
must have been selected.
In the table window of $ODUP/RJJLQJ, 8 ' on the /RRSLQ$ODUP column to
display the /RRSLQ$ODUP dialog box of the selected single message.
The configuration of the /RRSLQ$ODUP function can also be made from the
single message’s properties dialog box in the 7DJ$FWLRQ tab, /RRSLQ$ODUP field.
Save the configurations made in $ODUP/RJJLQJ.
4 Open the *UDSKLFV'HVLJQHU and create a new picture. In the example, this is the
6WHS 3URFHGXUH,PSOHPHQWDWLRQRIWKH([DPSOH
H[BBFKDSWHUBE3'/ .
To display the configured message window template, a 6PDUW2EMHFW→
$SSOLFDWLRQ:LQGRZ is used. In the example, this is the $SSOLFDWLRQ:LQGRZ
SetPictureName("ex_0_startpicture_00.PDL","workspace", PictureName);
}
• Call of the 6HW3LFWXUH1DPH function to execute the picture change. This function can
not be used directly in $ODUP/RJJLQJ, since the number and type of the call parameters
do not agree with the previous ones.
1RWH
In the message window template, a button in the toolbar has been provided to access the
report functions. The implementation of a message sequence report and its activation is
described in the example 0HVVDJH6HTXHQFH5HSRUWH[BBFKDSWHUBE3'/, in the
5HSRUW'HVLJQHU chapter.
*HQHUDO$SSOLFDWLRQ1RWHV
7DVN'HILQLWLRQ
A message archive is to be created, which is designed to hold 200 messages in the form of a
short-term archive. All archived messages are to be displayed in a message window.
The message window is to be controlled from a newly created toolbar. This toolbar should
contain two special buttons that allow the user to either display archived messages from
example 1 or example 2.
,PSOHPHQWDWLRQ&RQFHSW
A message window template is created in $ODUP/RJJLQJ. This example will use the
messages created in the previous examples. In addition, a message archive is configured.
In the *UDSKLFV'HVLJQHU, the message window is displayed using a 6PDUW2EMHFW→
$SSOLFDWLRQ:LQGRZ. The toolbar is implemented using multiple :LQGRZV2EMHFWV→
project function is needed that performs a defined selection in the message window if the
selection buttons are activated.
6HWXSRIWKH5HTXLUHG7DJV
6WHS 3URFHGXUH6HWXSRIWKH5HTXLUHG7DJV
1 Create a total of three tags of the %LQDU\7DJ type. In the example, these are the
%,1LBH[BDOJB, %,1LBH[BDOJB and %,1LBH[BDOJB tags.
1RWH
The configurations carried out in the previous two examples are considered complete. They
will not be described again, however, this example is based on them.
,PSOHPHQWDWLRQLQ$ODUP/RJJLQJ
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ$ODUP/RJJLQJ
In the 6WDWXV%DU and 7RROEDU tabs, deselect the check-boxes for displaying the
status bar and toolbar.
Close the dialog box by clicking on 2..
85
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ$ODUP/RJJLQJ
8
In the right window, the icon for the short-term archive will now be displayed.
5 on this icon will display its properties.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ$ODUP/RJJLQJ
,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
The %XWWRQ object replaces the button for the horn acknowledgement. Create a
&$FWLRQ at (YHQWV→0RXVH→0RXVH$FWLRQ, which calls the
parameter, enter the name of the message window template. This button
acknowledges the central signaling device, which is triggered by some of the
configured messages. Using a 6PDUW2EMHFW→*UDSKLF2EMHFW, which is placed
on top of the button, this button can be made inoperational. This occurs, if no
signal is present at the tag triggering the central signaling device.
3 Additionally, configure a %XWWRQ for single acknowledgement, a %XWWRQ for group
acknowledgement, a %XWWRQ for calling the selection dialog box and a %XWWRQ for
calling the infotext dialog box. The corresponding standard functions are:
2Q%WQ6LQJO$FNQSV]0VJ:LQ
2Q%WQ9LVLEOH$FNQSV]0VJ:LQ
2Q%WQ,QIRSV]0VJ:LQ
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
2Q%WQ6HOHFWSV]0VJ:LQ
4 As replacement for the button turning the auto-scroll function on/off, a 6PDUW
2EMHFW→6WDWXV'LVSOD\ is used. In the example, this is the 6WDWXV'LVSOD\
object.
2Q%WQ0VJ/DVWSV]0VJ:LQ
2Q%WQ0VJ1H[WSV]0VJ:LQ
2Q%WQ0VJ3UHYSV]0VJ:LQ
message window is stored in the %,1LBH[BDOJB tag, which must be set to zero
at the opening of the picture, since the message window is displayed as 6KRUW
7HUP$UFKLYH:LQGRZ first if called.
standard toolbar and toggles the %,1LBH[BDOJB tag. Do the same to configure
the 6WDWXV'LVSOD\ object. The following standard functions are used:
2Q%WQ0VJ:LQSV]0VJ:LQ
2Q%WQ$UF6KRUWWSV]0VJ:LQ
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
content of the short-term archive will be printed out. If a selection has been made
in the window, only the selected messages will be printed.
The system print job 5HSRUW$ODUP/RJJLQJ575HYROYLQJ$UFKLYH is called. By
default, the 3DJH/D\RXW DOJXPDUSO is used. This page layout must be adapted or
exchanged. The steps to do this are described in the example 0HVVDJH
$UFKLYH5HSRUWH[BBFKDSWHUBF3'/, in the 5HSRUW'HVLJQHU chapter.
PCMN_ERROR pError;
BOOL fRet;
MSG_FILTER_STRUCT Filter;
if (fRet == FALSE)
{
printf("Error MSRTSetMsgWinFilter\r\n" );
return FALSE;
}
else
return TRUE;
}
• Reservation of space for the created )LOWHU filter structure.
• Assignment of values to the, for this application relevant, structure member of the file
structure. As the V])LOWHU1DPH, the name of the message window template, to which the
filter is referring to, must be used. In the GZ0VJ1U array, enter the start and end values
of the message numbers to be selected. These values are supplied as transfer parameters
while the function is called. The GZ)LOWHU switch is set to identify the file structure as a
number filter.
• Call of the 06576HW0VJ:LQ)LOWHU API function, which applies the created filter to the
selected message window template.
*HQHUDO$SSOLFDWLRQ1RWHV
7DVN'HILQLWLRQ
,PSOHPHQWDWLRQ&RQFHSW
By using an OCX, no message line format or message window template must be created in
$ODUP/RJJLQJ. However, single messages must still be created. In the example, the single
messages created in the first two examples of this chapter are used.
In the *UDSKLFV'HVLJQHU, the message window is configured as a 6PDUW2EMHFW→2/(
&RQWURO. The toolbar is implemented using multiple :LQGRZV2EMHFWV→%XWWRQV, 6PDUW
1RWH
The configurations carried out in the previous two examples are considered complete. They
will not be described again, however, this example is based on them. The configuration of
the short-term archive is described in the example 0HVVDJH$UFKLYLQJ
H[BBFKDSWHUBF3'/.
,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
1 In Tag Management, create two tags of the %LQDU\7DJ type. In the example,
these are the %,1LBH[BDOJB and %,1LBH[BDOJB tags.
2 To display the message window, a 6PDUW2EMHFW→2/(&RQWURO is used. In the
example, this is the &&$OJ:LQ&WUO object.
After placing the object, the ,QVHUW2/(&RQWURO2&; dialog box is
automatically displayed. Select the :LQ&&$ODUP&RQWURO entry from the list and
exit the dialog box by clicking on 2..
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
In the 3DUDPHWHUV tab, select the +RUL]RQWDO and 9HUWLFDO check-boxes from the
6HSDUDWLRQ/LQHV field. Select line and column title, as well as auto-scrolling. In
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
In the 0HVVDJH/LQH tab, the message blocks displayed in the message line are
selected. The message blocks configured in $ODUP/RJJLQJ are marked by a
at
the beginning. For this example, all message blocks created in $ODUP/RJJLQJ are
selected for the message line.
If runtime is activated, the OCX will receive relevant data of the $ODUP/RJJLQJ.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
parameters. These functions require the picture and object names as transfer
parameters. The functions used in the example are:
• $;&B2Q%WQ+RUQ$FNQOSV]3LFWXUH1DPHOSV]2EMHFW1DPH
• $;&B2Q%WQ6LQJO$FNQOSV]3LFWXUH1DPHOSV]2EMHFW1DPH
• $;&B2Q%WQ9LVLEOH$FNQOSV]3LFWXUH1DPHOSV]2EMHFW1DPH
• $;&B2Q%WQ6FUROOOSV]3LFWXUH1DPHOSV]2EMHFW1DPH
• $;&B2Q%WQ0VJ)LUVWOSV]3LFWXUH1DPHOSV]2EMHFW1DPH
• $;&B2Q%WQ0VJ/DVWOSV]3LFWXUH1DPHOSV]2EMHFW1DPH
• $;&B2Q%WQ0VJ1H[WOSV]3LFWXUH1DPHOSV]2EMHFW1DPH
• $;&B2Q%WQ0VJ3UHYOSV]3LFWXUH1DPHOSV]2EMHFW1DPH
• $;&B2Q%WQ0VJ:LQOSV]3LFWXUH1DPHOSV]2EMHFW1DPH
• $;&B2Q%WQ$UF6KRUWWOSV]3LFWXUH1DPHOSV]2EMHFW1DPH
*HQHUDO$SSOLFDWLRQ1RWHV
8
In runtime, this example is accessed by clicking on the %XWWRQ displayed above using the
. The message generator can be turned on by selecting the $FWLYH check-box contained in
this picture. Messages will then be generated in 10 second cycles.
7DVN'HILQLWLRQ
Warnings are to be displayed in a picture that point out the presence of a certain type of
message.
The messages have already been created in the examples %LW0HVVDJH3URFHGXUH
&RQWLQXHG and $QDORJ$ODUPVFRQWLQXHG and can be taken over. Warnings and
alarms pending in the container picture and errors occurring in the motor picture are to be
pointed out. The alarm has priority over the error and warning. If a message is pending, a
button should enable the user to jump to the corresponding picture.
,PSOHPHQWDWLRQ&RQFHSW
The single messages to be monitored are combined into one group message. If one of the
single messages is generated, the group message will also be generated. A status tag and
status bit is assigned to this message.
Via a 6PDUW2EMHFW→6WDWXV'LVSOD\, the current status of this tag is analyzed and a
corresponding symbol displayed.
1RWH
The configurations carried out in the previous two examples are considered complete. They
will not be described again, however, this example is based on them.
6HWXSRIWKH5HTXLUHG7DJV
6WHS 3URFHGXUH6HWXSRIWKH5HTXLUHG7DJV
*HQHUDO,QIRUPDWLRQ
If a new message class is created, a group message for this message class will also be
created automatically. All messages within this message class are accepted into the group
message. The properties of the message classes and message types of the group message
can be changed independently of each other and therefore be linked to various status, lock
and acknowledge tags.
This example assumes that there are additional pictures using the same message classes.
This means that the automatically generated group messages can not be used, since the
group messages also try to identify the picture, from which the message originated.
Therefore, user-defined group messages must be created.
&UHDWLRQRIQHZ*URXS0HVVDJHV
6WHS 3URFHGXUH&UHDWLRQRIQHZ*URXS0HVVDJHV
8'
1 Open the $ODUP/RJJLQJ editor.
8
on the *URXS0HVVDJHV entry. This will display the 0HVVDJH&ODVV and
8VHU'HILQHG entries. 5 on the 8VHU'HILQHG entry and select "Add Group
Message" to display the 1HZ*URXS0HVVDJH dialog box.
2 Enter &RQWDLQHU$ODUP in the 1DPH entry field. As the 6WDWXV, /RFN and
$FNQRZOHGJH tags, set the tags created previously. Enter as the bit numbers.
Close the dialog box by clicking on 2.. Create two additional group messages
that use the same 6WDWXV, /RFN and $FNQRZOHGJH tags, but enter the bitnumber 1
and 2, respectively. The right window will display the icons of the newly created
group messages.
6WHS 3URFHGXUH&UHDWLRQRIQHZ*URXS0HVVDJHV
3 85 on one of the icons and select "Add Single Message" to open the 1HZ
6LQJOH0HVVDJHV dialog box. For each group message, enter the message
numbers of the corresponding single messages and close the dialog boxes by
clicking on 2..
4 In the navigation window, 8 ' on the 8VHU'HILQHG entry will display the
8
individual group messages as sub entries. If one of these group messages is
selected using the , the right window will display the icons of all added single
messages.
The following picture displays the single messages of the &RQWDLQHU$ODUP group
message.
,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
requested priority.
3URSHUWLHV→0LVFHOODQHRXV→2SHUDWRU&RQWURO(QDEOH to 1R.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
'LVSOD\.
state = GetTagWord("U16i_ex_alg_20");
if ((state&1)&&(state&256)) return 6;
else if ((state&2)&&(state&512)) return 5;
else if (state&1) return 3;
else if ((state&4)&&(state&1024)) return 4;
else if (state&2) return 2;
else if (state&4) return 1;
else return 0;
}
• Reading out of the status tag described by $ODUP/RJJLQJ.
• Setting of the current status depending on this tag. If multiple group messages are
pending, the user-definable order of priority decides which message will be displayed.
In this example, the order of priority, starting with the highest priority level, looks as
follows:
• Container Alarm
• Motor Error
• Acknowledged Container Alarm
• Container Warning
• Acknowledged Motor Error
• Acknowledged Container Warning
if ((value==2)||(value==5))
SetPictureName("ex_0_startpicture_00.PDL",
"workspace","ex_3_chapter_02.PDL");
else if (value>0)
SetPictureName("ex_0_startpicture_00.PDL",
"workspace","ex_3_chapter_02a.PDL");
}
• Determination of the currently displayed status of the status display.
• Depending on the displayed status, the picture change is performed. If the status is 0, no
action will be performed.
state = GetTagWord("U16i_ex_alg_20");
if ((state&1)&&(state&256)){
SetTagWord("U16i_ex_alg_22",
(WORD)(1|GetTagWord("U16i_ex_alg_22")));
SetTagWord("U16i_ex_alg_22",
(WORD)(~1&GetTagWord("U16i_ex_alg_22")));
}
else if ((state&2)&&(state&512)){
SetTagWord("U16i_ex_alg_22",
(WORD)(2|GetTagWord("U16i_ex_alg_22")));
SetTagWord("U16i_ex_alg_22",
(WORD)(~2&GetTagWord("U16i_ex_alg_22")));
}
else if ((state&4)&&(state&1024)){
SetTagWord("U16i_ex_alg_22",
(WORD)(4|GetTagWord("U16i_ex_alg_22")));
SetTagWord("U16i_ex_alg_22",
(WORD)(~4&GetTagWord("U16i_ex_alg_22")));
}
}
• Reading in of the current status of the group messages.
• If a message to be acknowledged is pending, it will be acknowledged. If multiple
messages to be acknowledged are pending, the on with the highest priority will be
acknowledged.
time(&Time);
TimeStruct = localtime(&Time);
mGroup.stTime.wYear=(WORD)(TimeStruct->tm_year+1900);
mGroup.stTime.wMonth=(WORD)(TimeStruct->tm_mon+1);
mGroup.stTime.wDay=(WORD)(TimeStruct->tm_mday);
mGroup.stTime.wHour=(WORD)(TimeStruct->tm_hour);
mGroup.stTime.wMinute=(WORD)(TimeStruct->tm_min);
mGroup.stTime.wSecond=(WORD)(TimeStruct->tm_sec+1);
mGroup.fIDUsed=FALSE;
strcpy(mGroup.szName,"Container Alarm");
mGroup.dwData=value;
MSRTStartMsgService(&dwServiceID,NULL,NULL,
MSG_NOTIFY_MASK_ALL,(LPVOID)0,&Error);
fRet=MSRTLockGroup (dwServiceID,&mGroup,&Error);
if (fRet==FALSE)
printf("Error in MSRTLockGroup(:::)
%s\r\n",Error.szErrorText);
else printf("Executed MSRTLockGroup(:::) \r\n");
MSRTStopMsgService (dwServiceID,&Error );
}
• Definition of the required tags. P*URXS is a structure that must be transferred to the
function setting the lock.
• Determination of the current system time. This value is given to the VW7LPH structure
member of the SYSTEMTIME type.
• The I,'8VHG structure member indicates, if the desired group message, which is to be
locked or enabled, is identified using its name or ID. The value of FALSE determines
that the group message is to be identified using its name.
• V]1DPH contains the name of the desired group message.
• GZ'DWH indicates, if it should be set or enabled. The current status is transferred to the
check-box.
• Starting of the message service via the 06576WDUW0VJ6HUYLFH function.
• Calling of the function for locking or enabling the 0657/RFN*URXS group message.
• Termination of the message service via the 06576WRS0VJ6HUYLFH function.
*HQHUDO$SSOLFDWLRQ1RWHV
5HSRUW'HVLJQHU
8
In runtime, the examples pertaining to this topic can be selected by clicking on the button
displayed above with the . The examples are configured in the H[BBFKDSWHUB3'/.
Additional examples are spread out throughout the example project.
*HQHUDO,QIRUPDWLRQ
The 5HSRUW'HVLJQHU is part of the WinCC basic package and offers functions for the
creation and output of reports. Creation comprises the creation of the report layout in the
configuration system of the 5HSRUW'HVLJQHU, output comprises the printing of these reports.
1RWH
The supplied system layouts can be used directly, or be copied and modified to meet your
needs. The names of the system layouts and system print jobs are always preceded by the
# symbol.
7DVN'HILQLWLRQ
,PSOHPHQWDWLRQ&RQFHSW
A system layout is available that satisfies all of these requirements. It is the #3'/3LFUSO
layout. This layout is copied and adapted to meet your needs.
,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
Open the #3'/3LFUSO system layout via )LOH→2SHQ and save it under a new
name via )LOH→6DYH$V. In the example, the name 3'/SLFWXUHUSO is used.
2 85 on a blank area within the layout to open its properties dialog box.
In the 3URSHUWLHV tab, general geometric properties can be set at the *HRPHWU\
entry.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
The 0LVFHOODQHRXV entry allows you to add a cover sheet or final page. In the
example, a cover sheet is used.
3
Clicking on the button from the toolbar enables the editing of the static
picture part, while clicking on the button enables the editing of the dynamic
picture part.
The dynamic part of the report contains a '\QDPLF2EMHFW→(PEHGGHG/D\RXW.
In the example, this is the (PEHG/D\RXW dynamic object, which is not to be
changed. The embedded layout is the #3'/SLFWXUHFRPSDFWUSO layout.
This layout can be opened and its elements be changed to meet your needs. It is
recommended to make a copy of this layout first and then to edit the copy. If
changes are made to the layout, this layout must be set in the initial layout at the
(PEHG/D\RXW object via 3URSHUWLHV→0LVFHOODQHRXV→/D\RXW)LOH.
your own logo, delete the current 2OH2EMHFW. Configure a new 6WDWLF2EMHFW→
2/((OHPHQW. In the ,QVHUW2EMHFW dialog box, which is displayed after placing
the object in the report, select &UHDWHIURP)LOH and set the bitmap file containing
your logo. Close the dialog box by clicking on 2..
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
6HWXSRI3ULQW-RE
85
6WHS 3URFHGXUH6HWXSRI3ULQW-RE
8' 85
The right window will display the new print job using the default name 3ULQW
-RE, in addition to the already existing print jobs. or on the new
print job to display its properties dialog box.
2 In the 3ULQW-RE tab, replace the default name in the 1DPH entry field by
3ULQWMREB3'/. As the /D\RXW, set the previously created layout 3'/SLFWXUHUSO.
In the 6HOHFWLRQ tab, the area to be printed is set. In the 3DJH5DQJH field, select
$OO. In the example, a set 7LPH5DQJH has no influence on the print job.
In the 3ULQWHU6HWXS tab, the printer is selected. You can also choose to print the
data to a file.
3 In the &RQWURO&HQWHU, 8 5 on the print job and selecting "Print the Print Job"
starts the print job. The print job can also be previewed first.
4 In the example project, a print job preview can be displayed via a :LQGRZV
2EMHFW→%XWWRQ. This is the %XWWRQ object in the H[BBFKDSWHUB3'/.
RPTJobPreview("PrintJob_PDL");
}
• Calls the 537-RE3UHYLHZ standard function. As transfer parameter, the name of the
print job is used.
1RWH
If the layout, inserted into the report layout of the 5HSRUW'HVLJQHU editor, is open, the
preview and the print job can not be started.
*HQHUDO$SSOLFDWLRQ1RWHV
7DVN'HILQLWLRQ
All created project functions of a project are to be reported. General information and the
source code of each project function are to be printed out.
,PSOHPHQWDWLRQ&RQFHSW
,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
85
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
Save this system layout under a new name via )LOH→6DYH$V. In the example,
the name JVFBSURMHFWIXQFWLRQUSO is used.
2 In the properties dialog box of the layout, which is accessed by 8 5 on a blank
area within the report, select the &RYHU6KHHW entry from 0LVFHOODQHRXV. Accept
the remaining settings.
3 The static part of the report contains a header and a footer.
The footer contains the 6\VWHP2EMHFWV 'DWH7LPH, 3DJH1XPEHU, 3URMHFW1DPH
and /D\RXW1DPH.
The header and footer both contain a 6WDWLF2EMHFW→5HFWDQJOH as the
background. Via 3URSHUWLHV→&RORUV→%DFNJURXQG&RORU, set the background
color of these rectangles to /LJKW*UD\.
The header contains two additional 6WDWLF2EMHFWV→6WDWLF7H[WV and one 6\VWHP
2EMHFW→3URMHFW1DPH. The existing 2OH2EMHFW, which displays the logo, is
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
entry will be displayed. This means that a selection can be made. Click on this
entry using the
6HOHFWLQJ(OHPHQWV
8 to activate the
dialog box.
button. This button opens the
displayed in %ROG. The entire '\Q7H[W object was framed by a border using a
/LQH:HLJKW of .
Save the changes made to the embedded layout. Close the layout.
7 In the still open layout JVFBSURMHFWIXQFWLRQUSO, set the just created layout at the
(PEHG/D\RXW object via 3URSHUWLHV→0LVFHOODQHRXV→/D\RXW)LOH. This
functions to be reported.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
1RWH
The procedure of creating a new print job and executing that print job from the &RQWURO
&HQWHU or runtime, is described in the previous example under 6HWXSRI3ULQW-RE. The
*HQHUDO$SSOLFDWLRQ1RWHV
7DVN'HILQLWLRQ
All tags of certain tag groups used in a project are to be documented. The tag
documentation should contain the tag name, tag type, its group, tag parameters and process
connection information.
,PSOHPHQWDWLRQ&RQFHSW
Configure a new layout in the 5HSRUW'HVLJQHU editor. This layout is not based on any
existing layout.
,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
85
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
8
The right window will display the new layout, using the default name
1HZ53/53/, in addition to the already existing ones. 5 on this layout and
select "Rename Layout" to give it a new name. In the example, the name
&RQWURO&HQWHUUSO is used.
8
2 Open the new layout in the 5HSRUW'HVLJQHU.
In the properties dialog box of the layout, which is accessed by 5 on a blank
area within the report, select the &RYHU6KHHW entry from 0LVFHOODQHRXV. Accept
the remaining settings.
3 In the static part of the report, various 6WDWLF2EMHFWV and 6\VWHP2EMHFWV are
configured for the header and footer.
The design of the cover sheet is a suggestion on which your own concept can be
based.
4 In the dynamic part of the report, a '\QDPLF2EMHFW→'\QDPLF7DEOH is
configured. In the example, this is the '\Q7DEOH object.
After the object is placed in the report, the &RQQHFW dialog box is displayed.
Select the 7DJV entry from the &RQWURO&HQWHU&6 folder. Close the dialog box by
clicking on 2..
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
6 In the &RQQHFW tab of the table’s properties dialog box, several selection options
are available.
8' on one of the entries brings up its corresponding dialog box for selecting
data. If a selection was made, a red check-mark will be displayed.
In the dialog box for selecting the tag parameters, select the 'DWD7\SH, *URXS,
3DUDPHWHUV and ([WHUQDO7DJ'DWD check-boxes. Also, select the &RPSDFW check-
In the example, the following tag groups are selected: $ODUP/RJJLQJ and
$ODUP/RJJLQJ. However, this selection is only possible, if the $OO7DJ*URXSV
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
1RWH
The procedure of creating a new print job and executing that print job from the &RQWURO
&HQWHU or runtime, is described in the first example of the 5HSRUW'HVLJQHU chapter under
*HQHUDO$SSOLFDWLRQ1RWHV
7DVN'HILQLWLRQ
The configuration data of all process value archives created in a project are to be
documented. The documentation should contain the general archive data and the
configuration data of the individual archive tags.
,PSOHPHQWDWLRQ&RQFHSW
Configure a new layout in the 5HSRUW'HVLJQHU editor. This layout is not based on any
existing layout.
,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
85
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
8
The right window will display the new layout, using the default name
1HZ53/53/, in addition to the already existing ones. 5 on this name and
rename the layout to WOJBFVUSO.
8
2 Open the new layout in the 5HSRUW'HVLJQHU.
In the properties dialog box of the layout, which is accessed by 5 on a blank
area within the report, select the &RYHU6KHHW entry from 0LVFHOODQHRXV. Accept
the remaining settings.
3 In the static part of the report, various 6WDWLF2EMHFWV and 6\VWHP2EMHFWV are
configured for the header and footer.
The design of the cover sheet is a suggestion on which your own concept can be
based.
4 In the dynamic part of the report, a '\QDPLF2EMHFW→'\QDPLF7DEOH is
configured. In the example, this is the '\Q7DEOH object.
After the object is placed in the report, the &RQQHFW dialog box is displayed.
Select the 3URFHVV9DOXH$UFKLYH entry from the 7DJ/RJJLQJ&6 folder. Close
the dialog box by clicking on 2..
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
6 In the &RQQHFW tab of the table’s properties dialog box, several selection options
are available.
8' on one of the entries brings up its corresponding dialog box for selecting
data. If a selection was made, a red check-mark will be displayed.
In the archive selection dialog box of the "Archive Names" entry, select the $OO
$UFKLYHV check-box. In the process archive selection dialog box of the "Process
1RWH
The procedure of creating a new print job and executing that print job from the &RQWURO
&HQWHU or runtime, is described in the first example of the 5HSRUW'HVLJQHU chapter under
*HQHUDO$SSOLFDWLRQ1RWHV
7DVN'HILQLWLRQ
A trend window is to be printed out in runtime. It should be possible to set a time range for
the data to be printed.
This example is based on the &\FOLF6HOHFWLYH$UFKLYLQJH[BBFKDSWHUBD3'/
example in the 7DJ/RJJLQJ chapter. Its concepts will be utilized to print out the table
displayed in this example.
,PSOHPHQWDWLRQ&RQFHSW
Configure a new layout in the 5HSRUW'HVLJQHU editor. The time selection is not made in the
layout, but in runtime via a project function. This function will carry out the time selection
directly in the print job.
,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
8
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
8
The right window will display the new layout in addition to the already existing
ones. Rename the layout to WOJB=6B3$BUSO by 5 on it.
2 Open the new layout in the 5HSRUW'HVLJQHU.
In the static part of the report, various 6WDWLF2EMHFWV and 6\VWHP2EMHFWV are
configured for the header and footer.
3 In the dynamic part of the report, three '\QDPLF2EMHFWV→'\QDPLF0HWDILOHV
are configured. In the example, these are the '\Q0HWDILOH, '\Q0HWDILOH and
'\Q0HWDILOH objects.
After placing the objects in the report, the &RQQHFW dialog box is displayed. For
all three objects, select the 7DJ7UHQG entry from the 7DJ/RJJLQJ5XQWLPH
folder. Close the dialog boxes by clicking on 2..
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
8' on one of the entries brings up its corresponding dialog box for selecting
data. If a selection was made, a red check-mark will be displayed.
A 7LPH6HOHFWLRQ will not be performed.
In the $UFKLYH'DWD6HOHFWLRQ dialog box, the =6B3URFHVV9DOXH$UFKLYHB
archive is selected. For the '\Q0HWDILOH object, select the *BH[BWOJB tag as
the archive tag. For the other two objects, set the other two available tags,
respectively.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
6HWXSRI3ULQW-RE
85
6WHS 3URFHGXUH6HWXSRI3ULQW-RE
1 In the &RQWURO&HQWHU, on the 3ULQW-RE entry and select "New Print Job".
8 8
The right window will display the new print job using the default name 3ULQW
-RE, in addition to the already existing print jobs. ' or 5 on the new
print job to display its properties dialog box.
In the 3ULQW-RE tab, enter 3ULQWMREB=6B3$B in the 1DPH entry field. As the
/D\RXW, set the previously created layout WOJB=6B3$BUSO.
In the 6HOHFWLRQ tab, the print range is set. In the 3DJH5DQJH field, select $OO. In
the 7LPH5DQJH field, select $EVROXWH. An exact time range is not set until runtime
is activated.
In the 3ULQWHU6HWXS tab, the printer to be used is set.
2 In the example project, a print job preview can be displayed via a :LQGRZV
2EMHFW→%XWWRQ. This is the %XWWRQ object in the H[BBFKDSWHUBD3'/.
6WHS 3URFHGXUH6HWXSRI3ULQW-RE
3 To perform a time selection, a setup dialog box is necessary. This dialog box is
configured as a separate picture. In the example project, this is the
H[BBZLQGRZB3'/.
the end time, the current system time is set, as the start time, the current system
time minus one minute is set.
5 Configure two :LQGRZV2EMHFWV→%XWWRQV in the H[BBZLQGRZB3'/. In the
example, these are the %XWWRQ and %XWWRQ objects.
%XWWRQ serves as the cancel button. Create a 'LUHFW&RQQHFWLRQ at (YHQWV→
&XUUHQW:LQGRZ.
function that sets the time selection of a certain print job. The name of the print
job is read from a tag of the 7H[W7DJ%LW&KDUDFWHU6HW type that must be
created in 7DJ0DQDJHPHQW. In the example, this is the 7LBH[BUHSB tag.
6 To display the just created picture in the H[BBFKDSWHUBD3'/, a 6PDUW2EMHFW
→3LFWXUH:LQGRZ must be created. In the example, this is the 3LFWXUH:LQGRZ
object. At 3URSHUWLHV→0LVFHOODQHRXV→3LFWXUH1DPH, set the
H[BBZLQGRZB3'/. Set the 'LVSOD\ to 1R.
6WHS 3URFHGXUH6HWXSRI3ULQW-RE
ModifyPrintJob(TimeFrom(),
TimeTo(),
GetTagChar("T16i_ex_rep_00"));
}
• Calling of the 0RGLI\3ULQW-RE project function. This project function requires as transfer
parameters two time values in the form of the SYSTEMTIME structure. These values
are determined via two project functions from the time values 7LPH)URP and
7LPH7R stored in the internal tags. In addition, the name of the print job to be
typ = VT_DATE;
strcpy( propname1, "ABSOLUTESELECTIONFROM");
strcpy( propname2, "ABSOLUTESELECTIONTO");
ptr1 = (LPVOID)&st1;
ptr2 = (LPVOID)&st2;
*HQHUDO$SSOLFDWLRQ1RWHV
functionality. The tags for buffering the time values are to be configured using the same
names. Otherwise, the 7LPH)URP and 7LPH7R project functions need to be adapted. To
utilize the dialog box for multiple print jobs, the creation of a text tag for storing the
print job name is advisable.
7DVN'HILQLWLRQ
A table is to be printed out in runtime. It should be possible to set a time range for the data
to be printed.
This example is based on the 8VHUGHILQHGWDEOHOD\RXWH[BBFKDSWHUBF3'/
example in the 7DJ/RJJLQJ chapter. Its concepts will be utilized to print out the table
displayed in this example.
,PSOHPHQWDWLRQ&RQFHSW
Configure a new layout in the 5HSRUW'HVLJQHU editor. The time selection is not made in the
layout, but in runtime via a project function. This function will carry out the time selection
directly in the print job.
The procedure for making a time selection in runtime is described in the previous 6HWXSRI
3ULQW-RE table.
,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
85
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
85
The right window will display the new layout in addition to the already existing
ones. Rename the layout to WOJB=.B3$BUSO by on it.
2 Open the new layout in the 5HSRUW'HVLJQHU.
In the static part of the report, various 6WDWLF2EMHFWV and 6\VWHP2EMHFWV are
configured for the header and footer.
3 In the dynamic part of the report, a '\QDPLF2EMHFW→'\QDPLF7DEOH is
configured. In the example, this is the '\Q7DEOH object.
After placing the objects in the report, the &RQQHFW dialog box is displayed. Select
the 7DJ7DEOH entry from the 7DJ/RJJLQJ5XQWLPH folder. Close the dialog box
by clicking on 2..
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
8' on one of the entries brings up its corresponding dialog box for selecting
data. If a selection was made, a red check-mark will be displayed. A 7LPH
6HOHFWLRQ is not performed.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
6HWXSRI3ULQW-RE
85
6WHS 3URFHGXUH6HWXSRI3ULQW-RE
8 8
The right window will display the new print job using the default name 3ULQW
-RE, in addition to the already existing print jobs. ' or 5 on the new
print job to display its properties dialog box.
In the 3ULQW-RE tab, enter 3ULQWMREB=.B3$B in the 1DPH entry field. As the
/D\RXW, set the previously created layout WOJB=.B3$BUSO.
In the 6HOHFWLRQ tab, the print range is set. In the 3DJH5DQJH field, select $OO. In
the 7LPH5DQJH field, select $EVROXWH. An exact time range is not set until runtime
is activated.
In the 3ULQWHU6HWXS tab, the printer to be used is set.
2 The procedure for making a time selection in runtime is described in the previous
example in the 6HWXSRI3ULQW-RE table.
Adaptations must be made to the button for the time selection in the
&$FWLRQ at (YHQWV→0RXVH→0RXVH$FWLRQ. The 7LBH[BUHSB text tag is to
be supplied with the name of the just created print job.
The print job name must be changed in the function call for the button
(which activates the print preview) in the &$FWLRQ at (YHQWV→0RXVH→0RXVH
$FWLRQ.
*HQHUDO$SSOLFDWLRQ1RWHV
7DVN'HILQLWLRQ
A message sequence report is to be created. The user should be able to activate the printing
of the report via a button. However, if the messages in the report exceed one layout page,
the message sequence report will be printed out automatically.
This example is based on the 0HVVDJH:LQGRZH[BBFKDSWHUBE3'/ example in
the $ODUP/RJJLQJ chapter. In that example, the toolbar of the message window used
already provided a button for the report functions, and the message sequence report has
been activated.
,PSOHPHQWDWLRQ&RQFHSW
A system layout and system print job are available, which meet the set requirements. These
are the #DOUWPHIUSO layout and #5HSRUW$ODUP/RJJLQJ570HVVDJH6HTXHQFH print job.
The layout is copied and adapted to meet your own requirements. As the print job, the
above system print job must be used, only its layout is replaced.
,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
85
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
Save this system layout under a new name via )LOH→6DYH$V. In the example,
the name DOJBPHIUSO is used.
2 The static part of the report contains a header and a footer.
The elements of the static part can be adapted to meet your own requirements.
3 The dynamic part of the report consists of a '\QDPLF2EMHFW→'\QDPLF7DEOH
("Alarm Logging Runtime" -> "Message Sequence Report"). In the example, this
is the '\Q7DEOH object.
Open the '\Q7DEOH object’s properties dialog box and select the &RQQHFW tab.
The table is already connected to the 0HVVDJH6HTXHQFH5HSRUW of $ODUP
/RJJLQJ5XQWLPH. A selection has also been already performed.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
4
The button or 8' on the 6HOHFWLRQ entry opens the dialog box for
selecting message blocks. The 'DWH, 7LPH and 1XPEHU system blocks are already
selected. In the example, clicking on the button adds all remaining
message blocks.
Close the dialog box by clicking on 2.. Save the layout.
$GDSWLQJWKH3ULQW-RE
6WHS 3URFHGXUH$GDSWLQJWKH3ULQW-RE
8 8
1 Open the system print job #5HSRUW$ODUP/RJJLQJ570HVVDJH6HTXHQFH by
' or 5 on its name (and then selecting "Properties") in the &RQWURO&HQWHU.
2 In the 3ULQW-RE tab, set the just created /D\RXW DOUWPHIUSO. In the 3ULQWHU6HWXS
tab, set the printer to be used. No further changes need to be made. Close the
dialog box by clicking on 2..
8
3 The message sequence report must be activated in the $ODUP/RJJLQJ editor.
Open the Alarm Logging editor. 5 on the 5HSRUWV entry and select
"Add/Remove" to open the $VVLJQLQJ5HSRUW3DUDPHWHUV dialog box.
6WHS 3URFHGXUH$GDSWLQJWKH3ULQW-RE
To allow the user to activate the message sequence report at any time, a
corresponding button must be configured in the toolbar of the message window
template. This is the 5HSRUW)XQFWLRQV button. In the example project, this button
has already been configured in the 0HVVDJH:LQGRZB template used in the
H[BBFKDSWHUBE3'/.
*HQHUDO$SSOLFDWLRQ1RWHV
0HVVDJH6HTXHQFH5HSRUWRQD/LQH3ULQWHU
7DVN'HILQLWLRQ
A message sequence report is to be created which is suitable for the output of a line printer.
If a message to be reported comes in, this message is to be printed automatically.
,PSOHPHQWDWLRQ&RQFHSW
Create a line printer layout. This layout will be set in the #5HSRUW$ODUP/RJJLQJ57
0HVVDJH6HTXHQFH system print job.
&UHDWLRQRID/LQH3ULQWHU/D\RXW
85
6WHS 3URFHGXUH&UHDWLRQRID/LQH3ULQWHU/D\RXW
8
2 A new line printer layout with the default name 1HZ5353 is created. In the
example, this name is kept. ' on the name of the new line printer layout (in
the right window), opens the /LQH/D\RXW(GLWRU.
In this editor, general settings pertaining to page margins, headers, footers, etc.
can be made.
In the 7DEOH field, the button opens a dialog box for selecting the
message blocks to be used in the message sequence report. In the example, all
available message blocks are selected.
3 The number of columns and their width is automatically adjusted according to the
selected message blocks and their order.
Save the settings made and close the line layout editor.
$GDSWLQJWKH3ULQW-RE
6WHS 3URFHGXUH$GDSWLQJWKH3ULQW-RE
8 8
1 Open the system print job #5HSRUW$ODUP/RJJLQJ570HVVDJH6HTXHQFH by
' or 5 on its name (and then selecting "Properties") in the &RQWURO&HQWHU.
2 In the 3ULQW-RE tab, select the /LQH/D\RXWIRU/LQH3ULQWHU check-box and set the
just created /D\RXW 1HZ5353. In the 3ULQWHU6HWXS tab, set the line printer
to be used. No further changes need to be made. The dialog box is closed by
clicking on 2..
8
3 The message sequence report must be activated in the $ODUP/RJJLQJ editor.
Open the Alarm Logging editor. 5 on the 5HSRUWV entry and select
"Add/Remove" to open the $VVLJQLQJ5HSRUW3DUDPHWHUV dialog box. In this
dialog box, select the 0HVVDJH6HTXHQFH5HSRUW check-box.
*HQHUDO$SSOLFDWLRQ1RWHV
7DVN'HILQLWLRQ
A message archive report is to be created. The user should be able to activate the printing of
the report via a button.
This example is based on the 0HVVDJH$UFKLYLQJH[BBFKDSWHUBF3'/ example
in the $ODUP/RJJLQJ chapter. In that example, the user-defined toolbar of the short-term
archive window already provided a button for the report function, and the message
sequence report has been activated.
,PSOHPHQWDWLRQ&RQFHSW
A system layout and system print job are available, which meet the set requirements. These
are the #DOUWXPDUSO layout and #5HSRUW$ODUP/RJJLQJ575HYROYLQJ$UFKLYH print job.
The layout is copied and adapted to meet your requirements. As the print job, the above
system print job must be used, only its layout is replaced.
,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
85
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH5HSRUW'HVLJQHU
4
The button or 8 ' on the 6HOHFWLRQ entry opens the dialog box for
selecting message blocks. The 'DWH, 7LPH and 1XPEHU system blocks are already
selected. In the example, clicking on the button adds all remaining
message blocks.
Close the dialog box by clicking on 2.. Save the layout.
$GDSWLQJWKH3ULQW-RE
6WHS 3URFHGXUH$GDSWLQJWKH3ULQW-RE
8 8
1 Open the system print job #5HSRUW$ODUP/RJJLQJ575HYROYLQJ$UFKLYH by
' or 5 on its name (and then selecting "Properties") in the &RQWURO&HQWHU.
2 In the 3ULQW-RE tab, set the just created /D\RXW DOUWXPDUSO. In the 3ULQWHU6HWXS
tab, set the printer to be used. No further changes need to be made. The dialog
box is closed by clicking on 2..
8
3 The archive report must be activated in the $ODUP/RJJLQJ editor. Open the
Alarm Logging editor. 5 on the 5HSRUWV entry and select "Add/Remove" to
open the $VVLJQLQJ5HSRUW3DUDPHWHUV dialog box.
In this dialog box, select the $UFKLYH5HSRUW$FWLYH check-box. Save the settings
made in $ODUP/RJJLQJ.
4 To allow the user to activate the report at any time, a corresponding button must
be configured in the toolbar of the message window template. If a user-defined
toolbar is used, the pressing of this button must be simulated my a standard
function. This would be the standard function 2Q%WQ3ULQWSV]0VJ:LQ. In the
example project, this button has already been configured in the
H[BBFKDSWHUBE3'/.
*HQHUDO$SSOLFDWLRQ1RWHV
2/(&RPPXQLFDWLRQWR(;&(/
8
In runtime, the examples to this topic can be selected by clicking on the button displayed
above with the . These examples are configured in the H[BBFKDSWHUB3'/ and the
2/(B&RPPXQLFDWLRQ[OV Excel spreadsheet.
7DVN'HILQLWLRQ
The values of internal tags of different types are to be read into an Excel spreadsheet. In a
second column of the spreadsheet, it should be possible to enter set point values for these
tags. These values are then written into the WinCC project.
,PSOHPHQWDWLRQ&RQFHSW
In a picture, one I/O field is configured for each tag in which the value of the tag can be
displayed and written.
Create a spreadsheet in Excel (Version 8.0). In a column of this spreadsheet, the names of
the tags to be read and written are entered. Add two buttons to the spreadsheet. Macros are
assigned to these buttons, which read the tag names to be processed and either read or
assign set point values to these tags.
,PSOHPHQWDWLRQLQ:LQ&&
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ:LQ&&
1 In Tag Management, create tags of several types. In the example, the following
tags are used:
corresponding tag.
,PSOHPHQWDWLRQLQ([FHO9HUVLRQ
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ([FHO
In the spreadsheet, fill out a column with the names of the tags to be processed.
2 Configure a button for reading tag values.
For this purpose, activate the &RQWURO7RROER[ toolbar from the 9LHZ→7RROEDUV
menu (if it is not activated yet). Select the "Command Button" element and place
it in the table.
The properties of this control element can be set after clicking on the button.
The example uses *HW9DOXH as the name of the object and *HW9DOXH as the
8'
caption.
on the created command button opens the Visual Basic Editor, where the
detailed procedure code can be entered.
Cell = "C3"
i = 1
End Sub
• Creation of a WinCC object, which is stored in the PFS tag.
• Using a loop, the individual cells of the column (containing the names of the tags to be
processed) are read. In the WinCC project, the tag values are read using the *HW9DOXH
function and entered into the column next to it. The loop is continued until an empty
cell (of the columns containing the tag names) is reached.
Cell = "C3"
i = 1
End Sub
• Creation of a WinCC object, which is stored in the PFS tag.
• Using a loop, the individual cells of the column (containing the names of the tags to be
processed) are read. Additionally, a column, containing the tag values to be set, is read.
These tag values are written into the WinCC project using the 6HW9DOXH function. The
loop is continued until an empty cell (of the columns containing the tag names) is
reached.
*HQHUDO$SSOLFDWLRQ1RWHV
$GGLWLRQDO&RQILJXUDWLRQVLQWKH([DPSOHV
This chapter describes the additional elements used in some of the pictures. The description
of these elements in the examples where they occur would distract from the main topic.
This chapter completes the description of the sample projects.
3LFWXUH5HJLVWHU
7DVN'HILQLWLRQ
The order of the last 10 selected pictures in the project are to be stored. A "Back" button
should allow the selection of these pictures in reverse order. A "Forward" button should
allow the selection of the current picture.
In a separate picture, all pictures of the register are to be displayed in the right order. A
direct selection of the pictures can be made from there.
,PSOHPHQWDWLRQ&RQFHSW
The picture order is stored in 10 static C-tags of a project function. This project function is
called at every picture change. It controls the picture selection performed by the "Back" and
"Forward" buttons and the direct picture selection.
,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
1 Two tags of the %LQDU\7DJ type are required. In the example, these are the
%,1LBH[BRUJB and %,1LBH[BRUJB tags. These tags control the operation of
time a call is made, the new picture name is stored in the register and the
remaining names are moved back by one position.
3 In the keyboard layout H[BBNH\ERDUGB3'/, two control elements for
scrolling backward and forward are configured.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
function. This function transfers the stored picture names to the 6WDWLF7H[WV. The
&$FWLRQ is triggered upon the change of the 7[BH[BRUJB tag. This updates
5 The project function uses a parameter to identify from where it was called. For
this parameter, some constants have been defined in the $3'()$3+ file. This
file is located in the /LEUDU\ project folder.
The following constants have been defined:
• #define REG_INSERTPICTURE 0
• #define REG_BACK 1
• #define REG_FORWARD 2
• #define REG_DIRECT 3
• #define REG_SHOWREGISTER 4
if (nFlag==REG_INSERTPICTURE){
if (st == 0 ){
pos = 0;
if (biz < MAX_REG) biz++;
for ( i=(MAX_REG-1) ; i>0 ; i-- ){
strcpy(PictureName[i],PictureName[i-1]);
}
strcpy(PictureName[0],PicName);
}
else st=0;
}
if (nFlag==REG_BACK){
pos++;
if ( pos > (MAX_REG-1) ) pos=(MAX_REG-1);
st = 1;
SetPictureName("ex_0_startpicture_00.PDL",
"workspace",PictureName[pos]);
}
if (nFlag==REG_FORWARD){
pos--;
if ( pos < 0 ) pos=0;
st = 1;
SetPictureName("ex_0_startpicture_00.PDL",
"workspace",PictureName[pos]);
}
if (nFlag==REG_SHOWREGISTER){
SetText("ex_9_register_00.PDL",
"Static Text1",PictureName[0]);
SetText("ex_9_register_00.PDL",
"Static Text2",PictureName[1]);
SetText("ex_9_register_00.PDL",
"Static Text3",PictureName[2]);
SetText("ex_9_register_00.PDL",
"Static Text4",PictureName[3]);
SetText("ex_9_register_00.PDL",
"Static Text5",PictureName[4]);
SetText("ex_9_register_00.PDL",
"Static Text6",PictureName[5]);
SetText("ex_9_register_00.PDL",
"Static Text7",PictureName[6]);
SetText("ex_9_register_00.PDL",
"Static Text8",PictureName[7]);
SetText("ex_9_register_00.PDL",
"Static Text9",PictureName[8]);
SetText("ex_9_register_00.PDL",
"Static Text10",PictureName[9]);
}
if (nFlag==REG_DIRECT){
st=1;
pos=nPos;
}
if ((nFlag!=REG_SHOWREGISTER) && (nFlag!=REG_DIRECT)){
if (pos<(biz-1)) SetTagBit("BINi_ex_org_00",FALSE);
else SetTagBit("BINi_ex_org_00",TRUE);
if (pos>0) SetTagBit("BINi_ex_org_01",FALSE);
else SetTagBit("BINi_ex_org_01",TRUE);
}
SetTagWord("U16i_ex_org_00",(WORD)pos);
}
• If the transfer parameter Q)ODJ has the value of 5(*B,16(573,&785(, the function
was called by the &$FWLRQ at (YHQWV→3URSHUW\7RSLFV→0LVFHOODQHRXV→3LFWXUH
1DPH of the :RUNVSDFH object in the H[BBVWDUWSLFWXUHB3'/. The :RUNVSDFH object
is the picture window in which all the example pictures are displayed. If the picture
change is not to be entered into the register, the VW tag must be set to in a previous
function call. The register itself consists of a static array having 10 text tags.
• If the transfer parameter Q)ODJ has the value of 5(*B%$&., the "Back" button has
been pressed. The picture change is performed by the function itself and is not entered
into the register.
• If the transfer parameter Q)ODJ has the value of 5(*B)25:$5', the "Forward" button
has been pressed. The picture change is performed by the function itself and is not
entered into the register.
• If the transfer parameter Q)ODJ has the value of 5(*B6+2:5(*,67(5, the 6WDWLF
7H[WV in the H[BBUHJLVWHUB3'/ are to be updated. This is the case if the named
picture has been selected or if a picture change has been performed in an opened
picture.
• If the transfer parameter Q)ODJ has the value of 5(*B',5(&7, a direct picture selection
via the 6WDWLF7H[WV has been performed. The picture change is performed by the
&$FWLRQ at the 6WDWLF7H[W and is not entered into the register.
*HQHUDO$SSOLFDWLRQ1RWHV
7DEOHRI&RQWHQWV
8
The example project’s table of contents can be displayed by clicking on the above button
with the .
7DVN'HILQLWLRQ
The entire contents of the project is to be displayed in a dialog box. One window should
display the main chapters. Another window should display the examples belonging to a
selected chapter.
It should be possible to directly select an example. The selection should be activated by a
double-click.
,PSOHPHQWDWLRQ&RQFHSW
The selection of the contents dialog box is made via a button from the overview bar. This
dialog box is displayed via a picture window. The dialog box contains an additional picture
window, which displays, depending on the chapter selected, another picture.
,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
1 Two tags of the 8QVLJQHG%LW9DOXH type are required. In the example, these
are the 8LBH[BFRQB and 8LBH[BFRQB tags. These tags store the currently
selected chapter number and example number.
2 A picture of the dialog box’s layout is available. This is the
H[BBUHJLVWHUB3'/. For each chapter, a 6WDQGDUG2EMHFW→6WDWLF7H[W and a
6PDUW2EMHFW→*UDSKLF2EMHFW is configured.
8
At the opening of the picture, no chapter is selected. The 8LBH[BFRQB tag
has the value of zero. If a 6WDWLF7H[W is selected with the , the corresponding
chapter number is written into the tag. Using multiple '\QDPLF'LDORJV, the
coloring of the selected 6WDWLF7H[W is changed.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
nButtonID=1;
if (bToggle) bPress1=TRUE;
else bPress2=TRUE;
bToggle=!bToggle;
SetTagWord("U16i_ex_cont_01",(WORD)nButtonID);
}
• The external C-tag is supplied with the identification number of the 6WDWLF7H[W. This
will determine the action to be performed.
• At each mouse click, E3UHVV and E3UHVV are alternately set to 758(.
if ((bPress1)&&(bPress2))
switch(nButtonID){
case1:SetPictureName("ex_0_startpicture_00.PDL",
"workspace","ex_3_chapter_01.PDL");
break;
case2:SetPictureName("ex_0_startpicture_00.PDL",
"workspace","ex_3_chapter_01a.PDL");
break;
case3:SetPictureName("ex_0_startpicture_00.PDL",
"workspace","ex_3_chapter_01b.PDL");
break;
case4:SetPictureName("ex_0_startpicture_00.PDL",
"workspace","ex_3_chapter_01c.PDL");
break;
case5:SetPictureName("ex_0_startpicture_00.PDL",
"workspace","ex_3_chapter_01d.PDL");
break;
case6:SetPictureName("ex_0_startpicture_00.PDL",
"workspace","ex_3_chapter_01e.PDL");
break;
case7:SetPictureName("ex_0_startpicture_00.PDL",
"workspace","ex_3_chapter_01f.PDL");
break;
case8:SetPictureName("ex_0_startpicture_00.PDL",
"workspace","ex_3_chapter_01g.PDL");
break;
case9:SetPictureName("ex_0_startpicture_00.PDL",
"workspace","ex_3_chapter_01i.PDL");
break;
case10:SetPictureName("ex_0_startpicture_00.PDL",
"workspace","ex_3_chapter_01j.PDL");
break;
default:break;
}
bPress1=FALSE;
bPress2=FALSE;
return 242;
}
• The two external C-tags are queried. If both have the status of 758(, a double-click has
been performed on a 6WDWLF7H[W in the past 500 ms. The &$FWLRQ is executed every 500
ms. After every call, both external C-tags are reset to )$/6(.
• If a double-click is detected, an action is performed depending on the Q%XWWRQ,' tag.
This tag contains information about which 6WDWLF7H[W was selected.
• Return of the picture width.
8
The dialog boxes for setting colors described in this example are displayed by selecting the
above button from the H[BBFKDSWHUBF3'/ with the .
7DVN'HILQLWLRQ
Using several dialog boxes, the color settings of the table described in the 7DJ/RJJLQJ
chapter, example 8VHUGHILQHGWDEOHOD\RXWH[BBFKDSWHUBF3'/, can be changed.
The background color of the table as well as each column’s font color are to be changeable.
,PSOHPHQWDWLRQ&RQFHSW
The setting colors dialog boxes are realized using three pictures. The first picture, which is
displayed by pressing on the button above, shows a dialog box containing the current color
8
settings. From this dialog box, a dialog box for selecting a color from among the 16 basic
colors can be displayed for each settable table property via a '. From this dialog box in
turn, an additional dialog box can be reached for selecting a color from a total of 50 colors.
,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
1 Five tags of the 8QVLJQHG%LW9DOXH type are used. In the example, these are
the &2B7,0(, &2B0$;, &2B0,1, &2B0($1 and &2B%$&. tags. These tags
store the current color values.
A tag of the 8QVLJQHG%LW9DOXH type is required. In the example, this is the
&2B7(03 tag. This tag serves as a buffer for the color value to be accepted with
an 2.%XWWRQ.
A tag of the 7H[W7DJ%LW&KDUDFWHU6HW type is used as an address tag. The
name of the color tag to be processed is stored in this tag. In the example, this is
the &2B$GGUHVV7DJ.
2 The table configured in the H[BBFKDSWHUBF3'/ consists of several individual
objects. All properties of these objects that are changeable have a 7DJ
&RQQHFWLRQ to one of the color tags.
The rectangle displays the currently set color of each property. This is realized
via a 7DJ&RQQHFWLRQ to the corresponding color tag. Create a &$FWLRQ for the
5HFWDQJOHV and 6WDWLF7H[WV at (YHQWV→0RXVH→3UHVV/HIW, which writes the
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
4 The layout of the second dialog box has been configured in another picture. This
is the H[BB)'B3'/. For each color that can be selected, a 6WDQGDUG2EMHFW
→5HFWDQJOH is configured whose background color matches the color to be set.
Also configure a 'LUHFW&RQQHFWLRQ for each color at (YHQWV→0RXVH→3UHVV
/HIW. This direct connection switches the value of the %DFNJURXQG&RORU 3URSHUW\
of the selected object to the color tag contained in the address tag.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
5 The layout of the third dialog box has been configured in another picture. This is
the H[BB)'B3'/. Just as described in step 4, a 6WDQGDUG2EMHFW→
5HFWDQJOH is configured for each color that can be selected. However, the 'LUHFW
indicated by the address tag, but the temporary color tag &2B7(03.
The value contained in this tag will only be written to the processing color tag
after activation of the OK button.
In the picture, a 6PDUW2EMHFW→*UDSKLF2EMHFW is configured, which displays
the current color value contained in the &2B7(03 tag. In the example, this is the
6HOHFWLRQ object. The position of this object is changed, if a rectangle is selected,
The bar graph display described in this example was used in the 7DJ/RJJLQJ chapter,
$UFKLYLQJDW6HW7LPHVH[BBFKDSWHUBH3'/ example.
7DVN'HILQLWLRQ
The current values of the tags archived in a corresponding picture are to be displayed using
three bar graphs. It should be possible to deactivate each bar graph via a button.
,PSOHPHQWDWLRQ&RQFHSW
,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQWKH*UDSKLFV'HVLJQHU
Only positive values can be displayed. Therefore, the absolute value of the tag is
formed using the DEV function. The maximum value that can be displayed is
100. Since the 3LFWXUH:LQGRZ displays the background of the bar graph, the tag
value must be subtracted from the maximum value to maintain the background
height. One unit of the bar graph consists of 3 pixels in the bitmap, therefore the
calculated height of the bar graph height must be multiplied by 3. Above the bar
graph background, there are 14 free pixels, which must be added to the picture
height.
4 Via three 6PDUW2EMHFWV→6WDWXVGLVSOD\V on the toolbar, the bar graphs can be
deactivated. This is done via &$FWLRQ at (YHQWV→0RXVH→3UHVV/HIW. This
&$FWLRQ toggles the visibility of the SLFWXUHZLQGRZ, toggles the visibility of the
picture displayed in the status display (which displays the bar graph), and toggles
the picture displayed by its own object.
8VHU$UFKLYH
This manual describes the way in which the new User Archive works and the procedure for
configuring and using it.
8VHU$UFKLYH
8
At runtime you can access the examples concerning this subject by choosing the button
illustrated above using the in the H[DPSOHB8$ project. The examples are configured in
pictures H[BBFKDSWHUBSGO to H[BBFKDSWHUBFSGO.
*HQHUDOLQIRUPDWLRQ
User Archive makes a database available for storing data in a user-defined tabular structure.
These data can be transferred to a subordinate PLC in different ways. You can use WinCC
tags and WinCC raw data tags for communication with the PLC. User Archive can also be
configured without communication, however.
At the present time four data types are available for the different data fields. They are:
• number (integer)
• number (double)
• string
• date/time
An OLE control can be used to display the data of User Archive at runtime in tabular form.
This OLE control can further be used, among other things, to edit the data of User Archive,
write them to the PLC, read them from the PLC, export them to a CSV file and import them
from a CSV file. Displayed data can be filtered according to different criteria and sorted
according to your specific requirements.
The OLE control has a freely configurable toolbar and status bar. Different display formats
can be assigned to the various columns of the table.
By configuring views, you can display fused data from different archives.
7DVNGHILQLWLRQ
You wish to create an archive having data records consisting of five integer boxes and a
text box for storing a data record name. You want the data of the archive to be available
record for record throughout the project.
,PSOHPHQWDWLRQFRQFHSW
An archive is created in the user archive editor for archiving the data. Archive
communications will be configured with WinCC tags. Six data fields of the requisite field
types will be created in the archive. An internal WinCC tag will be assigned to each data
field and will be used by the archive to communicate with the rest of the project.
1RWH
The following example is a general description of the procedure for configuring a user
archive. A connection is not established to the subordinate PLC and, instead, internal
WinCC tags will be used to demonstrate the method of working.
Examples containing a fully configured connection will be found further below.
&UHDWLQJDQDUFKLYH
6WHS 3URFHGXUH&UHDWLQJDQ$UFKLYH
1 Create one internal tag for each data record in the archive. Communications
between the archive and the rest of the system will take place by means of these
tags.
In the example, use is made of tags 6LBH[B8$LB to 6LBH[B8$LB of the
VLJQHGELWYDOXH type. Further, a type ELWIRQWWH[WWDJ is created for storing
3 Create a new archive. Click 8 5 on the $UFKLYH entry to start a wizard. This
wizard guides the user through the process of creating a new archive.
6WHS 3URFHGXUH&UHDWLQJDQ$UFKLYH
4 Fill out the wizard’s page called *HQHUDO,QIRUPDWLRQ. At this stage you give
general details about the archive you want to create.
You have to enter the DUFKLYHQDPH. The archive name length may be as many as
20 characters. You must not use any ANSI C (programming language) or SQL
(database query language) keywords. In our example, we enter 8VHU$UFKLYHBL as
the name in the $UFKLYH1DPH box.
In the $OLDV box, we can enter a piece of text that describes the archive in greater
detail. All alpha and numeric entries are accepted in this box. Completion of this
box is optional, however. In our example, we will leave the $OLDV box blank.
Further, we have to select the DUFKLYHW\SH. If this is set to /LPLWHG, we will have
to specify the maximum number of GDWDUHFRUGV that the archive will be allowed
to hold. In our example, we will set 8QOLPLWHG as the DUFKLYHW\SH.
The wizard’s page is closed by clicking 1H[W.
5 Fill out the wizard’s &RPPXQLFDWLRQV page. At this stage we have to specify how
our new archive will communicate with the rest of the project.
If we select &RPPXQLFDWLRQVYLD:LQ&&5DZ'DWD7DJ, we have to set a WinCC
raw data tag on this page. A complete data record is transferred via this set tag
with this type of communication. Further, we have to enter a 3/&,', which may
contain up to eight characters. This ID can be used to assign a block of raw data
that has been sent by the programmable logic controller to a specific archive.
If we select &RPPXQLFDWLRQVYLD:LQ&&7DJV, we will have to assign a WinCC
tag to every data field in the archive. However, we cannot do this until we create
the corresponding data fields.
Further, there is the possibility of configuring an archive with the option 1R
&RPPXQLFDWLRQV.
6WHS 3URFHGXUH&UHDWLQJDQ$UFKLYH
6 Fill out the wizard’s &RQWURO7DJV page. Here you can set four internal or external
WinCC tags. The archive can be controlled at runtime by means of these tags.
In our example, we will not use the control tags options. The example used in
:RUNLQJZLWK&RQWURO7DJVH[BBFKDSWHUB3'/ contains a detailed
6WHS 3URFHGXUH&UHDWLQJDQ$UFKLYH
In our example, we will not perform any settings on this page of the wizard.
The wizard’s page is closed by clicking )LQLVK.
8 The archive you have just configured now appears in the tree structure under the
entry $UFKLYHV.
Click 8 5 on the entry of the new archive or the button while the entry is
selected to open the Properties dialog box of the archive. The dialog box shows
all the wizard’s pages and the details we made on them in the form of tabs. In
addition, there is another tab for setting the archive order. However, there is only
a single archive at this stage of configuration.
1RWH
By default, the user archive editor is set such that when you have completed one archive
you are prompted as to whether you wish to create another one. This feature can be
modified by choosing (GLW→2SWLRQV from the menu and deselecting the corresponding
check box. The same applies to boxes, views and columns.
&RQILJXULQJGDWDILHOGV
8
6WHS 3URFHGXUH&RQILJXULQJ'DWD)LHOGV
1 Create the individual boxes of the archive. Click 5 on the entry of the new
archive to start a wizard. This wizard guides the user through the process of
creating a new box.
2 Fill out the wizard’s page called *HQHUDO,QIRUPDWLRQ. At this stage you provide
general details about the box you want to create.
You have to enter the ER[QDPH. The box name is subject to the same constraints
as the archive name. In our example, we will use the name 5HFRUG1DPH as the
ER[QDPH.
In the $OLDV box, you can enter a long name that is not subject to any constraints.
If a name is entered in the $OLDV box, it is used at runtime as a column heading. If
you do not enter a name, the ER[QDPH is used as the column heading. There is
also the possibility of entering the DOLDV directly or of using a reference to a text
in the WH[WOLEUDU\. The second possibility is sensible only when you want to
create multi-lingual projects.
Clicking the button opens a dialog box for entering text in the WH[W
OLEUDU\ or selecting text from the WH[WOLEUDU\. Text entered in the 7H[W box is
entered in the WH[WOLEUDU\ by clicking 2.. The DOLDV used is then a reference to
this text.
You can search for existing text in the 6HOHFW box, too. When doing so, you enter
a word or a piece of text that you require to be contained in the text you are
looking for as a ILOWHU. In this case the character is used a wildcard character. If
8
you just enter , the whole contents of the WH[WOLEUDU\ is displayed in the list
box. Clicking on the list box updates its contents.
In our example, we will enter ER[QDPH as WH[W. Close the 7H[W/LEUDU\ dialog box
by clicking 2..
6WHS 3URFHGXUH&RQILJXULQJ'DWD)LHOGV
Further, we have to select the W\SH of box. At the present time the types available
are QXPEHULQWHJHU, QXPEHUGRXEOH, VWULQJ and GDWHWLPH. In our example, we
will set the W\SH of box to VWULQJ. We also have to set the string OHQJWK for this
type. In our example, we will set the value to .
The wizard’s page is closed by clicking 1H[W.
3 Fill out the wizard’s page called 9DOXHV. Here we can set numeric box types to
0D[LPXP, 0LQLPXP and also 6WDUW9DOXH. In the case of text boxes, we can enter
a default value for the VWDUWYDOXH that is dependent upon the defined length.
If &RPPXQLFDWLRQYLD:LQ&&7DJV has been configured, we have to set a
corresponding tag for every box. In our example, we will select the text tag called
7LBH[B8$LB, which we configured earlier.
6WHS 3URFHGXUH&RQILJXULQJ'DWD)LHOGV
5 In our example, let us now create five more boxes. We want them to be
QXPEHULQWHJHU type boxes. The names of the boxes will range from 3UHVVXUHBD
to 3UHVVXUHBH; the aliases of the boxes will range from 3UHVVXUH to 3UHVVXUH. A
6WHS 3URFHGXUH&RQILJXULQJ'DWD)LHOGV
VLJQHGELWWDJ, which we created earlier, will be set as the tag. The remaining
6
Click 8 5 on the entry of a box or the button while the box is selected to
open the Properties dialog box associated with the box. The dialog box shows all
the wizard’s pages and the details we provided on them in the form of tabs. In
addition, there is another tab for setting the archive box order.
7
Save the configurations you have performed. To do this, you can use the
button on the toolbar or you can choose 3URMHFW→6DYH from the menu.
When doing so, make sure that the XVHUDUFKLYHHGLWRU is not in the mode for
entering data in the different archives. This means that you must not click the
button. Only then can you apply the configuration data to the database.
7DVNGHILQLWLRQ
We want to supply the archive we created earlier with data. In doing so, we want to avail
ourselves of the possibilities provided by direct data entry in the user archive editor and that
of data import from an external file.
'DWDHQWU\LQWKHXVHUDUFKLYHHGLWRU
6WHS 3URFHGXUH'DWD(QWU\LQWKH8VHU$UFKLYH(GLWRU
8
1 Open the user archive editor. Before we can enter data records in an archive, we
have to select it in the left tree structure with .
2 Switch the archive to Runtime Data mode. You do this by clicking the button on
the toolbar or by choosing (GLW→5XQWLPH'DWD from the menu. The data of an
archive can be modified in this mode only.
A blank table, whose columns correspond to the data structure of the archive we
configured, appears in the lower table window.
8
3 Enter the data. Before we can enter data in a box, we have to select the box by
'. If the focus is in the table window, entry of a new data record can be
initiated by clicking the button on the toolbar.
8
If the focus is in the table window and if you click the button on the toolbar,
the table window is in Change mode. It suffices to select a box with the in
order to enable data entry.
If the focus is in the table window, you can delete the currently selected data
record by clicking the button on the toolbar. You cannot delete more than
one data record at a time.
,PSRUWLQJGDWDIURP&69ILOHV
6WHS 3URFHGXUH,PSRUWLQJ'DWDIURP&69)LOHV
In the )LOH6HOHFWLRQ box, we specify the name of the file to which we wish to
export our archive data records. Click the button to select an existing file.
In our example, the file we will set in the )LOH6HOHFWLRQ box is the one called
H[B8$LFVY.
We leave &69 (comma separated values) set as the file format. We can modify
the separator used for the file by clicking the button. In our
example, we will keep to the default semicolon, however.
6WHS 3URFHGXUH,PSRUWLQJ'DWDIURP&69)LOHV
Clicking the button starts the export operation of the data to the
file we selected.
2 The file we just selected can be opened only with a text editor of some
description. In our example, the file was opened with the Microsoft editor. It will
be retained for importing the necessary file structure.
When creating a file which you want to use as a basis for importing data, make
sure the quotation marks enclosing text boxes are removed, since otherwise
errors will occur during the import operation. Existing data records are not
overwritten during the import operation. Data records are identified by the IDs
displayed in the first column. Imported files should contain only data records
having IDs that have not been assigned so far.
3 There is now the possibility of opening and editing the file we received in Excel.
In Excel’s Open dialog box, change the file type setting from 0LFURVRIW([FHO
)LOHV to WH[WILOHV.
The different boxes in the archive are then displayed in such a manner that they
are distributed over various columns in a table. Various new data records can be
created in a user-friendly manner as illustrated below.
In our example, we will now save the file by choosing )LOH→6DYH$V from the
menu as LPB8$LFVY. Excel automatically removes the quotation marks
encompassing the text boxes during the operation. We can now exit Excel. The
final query on the save operation can be answered by selecting 1R, since the data
have already been saved in a new file.
4
Import the data into the user archive editor. We do this by clicking the
button on the toolbar. The Import dialog box opens.
6WHS 3URFHGXUH,PSRUWLQJ'DWDIURP&69)LOHV
In the )LOH6HOHFWLRQ box, we set the file receiving the data by clicking the
button. In our example, the file we set in the )LOH6HOHFWLRQ box will be the one
we created earlier, in other words LPB8$LFVY.
1RWH
During the import operation, make sure the file is not still open in Excel. If it is, an error
will occur. The same error message is issued when the file contains existing data records or
the file structure of the file does not match that of the archive.
7DVNGHILQLWLRQ
The data of the archive configured in these examples are required to be made available to
the user at runtime. The archive data are to be displayed in tabular form.
,PSOHPHQWDWLRQFRQFHSW
The archive will be displayed at runtime by means of a special OLE control. The data will
be displayed in tabular form. Using the control it will be possible to place various edit
options for the archive at the disposal of the user.
,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
1 Open *UDSKLFV'HVLJQHU and create a new picture. In our example, this is the
picture called H[BBFKDSWHUBSGO.
2 Configure an OLE control at 6PDUW2EMHFW→2/(&RQWURO. The ,QVHUW
2OH&RQWURO dialog box is opened.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
4 On the *HQHUDO,QIRUPDWLRQ tab, we select the $UFKLYH option in the 6RXUFH box.
In the present example, we cannot select 9LHZ since we have not configured any
views as yet. The archive we select is 8VHU$UFKLYHBL.
In the (GLW box, we can set the edit options for the archive that the user will be
able to access. In our example, we will make the full range of edit options
available to the user.
We can display the OLE control with %RUGHU. In addition, we can also display the
object in form view. In our example, we select the %RUGHU check box. But we do
not select the )RUP check box.
5 We can select the data fields, which we want to have displayed in the table, on
the &ROXPQV tab. In our example, we select all the boxes available.
Further, there is the possibility of setting certain properties for every data field in
the 3URSHUWLHV box. In our example, however, we will leave the default settings
for all the data fields as they are.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
6 On the 7RROEDU tab, we can configure the elements we require on the toolbar. In
our example, we will leave all the functions selected. There is the possibility of
assigning an authorization level to every button on the toolbar so that it can be
operated only by authorized users.
If the &OHDU check box is selected, the toolbar is not displayed. If, however, only
individual buttons are deselected from the list by means of the check boxes, they
will be displayed nevertheless, though it will not be possible to operate them.
7 On the 6WDWXV%DU tab, we can set the status bar to look as we wish it to. In our
example, we will leave all the elements selected.
If the &OHDU check box is selected, the status bar is not displayed.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
8 On the )RQWV tab, we can customize the font used by the OLE control. In our
example, we will reduce the VL]H of the font to in order to be able
simultaneously to display all the columns of the table at runtime. We will leave
all the other settings as they are.
9 On the )LOWHU6RUW tab, we will not perform any settings for our example. You can
set filters and sorts at runtime, too, if the corresponding buttons have been
provided on the toolbar.
10 On the &RORUV tab, we can modify the colors of individual elements in a table. A
convenient place for settings colors, especially when more than 16 colors are
required to be available, is the 2/(&RQWURO object Properties dialog box
provided by WinCC.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
8'
4 We can check some of the configurations we have performed in *UDSKLFV
'HVLJQHU. Click on the 2/(&RQWURO object while keeping CTRL pressed
to open the object.
5 Configure five pointer-type instruments to display the tags that have to be written
by 8VHU$UFKLYH. These are :LQ&&JDXJHFRQWURO type OLE controls configured
at 6PDUW2EMHFWV→2/(&RQWUROV. In our example, these are objects 2/(
&RQWURO to 2/(&RQWURO.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
At each of the objects, we create a WDJFRQQHFWLRQ to one of the five integer tags
that have to be written by the archive at 3URSHUWLHV→2/(&RQWURO3URSHUWLHV→
9DOXH.
3URSHUW\7RSLFV→0LVFHOODQHRXV→3URFHVV'ULYHU&RQQHFWLRQ→&KDQJH. For
→7H[W.
If the tag still does not contain text when a picture is opened, a data record has
not been loaded as yet, and we want this to be displayed likewise. This is
performed by means of a &DFWLRQ at picture object H[BBFKDSWHUB by selecting
(YHQW→0LVFHOODQHRXV→2SHQ3LFWXUH. This &DFWLRQ writes the words 1RGDWD
1RWHVRQJHQHUDOXVH
The OLE control toolbar buttons illustrated below perform the following tasks at runtime:
• You can toggle between table view and form view at runtime by means of the
Form button.
• You can modify archive data at runtime, too, using the edit buttons. You
can delete and modify data records, or add new ones. The extent to which the user is
authorized to modify data will depend on the OLE control settings in *UDSKLFV
'HVLJQHU.
• Using the navigation buttons, you can move in the table and select
different data records. Selection of data records also works by directly selecting data
records with the mouse.
• The data transfer buttons are used to read and write data. The :ULWH7DJV
button is used to write the data record selected in the table to the tags set in 8VHU
$UFKLYH. The 5HDG7DJV button is used to read in the current values of the tag set in
• We can use the Export and Import buttons to export archive data to CSV files,
or import new data from CSV files. The buttons have the same function as the
corresponding buttons in the user archive editor. The procedure for importing and
exporting data is described in the example contained in 'DWD(QWU\
H[BBFKDSWHUB3'/.
• We can use the )LOWHU and 6RUW buttons to define the data records we want to
have displayed and the order in which we want to have them displayed. These settings
for OLE control can also be performed in *UDSKLFV'HVLJQHU.
7DVNGHILQLWLRQ
The data of the archive configured in these examples are required to be made available to
the user at runtime. We want the archive data to be displayed as a form, by means of which
it will be possible to display one data record at a time.
,PSOHPHQWDWLRQFRQFHSW
The archive will be displayed at runtime by means of a special OLE control. The data will
be displayed as a form.
By means of several buttons, it will be possible to place various edit options for the archive
at the disposal of the user.
,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
1 Open *UDSKLFV'HVLJQHU and create a new picture. In our example, this is the
picture called H[BBFKDSWHUBSGO.
2 Configure an OLE Control object at 6PDUW2EMHFWV→2/(&RQWURO. The ,QVHUW
2OH&RQWURO dialog box is opened.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
4 On the *HQHUDO,QIRUPDWLRQ tab, we select the $UFKLYH option in the 6RXUFH box.
In the present example we cannot select 9LHZ since we have not configured any
views as yet. The archive we select is 8VHU$UFKLYHBL.
In the (GLW box, we can set the edit options for the archive that the user will be
able to access. In our example, we will not allow the user to modify archive data
by selecting the 5HDG2QO\ check box.
We can display the OLE control with %RUGHU. In addition, we can also display the
object in form view. In our example, we select the %RUGHU and )RUP check boxes.
5 On the 7RROEDU tab, we can configure a toolbar. In our example, however, we
select the &OHDU check box. This means that the toolbar will not be displayed at
runtime.
On the 6WDWXV%DU tab, we can configure a status bar. In our example, we will
leave all the elements selected. But, as on the previous tab, we select the &OHDU
tab. This means that the status bar will not be displayed at runtime, either.
6 In our example, the VL]H of the font was reduced to on the )RQWVtab. It is true
that this setting refers to table view, which is not being used, but it also indirectly
affects form view too.
If the size of the OLE control is too small to display the entire table view, scroll
bars are shown. They are likewise shown when the OLE control happens to be in
form view. To circumvent this annoying effect, the font size is reduced to allow
the entire table view to be shown.
7 On the other tabs, we will not perform any more settings for our example.
Complete the settings in the 3URSHUWLHVRI:LQ&&8VHU$UFKLYH7DEOH&RQWURO
dialog box by clicking 2..
8
8 For us to be able to configure the form view, OLE control has to be activated in
*UDSKLFV'HVLJQHU. This is done by clicking ' on the object while keeping
8
CTRL pressed.
Clicking 5 on the activated object opens a shortcut menu, which can be used
to insert text boxes, editing boxes and buttons in the form. To insert a text box,
choose 7H[W from the menu.
9 A text box is displayed on the form and, at the same time, its Properties dialog
box is opened. There is also the possibility of entering a piece of text in the 7H[W
input box, or selecting the name of a data field from the drop-down list.
In our example, the box name 5HFRUG1DPH has been selected from the drop-
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
8
10 Configure the editing box that matches the text box. This is accomplished by
clicking 5 on the activated OLE control. We choose (GLW from the shortcut
menu that appears.
11 An editing box is displayed on the form and, at the same time, its Properties
dialog box is opened. From the drop-down list, we can now select the required
box whose data we want to have displayed in the editing box.
In our example, the 5HFRUG1DPH box has been selected from the drop-down list
for the )LHOG box.
12 As with the procedure described in the preceding four steps, a text box and an
editing box will be configured for each archive box in our example.
13 It must then be possible to navigate through the boxes in the archive. This is
accomplished by configuring buttons. On the form, all the functions available on
85
the toolbar can be triggered by buttons.
Click on the activated OLE control to insert a EXWWRQ in the form.
14 A button is displayed on the form and, at the same time, its Properties dialog box
is opened. It is possible to enter a piece of text for labeling the button in the 7H[W
input box. In our example, the WH[W we use is the string . Its purpose is to
symbolize the function of the button for going to the first data record.
In the $FWLRQ box, we set the function we want the button to trigger. A list of all
the functions available is shown as a drop-down list. In our example, we set the
6WDUW function.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
15 We then configure three more buttons. We want them to trigger %DFN, )RUZDUG
and (QG functions.
In our example, we configure a further two buttons which the user can use to
write single data records to the tags assigned to the data fields. The functions we
have to set for them are 5HDG7DJV and :ULWH7DJV.
16 Configure five pointer-type instruments to display the tags that have to be written
by 8VHU$UFKLYH. These are :LQ&&JDXJHFRQWURO type OLE controls configured
at 6PDUW2EMHFWV→2/(&RQWUROV. In our example, these are objects 2/(
&RQWURO to 2/(&RQWURO.
At each of the objects, we create a WDJFRQQHFWLRQ to one of the five integer tags
that have to be written by the archive at 3URSHUWLHV→2/(&RQWURO3URSHUWLHV→
9DOXH.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
7DVNGHILQLWLRQ
We wish to create an archive having data records consisting of three double boxes and a
text box for storing a data record name. We want to keep the number of data records to
three.
We want the archive data to be made available throughout the project by using the control
tags on a record-by-record basis.
,PSOHPHQWDWLRQFRQFHSW
An archive is created in the user archive editor for archiving the data. Archive
communication will be configured with WinCC tags. We will assign four control tags to the
archive. Their purpose is to control writing of the data to the WinCC tags and reading of the
data from the WinCC tags.
Four data fields of the requisite field types will be created in the archive. An internal tag
will be assigned to each data field and will be used by the archive to communicate with the
rest of the project.
We then configure several buttons and I/O fields in Graphics Designer, which will be used
to write to the control tags. The contents of the control tags set the data record for
processing and whether data should be read or written.
&UHDWLQJDQDUFKLYH
6WHS 3URFHGXUH&UHDWLQJDQ$UFKLYH
1 Create a single internal tag for each data record in the archive. Communication
between the archive and the rest of the system will take place by means of these
tags.
In our example, we use tags *LB8$FWB to *LB8$FWB of the IORDWLQJ
SRLQWELW,((( type. Further, a type ELWIRQWWH[W tag is created for
storing the data record name. In our example, this is tag 7LB8$FWB.
8
2 Open the user archive editor. We create a new archive in the user archive editor.
Click 5 on the $UFKLYHV entry to open a wizard for this purpose.
3 We enter the DUFKLYHQDPH on the wizard’s first page. In our example, we enter
8VHU$UFKLYHBFW as the name in the $UFKLYHQDPH box. We will leave the $OLDV
box blank.
We choose /LPLWHG as the DUFKLYHW\SH. In keeping with the task set, the
maximum number of GDWDUHFRUGV is set to .
The wizard’s page is closed by clicking 1H[W.
4 On the wizard’s second page, we select the type of communication. In the present
example, we select 7\SH as &RPPXQLFDWLRQYLD:LQ&&7DJV.
The wizard’s page is closed by clicking 1H[W.
5 On the third page of the wizard, we can set four control tags. The archive can be
controlled at runtime by means of these tags.
If the tags have not been created previously, you can have the wizard do it
6WHS 3URFHGXUH&UHDWLQJDQ$UFKLYH
The tags you have just created are then automatically entered in the
corresponding boxes for ,', -RE, )LHOG and 9DOXH.
Since we will not perform any more settings on the next page of the wizard in our
example, we can close the wizard at this stage already by clicking )LQLVK.
6WHS 3URFHGXUH&UHDWLQJDQ$UFKLYH
6 The boxes listed in the table that follows are created in our example for the
archive you have just configured. The tags configured in step 1 are set as the
assigned tags.
For the double boxes, we set a PLQLPXPYDOXH of - and a PD[LPXPYDOXH of .
We set the OHQJWK of the text box to .
7 A total of three data records can now be created for the archive in the bottom
window of the table.
,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
1 Open *UDSKLFV'HVLJQHU and create a new picture. In our example, this is the
picture called H[BBFKDSWHUBSGO.
2 Configure an OLE Control object at 6PDUW2EMHFWV→2/(&RQWURO. It will only
be used in our example to display archive data and will not be given any control
elements.
The ,QVHUW2OH&RQWURO dialog box is opened.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
For us to be in a position to simulate any change of values for these tags, two
buttons are configured at :LQGRZV2EMHFWV→%XWWRQ for each bar graph. One of
these buttons is used to increment the corresponding tag value in typing mode
and the other to decrease it.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
6 We then have to configure control elements with which the user can, firstly,
select a specific data record and, secondly, trigger a specific function for that
function.
Selection of the data record by means of control tags can be done in two different
ways. It is possible to write to the tag set for the ID. The second version consists
of writing a field name for the tag set for the field and, in addition, a search value
to the tag set for the value.
7 To select the data record by means of the ID, we configure three buttons at
:LQGRZV2EMHFWV→%XWWRQ in our example. They write a suitable value, via
8 To select the data record using the field name and a search value, we configure
four buttons at :LQGRZV2EMHFWV→%XWWRQ. They write a suitable field name, via
GLUHFWFRQQHFWLRQV, to the tag, #8$B8VHU$UFKLYHBFWB)LHOG, set for the field
name. The current tag value is displayed by means of an I/O field created at
6PDUW2EMHFWV→,2)LHOG.
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
9 In our example, we can switch to and fro between two possible selections for data
records by means of two buttons configured at :LQGRZV2EMHFWV→%XWWRQ. A
ELQDU\WDJ type is used to disable the input objects of the one version and then the
other.
10 To trigger jobs for the data record we selected, we configure two buttons at
:LQGRZV2EMHFWV →%XWWRQ. They write a suitable value, via GLUHFWFRQQHFWLRQV,
to the tag, #8$B8VHU$UFKLYHBFWB-RE, set for the job. Permissible values in this
instance are:
• 6, for the job of reading the record from the tags
• 7, for the job of writing the record to the tags
• 8, for the job of deleting the record from the archive
In the present example, however, we use only the read tags and write tags jobs.
Successful triggering of the job can similarly be checked by means of the tag set
for the job. If the job has been completed successfully, the tag is set to zero. If the
job fails, the tag is set to -1.
This is evaluated in our example using a G\QDPLFGLDORJER[ created at 6PDUW
2EMHFW→,2)LHOG.
7DVNGHILQLWLRQ
Further, we wish to create an archive. The data records in this archive will consist of a text
box, two integer fields, two double fields and a date field. We want the archive data to be
displayed in tabular form at runtime. They are required to be made available to the
programmable logic controller on a record-by-record basis.
1RWH
The option of communication between User Archive and the programmable logic controller
via WinCC tags should be preferred when the majority of the activities are to be controlled
by WinCC.
,PSOHPHQWDWLRQFRQFHSW
6,0$7,&6(WKHUQHW/D\HUFRPPXQLFDWLRQGULYHU
This driver will be used for communication with the programmable logic controller in our
example. It is suitable for connections to the SIMATIC S5-115U, -135U and -155U with
the CP 1430 communication processor. We will use a CP-1413 card as the PC interface.
With not more than two modules, it can communicate with as many as 30 programmable
logic controllers.
&RQILJXULQJWKH&3FRPPXQLFDWLRQSURFHVVRU
6WHS 3URFHGXUH&RQILJXULQJWKH&3&RPPXQLFDWLRQ3URFHVVRU
1 Install the driver for the network connection between the PC and the PLC. For
this we will require the SIMATIC Drivers CD (SIMATIC NET). After specifying
a few general details in the installation wizard concerning the installation, we
select the entry ,(6 in the list box displayed on the page labeled
&RPSRQHQWV. Installation is completed by clicking 1H[W. Following this, the
6WHS 3URFHGXUH&RQILJXULQJWKH&3&RPPXQLFDWLRQ3URFHVVRU
2 Install the CP 1413 card on the PC. Install the CP 1413 card on the PC exactly in
the manner stated in the installation instructions enclosed with the card.
Following this, software installation of the card has to be performed, again by
precisely following the instructions.
Start the 6HW3URJUDPPLQJ'HYLFH3&,QWHUIDFH program on the Control Panel.
The access point for the Industrial Ethernet connection was entered by default
when you installed the card. This is the access point labeled &3+B.
6WHS 3URFHGXUH&RQILJXULQJWKH&3&RPPXQLFDWLRQ3URFHVVRU
3 Assign a module to the access point. The module has to be installed first,
however. This is accomplished by means of the button in the
0RGXOHV box. The ,QVWDOO8QLQVWDOO0RGXOH dialog box opens. In the left list box,
we select the &3 entry and install the card using the
button.
6WHS 3URFHGXUH&RQILJXULQJWKH&3&RPPXQLFDWLRQ3URFHVVRU
4 The &35HVRXUFHV dialog box opens. The set memory area (
()))) can frequently not be used. We recommend the '
')))) area. By default, the I/O area is set to (( and can be
7 Assign the card you have just installed to the access point. To do this, in the 6HW
3URJUDPPLQJ'HYLFH3&,QWHUIDFH program, select access point &3B+B in the
top list box and select the entry for the &3 in the bottom list.
6WHS 3URFHGXUH&RQILJXULQJWKH&3&RPPXQLFDWLRQ3URFHVVRU
&RQILJXULQJWKHFRQQHFWLRQRQWKHSURJUDPPDEOHORJLFFRQWUROOHU
6WHS 3URFHGXUH&RQILJXULQJWKH&RQQHFWLRQRQWKH3URJUDPPDEOH/RJLF
&RQWUROOHU
1 Configure the connection on the programmable logic controller. This is done with
the 6,1(&1&0 COM package for the processor we are using.
Open the 'HIDXOW6HWWLQJV dialog box by choosing )LOH→6HOHFWfrom the menu.
For the &37\SH, we enter &3. The GDWDEDVHILOH we create in our example is
the file called $865$5&. The file name must start with an A character. Apply
the settings you have performed with ).
2 Choose (GLW→&3,QLW from the menu to open the &3%DVLF,QLWLDOL]DWLRQ dialog
box. We will leave the 0$&$GGUHVV in our example at . This is
also the default Ethernet address set by WinCC for the programmable logic
controller when a new connection is created. Apply the settings you have
performed with ).
3 Create two transport connections. This is accomplished by choosing (GLW→
&RQQHFWLRQV→7UDQVSRUW&RQQHFWLRQV from the menu. The 7UDQVSRUW
6WHS 3URFHGXUH&RQILJXULQJWKH&RQQHFWLRQRQWKH3URJUDPPDEOH/RJLF
&RQWUROOHU
parameter of 76$3in our example. We enter &&':5,7( as the 76$3 for the
remote device parameter. We also have to specify the Ethernet address of the
card at this stage. Apply the settings you have performed with ).
It is always necessary to create read and write jobs. This also applies when one or
the other type of job is not required.
4 The data must now be transferred to the CP. This is accomplished by choosing
'RZQORDG→)'!&3 from the menu. However, this can be done only when the
&RQILJXULQJWKHFRQQHFWLRQLQ&RQWURO&HQWHU
6WHS 3URFHGXUH&RQILJXULQJWKH&RQQHFWLRQLQ&RQWURO&HQWHU
8
1 Install the required communication driver for the requisite programmable logic
controller and the requisite driver connections. In &RQWURO&HQWHU, click 5 on
7DJ0DQDJHPHQW to open the $GG1HZ'ULYHU dialog box.
Select 6,0$7,&6(WKHUQHW/D\HU from the list shown in the dialog box. Exit
the dialog box by clicking 2SHQ.
6WHS 3URFHGXUH&RQILJXULQJWKH&RQQHFWLRQLQ&RQWURO&HQWHU
8
2 Configure a connection for the communication driver you have just added. This
is accomplished in &RQWURO&HQWHU by clicking 5 on the entry of one of the
two channel units that are displayed. In our example, we will use the
67UDQVSRUW&3 channel unit.
TSAPs always consist of eight characters. If less than eight characters are
entered, the other positions are filled with 0x0. The hexadecimal code of the
TSAP is displayed next to the name we entered. Be careful with upper-case and
lower-case characters, and also with distinguishing an entered space and a non-
entered character.
6WHS 3URFHGXUH&RQILJXULQJWKH&RQQHFWLRQLQ&RQWURO&HQWHU
3 Set the system parameters for the channel unit being used. To do this, click
on their entry.
85
6WHS 3URFHGXUH&RQILJXULQJWKH&RQQHFWLRQLQ&RQWURO&HQWHU
WinCC and reboot. A complete restart is the only way to enable application of
the parameters to the CP.
4 We create a new tag group in the example for the new connection we have
created. All the tags for communication between User Archive and the
programmable logic controller will be combined in this group. In our example,
we will call the new tag group 8VHU$UFKLYHBGP.
5 Create the tags to be used for communication in the new tag group. Each of the
tags corresponds to a box in the User Archive we have yet to create. We create a
type ELWIRQWWH[W tag. In our example, it is called 7ZBH[B8$GPB. Its OHQJWK
is set to .
6WHS 3URFHGXUH&RQILJXULQJWKH&RQQHFWLRQLQ&RQWURO&HQWHU
Click the button to open the dialog box for setting the DGGUHVV of the
tag on the programmable logic controller.
In the $GGUHVV'HVFULSWLRQ box, we select '% for the GDWDDUHD in our example.
We set the '%1R to . Select :RUG for the addressing, and set ':.
Exit the dialog box by clicking 2..
6WHS 3URFHGXUH&RQILJXULQJWKH&RQQHFWLRQLQ&RQWURO&HQWHU
The assigned names and the parameters assigned to the addresses comply with
the following table.
6WHS 3URFHGXUH&RQILJXULQJWKH&RQQHFWLRQLQ&RQWURO&HQWHU
&UHDWLQJDQGFRQILJXULQJWKH'%LQWKH6,0$7,&6FRQILJXUDWLRQ
DB 20
User Archive via DM Tags
0:KH = 0000
1:KH = 0000
2:KH = 0000
3:KH = 0000
4:KH = 0000
5:KH = 0000
6:KH = 0000
7:KH = 0000
8:KH = 0000
9:KH = 0000
10:KC =’Record_001’ RecordName
15:KH = 0000 Pressure_a High
16:KH = 01C9 Pressure_a Low
17:KG = +1025400+03 Temperature_a
19:KH = 0000 Pressure_b High
20:KH = 0381 Pressure_b Low
21:KG = +4959800+03 Temperature_b
• The tags for communication are addressed in '%. This DB therefore contains the
data sent by User Archive.
• With a text length of 10 characters, the text box is assigned a data area from ': to
':. The memory allocation for the other data fields can be taken from the program
&RQILJXULQJWKH8VHU$UFKLYH
85
6WHS 3URFHGXUH&RQILJXULQJ8VHU$UFKLYH
more settings.
2 The boxes listed in the table that follows are created in our example for the
archive you have just configured. The external tags we configured earlier are set
as the assigned tags.
3 Several data records can now be created for the archive in the bottom window of
the User Archive table editor.
1RWH
You cannot assign tags to a date/time type of data field. The data entered in this data field
are used merely as additional details elating to a data record.
&RQILJXULQJLQ*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH&RQILJXULQJLQ*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH&RQILJXULQJLQ*UDSKLFV'HVLJQHU
2 Click
box.
8 ' on the object known as 2/(&RQWURO to open its Properties dialog
On the *HQHUDO,QIRUPDWLRQ tab, we select $UFKLYH8VHU$UFKLYHBGP as the
6RXUFH. In the (GLW field, we select the check boxes labeled 3DVWH, &KDQJH and
'HOHWH to make all the editing options available to the user. In addition, we select
The other four tags are all displayed by means of an I/O field created at 6PDUW
2EMHFW→,2)LHOG and a bar graph created at 6PDUW2EMHFW→%DU*UDSK.
1RWHVRQJHQHUDOXVH
&RQQHFWLRQYLD:LQ&&5DZ'DWD7DJVWRWKH6
H[BBFKDSWHUBESGO
7DVNGHILQLWLRQ
Further, we wish to create an archive. The data records in this archive will consist of a text
box, an integer field and a double field. We want the archive data to be displayed in tabular
form at runtime. They are required to be made available to the programmable logic
controller on a record-by-record and field-by-field basis.
1RWH
The option of communication between User Archive and the programmable logic controller
via WinCC raw data tags should be preferred when the majority of the activities are to be
controlled by the programmable logic controller.
In the present example, however, the WinCC user takes the initiative. The programmable
logic controller will be prompted to send job message frames to WinCC by setting a control
tag. In this way the functionality otherwise present in the programmable logic controller is
simulated.
,PSOHPHQWDWLRQFRQFHSW
1RWH
The present example of connecting via WinCC raw data tags is based on the previous
example of connecting via WinCC tags. The configurations performed with regard to the
connection are regarded as completed. These are the sections on configuration of
communication processor CP 1413, configuration of the connection on the programmable
logic controller and configuration of the connection in Control Center. Completion of the
other sections of the preceding example is not assumed.
&RQILJXULQJWKH&3&RPPXQLFDWLRQ3URFHVVRU
The configuration of the CP 1413 communication processor has already been described at
length in the preceding section. The approach to configuring is identical in as far as the
requirements of this example are concerned and can thus be adopted without any changes
having to be made to it.
&RQILJXULQJWKHFRQQHFWLRQRQWKHSURJUDPPDEOHORJLFFRQWUROOHU
6WHS 3URFHGXUH&RQILJXULQJWKH&RQQHFWLRQRQWKH3URJUDPPDEOH/RJLF
&RQWUROOHU
A transport connection is now created for the active transmission of data from the
programmable logic controller to WinCC. We can enter a new transport
connection by pressing ). Specify 6(1' as the job type. We set the
programmable logic controller to $FWLYH.
In the 7UDQVSRUW$GGUHVVHV box, we enter $*5)(7&+ for the local parameter of
76$3in our example. In addition to the 76$3, &&5)(7&+ in our example, we
also have to enter the Ethernet address of the &3 card as the 0$&DGGUHVV
for the remote device parameter.
A transport connection is now created for sending data to the programmable logic
controller from WinCC. Specify 5(&(,9( as the job type. We set the
programmable logic controller to 3DVVLYH.
In the 7UDQVSRUW$GGUHVVHV box, we enter $*5:5,7( for the local parameter of
76$3in our example. We enter &&5:5,7( as the 76$3 for the remote device
parameter. We also have to specify the Ethernet address of the card again. Apply
the settings you have performed with ).
3 The data must now be transferred to the CP. This is accomplished by choosing
'RZQORDG→)'!&3 from the menu. However, this can be done only when the
&RQILJXULQJWKH&RQQHFWLRQLQ&RQWURO&HQWHU
6WHS 3URFHGXUH&RQILJXULQJWKH&RQQHFWLRQLQ&RQWURO&HQWHU
8
The driver was installed in the preceding example already. Create the new
connection in &RQWURO&HQWHU by clicking 5 on the entry of one of the two
channel units displayed. In our example, we will use the
67UDQVSRUW&3 channel unit.
6WHS 3URFHGXUH&RQILJXULQJWKH&RQQHFWLRQLQ&RQWURO&HQWHU
In the :5,7()XQFWLRQ box, our 2ZQ76$3 will be called &&5:5,7( and the
3HHU76$3 will be called $*5:5,7( in our example.
TSAPs always consist of eight characters. If less than eight characters are
entered, the other positions are filled with 0x0. The hexadecimal code of the
TSAP is displayed next to the name we entered. Be careful with upper-case and
lower-case characters, and also with distinguishing an entered space and a non-
entered character.
Close the dialog box by clicking 2..
6WHS 3URFHGXUH&RQILJXULQJWKH&RQQHFWLRQLQ&RQWURO&HQWHU
8
2 Create the WinCC raw data tag for communication between User Archive and the
programmable logic controller. You do this by clicking 5 on the entry of the
new connection 68:LQ&&3DVVLYH. The 7DJ3URSHUWLHV dialog box opens.
3 Set the tag properties. The QDPH of the tag we use in our example is
5$:BH[B8$UGB. We select the UDZGDWDW\SH from the list of GDWDW\SHV.
6WHS 3URFHGXUH&RQILJXULQJWKH&RQQHFWLRQLQ&RQWURO&HQWHU
Open the dialog box for assigning parameters to addresses by clicking the
button.
In the $GGUHVV'HVFULSWLRQ box, we select in our example the GDWDDUHD as '%
and '%1R. Further, we enter :RUG$GGUHVVLQJ and ':. We select the 5DZ
'DWD check box and set a OHQJWK of for the tag. In the 5DZ'DWD box, we
4 Create external tags for triggering actions on the programmable logic controller
and for checking correct functioning of the connection.
We create these tags in a new tag group, which we will have to create, in the 6
8:LQ&&$FWLYH connection. We configured this connection in the preceding
example.
In our example, the tag group in which we are going to create the tags will be
called 8VHU$UFKLYHBUG.
6WHS 3URFHGXUH&RQILJXULQJWKH&RQQHFWLRQLQ&RQWURO&HQWHU
5 The tags we need to create and their addressing on the programmable logic
controller are shown at length in the list below.
Tags 7ZBH[B8$UGB, *ZBH[B8$UGB and 6ZBH[B8$UGB are
required to accommodate data sent to and from User Archive.
Tags 8ZBH[B8$UGB and 8ZBH[B8$UGB are to be used to set the record
number that has to be edited or the field number that needs editing.
Tag 8ZBH[B8$UGB is used as a control tag. We wish to use it to set and
trigger the type of job that has to be performed.
&RQILJXULQJ8VHU$UFKLYH
85
6WHS 3URFHGXUH&RQILJXULQJ8VHU$UFKLYH
1 Open the 8VHU$UFKLYH editor and create a new archive. Do this by clicking
on $UFKLYHV. The wizard for creating a new archive appears.
Click the button to set the WinCC raw data tag used for
communication. In our example, we set the tag we created earlier,
5$:BH[B8$UGB, in the 7DJ box.
6WHS 3URFHGXUH&RQILJXULQJ8VHU$UFKLYH
4 In our example, we will not perform any more settings on the remaining pages of
the wizard.
3 The boxes listed in the table that follows are created in our example for the
archive you have just configured. We now save the settings we have performed.
5 Several data records can now be created for the archive in the bottom window of
the User Archive table editor.
3URJUDPJHQHUDWLRQRQWKHSURJUDPPDEOHORJLFFRQWUROOHU
6WHS 3URFHGXUH3URJUDP*HQHUDWLRQRQWKH3URJUDPPDEOH/RJLF&RQWUROOHU
1 We have to create a data block in which we store the data for controlling and
monitoring communication.
This is control tag 8ZBH[B8$UGB, which contains the job type. Further,
there are the communication monitoring tags, 7ZBH[B8$UGB,
*ZBH[B8$UGB and 6ZBH[B8$UGB, as well as the tags for setting the
6WHS 3URFHGXUH3URJUDP*HQHUDWLRQRQWKH3URJUDPPDEOH/RJLF&RQWUROOHU
3 To illustrate the example more clearly, a separate raw data message frame is
stored in a separate data data block for every job type. The structure of these job
message frames is explained in the section that follows, 6WUXFWXUHRIUDZ
GDWDPHVVDJHIUDPHV.
4 Every job message frame has an area for accommodating the data record number
and data field number. In WinCC, we enter the values for these specifications in
tags 8ZBH[B8$UGB and 8ZBH[B8$UGB. The tag types have been
chosen in accordance with the length specified in the message frame structure for
the different values. The data record number requires 4 bytes, while the data field
number requires 2 bytes.
In the PLC program, these values are reloaded to the different job message
frames by means of a separate program block. The data record number is required
for all job types except the 'HOHWH$OO'DWD5HFRUGV type. The data field number
is required only for job types :ULWH)LHOG and 5HDG)LHOG. The program block
responsible for reloading the values is 3% in our example.
5 All communication handling is performed by another program block. In our
example, this is 3%. It is processed on a cyclic basis by means of 2%.
The contents of the control tag are transferred to a specific memory byte in 3%.
In our example, this is memory byte 30. Depending on the states of the different
bit memories, job message frames are sent to WinCC. This is accomplished in
each case by send block )%.
The different transmit data for )% are stored in a separate data block. In our
example, '% is used for this purpose.
000F SW : DW 0
0010 QTYP : KC DB
0011 DBNR : KY 000,000
0012 QANF : KF +0
0013 QLAE : KF +0
0014 PAFE : MB 100
0015 :***
• This program block is called in OB1. This means that it is processed on a cyclic basis.
• On Network1, the address area of the control tag sent by WinCC, 8ZBH[B8$UGB,
is transferred first to memory word 30. The contents of the control tag is then reset to
zero. Further, the record number and field number entered in WinCC is entered in the
different message frames by means of PB7. In this case we must remember that the byte
order has to be changed. Finally, the data block containing the transmit data is opened
for processing on the subsequent networks.
• On Network 2, a Send All job is executed.
• On Network 3, a Receive All job is executed.
• On Network 4, a job message frame is sent to WinCC in the event of bit memory 30.1
being set. In this case the message frame is used to delete all the data records from an
archive. The transmit data are taken by FB244 from DB5 starting at DW50. The
transmit data contained in this block are shown in the program excerpt below.
• On the subsequent networks, other job message frames are sent to WinCC, depending
on the state of memory byte 30. The only differences in the calls relate to the addressing
if the display word and the start of the transmit data in DB5.
48:KH = 0000
49:KH = 0000 ### Transmit data Delete All Records
50:KC =’DB’ Source type DB
51:KY = 000,025 of DB 25
52:KF = +00000 DW 0
53:KF = +00050 with length of 50 words
54:KC =’DB’ Destination type DB
55:KY = 000,023 to DB 23
56:KF = +00000 DW 0
57:KF = +00050 with length of 50 words
58:KH = 0000
59:KH = 0000
• The program excerpt above contains the transmit data of the job for deleting the archive.
The contents of DB25, which contains the job message frame, is sent to DB23. This is
the block in which the raw data tag of User Archive is addressed
• This block similarly contains the transmit data for all the other send jobs of PB5.
&RQILJXULQJLQ*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH&RQILJXULQJLQ*UDSKLFV'HVLJQHU
2 Click
box.
8 ' on the object known as 2/(&RQWURO to open its Properties dialog
On the *HQHUDO,QIRUPDWLRQ tab, we select $UFKLYH8VHU$UFKLYHBUG as the
6RXUFH. In the (GLW field, we select check boxes 3DVWH, &KDQJH and 'HOHWH to
6WHS 3URFHGXUH&RQILJXULQJLQ*UDSKLFV'HVLJQHU
make all the editing options available to the user. In addition, we select the
%RUGHU check box.
On the &ROXPQV tab, we select all the existing data fields of the archive.
On the 7RROEDU tab, we deselect the two buttons :ULWH7DJ and 5HDG7DJ.
Control is performed by the programmable logic controller in the present
example. All the other buttons on the toolbar will be used.
On the 6WDWXV%DU tabs, we apply the presettings and thus use all the existing
elements.
On the )RQWV tab, we will reduce the VL]H of the font to in order to be able
simultaneously to display all columns of the table at runtime.
On the )LOWHU6RUW tab, we will not perform any settings for our example.
Complete the settings in the 3URSHUWLHVRI:LQ&&8VHU$UFKLYH7DEOH&RQWURO
dialog box by clicking 2..
The color scheme of the table has been adapted in our example to the color
scheme used throughout the project by means of the Properties dialog box of the
2/(&RQWURO object.
3 To display the data transferred from User Archive to the programmable logic
controller, we configure three I/O fields at 6PDUW2EMHFWV→,2)LHOGV. In our
example, these are the objects ,2)LHOG, ,2)LHOG and ,2)LHOG.
At the ,2ILHOGV, we create - at 3URSHUWLHV→2XWSXW,QSXW→2XWSXW9DOXH - a
WDJFRQQHFWLRQ for each of the three tags 7ZBH[B8$UGB, 6ZBH[B8$UGB
and *ZBH[B8$UGB.
4 To set the record number that has to edited and the field number, we create two
more I/O fields at 6PDUW2EMHFWV→,2)LHOGV. In our example, these are the
objects ,2)LHOG and ,2)LHOG.
At the object ,2)LHOG, we create at 3URSHUWLHV→2XWSXW,QSXW→2XWSXW
9DOXH a WDJFRQQHFWLRQ to tag 8ZBH[B8$UGB. This is used to accommodate
6WHS 3URFHGXUH&RQILJXULQJLQ*UDSKLFV'HVLJQHU
1RWH
In our example, we want to test the exchange of data between User Archive and the
programmable logic controller. A complex program that sends and receives would go
beyond the framework of a basic description of the connection.
Tags 7ZBH[B8$UGB, *ZBH[B8$UGB and 6ZBH[B8$UGB have been created
for checking communication. I/O field data are used to make entries in these tags at
runtime. These data are then re-stored in the data area of a job message frame using project
functions.
The procedure for data arriving at the programmable logic controller is similar. They are re-
stored from the data area of the acknowledgement message frame in the corresponding tags
by means of a project function.
-REVIRUZULWLQJWRWKH3/&
6WHS 3URFHGXUH-REVIRU:ULWLQJWRWKH3/&
1 With write jobs (write to the programmable logic controller), the data arriving at
the programmable logic controller in our example are re-stored in tags
7ZBH[B8$UGB, *ZBH[B8$UGB and 6ZBH[B8$UGB. This is done to
check the function and is not necessary in normal practice. In the present
example, the storage of data at the WinCC end is solved by means of project
functions.
Two raw data tags were created. One of the tags is tag 5$:BH[B8$UGB in our
example. With regard to its address, it corresponds to the data area of the
acknowledgement message frame sent to the requesting programmable logic
controller by WinCC in response to a job. The second tag is tag
5$:BH[B8$UGB in our example. With regard to its addressing, it corresponds
to the memory area on the programmable logic controller in which the three
WinCC tags used for checking are addressed.
When the data are re-stored, we have to make sure that the first byte of a number
occurring in a raw data message frame is the least significant byte. In the case of
WinCC tags, the byte order is exactly the reverse of this.
If object %XWWRQ (write record to PLC) is operated by clicking 8 , an internal
tag of the ELQDU\WDJ type is set. In our example, this is tag %,1LBH[B8$UGB.
6WHS 3URFHGXUH-REVIRU:ULWLQJWRWKH3/&
2 The procedure for writing fields to the PLC is similar to step 1. However, only a
single field is processed.
If object %XWWRQ (write field to PLC) is operated by clicking 8 , an internal tag
of the ELQDU\WDJ type is set. In our example, this is tag %,1LBH[B8$UGB.
Further, control tag 8ZBH[B8$UGB is set to a value of 0x2000.
By means of the write operation to the control tag, the programmable logic
controller then sends a job message frame to WinCC. This message frame
requests a specific data field of a data record. The requested data are then sent by
means of the raw data tag set in User Archive to the programmable logic
controller (acknowledgement message frame).
We configure a &DFWLRQ at 3URSHUWLHV→*HRPHWU\→3RVLWLRQ; of the button
that is triggered when tag 5$:BH[B8$UGB is modified. Any change to this tag
signifies that new data have been sent.
Tag %,1LBH[B8$UGB is checked in the &DFWLRQ. If it has been set, a new data
field (as opposed to a new data record) has been sent. Project function
$FWXDOLVH'DWD)LHOG is then triggered and performs the re-store operation of the
sent field to the corresponding WinCC tag. This is performed in function of the
currently set field number. Further, tag %,1LBH[B8$UGB is reset.
SetTagWord("U16w_ex_UArd_01",0x0400);
SetTagBit("BINi_ex_UArd_01",TRUE);
}
• Trigger a job on the programmable logic controller. This is done by setting tag
8ZBH[B8$UGB to a defined value. In this instance we use the value [. It
if (GetTagBit("BINi_ex_UArd_01") == TRUE)
{
ActualiseDataSet();
SetTagBit("BINi_ex_UArd_01",FALSE);
}
return 470;
}
• Check tag%,1LBH[B8$UGB.
• If it has been set, a data record has been sent. In this instance project function
$FWXDOLVH'DWD6HW is called. It re-stores the data area of the sent acknowledgement
GetTagRaw("RAW_ex_UArd_02",&byData[0],22);
SetTagRaw("RAW_ex_UArd_08",&bySet[0],22);
• The program excerpt above shows the job message frame for reading a data record from
the archive. The structure of the job message frames can be taken from Section
6WUXFWXUHRIUDZGDWDPHVVDJHIUDPHV. Attention must be paid to the coding of the
1RWH
'% stores the message frame for reading a data field. This differs from the message
frame for reading a data record only in respect of a different value for the job type (9). The
data field number is entered in this message frame by means of 3%, in addition to the data
record number.
• The program excerpt above shows the acknowledgement message frame for reading a
data record from the archive. The structure of the acknowledgement message frames
can be taken from the section that follows, 6WUXFWXUHRIUDZGDWDPHVVDJH
IUDPHV.
• The data are re-stored from the data area of the message frame by means of project
function $FWXDOLVH'DWD6HW to the WinCC tags. This means that successful sending of
data is immediately visible in the example project.
• In the case of a job to send a data field, the data area of the acknowledgement message
frame does not contain more than a single data field. The data field is re-stored in the
corresponding WinCC tag by means of project function $FWXDOLVH'DWD)LHOG.
-REVIRUUHDGLQJIURPWKH3/&
6WHS 3URFHGXUH-REVIRU5HDGLQJIURPWKH3/&
1 In the case of read jobs (read from the programmable logic controller), the data
stored in tags 7ZBH[B8$UGB, *ZBH[B8$UGB and 6ZBH[B8$UGB
have to be re-stored in the data areas of the write message frames of the PLC
program. In the present example, this is performed at the WinCC end by means
of project functions.
Create two raw data tags. A tag, in our example tag 5$:BH[B8$UGB,
corresponds with regard to its addressing to the data area of the message frame
for sending a data record in the PLC program. A second tag, in our example tag
5$:BH[B8$UGB, corresponds with regard to its addressing to the data area of
the message frame for sending a data field in the PLC program.
2 The procedure for reading from fields on the PLC is similar to that for reading
8
records. However, only a single field is processed.
If object %XWWRQ (read record from PLC) is operated by clicking , project
function /RDG'DWD)LHOG is called. This function re-stores the current data of the
tag corresponding to the currently set field number in the data area of the
message frame for writing a data field.
Further, control tag 8ZBH[B8DUGB is set to a hexadecimal value of [.
By means of the write operation to the control tag, the programmable logic
controller then sends a job message frame to WinCC to send a data field. In our
example, the message frame we are referring to is located in '%.
• The program excerpt above shows the job message frame for sending a data record to
the archive. The structure of the job message frames can be taken from Section
6WUXFWXUHRIUDZGDWDPHVVDJHIUDPHV. Attention must be paid to the coding of the
1RWH
'% stores the message frame for writing a data field. This differs from the message
frame from writing a data record only in respect of a different value for the job type (10).
Further, the data area of the message frame contains only the data of one message field.
The data field number is entered in this message frame by means of 3%, in addition to the
data record number.
-REVIRUGHOHWLQJIURPWKHDUFKLYH
8
6WHS 3URFHGXUH-REVIRU'HOHWLQJIURPWKHDUFKLYH
By means of the write operation to the control tag, the programmable logic
controller then sends a job message frame to WinCC to delete a data record. In
our example, the message frame we are referring to is located in '%.
• The program excerpt above shows the job message frame for deleting a data record
from the archive. The structure of the job message frames can be taken from Section
6WUXFWXUHRIUDZGDWDPHVVDJHIUDPHV. Attention must be paid to the coding of
• The program excerpt above shows the job message frame for deleting all data records
from the archive.
1RWHVRQJHQHUDOXVH
&RQQHFWLRQYLD:LQ&&5DZ'DWD7DJVWRWKH6
H[BBFKDSWHUBFSGO
7DVNGHILQLWLRQ
Further, we wish to create an archive. The data records in this archive will consist of a text
field, an integer field and a double field. We want the archive data to be displayed in tabular
form at runtime. They are required to be made available to the programmable logic
controller on a record-by-record and field by field basis.
1RWH
The option of communication between User Archive and the programmable logic controller
via WinCC raw data tags should be preferred when the majority of the activities are to be
controlled by the programmable logic controller.
In the present example, however, the WinCC user takes the initiative. The programmable
logic controller will be prompted to send job message frames to WinCC by way of setting a
control tag. In this way the functionality otherwise present in the programmable logic
controller is simulated.
,PSOHPHQWDWLRQFRQFHSW
We establish a connection to an S7 via the MPI. Two connections are created in Control
Center. Create a WinCC raw data tag for this connection. We want to use this tag for
communication between the programmable logic controller and the User Archive that we
are going to create. The second connection is used to connect WinCC tags.
We create a User Archive which we want to communicate with the PLC by means of
WinCC raw data tags. The tag we created earlier is assigned to the archive.
The archive data are displayed at runtime by means of an OLE control. Control bits are set
on the programmable logic controller by means of various buttons. They trigger the transfer
of raw data message frames for writing, reading and deleting different data records and data
fields.
6,0$7,&6SURWRFROVXLWHFRPPXQLFDWLRQGULYHU
This driver will be used for communication with the programmable logic controller in our
example. The driver contains five different channel units. In our example, we use the MPI
channel unit. It is suitable for connections to a SIMATIC S7-300 and S7-400 through the
MPI. An MPI ISA card is used as the PC interface. Not more than one module can be used.
It should communicate with not more than four programmable logic controllers.
&RQILJXULQJWKH03,FDUG
6WHS 3URFHGXUH&RQILJXULQJWKH03,&DUG
1 Install the WinCC component called 6'RV. If this was not done at the time when
WinCC was installed, the 6'RV component can be installed later.
2 Install the MPI ISA card on the PC. Install the card on the PC exactly as stated in
the installation instructions enclosed with the card. Following this, software
installation of the card has to be performed, again by precisely following the
instructions.
Start the 6HW3URJUDPPLQJ'HYLFH3&,QWHUIDFH program on the Control Panel.
The access point for the MPI was entered by default at the time WinCC was
installed. This is the access point labeled 03,:LQ&&.
6WHS 3URFHGXUH&RQILJXULQJWKH03,&DUG
3 Assign a module to the access point. The module has to be installed first,
however. This is accomplished by means of the button in the
0RGXOHV box. The ,QVWDOO8QLQVWDOO0RGXOH dialog box is opened. In the left list
box, we select the 03,,6$&DUG entry and install the card using the
button.
6WHS 3URFHGXUH&RQILJXULQJWKH03,&DUG
4 The 03,,6$&DUG5HVRXUFHV dialog box opens. The set memory area can
frequently not be used. We recommend the '')). area
the top list box and select the entry for the 03,,6$&DUG in the bottom list.
6WHS 3URFHGXUH&RQILJXULQJWKH03,&DUG
8 Set the properties of the MPI ISA card. We do this by clicking the
button. In the 03,,6$&DUG03, Properties dialog box that
appears, set a ORFDOQRGHDGGUHVV for the card on the 03,1HWZRUN tab. The
WUDQVPLVVLRQUDWH we use on the S7-300 must be NELWVHF. On the S7-400,
6WHS 3URFHGXUH&RQILJXULQJWKH03,&DUG
&RQILJXULQJWKHFRQQHFWLRQRQWKHSURJUDPPDEOHORJLFFRQWUROOHU
6WHS 3URFHGXUH&RQILJXULQJWKH&RQQHFWLRQRQWKH3URJUDPPDEOH/RJLF
&RQWUROOHU
8
opened. In the present example, the CPU is in slot 3. Open the Properties dialog
box for the CPU module we are using by clicking 5.
6WHS 3URFHGXUH&RQILJXULQJWKH&RQQHFWLRQRQWKH3URJUDPPDEOH/RJLF
&RQWUROOHU
On the 3RZHU6XSSO\ tab, enter a as the value for the DGGUHVV in the 8VHU box.
This value also has to be specified later in WinCC when we configure the
connection.
Finish the settings in the 03,8VHU3URSHUWLHV dialog box by clicking 2.. Close
the &38'33URSHUWLHV dialog box similarly by clicking 2.. We can then
exit the +:&RQILJ program.
&RQILJXULQJWKHFRQQHFWLRQLQ&RQWURO&HQWHU
6WHS 3URFHGXUH&RQILJXULQJWKH&RQQHFWLRQLQ&RQWURO&HQWHU
8
1 Install the required driver for the necessary programmable logic controller and
necessary driver connections. In &RQWURO&HQWHU, click 5 on option 7DJ
0DQDJHPHQW to open the $GG1HZ'ULYHU dialog box.
Select the 6,0$7,&63URWRFRO6XLWH driver from the list shown in the dialog
box. Exit the dialog box by clicking 2SHQ.
6WHS 3URFHGXUH&RQILJXULQJWKH&RQQHFWLRQLQ&RQWURO&HQWHU
8
2 Configure a connection for the driver you have just added. This is accomplished
in &RQWURO&HQWHU by clicking 5 on the 03, channel unit entry.
6WHS 3URFHGXUH&RQILJXULQJWKH&RQQHFWLRQLQ&RQWURO&HQWHU
3 Set the system parameters for the channel unit being used. To do this, click
on their entry.
85
6WHS 3URFHGXUH&RQILJXULQJWKH&RQQHFWLRQLQ&RQWURO&HQWHU
4 We create a new tag group in our example for the new connection we have
created. In the 1HZ7DJ dialog box, we use the name 5$:BH[B8$6B in our
example. We set the tag type to 5DZ'DWD7\SH.
6WHS 3URFHGXUH&RQILJXULQJWKH&RQQHFWLRQLQ&RQWURO&HQWHU
We set the properties of the connection on the &RQQHFWLRQ tab. In our example,
we set the VWDWLRQDGGUHVV to the value of that is set on the PLC.
We have to set the values of the VHJPHQW,', UDFNQXPEHU and VORWQXPEHU in
accordance with the conditions prevalent on the programmable logic controller.
Close the dialog box by clicking 2..
6WHS 3URFHGXUH&RQILJXULQJWKH&RQQHFWLRQLQ&RQWURO&HQWHU
6 Create external tags for triggering actions on the programmable logic controller
and for checking correct functioning of the connection.
We create these tags in a new tag group, which we have yet to create, in the 6
8:LQ&&$FWLYH connection.
In our example, the tag group in which we are going to create the tags will be
called 8VHU$UFKLYHB6.
7 The tags we need to create and their addressing on the programmable logic
controller are shown at length in the list below.
Tags 7ZBH[B8$6B, *ZBH[B8$6B and 6ZBH[B8$6B are
required to accommodate data sent to and from User Archive.
Tags 8ZBH[B8$6B and 8ZBH[B8$6B are to be used to set the
record number that has to be edited or the field number that needs editing.
Tag 8ZBH[B8$B is used as a control tag. We wish to use it to set the type
of job that has to be performed and to trigger it.
6WHS 3URFHGXUH&RQILJXULQJWKH&RQQHFWLRQLQ&RQWURO&HQWHU
8 Check the connection to the programmable logic controller. To do this, switch the
WinCC project to Runtime and start the programmable logic controller. A dialog
box, which you can open by choosing 2SWLRQV→6WDWXVRI'ULYHU&RQQHFWLRQV in
&RQWURO&HQWHU, keeps you informed of the status of the connection.
8
available for the different connections of the channel unit. It is opened by
clicking 5 on the button of the corresponding channel unit and the V\VWHP
SDUDPHWHUV entry in the shortcut menu that is displayed. The 6\VWHP3DUDPHWHUV
dialog box opens. The &RQQHFWLRQV tab displays the current states of the different
connections.
&RQILJXULQJWKH8VHU$UFKLYH
85
6WHS 3URFHGXUH&RQILJXULQJ8VHU$UFKLYH
1 Open the 8VHU$UFKLYH editor and create a new archive. Do this by clicking
on $UFKLYHV. The wizard for creating a new archive appears.
Click the button to set the WinCC raw data tag used for
communication. In our example, we set the tag we created earlier,
5$:BH[B8$6B, in the 7DJ box.
4 In our example, we will not perform any more settings on the remaining pages of
the wizard.
3 The boxes listed in the table that follows are created in our example for the
archive you have just configured. We now save the settings we have performed.
5 Several data records can now be created for the archive in the bottom window of
the User Archive table editor.
6WHS 3URFHGXUH&RQILJXULQJ8VHU$UFKLYH
3URJUDPJHQHUDWLRQRQWKHSURJUDPPDEOHORJLFFRQWUROOHU
6WHS 3URFHGXUH3URJUDP*HQHUDWLRQRQWKH3URJUDPPDEOH/RJLF&RQWUROOHU
1 We have to create a data block in which we store the data for controlling and
monitoring communication.
This is control tag 8ZBH[B8$6B, which contains the job type. Further,
there are the communication monitoring tags, 7ZBH[B8$6B,
*ZBH[B8$6B and 6ZBH[B8$6B, as well as the tags for setting the
3 To illustrate the example more clearly, a separate raw data message frame is
stored in a separate data data block for every job type. The structure of these job
message frames is explained in the section that follows, 6WUXFWXUHRIUDZ
GDWDPHVVDJHIUDPHV.
4 Every job message frame has an area for accommodating the data record number
and data field number. In WinCC, we enter the values for these specifications in
tags 8ZBH[B8$6B and 8ZBH[B8$6B. The tag types have been
chosen in accordance with the length specified in the message frame structure for
the different values. The data record number requires 4 bytes, while the data field
number requires 2 bytes.
In the PLC program, these values are reloaded to the different job message
frames by means of a separate program block. The data record number is required
for all job types except the 'HOHWH$OO'DWD5HFRUGV type. The data field number
is required only for job types :ULWH)LHOG and 5HDG)LHOG. The program block
responsible for reloading the values is )& in our example.
5 All communication handling is performed by another program block. In our
example, this is )&. It is processed on a cyclic basis by means of 2%.
The contents of the control tag are transferred to a specific memory byte in )&.
In our example, this is memory byte 30. Depending on the states of the different
bit memories, job message frames are sent to WinCC. This is accomplished in
6WHS 3URFHGXUH3URJUDP*HQHUDWLRQRQWKH3URJUDPPDEOH/RJLF&RQWUROOHU
VAR_TEMP
stat : WORD ;
len : WORD ;
END_VAR
BEGIN
NETWORK
TITLE = Preparations for communication
//Load the job type in memory word 30, reset job type,
//reload record number and field number via FC7
L DB21.DBW 0;
T MW 30;
L 0;
T DB21.DBW 0;
CALL FC 7 ;
NETWORK
TITLE = Transmit data length
//Set tag #len (length of transmit data) to a value of 50
L 50;
T #len;
NOP 0;
NETWORK
TITLE = Delete all records
//If bit memory 30.1 set, send job "Delete all records"
U M 30.1;
= L 4.0;
BLD 103;
CALL SFB 12 , DB 12 (
REQ := L 4.0,
ID := W#16#10,
R_ID := DW#16#5,
STATUS := #stat,
SD_1 := P#DB25.DBX 0.0 BYTE 4,
LEN := #len);
NOP 0;
NETWORK
TITLE = Read data record
//If bit memory 30.2 set, send job "Read data record"
U M 30.2;
= L 4.0;
BLD 103;
CALL SFB 12 , DB 12 (
REQ := L 4.0,
ID := W#16#10,
R_ID := DW#16#5,
STATUS := #stat,
SD_1 := P#DB26.DBX 0.0 BYTE 4,
LEN := #len);
NOP 0;
NETWORK
• This program block is called in OB1. This means that it is processed on a cyclic basis.
• On the first network, the address area of the control tag sent by WinCC,
8ZBH[B8$UGB, is transferred to memory word 30. The contents of the control tag
is then reset to zero. Further, the record number and field number entered in WinCC are
entered in the different message frames by means of FC7. In this case we must
remember that the byte order has to be changed.
• On the second network, the tag called #len, which transfers the length of the message
frames that have to be transmitted to subsequent send jobs, is set to 50.
• On the third network, a job message frame is sent to WinCC in the event of bit memory
30.1 being set. In this case the message frame is used to delete all the data records from
an archive.
• On subsequent networks, other job message frames are sent to WinCC depending on the
state of memory byte 30. The only differences between the calls relate to the addressing
of the start of the data that have to be transmitted.
• On the final network, acknowledgement message frames originating from WinCC are
forwarded to DB23.
&RQILJXULQJLQ*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH&RQILJXULQJLQ*UDSKLFV'HVLJQHU
2 Click
box.
8 ' on the object known as 2/(&RQWURO to open its Properties dialog
On the *HQHUDO,QIRUPDWLRQ tab, we select $UFKLYH8VHU$UFKLYHB6 as the
6RXUFH. In the (GLW field, we select check boxes 3DVWH, &KDQJH and 'HOHWH to
make all the editing options available to the user. In addition, we select the
%RUGHU check box.
On the &ROXPQV tab, we select all the existing data fields of the archive.
On the 7RROEDU tab, we deselect the two buttons :ULWH7DJ and 5HDG7DJ.
Control is performed by the programmable logic controller in the present
example. All the other buttons on the toolbar will be used.
On the 6WDWXV%DU tabs, we apply the presettings and thus use all the existing
6WHS 3URFHGXUH&RQILJXULQJLQ*UDSKLFV'HVLJQHU
elements.
On the )RQWV tab, we will reduce the VL]H of the font to in order to be able
simultaneously to display all columns of the table at runtime.
On the )LOWHU6RUW tab, we will not perform any settings for our example.
Complete the settings in the 3URSHUWLHVRI:LQ&&8VHU$UFKLYH7DEOH&RQWURO
dialog box by clicking 2..
The color scheme of the table has been adapted in our example to the color
scheme used throughout the project by means of the Properties dialog box of the
2/(&RQWURO object.
3 To display the data transferred from User Archive to the programmable logic
controller, we configure three I/O fields at 6PDUW2EMHFWV→,2)LHOGV. In our
example, these are the objects ,2)LHOG, ,2)LHOG and ,2)LHOG.
At the ,2ILHOGV, we create - at 3URSHUWLHV→2XWSXW,QSXW→2XWSXW9DOXH - a
WDJFRQQHFWLRQ for each of the three tags 7ZBH[B8$6B, 6ZBH[B8$6B
and *ZBH[B8$6B.
4 To set the record number that has to edited and the field number, we create two
more I/O fields at 6PDUW2EMHFWV→,2)LHOGV. In our example, these are the
objects ,2)LHOG and ,2)LHOG.
At the object ,2)LHOG, we create at 3URSHUWLHV→2XWSXW,QSXW→2XWSXW
9DOXH a WDJFRQQHFWLRQ to tag 8ZBH[B8$6B. This is used to accommodate
6WHS 3URFHGXUH&RQILJXULQJLQ*UDSKLFV'HVLJQHU
1RWH
In our example, we want to test the exchange of data between User Archive and the
programmable logic controller. A complex program that sends and receives would go
beyond the framework of a basic description of the connection.
For checking communication, tags 7ZBH[B8$6B, *ZBH[B8$6B and
6ZBH[B8$6B have been created. I/O field data are used to make entries in these tags
at runtime. These data are then re-stored in the data area of a job message frame using
project functions.
The procedure with data arriving at the programmable logic controller is similar. They are
re-stored from the data area of the acknowledgement message frame in the corresponding
tags by means of a project function.
-REVIRUZULWLQJWRWKH3/&
6WHS 3URFHGXUH-REVIRU:ULWLQJWRWKH3/&
1 With write jobs (write to the programmable logic controller), the data arriving at
the programmable logic controller in our example are re-stored in tags
7ZBH[B8$6B, *ZBH[B8$6B and 6ZBH[B8$6B. This is done
to check the function and is not necessary in normal practice. In the present
example, the storage of data at the WinCC end is solved by means of project
functions.
Two raw data tags were created. One of the tags is 5$:BH[B8$UGB in our
example. With regard to its address, it corresponds to the data area of the
acknowledgement message frame sent to the requesting programmable logic
controller by WinCC in response to a job. The second tag is 5$:BH[B8$UGB
in our example. With regard to its addressing, it corresponds to the memory area
on the programmable logic controller in which the three WinCC tags used for
checking are addressed.
When the data are re-stored, we have to make sure that the first byte of a number
occurring in a raw data message frame is the least significant byte. In the case of
WinCC tags, the byte order is exactly the reverse of this.
If object %XWWRQ (write record to PLC) is operated by clicking 8 , an internal
tag of the ELQDU\WDJ type is set. In our example, this is tag %,1LBH[B8$6B.
Further, control tag 8ZBH[B8$6B is set to a value of 0x0400.
By means of the write operation to the control tag, the programmable logic
controller then sends a job message frame to WinCC, which requests a specific
data record. The requested data are then sent by means of the raw data tag set in
User Archive to the programmable logic controller (acknowledgement message
frame).
We configure a &DFWLRQ at 3URSHUWLHV→*HRPHWU\→3RVLWLRQ; of the button
6WHS 3URFHGXUH-REVIRU:ULWLQJWRWKH3/&
that is triggered when tag 5$:BH[B8$6B is modified. Any change to this tag
signifies that new data have been sent.
Tag %,1LBH[B8$6B is checked in the &DFWLRQ. If it has been set, a new data
record (as opposed to a new data field) has been sent. Project function
$FWXDOLVH6'DWD6HW is then triggered and performs the re-store operation of the
2 The procedure for writing fields to the PLC is similar to step 1. However, only a
single field is processed.
If object %XWWRQ (write field to PLC) is operated by clicking 8 , an internal tag
of the ELQDU\WDJ type is set. In our example, this is tag %,1LBH[B8$6B.
Further, control tag 8ZBH[B8$6B is set to a value of 0x2000.
By means of the write operation to the control tag, the programmable logic
controller then sends a job message frame to WinCC, which requests a specific
data field of a data record. The requested data are then sent by means of the raw
data tag set in User Archive to the programmable logic controller
(acknowledgement message frame).
We configure a &DFWLRQ at 3URSHUWLHV→*HRPHWU\→3RVLWLRQ; of the button
that is triggered when tag 5$:BH[B8$6B is modified. Any change to this tag
signifies that new data have been sent.
Tag %,1LBH[B8$6B is checked in the &DFWLRQ. If it has been set, a new data
field (as opposed to a new data record) has been sent. Project function
$FWXDOLVH6'DWD)LHOG is then triggered and performs the re-store operation of
the sent field to the corresponding WinCC tag. This is performed as a function of
the currently set field number. Further, tag %,1LBH[B8$6B is reset.
SetTagWord("U16w_ex_UAS7_01",0x0400);
SetTagBit("BINi_ex_UAS7_01",TRUE);
}
• Trigger a job on the programmable logic controller. This is done by setting tag
8ZBH[B8$6B to a defined value. In this instance we use the value [. It
if (GetTagBit("BINi_ex_UAS7_01") == TRUE)
{
ActualiseS7DataSet();
SetTagBit("BINi_ex_UAS7_01",FALSE);
}
return 470;
}
• Check tag %,1LBH[B8$6B.
• If it has been set, a data record has been sent. In this instance project function
$FWXDOLVH6'DWD6HW is called. It re-stores the data area of the sent acknowledgement
GetTagRaw("RAW_ex_UAS7_02",&byData[0],22);
SetTagRaw("RAW_ex_UAS7_08",&bySet[0],22);
• Declaration of two byte fields. They are required to store the data of the raw data tags.
• Read the data sent to the programmable logic controller to the E\'DWD byte field.
• Reload the text box to the E\6HW byte field. These data correspond to data field
5HFRUG1DPH, which is present in the 8VHU$UFKLYHBUG archive. The 10-character field is
struct
TLngLow : WORD := W#16#1C00; //Frame length low
TLngHigh : WORD := W#16#0; //Frame length high
Transfer : WORD := W#16#200; //Transfer type, Reserve
AAnz : WORD := W#16#100; //Number of jobs
PLCID : ARRAY [1 .. 8 ] OF //PLCID of archive
CHAR := ’U’,’S’,’R’,’A’,’R’,’C’,’S’,’7’;
ALng : WORD := W#16#C00; //Job length
ATyp : WORD := W#16#600; //Job type, Reserve
FNr : WORD := W#16#0; //Field number
SNrLow : WORD := W#16#200; //Data record number low
SNrHigh : WORD := W#16#0; //Data record number high
SelKrit : WORD := W#16#0: //Selection criterion
Date1 : WORD;
Date2 : WORD;
END_STRUCT ;
• The program excerpt above shows the job message frame for reading a data record from
the archive. The structure of the job message frames can be taken from Section
6WUXFWXUHRIUDZGDWDPHVVDJHIUDPHV. Attention must be paid to the coding of the
1RWH
'% stores the message frame for reading a data field. This differs from the message
frame from reading a data record only in respect of a different value for the job type (9).
The data field number is entered in this message frame by means of )&, in addition to the
data record number.
struct
TLngLow : WORD := W#16#2C00; //Frame length low
TLngHigh : WORD := W#16#0; //Frame length high
TTyp : WORD := W#16#100; //Transfer type, Reserve
FCode : WORD := W#16#0; //Error code, job type
Res : WORD := W#16#0; //Reserve
FNr : WORD := W#16#100; //Field number
SNrLow : WORD := W#16#300; //Data record number low
SNrHigh : WORD := W#16#0; //Data record number high
PLCID : ARRAY [1 .. 8 ] OF //PLCID
CHAR := ’U’,’S’,’R’,’A’,’R’,’C’,’S’,’7’;
Text : ARRAY [1 .. 10 ] OF //Text box
CHAR := ’R’,’E’,’C’,’O’,’R’,’D’,’_’,’0’,’0’,’1’;
Double0 : WORD := W#16#0; //Double field low
Double1 : WORD := W#16#0;
Double2 : WORD := W#16#0;
Double4 : WORD := W#16#0; //Double field high
IntLow : WORD := W#16#0; //Integer field low
IntHigh : WORD := W#16#0; //Integer field high
Data1 : WORD;
Data2 : WORD;
END_STRUCT ;
• The program excerpt above shows the acknowledgement message frame for reading a
data record from the archive. The structure of the acknowledgement message frames
can be taken from the section that follows, 6WUXFWXUHRIUDZGDWDPHVVDJH
IUDPHV.
• The data are re-stored from the data area of the message frame by means of project
function $FWXDOLVH6'DWD6HW to the WinCC tags. This means that successful sending
of data is immediately visible in the example project.
• In the case of a job to send a data field, the data area of the acknowledgement message
frame does not contain more than a single data field. The data field is re-stored in the
corresponding WinCC tag by means of project function $FWXDOLVH6'DWD)LHOG.
-REVIRUUHDGLQJIURPWKH3/&
6WHS 3URFHGXUH-REVIRU5HDGLQJIURPWKH3/&
1 In the case of read jobs (read from the programmable logic controller), the data
stored in tags 7ZBH[B8$6B, *ZBH[B8$6B and 6ZBH[B8$6B
have to be re-stored in the data areas of the write message frames of the PLC
program. In the present example, this is performed at the WinCC end by means
of project functions.
Create two raw data tags. A tag, in our example tag 5$:BH[B8$6B,
corresponds with regard to its addressing to the data area of the message frame
for sending a data record in the PLC program. A second tag, in our example tag
5$:BH[B8$6B, corresponds with regard to its addressing to the data area of
the message frame for sending a data field in the PLC program.
6WHS 3URFHGXUH-REVIRU5HDGLQJIURPWKH3/&
2 The procedure for reading from fields on the PLC is similar to that for reading
8
records. However, only a single field is processed.
If object %XWWRQ (read field from PLC) is operated by clicking , project
function /RDG6'DWD)LHOG is called. This function re-stores the current data of
the tag corresponding to the currently set field number inn the data area of the
message frame for writing a data field.
Further, control tag 8ZBH[B8D6B is set to a hexadecimal value of [.
By means of the write operation to the control tag, the programmable logic
controller then sends a job message frame to WinCC to send a data field. In our
example, the message frame we are referring to is located in '%.
struct
TLngLow : WORD := W#16#3200; //Frame length low
TLngHigh : WORD := W#16#0; //Frame length high
TTyp : WORD := W#16#200; //Transfer type, Reserve
AAnz : WORD := W#16#100; //Number of jobs
PLCID : ARRAY [1 .. 8 ] OF //PLCID
CHAR := ’U’,’S’,’R’,’A’,’R’,’C’,’S’,’7’;
ALng : WORD := W#16#2200; //Job length
ATyp : WORD := W#16#700; //Job type, Reserve
FNr : WORD := W#16#0; //Field number
SNrLow : WORD := W#16#300; //Data record number low
SNrHigh : WORD := W#16#0; //Data record number high
SelKrit : WORD := W#16#0; //Selection criterion
Text : ARRAY [1 .. 10 ] OF //Text box
CHAR := ’R’,’E’,’C’,’O’,’R’,’D’,’_’,’0’,’0’,’1’;
Double0 : WORD := W#16#0; //Double field low
Double1 : WORD := W#16#0;
Double2 : WORD := W#16#0;
Double4 : WORD := W#16#0; //Double field high
IntLow : WORD := W#16#0; //Integer field low
IntHigh : WORD := W#16#0; //Integer field high
Data1 : WORD ;
Data2 : WORD ;
END_STRUCT;
• The program excerpt above shows the job message frame for sending a data record to
the archive. The structure of the job message frames can be taken from Section
6WUXFWXUHRIUDZGDWDPHVVDJHIUDPHV. Attention must be paid to the coding of the
1RWH
'% stores the message frame for writing a data field. This differs from the message
frame for writing a data record only in in as much as a there is a different value for the job
type (10). Further, the data area of the message frame contains only the data of one message
field.
The data field number is entered in this message frame by means of )&, in addition to the
data record number.
-REVIRUGHOHWLQJIURPWKHDUFKLYH
8
6WHS 3URFHGXUH-REVIRU'HOHWLQJIURPWKHDUFKLYH
By means of the write operation to the control tag, the programmable logic
6WHS 3URFHGXUH-REVIRU'HOHWLQJIURPWKHDUFKLYH
controller then sends a job message frame to WinCC to delete a data record. In
our example, the message frame we are referring to is located in '%.
struct
TLngLow : WORD := W#16#1A00; //Frame length low
TLngHigh : WORD := W#16#0; //Frame length high
TTyp : WORD := W#16#200; //Transfer type, Reserve
AAnz : WORD := W#16#100; //Number of jobs
PLCID : ARRAY [1 .. 8 ] OF //PLCID
CHAR := ’U’,’S’,’R’,’A’,’R’,’C’,’S’,’7’;
ALng : WORD := W#16#A00; //Job length
ATyp : WORD := W#16#800; //Job type, Reserve
FNr : WORD := W#16#0; //Field number
SNrLow : WORD := W#16#100; //Data record number low
SNrHigh : WORD := W#16#0; //Data record number high
Date1 : WORD;
Date2 : WORD;
END_STRUCT ;
• The program excerpt above shows the job message frame for deleting a data record
from the archive. The structure of the job message frames can be taken from Section
6WUXFWXUHRIUDZGDWDPHVVDJHIUDPHV. Attention must be paid to the coding of
struct
TLngLow : WORD := W#16#1400; //Frame length low
TLngHigh : WORD := W#16#0; //Frame length high
TTyp : WORD := W#16#200; //Transfer type, Reserve
AAnz : WORD := W#16#100; //Number of jobs
PLCID : ARRAY [1 .. 8 ] OF //PLCID
CHAR := ’U’,’S’,’R’,’A’,’R’,’C’,’S’,’7’;
ALng : WORD := W#16#400; //Job length
ATyp : WORD := W#16#500; //Job type, Reserve
Date1 : WORD;
Date2 : WORD;
END_STRUCT ;
• The program excerpt above shows the job message frame for deleting the archive.
1RWH
A dialog box for monitoring the status of individual tags can be opened by means of a
button. However, the configuration of this dialog box does not depend on the
programmable logic controller being used and is therefore described in a separate section
(Section 6WDWXV0RQLWRULQJRI([WHUQDO7DJVH[BBFKDSWHUBFSGO).
1RWHVRQJHQHUDOXVH
7DVNGHILQLWLRQ
The status of several external tags is required to be monitored at runtime. We want the
status to be displayed in a separate dialog box, which we want to be accessible by means of
a button.
,PSOHPHQWDWLRQFRQFHSW
The dynamic dialog box is used to monitor the status of individual tags. For every tag we
want to have monitored, static text is used to display the static text and a status display
presents a symbolic representation of the status. These objects are configured in a separate
picture.
This picture is displayed at runtime by means of a picture window that can be shown by
means of a button.
,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
display the status of tag 7ZBH[B8$6B, which was created in the
&RQQHFWLRQYLD:LQ&&5DZ'DWD7DJVWRWKH6H[BBFKDSWHUBFSGO
example. The procedure is the same for any other external tag, however.
At 3URSHUWLHV→)RQW→7H[W, we create a G\QDPLFGLDORJER[. In the
([SUHVVLRQ)RUPXOD box, we click the button to set the tag we want to
monitor, namely 7ZBH[B8$6B.
Select the (YDOXDWH7DJ6WDWXV check box. The dialog box is then expanded.
There is then the possibility of defining text for every tag status possible. If the
tag assumes the corresponding status, this text is displayed in the 6WDWLF7H[W
object. If no status on the list is in fact current - in other words, the connection is
in order - the text entered on the 2WKHU line is displayed. In our example, this is
&RQQHFWLRQ2..
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
clicking the button. We then set a suitable picture for every status.
In our example, the pictures are 9HUELQGXQJ2.EPS for status and
9HUELQGXQJ6723EPS for status .
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
6WHS 3URFHGXUH,PSOHPHQWDWLRQLQ*UDSKLFV'HVLJQHU
1RWH
If you wish to use several objects in the same manner for monitoring the status of different
tags, it is advantageous to fully configure these objects and then copy them. In the present
case, however, this is not possible - at least not directly possible. If, namely, the tag name is
modified in the dynamic dialog box, the values entered for each status of the tag will
similarly be lost.
There is a possibility, however, of transforming the dynamic dialog box into a C action. For
this purpose, only the created dynamic dialog box is opened as a C action in the Properties
dialog box of the object.
The C action received can now be copied. Only the tag name in the code of the copy has to
be modified and the C action triggered on this tag.
if (strcmp(value,"Connection OK") != 0)
{
SetIndex("ex_5_window_03.pdl","Status Display1",1);
}
else
{
SetIndex("ex_5_window_03.pdl","Status Display1",0);
}
}
• Compares the new text with the string &RQQHFWLRQ2..
• If they are identical, object 6WDWXV'LVSOD\ is set to status . This means that the green
check mark is displayed.
• If they are not identical, object 6WDWXV'LVSOD\ is set to status . This means that the
STOP symbol is displayed.
1RWHVRQJHQHUDOXVH
6WUXFWXUHRIUDZGDWDPHVVDJHIUDPHV
*HQHUDO
The raw data message frames can be sent by the programmable logic controller by means of
an active sender to WinCC. The message frames contain one or more requests on the
WinCC archive system. These may be read or write jobs. In response to these requests,
WinCC returns a processing acknowledgement with any data that may have been requested.
Requests consist of a message frame header and subsequent requests. The requests consist
in their turn of a job header and possibly subsequent data - where write jobs are concerned.
6WUXFWXUHRIWKHPHVVDJHIUDPHKHDGHU
%\WH 'HVFULSWLRQ
0 Message frame length in byte LSB (frame length requires a total of 4 bytes)
1 Message frame length in byte
2 Message frame length in byte
3 Message frame length in byte MSB
4 Transfer type: 2 corresponds to Send Data from the programmable logic
controller
5 Reserved
6 Number of jobs LSB (number of jobs requires a total of 2 bytes)
7 Number of jobs MSB
8 1st character of archive PLCID (PLCID is eight characters long)
9 2nd character of archive PLCID
10 3rd character of archive PLCID
11 4th character of archive PLCID
12 5th character of archive PLCID
13 6th character of archive PLCID
14 7th character of archive PLCID
15 8th character of archive PLCID
6WUXFWXUHRIWKHMREKHDGHU
%\WH 'HVFULSWLRQ
1RWH
The field number that has to be specified in the job header is applicable only to jobs
involving reading from and writing to different fields. Data fields are numbered from zero.
The data record number specified in the job header is identical to the number specified in
the ID column of User Archive. Data record numbering starts at 1. If 0 is entered, a new
data record is added in the case of a job writing a data record to User Archive.
-REW\SHV
A byte is set for the job type in the job header. The following job types are available.
7\SH 'HVFULSWLRQ
-REGDWD
In the case of write jobs, the archive data come next. They correspond to the contents of a
data record with a ZULWHGDWDUHFRUG job or the contents of a data field with a ZULWHGDWD
ILHOG job. No other data follow for the remaining jobs.
Numbers are transmitted in Intel format. This means that the LSB is transferred first and the
MSB last. Integer fields are 4 bytes long, double fields are 8 bytes long. Text fields are not
terminated with \0.
$FNQRZOHGJHPHQWKHDGHU
%\WH 'HVFULSWLRQ
0 Message frame length in byte LSB (frame length requires a total of 4 bytes)
1 Message frame length in byte
2 Message frame length in byte
3 Message frame length in byte MSB
4 Transfer type: 1 corresponds to the data sent by WinCC
5 Reserved
6 Error code: refer to the description of error types below
7 Job type: refer to description of job types above
8 Reserved
9 Reserved
10 Field number LSB (field number requires a total of 2 bytes)
11 Field number MSB
12 Data record number LSB (data record number requires a total of 4 byte)
13 Data record number
14 Data record number
15 Data record number MSB
16 1st character of archive PLCID (PLCID is eight characters long)
17 2nd character of archive PLCID
18 3rd character of archive PLCID
19 4th character of archive PLCID
20 5th character of archive PLCID
21 6th character of archive PLCID
22 7th character of archive PLCID
23 8th character of archive PLCID
$FNQRZOHGJHPHQWGDWD
In the case of read jobs, the requested data then follow. They correspond to the contents of
a data record with a UHDGGDWDUHFRUG job or the contents of a data field with a UHDGGDWD
ILHOG job. No other data follow for the remaining jobs.
(UURUFRGHV
&RGH 'HVFULSWLRQ
0 Function triggered
1 Invalid data (archive)
2 Non-existent data (archive)
101 Invalid data (data record)
102 Non-existent data (data record)
201 Invalid data (field)
202 Non-existent data (field)
254 Function not available
255 Undefined error
Index
Use, 4-30
Changeover switch, 2-17
A Color
change, 3-70, 3-79
Acknowledgement, 3-57 scheme, 3-109
Horn, 4-76 Communication
Messages, 4-76 driver, 5-39
Addressing processor, 5-34
indirect, 2-47, 2-50 Communications
Alarm user archives, 5-4
Analog Alarms, 4-72 Communikation
Archiving of, 4-91 OLE with Excel, 4-139
Bit Message Procedure, 4-52 Configuration
Create with Wizard, 4-63 Color Scheme of the Messages, 4-67
Enter Alarm Logging in the Startup tab, 4- Loop in Alarm, 4-89
69 Trend Display, 4-24, 4-46
line, 3-5 Connection
Loop in, 4-89 in Control Center, 5-39
Loop in, 3-109 on PLC, 5-38
Setup, 4-52 raw data tags, 5-49
Use OCX, 4-97 To Excel, 4-139
Alias to S5, 2-66
archive, 5-4 WinCC tags, 5-34
data fields, 5-7 Content
Analog Values Print Short-Term Archive, 4-95
Monitor, 4-72 Control tags, 5-28
API Controllable
For Message Filter, 4-95 access protection, 3-24, 3-27
Use, 4-28 Create
Application window, 3-107 data fields, 5-7
Archive user archives, 5-3
Every full Minute, 4-42 Creating
Export, 4-46 tags, 2-2
archiving Creation
Cyclic-Continuous, 4-3 Group Messages, 4-102
Archiving Process Value Archive, 4-3
Acyclic, 4-21 CSV
Alarms, 4-91 Export Archive Automatically, 4-46
Authorization level, 3-27 user archives, 5-12
CurrentUser, 4-25
B
Bit editing, 2-39 D
Bit Message Procedure, 4-52, 4-64 Data
Bit pattern, 2-40 Archive, 4-29
Buttons Archiving, 4-16
For Message Filter, 4-91 data fields, 5-7
data type, 5-2
transfer to PLC, 5-2
C Data import
user archives, 5-12
Callback Function Decrementing, 2-7, 2-19
Direct connection, 2-13, 2-29, 2-40, 3-7 picture window, 3-33, 3-35, 3-36
Direct link, 1-1 HMI, 3-1
Display Contents Hot key
Of Example_01, 4-149 configuring, 3-86
DLL
Integration, 4-86
Documentation I
Pictures, 4-110
Project Function, 4-115 Import
Tags, 4-118 tags, 2-61
Trend Window, 4-123 Incrementing, 2-7, 2-19
Dynamic Info (instruction) box
Part of the Report, 4-132 configuring, 3-39
Dynamic Dialog Information
Use, 4-40 hiding, 3-74, 3-102
Dynamic dialog box showing, 3-74, 3-102
status monitoring, 5-98 Initialisation
Dynamic Wizard, 3-12, 3-15 Of the Callback Function with Call, 4-33
Initialization
in the project, 3-50
picture, 1-2
E
simulation, 2-56
Editor Input
user archive editor, 5-3 by means of a check box, 2-36
Embedding by means of a slider, 2-29
OCX, 5-15 by means of an option group, 2-34
Entry check, 3-59, 3-61
data entry, 5-11 Integration
Error DLL, 4-28
error code, 5-106
Excel
user archives, 5-13 J
Export
Process Valie Archive, 4-46 Jogging, 2-7
tags, 2-61
K
F Key combination
Form view, 5-23 Logon, Logoff, 3-28
switching between windows, 3-93
Key Combination
For Login, 4-12
G
Gauge control, 5-20
Group L
Tag Management, 2-2
user group, 3-28 Language
Group Messages, 4-101 in runtime, 3-83
Library, 3-7
project, 3-11
Login, 3-27, 3-30
H
Name in the project example_01, 4-12
Hiding Loop in Alarm, 4-89
information, 3-74, 3-102
O R
OCX Raw data tags
Use Alarm OCX, 4-97 raw data message frames, 5-103
using, 3-105 user archives, 5-49, 5-70
OLE Resolution
Connection to Excel, 4-139 screen, 1-1, 3-1
insert, 5-15 Runtime
OLE control, 5-2 language change, 3-83
Operator Authorization Print out table, 4-129
For Trend Display, 4-9 Print out trend window, 4-123
Operator panels, 3-52 shutting down (exiting), 3-25
Operator-controllable Start, stop archiving, 4-15
archives, 5-5
Output
Message Sequence Report, 4-135
Overview
S
picture, 3-3, 3-107 Screen
layout, 3-3, 3-4
Section
P screen, 3-4
Selection
password data types, 2-3
In the project example_01, 4-3 Set value
Password, 3-2 changing, 2-8, 2-29
In the project example_01, 4-21 Setup
Performance, 1-1 Message Class, 4-75
Picture Message Line Format, 4-57
adjust size, 3-46 Message Window Template, 4-58
buildup, 3-1 Single Messages, 4-64
change, 3-6 Short-term archive, 3-108
change size, 3-49 Short-Term Archive
changing, 3-3 Create, 4-92
displaying the picture name, 3-7 Print Messages, 4-137
Documentation, 4-110 Showing
geometry, 3-46 picture window, 3-32
initialization, 1-2 Shutdown
opening, 3-1, 3-7 WinCC, 3-24