Sunteți pe pagina 1din 43

Contents Page

Training aims ...................................................................................................................................... 3


Integration of the OS in STEP 7 1/4 ............................................................................................ 4
Configuration of the WinCC station with PROFIBUS CP 2/4.......................................................... 5
Setting interface properties of the PROFIBUS CP 3/4 ...................................................... 6
Data view of the WinCC station via NetPro 4/4 ............................................................................... 7
Exercise 1: Integration of the OS (with the Control Room project) in STEP 7 .................................... 8
Copying WinCC from STEP (releasing) ........................................................................................ 9
Opening integrated WinCC project .................................................................................................... 10
Creating tags "along the way" and using them directly ...................................................................... 11
Tag connection with drag&drop .............................................................................................. 12
Exercise 2: Gauge control with tag connection via STEP 7 symbol server .................................... 13
Overview of the dynamization options in the Graphics Designer 1/2 ................................................ 14
Overview of the dynamization options in the Graphics Designer 2/2 ................................................ 15
Configuration dialog (fast configuration) ...................................................................................... 16
Dynamic Wizard .............................................................................................................................. 17
Dynamics options in the object properties ............................................................... 18
Overview of the Dynamic dialog ....................................................................................................... 19
Dynamic dialog further examples 1/2 ............................................................................................. 20
Dynamic dialog further examples 2/2 .............................................................................................. 21
Overview of a direct connection ........................................................................................................ 22
Exercise 3: Motor control and color change ............................................................................. 23
I/O field consolidation ........................................................................................................................ 24
Bar display consolidation ................................................................................................................ 25
WinCC Slider control consolidation ................................................................................................... 26
Exercise 4: Inserting a bar for actual value and slider for setpoint ..................................................... 27

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 1 Graphics Designer Consolidation
Contents Page
Status display consolidation ........................................................................................................... 28
Exercise 5: Status display for direction of rotation ...................................................................... 29
Overview of the configuration options for color change with the following examples .................... 30
Linking a tag with the corresponding color property ................................................................ 31
Overview of color change with the Dynamic dialog ............................................................................ 32
Overview of color change with scripts (C script or VBS) .................................................................. 33
Setting a bit in a word with the Dynamic Wizard ................................................................................ 34
Exercise 6: Setting a bit in a byte ................................................................................................... 35
Slider object .................................................................................................................................. 36
Check box and radio box .................................................................................................................. 37
Text list ........................................................................................................................................... 38
List box and combo box .................................................................................................................... 39
Help for the operator ...................................................................................................................... 40
Exercise 7: Help function for the plant operator ................................................................................. 41
Showing a picture name in any picture ............................................................................................ 42
Default trigger for new objects ....................................................................................................... 43

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 2 Graphics Designer Consolidation
The participant will:
Be able to integrate a WinCC project into a STEP 7 project at a later point in
time.
Be able to adapt objects in a configuration dialog
Know how the Dynamic Wizard works.
Be able to make, for example, color changes with the dynamic dialog box:
Be able to use further objects such as sliders and check boxes.
Know options to provide the operator with help functions.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 3 Graphics Designer Consolidation
The configuration of SIMATIC WinCC in an integrated environment provides the
following advantages:
- Simple compilation of tags and message texts into the
WinCC project
- Direct access to STEP 7 symbols during process connection
- End-to-end message configuration for operator devices and PC stations
- Loading the configuration data on the runtime OS
- Extended diagnostics support

Note Before starting the import function WinCC must be closed

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 4 Graphics Designer Consolidation
1. Start the configuration (HW Config) by double-clicking

2. Take the CP 5611 or CP 5711 from the hardware catalog by


dragging and dropping it on slot 2. If necessary, the "hardware catalog" can be
made visible with View Catalog.

In the following steps, the PROFIBUS interface has parameters assigned.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 5 Graphics Designer Consolidation
1. By double-clicking on the CP 5611 or CP 5711 you start the parameter
assignment of the PROFIBUS CP.

2. Assign the PROFIBUS interface to the CP 5611 or the CP 5711.

3. Open the properties of the PROFIBUS interface.

4./5. Add the PROFIBUS subnet and assign the address 0.

6. Save and compile the configuration.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 6 Graphics Designer Consolidation
By double-clicking on "PlantBus" open the NetPro editor
(prior to this, click "Ventilation").

Here, you can check whether a PROFIBUS connection between the PC and the
S7 exists. The PROFIBUS addresses can also be recognized.

Tip With "View with DP Slaves / IO Devices", these devices can be made visible in
the NetPro view

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 7 Graphics Designer Consolidation
Objective The existing "Control_Room" project will be integrated in the S7 project
"Ventilation. After integration of the WinCC project, you can, for example access
the symbols of the S7 from WinCC.

Exercise 1. Close WinCC Explorer


2. Open S7 project "Ventilation" on drive: D:\Courses\WINCCS with the SIMATIC
manager
3. Integrate the "Control Room" WinCC project in the S7 project
"Ventilation_Step7" with Options OS Import (see figure above)
4. Configure the WinCC station (see slide "Configuration of the WinCC station
with PROFIBUS CP 2/4")
5. Assign parameters to the CP 5711 (refer to the slide "Setting interface
properties of the PROFIBUS CP 3/4")
6. Check the configuration with Netpro ( see slide " Data view of the
WinCC station via NetPro 4/4")

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 8 Graphics Designer Consolidation
If the WinCC project is to be used on a PC without a STEP 7 installation, you use
the WinCC tool Project Duplicator. The integrated project is entered as the source
project and stored as a separate project with "Save As".
The WinCC project integrated in STEP 7 is not automatically deleted.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 9 Graphics Designer Consolidation
Note If you are working with integration, it is strongly recommended that you always
start the WinCC project from the SIMATIC Manager. This ensures that the correct
WinCC project is opened.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 10 Graphics Designer Consolidation
Tags When working with integration, in the tags view, not only the WinCC tags but also
the data blocks and the symbols from the S7 controllers are visible.

1. The required tag is simply dragged to a WinCC picture.

2. If no connection has yet been created for the controller and if the interface is
not unique, the dialog "Select the Network Connection" opens automatically, In
this case, please select the WinCC unit "PROFIBUS".

3. After this configuration step, an I/O field with the required tag has been created.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 11 Graphics Designer Consolidation
Tag connection The tag connection can also be made by dragging and dropping on any property of
a graphics object. In the example above, and internal tag is shown at the property
Position X of the object "Circle1".

1. Click on the tag with the mouse and then holding down the mouse button drag it
to the Properties tab. This tab is then shown.
2. Then while still holding down the mouse button, go to the lamp symbol beside
the property to be dynamized and release the mouse button there.
3. The result is shown in the figure above. The tag is used to dynamize Position X.

"Update" column Here, the update time can be adapted. With the procedure above, the default time
(2 s) is entered automatically. The default time can be changed in Tools/Settings -
> "Default Object Settings" tab.

Direct/Indirect To dynamize a graphics object, the indirect addressing of tags can also be used.
To do this a tag (address tag) is defined that contains the tag name of the target
tag.
By changing the content of the "address tag" it is possible to access different tags.
This also changes the link of the tag to the I/O field.
Indirect addressing is indicated by a check mark being entered for "Indir." in
addition to the tag when it is double-clicked.
With indirect addressing, the tag entered there must be a text tag.

Note The dynamization of an object linked to a tag is indicated by a green lamp signal.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 12 Graphics Designer Consolidation
Objective An indicator instrument (gauge control) needs to be linked to a tag. The tag will be
created by access to the STEP 7 symbol server.
Exercise - In the "Ventilation" S7 project, open the integrated WinCC project
"Control Room" with "Open Object".
1. Place a "WinCC Gauge Control" from the Control palette in your picture.

2. Select the object and go to the object properties. Find the attribute "Value"
there. Open the shortcut menu of this attribute and select "Tag".

3. In the tag box, find the data block "User" and the "P_speed_actual" tag

4. Change the update time to 1 second. Afterwards the row should appear as
follows:

5. You can set the attributes (such as maximum value, tick width, danger,
warning,...) of the gauge control with properties. With controls, it is often easier to
use its own properties dialog. To do this please click on the control.

6. In the start picture (in the overview area) configure the system function "Exit
WinCC Runtime" on an additional button with the Dynamic Wizard of the
Graphics Designer.

7. Save the picture and test the functions.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 13 Graphics Designer Consolidation
Configuration dialog
Fast configuration with standard applications e.g. changing to another picture.
Not all objects have such a dialog.
The configuration dialog can be set with
P>Tools, O>Settings, Options tab.

Dynamic Wizard
The Dynamic Wizard makes it easier for you to use and configure complex objects
such as I/O fields and bars because all the required parameters are queried by the
wizard. These are then entered in the object properties and can also be adapted
later individually.
The Dynamic Wizard always generates a C script. The Dynamic Wizard can be
set with P>View, O>Toolbars.

Tag connection
If tags need to be displayed 1 to 1, the direct tag connection of internal and
process tags is available that can also be addressed indirectly.

Dynamic dialog
As a convenient option for dynamizing objects, you can also use the Dynamic
dialog. Here, it is very easy to configure color changes if various limits are
exceeded.
Using the Dynamic dialog results in high performance in
runtime mode.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 14 Graphics Designer Consolidation
Direct connection A special type of action is the direct connection. With this direct connection, for
example, fixed process variables can be transferred very quickly to a tag. In
addition to this, individual properties of an object can be linked directly to tags (e.g.
a string tag with the property Text of a static text).
Using the direct connection results in high performance in
runtime mode.
Properties actions
To dynamize graphics pictures, various options are available. Actions in C syntax
and VBS can be used on the object. Many properties can be made dynamic such
as the color, object size, position, font size etc. via internal or process tags. These
are triggered by a timer or a tag change.
Event actions For extensive actions to be processed event-triggered, the use of actions in C
syntax and VBS is also possible. In these actions, for example, complex
calculations can be made and the results then displayed by WinCC pictures and
objects.
This is triggered by a change in the object properties, for example color change
or events on an object e.g. mouse click.
VBS With VBScript (VBS) you have access to tags and objects of the graphical runtime
system during runtime. Actions can be executed via objects.
This results in numerous options for dynamizing properties of graphics objects or
for reacting to events in runtime mode. With
the Global Script editor, actions and procedures can be created
independent of pictures. VBS supports access via the Component Object Model.
VBS and C VBS provides internal interfaces to tags and picture objects while the C
environment allows access to other WinCC subsystems (e.g. the report system).
See also WinCC help system: Performance Data, Scripting with VBS and ANSI.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 15 Graphics Designer Consolidation
Configuration dialog
The configuration dialog is used for fast configuration. Here, the most important
properties of an object are be displayed clearly.
If you want to change a property that does not exist in this dialog, this can be done
in the object properties. Here, all properties are displayed.

Two examples are shown in the figure: Configuration dialog for an I/O field and for
a button. Not all objects have such a dialog.

It appears automatically when generating these objects. The configuration dialog


can be shown or hidden with P>Tools, O>Settings.

For changes: Open the shortcut menu with the right mouse button and start the
configuration dialog.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 16 Graphics Designer Consolidation
Dynamic Wizard
The Dynamic Wizard is an aid to configuration.

The wizards are distributed on different tabs according to different topics. In the
"System Functions" tab, there are for example wizards for language switchover in
WinCC Runtime or to exit WinCC Runtime.

First, the object to be dynamized must be selected. Then the required wizard is
started by double-clicking on it. Here, one or more screens may be displayed with
questions. On completion of the wizard, this has generated a C script for
dynamization.

Changes can only be made in the generated C script.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 17 Graphics Designer Consolidation
Properties tab, Events tab
In Properties, (almost) all properties can be dynamized. The dynamics are
updated cyclically and for this reason a cycle time needs to be specified here.
With events, it is possible to react to an event e.g. mouse click or pressing the
keyboard. For this reason, these dynamics are not called cyclically and no cycle
time needs to be configured.

Tag Select an object in the picture --> display the Object Properties --> select the
Properties tab --> open the shortcut menu by right clicking in the Dynamic column
->> select a tag --> select the corresponding tag in the dialog and adopt it.
The tag connection is used when the value of a tag is required to influence the
property of an object directly (example: Tag has the value 120 and is linked to the
X position of the graphics object, this is then displayed at X position 120).

Dynamic dialog The dynamic dialog can be used for more complex dynamics. For details, refer to
the next pages.

Direct connection With events a direct connection can also be used. For details, refer to the next
pages.

C Action
VBS action When a solution is not possible with the Dynamic dialog or a direct connection,
scripts can be programmed in the programming language "ANSI C" or "Visual
Basic Script". Details are discussed in section 5.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 18 Graphics Designer Consolidation
Dynamic dialog The dynamic dialog can be configured in the "Dynamic" column for every property
for which a lamp symbol is displayed.

Configuration The configuration of the Dynamic dialog is started with the right mouse button on
the lamp symbol. (Shortcut menu for the object property).
The results of the query are therefore linked immediately to the connected
property. In the example above to "Position X".

Changes If changes need to be made, these can be integrated easily in the existing dialog.
(Open the Dynamic dialog again using the shortcut menu).

Note If the attribute was dynamized with a Dynamic dialog, the lamp symbol is replaced
by a red lightning symbol.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 19 Graphics Designer Consolidation
Analog Several value ranges can be defined. With "Add", a further value range can be
added. The corresponding value for the property to be dynamized is entered in the
right-hand column. In the example above, the background color is dynamized.

Bool If a binary tag is to be evaluated, select the setting "Boolean".

However an unsigned 16-bit value can also be used. If this equals zero, this
corresponds to "False", if it is not equal to zero "True".

An expression such as 'Tag1' < 'Tag2' is also possible.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 20 Graphics Designer Consolidation
Direct In the "Expression/Formula" box, formulas can also be entered.
If the calculated value is to be output one-to-one the data type needs to be set to
"Direct".

Tag status Dynamizing by using the Dynamic Dialog can also be used to monitor the status of
a WinCC tag in Runtime. With external tags, monitoring the tag status also allows
conclusions to be made about the status of the associated connection.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 21 Graphics Designer Consolidation
Direct connection Using a direct connection, it is possible to link certain properties and actions
without formulating the action as a C script.
This allows a very fast connection of individual properties and the relevant source.

The picture shows the direct connection between the value of a mouse operation
and the writing of a tag.
It is also just as easy for example to configure a direct change to another picture or
similar. As of WinCC V5, the direct connection is displayed at the target object via
the object properties and is recognizable by the italic font.

Note If a direct connection was configured, the lightning symbol is shown in blue.

Via the properties


of the picture, the
references of the direct
connection are shown.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 22 Graphics Designer Consolidation
Objective For the display of the motor status, the color of the motor will be changed. (You
can take the motor display from the symbol library).
The Dynamic dialog can be used for the color change.
It is possible to change the setpoint speed with the setpoint speed button.
Exercise 1. Select a motor display from the symbol library and place
the selected symbol by dragging it to your picture. You will find
suitable symbols in the category "Blowers" or "Motors".

2. Dynamize the foreground color of the motor display using


the Dynamic dialog depending on the tag
"S7 program/User.Actual_speed".
(up to zero gray; up to 1000 green; up to 1300 yellow, otherwise red)

3. Draw a polyline between the toggle button and the motor. In a Dynamic
dialog, dynamize the line color depending on the S7 program(1)/ user.on_off
(0= black, 1= red)

4. Configure the three setpoint buttons for changing the setpoint speed
400, 900 and 1200 revolutions. Use the direct connection with the tag "S7
program/User.Reference_speed".

6. Save the picture and test the functions.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 23 Graphics Designer Consolidation
Field type ""I/O field" means input and output field.
"Output" prevents the operator from entering data.
"Input" is used seldom. Here, the last input value is displayed, if, for example, the
value on the controller changes this is not displayed.

Data format Here, the following options are available:


- Binary
- Decimal
- String
- Hexadecimal

Output Format Here you define how many places the number can have before or after the point.
Examples for "Decimal":
- 999.9 3 places before the point, one place after the point
- s9.99 one place before the point, two places after the point, signed, necessary
with negative numbers
- 0999 3 places before the point with leading zeros, 3 is displayed as 003
- 99.9e number is displayed in exponential notation
Examples for Binary:
- 1111 4 places
- 01111 4 places with leading zeros
Tip: By double-clicking on "Output Format" a list with various options is displayed.
Clear on New Input
If you click in the field, the old value is deleted.

Hidden Input Useful when entering a password

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 24 Graphics Designer Consolidation
Example Temperature displays or fill levels can be visualized well with bar objects.

Procedure From the object palette, Smart Objects group, select a bar
and configure this in your graphics picture with the configuration dialog.
You will find the other necessary settings in the figure above.

Scale marks With this, the number of labels on the axis can be specified. Zero means that the
scaling is performed automatically.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 25 Graphics Designer Consolidation
WinCC slider control
Apart from the normal slider object (Standard palette/Windows objects) there is
also a "WinCC Slider Control" (Controls palette/ActiveX controls).

With the first of these, no scaling can be displayed, with the WinCC slider control
this is possible.

As with almost all controls, there is a properties box that can be opened by double-
clicking.

If a tag is to be linked, this is only possible in the Object Properties with the
"Position" attribute.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 26 Graphics Designer Consolidation
Objective Further objects will be inserted in the Motor picture: A WinCC slider control for the
setpoint speed and a bar with limit value monitoring for the actual speed.

Exercise 1. Configure a WinCC slider object (Controls palette/ActiveX controls) and connect
it to the tag "S7 program(1)/ User.Reference_speed
(Object Properties: Control Properties / Position). Also change the scaling
to the value range: 0 to 1400

2. Configure a bar and connect the bar with the tag


"S7 program/User.Actual_speed"
(Object Properties: Miscellaneous/Process Driver Connection)

3. Configure the lower display limit with 00 and the upper limit with 1400.

4. You can set the attributes (such as font size, number of places, color...) of the
bar in the Properties.

5. If the speed exceeds >1000


the bar color should change to yellow
> 1300 to red.

AH = Alarm High
WH = Warning High

6. Change the bar properties in


Miscellaneous/Change Color to
"Segment"

7. Save the picture and test the


functions.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 27 Graphics Designer Consolidation
Task The representation of a process object (e.g. valve, switch, ...) needs to be
displayed on the screen depending on the process. Depending on the process
tags, different graphics are displayed.

Example The representation of a valve needs to be shown in various colors, in various


positions (horizontal, vertical) and in some situations flashing.

Procedure - You require different graphics files that, for example, represent a valve differently.
These graphics files could also be generated with the Graphics Designer
(File/Export... -> generates an EMF file or with the aid of a hardcopy). Or they can
also be generated with other tools (e.g. Paintshop Pro, ...).

1. From the object palette via the "Smart Objects" node, select the
status display and place it in the picture.
2. In the shortcut menu of the State:, select "Add" (2b), this generates the states 0,
1, 2, 3, 4, ... If you select further states with the "Add" button, these are bit coded:
0, 1, 2, 4, 8,
3. Then drag the graphic file name to the Basic Picture column and possibly a
flashing picture. If the flash attribute is set to "Slow", "Medium" or "Fast", the basic
picture and the flashing picture will be displayed alternately.
4. Select the required tag and your update time.

Note As default for Properties/ State / Basic Picture Referenced: yes


is set. In other words, the individual status files (.emf, .wmf, .bmp) are
loaded if there is a status change. If you now select Basic Picture Referenced:
no, the status files are stored in the picture and are loaded when the picture is
selected. This can reduce the update time. The plant picture .pdl becomes larger
as a result.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 28 Graphics Designer Consolidation
Objective The display of the direction of rotation and a switch for selecting the direction of
rotation are to be configured. The direction of rotation display is configured with the
smart object "Status Display".

Exercise 1. From the global library under Operation/Toggle Buttons select a suitable switch
or copy the existing On/Off toggle switch. Then link the tag
S7 program/User.Direction_reference with the property Tag
Assignment/Toggle Bit. (Check this property to make sure that the check mark
is not set in the "Indir" column.)

2. Place a status display at the required position in the Motor picture.

3. In the configuration dialog of the status display that then appears, the required
graphics files must first be added to the list using the "Browse" button. The two
files "left.emf" and "right.emf" can be found in
D:\Courses\WINCCS\ab_exercise.

4. From the picture selection window, select your files ("left.emf") and
"right.emf" and place these by dragging them to the status table, Basic Picture
column (0=left, 1=right).

5. Connect the status display with the process tag


S7-Program/User.Direction_act.

6. Save the picture and test the function.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 29 Graphics Designer Consolidation
Color change To change the color of objects, various options are available:
1. Tag connection to the corresponding color property
2. Dynamic dialog
3. Scripts (C script or Visual Basic script)

Use The color change of objects is used, for example to indicate


1. Switching status
2. Limit value violation
3. Status of the process interface

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 30 Graphics Designer Consolidation
Connecting a tag directly to a color property
As the simplest option, an internal or an external tag can be connected to a color
property (frame color, background color etc.). In this case, the value of the tag
should include the required color code.

The color code is made up of the three color portions red, green and blue.

Examples Color Color value Color Color value


Dark
red 0x000000FF Red 0x00000080
Green 0x0000FF00 Green 0x00008000
Blue 0x00FF0000 Blue 0x00800000
Cyan 0x00FFFF00 Cyan 0x00808000
Yellow 0x0000FFFF Yellow 0x00008080
Magenta 0x00FF00FF Magenta 0x00800080
Light gray 0x00C0C0C0 Gray 0x00808080

Black 0x00000000 White 0x00FFFFFF

Mixed colors result from intermediate values in the palette.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 31 Graphics Designer Consolidation
Dynamic dialog For the sake of completeness the options of the Dynamic dialog are shown again
here. The examples above relate to color changes for the data types Analog and
Bool.

Analog Several value ranges can be defined. With "Add", a further value range can be
added. The corresponding value for the property to be dynamized is entered in the
right-hand column. In the example above, the background color is dynamized.

Bool If a binary tag is to be evaluated, select the setting "Bool".

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 32 Graphics Designer Consolidation
Scripts If the options of the Dynamic dialog are no longer adequate to configure more
complex conditions for color changes, the script languages C and VBS provide
further options.

In the VBS example above, a color change to red is output when the current value
for the tag Direction_actual is one and at the same time the actual speed is higher
than 1200. If this is not the case, the graphics object is colored green.

Detailed information on these options will be discussed in the next section.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 33 Graphics Designer Consolidation
Task Four conveyor lines are to be switched with 2 x 4 buttons via a connecting block.
Each button is assigned the coupling (C1-C4) of a conveyor line that can either be
open or closed.
For the switching action, the same process tag (line) is to be used, so that the
operand addresses are made optimum use of on the controller.

Example Each switching action for a coupling causes a bit to be set and reset in a word. For
this, bit addresses 0-3 are used, the bit addresses 4-15 can be used for other
operations in the control program.

Procedure In the data manager, the tag "Line" is defined as an unsigned 8-bit value.

In the following exercise, the control buttons for lines 1 and 2 are
inserted in the Motor picture. The coupling status is represented by an I/O field
with the bit pattern of the Line tag.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 34 Graphics Designer Consolidation
Objective Two conveyor lines will be turned on or off via four buttons.
The switching action causes a bit to be set and reset in a byte.
The free bit addresses can be used for other operations in the control program.

Exercise 1. Insert the four buttons and the I/O field at the bottom left in the Motor picture.

2. Create the internal tag "Line" as an unsigned 8-bit value.

3. Connect the I/O field with the "Line" tag and select the following
settings:
- Field Type: Output
- Output Value: Line
- Update Cycle: On change
- Data Format: Binary
- Output Format: 011111111

4. Call the Dynamic Wizard for each window button and generate the function
Setting/Resetting a bit for bits 1 and 2.

5. Save the picture and test the functions.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 35 Graphics Designer Consolidation
Task The entry of a setpoint will be made with the slider object.
The control range lies between the minimum value and the maximum value.

Example The adjustment value (control range) of the slider object will be between 0 and
100.
In the example above, a tag still needs to be specified that will be adjusted using
the slider.

Procedure The slider object is created in the picture using the object palette, the size
can be set using the handles.
It is labeled by the user.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 36 Graphics Designer Consolidation
Task It should be possible to display and change individual bits simply within a byte,
word etc.
The check box allows the operator to select several bits and to enable the
corresponding check boxes.
The radio box allows the operator to set exactly one bit. Example: When the
second bit is set the previously set bit is automatically reset.

Note The number of fields is limited to 32.

The entry of the labeling texts e.g. "1st bit" is sequential; in other words first set the
index to 1 then enter the first text, then set the index to 2 and enter the second text
etc.

The radio box can if necessary also display several set bits if these have been set
by the PLC program. The operator cannot set more than one bit.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 37 Graphics Designer Consolidation
Text list The text list provides the option of assigning specific values to a text.

The text list can be defined as an input list, an output list or as a combined
input/output list.

The following data formats are available: Decimal, binary or bit.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 38 Graphics Designer Consolidation
Combobox The combobox makes it possible to display a drop-down list of several values and
to use the selection as the input.

List box The list box makes it possible to highlight one of several values of a scrollable list
and to use the selection as an input.

Configuration The most important properties are described above.

The entry of the labeling texts (e.g. "1st bit") is sequential; in other words first set
the index to 1 then enter the first text, then set the index to 2 and enter the second
text etc.

Runtime If the value of the connected tag changes, the assigned text is displayed.
If the operator selects one of the texts from the list, the value of the connected tag
also changes.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 39 Graphics Designer Consolidation
Task Help texts should also be available to the operator.

Example The help texts are based on the technological application and inform
the operator for example about adjustment ranges or tank temperature.

Option 1 Individual help texts are shown and hidden by clicking with the mouse. This can be
achieved as shown in the example above with two buttons or using an object with
press mouse/left -> help text visible and release mouse/left -> help text invisible.

Option 2
Tooltip The "Tooltip text" attribute specifies the tooltip text to display in Runtime by
positioning the mouse pointer on the object. The tooltip text can be entered in
several languages.
With the control character \n, the tooltip text can also be shown on several lines.

Option 3 If it should be possible to make several objects visible or invisible at the same
time, this is achieved most easily with a VBS script. With this, all objects for
example on layer 5 can be switched visible or invisible at the same time. Details
follow in the next section.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 40 Graphics Designer Consolidation
Objective The operator will be informed of restrictions to the setpoint speed in two different
ways.

Exercise 1. Call-up the Motor picture and take the object Multiple row text from the Smart
Objects and edit a static text with the information text: "The maximum setpoint
speed is 1350."
Adapt the font size and colors. The object name should be Help text.
The property Miscellaneous/Display must be set to no.

2. Configure a round button and under Events Mouse/Press Left the following
direct connection:
- Source: Constant 1
- Target: Object in picture, Help text , Display

3. For the round button also under Events Release Left the following direct
connection:
- Source: Constant 0
- Target: Object in picture, Help text , Display

4. Configure the tooltip text for the input field for the setpoint speed.

5. Save the picture and test the functions.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 41 Graphics Designer Consolidation
Task The current file name will be displayed in the picture.

C script:
Procedure Procedure To display the current file name in the picture, it is adequate to
configure a static text with which the text display is dynamized by a small C action.
In the return value, the call parameter lpszPictureName of the C action is simply
returned.
Configuring properties:
Static text / font / text / C action:

return lpszPictureName;

Note Note the following during configuration:


1. 1 hour should be set as the trigger of the action
2. Assign text attributes once
3. Properties/Miscellaneous/Adapt Border: Yes

This static text can be copied into every picture and displays the current name of
the picture in runtime.

When necessary, the visibility can be controlled by a central internal tag so that
picture name output can be suppressed.

Recommendation Copy the object to the project library once it is created.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 42 Graphics Designer Consolidation
Object trigger One way to achieve efficient picture selection and communication is to use the
setting of a default trigger for all objects of a picture. In many cases it makes sense
to set a value for example of 1 second.
Whenever possible, only one trigger per picture should be used. Different
triggers (update cycles) require additional frames for data exchange with the
controller.

SITRAIN Training for ST-BWINCCS


Automation and Industrial Solutions Page 43 Graphics Designer Consolidation

S-ar putea să vă placă și