Contents
Page
Training Training aims ............ ................. ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ............ ........... ........... ............ ........... ........... ........... ........... ........... ........... ......
3
Integration Integration of the OS in STEP 7
4
1/4
............ ................. ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ............ ........... ........ ...
Configu Configurat ration ion of the WinCC WinCC statio station n with with PROFI PROFIBU BUS S CP
2/4....... 2/4.......... ...... ....... ....... ...... ...... ...... ...... ....... ....... ...... ...... ...... ....... ....... ...... ...
5
...... .......... ....... ....... ....... ...... ...... ....... ....... ...... ...... ...... ...... ...... ...... ...... ...
6
........ ........... ..... ...... ....... ...... ...... ...... ...... ....... ....... ....... ....... ..... ...... ....... ...... ...... ....... ....... ...... ...... ...... ..... ..
7
Exercis Exercise e 1: Integr Integrati ation on of of the OS (with (with the the Contro Controll Room Room projec project) t) in STE STEP P 7 ....... .......... ...... ....... ....... ...... ...... ....... ....... ...... ...
8
Copy Copying ing WinCC WinCC from from ST STEP EP (relea (releasi sing ng))
.... ...... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ..
9
Opening Opening integrated integrated WinCC project project ............ ................. ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ............ ........... ........... ........... .....
10
Creating tags "along "along the way" way" and using them directly directly ............ ................. ........... ........... ........... ........... ........... ........... ........... ........... ........... ......... ...
11
Tag connectio connection n with drag&drop drag&drop
12
Setting Setting interfa interface ce proper properties ties of the PROFIB PROFIBUS US CP 3/4 3/4 Data Data view view of the WinCC WinCC stat station ion via NetPr NetPro o 4/4 4/4
............ ................. ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ............ ........... .......... .....
Exerc Exercis ise e 2: Gaug Gauge e cont contro roll with with tag tag conn connec ecti tion on via via STE STEP P 7 symbo symboll server server
.... ...... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ..
13
Overview Overview of of the dynam dynamizat ization ion optio options ns in the the Graphics Graphics Desig Designer ner 1/2 ....... .......... ...... ...... ...... ....... ....... ...... ...... ...... ..... ...... ....... ...... .....
14
Overview Overview of of the dynam dynamizat ization ion optio options ns in the the Graphics Graphics Desig Designer ner 2/2 ....... .......... ...... ...... ...... ....... ....... ...... ...... ...... ..... ...... ....... ...... .....
15
Configu Configurat ration ion dialog dialog (fast (fast config configura uration tion))
....... .......... ...... ...... ...... ....... ....... ....... ....... ...... ...... ....... ....... ..... ...... ....... ...... ...... ...... ...... ....... ....... ....... ....... ...... ..... ..
16
............ ................. ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ............ ........... ........... ............ ........... ........... ........... ........... ......... ...
17
Dynamic Dynamic Wizard
Dynamics options in the object properties Overview Overview of the Dynamic Dynamic dialog dialog
...............................................................
18
............ ................. ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ............ ........... ........... ............ ........ ..
19
Dynamic Dynamic dialog further examples examples 1/2
............ ................. ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ............ ........... ......... ....
20
Dynamic Dynamic dialog dialog further further examples examples 2/2
...... .......... ....... ....... ........ ....... ....... ....... ...... ...... ...... ...... ....... ....... ...... ...... ...... ..... ...... ....... ...... ...... ....... ....... ...... ...... ...... ...... .....
21
Overview Overview of a direct direct connection connection ............ ................. ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ............ ........... ........... ............ ......... ...
22
Exer Exercis cise e 3: Motor otor cont contro roll and and color color chan change ge
.... ...... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
23
............ ................. ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ............ ........... ........... ............ ........... ........... ........... ........ ...
24
I/O field consolidat consolidation ion
Bar display display conso consolida lidatio tion n
....... .......... ...... ....... ....... ...... ...... ...... ...... ...... ..... ...... ........ ....... ....... ....... ...... ...... ...... ...... ....... ....... ...... ...... ...... ..... ...... ....... ...... ....... ....... ...... ...... ...... .....
25
WinCC Slider control control consolidat consolidation ion ............ ................. ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ............ ........... ........... .......... ....
26
Exercis Exercise e 4: Inserti Inserting ng a bar for actual actual value and slide sliderr for setpoin setpointt ........ ........... ..... ...... ........ ....... ....... ........ ....... ..... ...... ....... ...... ...... ...... ...
27
SITRAIN Train Trainin ing g for for Automation Automation and Industrial Industrial Solutions Solutions
Page 1
ST-BWINCCS Graphics Designer Consolidation
Contents
Page
Status Status display display consolidat consolidation ion
............ ................. ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ............ ........... ........... ............ ........... .......
Exercise Exercise 5: Status display display for direction direction of rotation rotation
............ ................. ........... ........... ........... ........... ........... ........... ........... ........... ........... ......... ...
Overv Overvie iew w of of the con config figur urat atio ion n optio options ns for colo colorr chan change ge with with the the follo follow wing exa examp mples les
28 29
.... ...... .... .... .... .... .... .... .... ..
30
.... ...... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ..
31
Overview Overview of color change change with the Dynamic Dynamic dialog dialog ............ ................. ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ......... ....
32
Overview Overview of of color chang change e with with script scripts s (C script script or VBS VBS))
...... .......... ....... ....... ........ ....... ....... ........ ....... ..... ...... ........ ....... ....... ........ ....... ..... ...... ......
33
Setting a bit in a word word with the Dyna Dynamic mic Wizard ............ ................. ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ........ ..
34
Exercis Exercise e 6: Sett Setting ing a bit bit in a byte
...... ......... ...... ...... ...... ...... ...... ....... ....... ...... ...... ...... ...... ...... ...... ...... ....... ....... ..... ...... ....... ...... ...... ...... ...... ....... ....... ....... ....... ...... ..... ..
35
............ ................. ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ............ ........... ........... ............ ........... ........... ........... ........... ........... ....... ..
36
Link Linkin ing g a tag tag with with the the corre corresp spon ondi ding ng co color lor prope propert rty y
Slider object object
Check box and radio radio box Text Text list list
............ ................. ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ............ ........... ........... ............ ........... ........... ........ ..
37
...... .......... ....... ....... ....... ...... ...... ...... ...... ....... ....... ...... ...... ...... ...... ...... ...... ...... ...... ....... ....... ..... ...... ....... ...... ...... ...... ...... ....... ....... ...... ...... ...... ...... ...... ...... ...... ....... ....... ....... ....... ...... ...... ...
38
List box and combo box
............ ................. ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ............ ........... ........... ............ ........... ........... .......... ....
39
............ ................. ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ............ ........... ........... ............ ........... ........... ........... .......
40
Exercise Exercise 7: Help function function for the plant operator operator ............ ................. ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ........... ......... ...
41
Showin Showing g a pictur picture e name name in any pictur picture e
...... .......... ....... ....... ....... ...... ...... ....... ....... ...... ...... ...... ...... ...... ...... ...... ....... ....... ....... ....... ...... ...... ...... ...... ....... ....... ...... ..... ..
42
...... .......... ....... ....... ....... ...... ...... ....... ....... ...... ...... ...... ...... ...... ...... ...... ....... ....... ....... ....... ...... ...... ...... ...... ....... ....... ...... ...... ...... ...... ...... .....
43
Help for the operator operator
Default Default trigger trigger for for new obj objects ects
SITRAIN Train Training ing for for Automation Automation and Industrial Industrial Solutions Solutions
Page 2
ST-BWINCCS Graphics Designer Consolidation
The participant will : • Be able able to integrate integrate a WinCC project project into a STEP STEP 7 project project at a later later point point in time. •
Be able able to adapt adapt object objects s in a configur configuratio ation n dialog dialog
•
Know Know how how the the Dyna Dynamic mic Wizar Wizard d wor works ks..
•
Be able able to make, make, for example, example, color color changes changes with with the dynamic dynamic dialog dialog box: box:
•
Be able able to use further further objects such such as sliders sliders and check check boxes. boxes.
•
Know Know options options to provide provide the oper operator ator with with help help functio functions. ns.
SITRAIN Train Trainin ing g for for Automation Automation and Industrial Industrial Solutions Solutions
Page 3
ST-BWINCCS Graphics Designer Consolidation
The configuration of SIMATIC WinCC in an integrat ed environment provides the following advantages: Note
Simple Simple compi compilati lation on of tags tags and and message message texts texts into the WinCC project Direct Direct acce access ss to STEP STEP 7 symbo symbols ls during during proc process ess conn connectio ection n End-to-end End-to-end message message configuratio configuration n for operator operator devices and PC PC stations stations Loading Loading the config configura uration tion data data on the runti runtime me OS OS Exten Extende ded d diagn diagnos ostic tics s sup suppo port rt
Before starting the import f unction WinCC must be closed
SITRAIN Train Trainin ing g for for Automation Automation and Industrial Industrial Solutions Solutions
Page 4
ST-BWINCCS 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 cat alog" can be made visible with View Catalog. In the following steps, the PROFIBUS interface has parameters assigned.
SITRAIN Training for Automation and Industrial Solutions
Page 5
ST-BWINCCS 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 Automation and Industrial Solutions
Page 6
ST-BWINCCS 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 Dev ices", these devices can be made visible in the NetPro view
SITRAIN Training for Automation and Industrial Solutions
Page 7
ST-BWINCCS 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 ex ample access the symbols of the S7 from WinCC.
Exercise
1. Close W inCC 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 Automation and Industrial Solutions
Page 8
ST-BWINCCS Graphics Designer Consolidation
If the W inCC 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 Automation and Industrial Solutions
Page 9
ST-BWINCCS Graphics Designer Consolidation
Note
If you are working with integration, it is strongly recom mended that you always start the W inCC project from the SIMATIC Manager. This ensures that the correct WinCC project is opened.
SITRAIN Training for Automation and Industrial Solutions
Page 10
ST-BWINCCS Graphics Designer Consolidation
Tags
When working with integration, in the tags view, not only the W inCC 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 autom atically, In this case, please select the W inCC unit "PROFIBUS". 3. After this configuration step, an I/O field with the required tag has been created.
SITRAIN Training for Automation and Industrial Solutions
Page 11
ST-BWINCCS Graphics Designer Consolidation
Tag connectio n
The tag connection can also be m ade by dragging and dropping on any property of a graphics object. In the ex ample 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 holdi ng 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 lam p 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/Setti ngs > "Default Object Settings" tab.
Direct/Indirect
To dynamize a graphics object, the i ndirect addressing of tags can also be used. To do this a tag (address tag) is defi ned that contains the tag name of the target tag. By changing the content of the "address t ag" it is possible to access dif ferent 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 li nked to a tag is indicated by a green lamp signal.
SITRAIN Training for Automation and Industrial Solutions
Page 12
ST-BWINCCS 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 thi s 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 "E xit WinCC Runti me" on an additional button with the Dynamic Wizard of the Graphics Designer. 7. Save the picture and test the functions.
SITRAIN Training for Automation and Industrial Solutions
Page 13
ST-BWINCCS 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>Settin gs, Opti ons 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 W izard can be set with P>View, O>Toolb ars.
Tag connectio n 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 v arious limits are exceeded. Using the Dynamic dialog results i n high performance in runtime mode.
SITRAIN Training for Automation and Industrial Solutions
Page 14
ST-BWINCCS Graphics Designer Consolidation
Direct connectio n
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. I n addition to this, indiv idual 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 i n high performance in runtime mode.
Properties action s To dynamize graphics pictures, vari ous options are available. Actions in C syntax and VBS can be used on the object. Many properties can be m ade dynamic such as the color, object size, position, font size etc. v ia internal or process tags. These are triggered by a timer or a tag change. Event action s
For extensive actions to be processed ev ent-triggered, the use of actions in C syntax and VBS is also possible. In t hese 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 opti ons 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 v ia theComponent Object Model.
VBS and C
VBS provides internal interfaces to tags and picture objects while the C environment allows access to other W inCC subsystems (e.g. the report system). See also WinCC help system: Performance Data, Scripting with VBS and ANSI.
SITRAIN Training for Automation and Industrial Solutions
Page 15
ST-BWINCCS 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 conf iguration 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 Automation and Industrial Solutions
Page 16
ST-BWINCCS Graphics Designer Consolidation
Dynamic Wizard The Dynamic Wizard is an aid to configuration. The wizards are distributed on different tabs according to diff erent topics. In the "System Functions" tab, there are for ex ample wizards for language switchover in WinCC Runtime or to exit WinCC Runtime. First, the object to be dy namized must be selected. Then the required wizard i s 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 Automation and Industrial Solutions
Page 17
ST-BWINCCS Graphics Designer Consolidation
Properti es tab, Events tab In Properties, (almost) all propert ies can be dynamized. The dynamics are updated cyclically and for thi s reason a cycle time needs to be specif ied 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 v alue of a tag is required to inf luence the property of an object directly (example: Tag has the v alue 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 f or more complex dynamics. For details, ref er to the next pages.
Direct connectio n
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 programm ed in the programming language "ANSI C" or "Visual Basic Script". Details are discussed in section 5.
SITRAIN Training for Automation and Industrial Solutions
Page 18
ST-BWINCCS Graphics Designer Consolidation
Dynamic dialog
The dynamic dialog can be confi gured in the "Dynamic" column for every property for which a lamp symbol is displayed.
Configuration
The configuration of the Dynamic dialog is started wit h the right mouse button on the lamp symbol. (Shortcut menu f or 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, t hese can be integrated easily in the ex isting dialog. (Open the Dynamic dialog again using t he 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 Automation and Industrial Solutions
Page 19
ST-BWINCCS Graphics Designer Consolidation
Analo g
Several value ranges can be def ined. With "Add", a further value range can be added. The corresponding value for the property to be dynamized is entered in t he right-hand column. In the exam ple above, the background color is dynamized.
Bool
If a binary tag is to be ev aluated, 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 Automation and Industrial Solutions
Page 20
ST-BWINCCS 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 al so be used to monitor the status of a Wi nCC tag in Runtime. With external tags, monitoring the tag status also allows conclusions to be made about the status of t he associated connection.
SITRAIN Training for Automation and Industrial Solutions
Page 21
ST-BWINCCS Graphics Designer Consolidation
Direct connectio n
Using a direct connection, it is possible to link certain properties and actions without formulating the action as a C script. This allows a v ery fast connection of individual properties and the relev ant source. The picture shows the direc t connection between the value of a mouse operation and the writing of a tag. It is also just as easy for exam ple 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 Automation and Industrial Solutions
Page 22
ST-BWINCCS Graphics Designer Consolidation
Objective
For the display of the m otor status, the color of the m otor will be changed. (You can take the motor display from the symbol library). The Dynamic dialog can be used f or 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 "Mot ors". 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 aDynamic dialog , dynamize the line color depending on the S7 program(1)/ user.on_of f (0= black, 1= red) 4. Configure the three setpoint buttons for changing the setpoint speed 400, 900 and 1200 revolutions. Use thedirect connection with the tag "S7 program/User.Reference_speed ". 6. Save the picture and test the functions.
SITRAIN Training for Automation and Industrial Solutions
Page 23
ST-BWINCCS 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 l ast 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 v arious options is displayed.
Clear on New Input If you click in the field, the old value is deleted. Hidden Input
Useful when enteri ng a password
SITRAIN Training for Automation and Industrial Solutions
Page 24
ST-BWINCCS Graphics Designer Consolidation
Example
Temperature displays or fill levels can be visualized well with bar objects.
Procedure
From the object palette, Smart Object s 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 Automation and Industrial Solutions
Page 25
ST-BWINCCS Graphics Designer Consolidation
WinCC slider cont rol Apart from the normal slider object (Standard palette/Windows objects) there is also a "W inCC 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 doubleclicking.
If a tag is to be linked, this is only possible in the Object Properties with the "Position" attribute.
SITRAIN Training for Automation and Industrial Solutions
Page 26
ST-BWINCCS Graphics Designer Consolidation
Objective
Further objects will be inserted in the Motor picture: A W inCC slider control for the setpoint speed and a bar with limit value monitoring for the actual speed.
Exercise
1. Configure a W inCC 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 v alue 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 lim it 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 Automation and Industrial Solutions
Page 27
ST-BWINCCS Graphics Designer Consolidation
Task
The representation of a process object ( e.g. valve, switch, ...) needs to be displayed on the screen depending on the pr ocess. 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 colum n and possibly a flashing picture. If the f lash 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 Properti es/ State / Basic Pi ctu re Referenced: yes is set. In other words, the individual status fil es (.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 l oaded when the picture is selected. This can reduce the update ti me. The plant picture .pdl becomes larger as a result.
SITRAIN Training for Automation and Industrial Solutions
Page 28
ST-BWINCCS Graphics Designer Consolidation
Objective
The display of the direction of rotation and a switch for selecti ng the direction of rotation are to be conf igured. The direction of rotation display is confi gured 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 t o the list using the "Browse" butt on. 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 Automation and Industrial Solutions
Page 29
ST-BWINCCS 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 Automation and Industrial Solutions
Page 30
ST-BWINCCS Graphics Designer Consolidation
Connecting a tag directly to a color pro perty 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 Green 0x0000FF00 Blue 0x00FF0000 Cyan 0x00FFFF00 Yellow 0x0000FFFF Magenta 0x00FF00FF Light gray 0x00C0C0C0
Red Green Blue Cyan Yellow Magenta Gray
0x00000080 0x00008000 0x00800000 0x00808000 0x00008080 0x00800080 0x00808080
Black
White
0x00FFFFFF
0x00000000
Mixed colors result from intermediate values in the palette.
SITRAIN Training for Automation and Industrial Solutions
Page 31
ST-BWINCCS 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 Anal og and Bool.
Analo g
Several value ranges can be def ined. With "Add", a further value range can be added. The corresponding value for the property to be dynamized is entered in t he right-hand column. In the exam ple above, the background color is dynamized.
Bool
If a binary tag is to be ev aluated, select the setting "Bool".
SITRAIN Training for Automation and Industrial Solutions
Page 32
ST-BWINCCS Graphics Designer Consolidation
Scripts
If the options of the Dy namic dialog are no longer adequate to conf igure 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 tim e 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 di scussed in the next section.
SITRAIN Training for Automation and Industrial Solutions
Page 33
ST-BWINCCS Graphics Designer Consolidation
Task
Four conveyor lines are to be switched with 2 x 4 buttons vi a 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 Automation and Industrial Solutions
Page 34
ST-BWINCCS Graphics Designer Consolidation
Objective
Two conveyor lines will be turned on or off vi a 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 Automation and Industrial Solutions
Page 35
ST-BWINCCS 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 sli der object will be between 0 and 100. In the example above, a tag still needs to be specifi ed that will be adjusted using the slider.
Procedure
The slider object is created i n the picture using the object palett e, the size can be set using the handles. It is labeled by the user.
SITRAIN Training for Automation and Industrial Solutions
Page 36
ST-BWINCCS 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 operat or 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 autom atically 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 bi ts if these have been set by the PLC program. The operator cannot set more than one bit.
SITRAIN Training for Automation and Industrial Solutions
Page 37
ST-BWINCCS 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 Automation and Industrial Solutions
Page 38
ST-BWINCCS 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 v alues 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 Automation and Industrial Solutions
Page 39
ST-BWINCCS Graphics Designer Consolidation
Task
Help texts should also be available to the operator.
Example
The help texts are based on t he 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 m ouse. This can be achieved as shown in the ex ample above with two buttons or using an obj ect with press mouse/left -> help text visible and release mouse/left -> help text invisible.
Option 2 Tooltip
The "Tooltip text" attribute specifies the toolti p text to display in Runtime by positioning the mouse pointer on the object. The toolt ip 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 t o make several objects v isible 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 invi sible at the same time. Details follow in the next section.
SITRAIN Training for Automation and Industrial Solutions
Page 40
ST-BWINCCS 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 tex t with the information text: "The maximum setpoint speed is 1350." Adapt the font size and colors. The object name should beHelp 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 t ext for the input field for the setpoint speed. 5. Save the picture and test the functions.
SITRAIN Training for Automation and Industrial Solutions
Page 41
ST-BWINCCS 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 i s 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 copi ed into every picture and displays the curr ent name of the picture in runtime. When necessary, the v isibility can be controlled by a central internal tag so t hat picture name output can be suppressed.
Recommendation
Copy the object to the project library once it is created.
SITRAIN Training for Automation and Industrial Solutions
Page 42
ST-BWINCCS Graphics Designer Consolidation