0% found this document useful (0 votes)
99 views73 pages

5.3.8 Visualizing The Pilot Lights: Visualizing The Process 5.3 Creating The "Production" Root Screen

The document describes adding graphics objects to visualize aspects of a production process. Two pilot lights are added - one to flash when filling recipe ingredients and one to flash during bottle filling. A rectangle and I/O field are also added to visualize the labeling machine. Finally, a switch is inserted from the global library to allow activating and deactivating the production sequencer.

Uploaded by

georgel1605
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
99 views73 pages

5.3.8 Visualizing The Pilot Lights: Visualizing The Process 5.3 Creating The "Production" Root Screen

The document describes adding graphics objects to visualize aspects of a production process. Two pilot lights are added - one to flash when filling recipe ingredients and one to flash during bottle filling. A rectangle and I/O field are also added to visualize the labeling machine. Finally, a switch is inserted from the global library to allow activating and deactivating the production sequencer.

Uploaded by

georgel1605
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 73

Visualizing the process

5.3 Creating the "Production" root screen

5.3.8 Visualizing the pilot


lights
Introduction
In the following, you will add two graphics objects for visualization of the pilot lights that
indicate whether the "S2 Fill recipe ingredients" and "S5 Filling" steps are currently running:
● You position a pilot light next to the beverage tanks with the ingredients. It should flash
when the "S2 Fill recipe ingredients" step is running.
● You position the second pilot next to the bar graph. It should flash when a bottle is being
filled, i.e., when the "S5 Filling" step is running.

Requirement
You have created the "GRAPH_Sequence_DB" data block and the "Production" root screen.

Procedure
To visualize the pilot lights, follow these steps:
1. Open the "Toolbox" palette in the "Basic objects" task card.
2. Insert a circle for visualization the first pilot light as follows:
– Select the "Circle" basic object and drag it next to the ingredient tank in the root
screen.
– Select green as the background color for the circle.

217
Visualizing the process
3. Creating the "Production" root screen

3. Animate the first pilot lights as follows:


– Select the circle.
– Open the "Animations" tab in the Inspector window.
– Select the "Add new animation" command under "Display".
– Select the "Dynamize colors and flashing" function.

The "Appearance" dialog opens.

218
Visualizing the process
5.3 Creating the "Production" root screen

4. Link the object animation to the "X" status tag of the "Fill recipe ingrendients" GRAPH
step as follows:
– Open the tab overview.
– Select the "S2 Fill recipe ingredients" step under "S7-300 Master" > "Program blocks"
> "GRAPH_Sequence_DB".
– Link the "X" tag to the animation with a double click.

5. Enter "0" and "1" as the value range for the tag. For "1", select a different background
color and enable the "Flashing" function.

219
Visualizing the process
5.3 Creating the "Production" root screen

6. Copy the first pilot light, by dragging it to the middle of the bar graph while holding down
the <Ctrl> key.

7. Link the second pilot light to the "GRAPH Sequence_DB_Filling.X" HMI tag as follows:
– Open the tab overview.
– Double-click to select the "GRAPH Sequence_DB_Filling.X" HMI tag under "HMI
Panel" > "HMI Tags" > "Default tag table".

8. Save the project.

220
Visualizing the process
5.3 Creating the "Production" root screen

Result
You have successfully inserted the two pilot lights in the "Production" root screen.
● When the "S2 Fill recipe ingredients" step is executed, the first pilot light flashes next to
the tanks with the ingredients.
● When the "S5 Filling" step is executed, the second pilot light flashes within the bar graph.

5.3.9 Visualizing the labeling


machine
Introduction
In the following, you will add two objects for visualizing the labeling machine:
● A rectangle that flashes when the "S7 Labeling" step is running.
● An I/O field displaying the minimum date of expiration calculated by the "SCL - Best
before date" program block.

Definition: I/O field


The "I/O field" object is used to enter and display process values.

Requirement
You have created the "GRAPH_Sequence_DB" data block, the "Best_Before_Date" tag and
the "Production" root screen.

221
Visualizing the process
3. Creating the "Production" root screen

Procedure
To visualize the labeling machine, follow these steps:
1. Open the "Basic objects" palette in the "Toolbox" task card.
2. Insert a rectangle as follows:
– Select the "Rectangle" basic object.
– Drag the rectangle to the right end of the conveyor belt.

3. Select green as the background color.

222
Visualizing the process
5.3 Creating the "Production" root screen

4. Animate the rectangle as follows:


– Select the rectangle.
– Open the "Animations" tab.
– Click on "Add new animation" under "Display".
– Select the "Dynamize colors and flashing" command.

223
Visualizing the process
3. Creating the "Production" root screen

5. Link the animation to the status tag of the "Labeling" step as follows:
– Open the tab overview.
– Select the "Labeling" step under "S7-300 Master" > "Program blocks" >
"GRAPH_Sequence_DB".
– Link the "X" status tag to the animation with a double click.

6. Enter "0" and "1" as the value range for the tag. For "1", select a different background
color and enable the "Flashing" function.

224
Visualizing the process
5.3 Creating the "Production" root screen

7. In the "Elements" tab, select the "I/O field" object and drag it into the root screen.

8. Link the I/O field to the tag of the calculated expiration date as follows:
– Select the I/O field.
– Open the tag overview under "General" in the "Properties" tab.
– Select the "Tags Best_Before_Date" tag table under "S7-300 Master" > "PLC Tags".
– Select the "Best_Before_Date" tag with a double click.

225
Visualizing the process
5.3 Creating the "Production" root screen

9. In the "Properties" tab, change the type of the I/O field to "Output" and the display format
to four digits.

10.Save the project.

Result
You have successfully visualized the labeling machine.
● The rectangle flashes when the "S7 Labeling" step is active.
● The expiration date that is calculated by the "SCL – Best before date" program block
based on the current system time now appears in the output field when you start
Runtime.

226
Visualizing the process
5.3 Creating the "Production" root screen

5.3.1 Switch for activating the


0 sequencer
Introduction
In the following, you will add a graphic object from the global library to visualize a switch,
which will allow you to activate the GRAPH sequencer. The GRAPH F B called in the "OB1"
program block is interconnected to the input parameters "OFF_SQ" and "INIT_SQ" by the
"Start_GRAPH_Sequence" tag. This tag is used to activate and deactivate the sequencer:
● When there is a positive signal edge at the "OFF_SQ" input parameter, the sequencer is
aborted, regardless of the state of execution.
● When there is a positive signal edge at the "INIT_SQ" input parameter, the sequencer is
started with the initial step, regardless of whether another step has already been
executed.

Requirement
You have programmed the GRAPH sequencer, called it in the organization block "Main
[OB1]" and created the "Production" root screen.

227
Visualizing the process
3. Creating the "Production" root screen

Procedure
To visualize the switch, follow these steps:
1. Open the "Global libraries" palette in the "Libraries" task card.
2. Insert the switch as follows:
– Open the "RotarySwitches" folder in the "Buttons-and-Switches" > "Master copies"
directory.
– Insert the "Rotary_RG" switch into the upper right corner of the HMI screen.

228
Visualizing the process
5.3 Creating the "Production" root screen

3. Link the switch to the "Start_GRAPH_Sequence" tag as follows:


– Select the switch.
– Open the tag overview under "General" in the "Properties" tab.
– Double-click the "Start_GRAPH_Sequence" tag under "S7-300 Master" > "PLC Tags"
> "Tags_GRAPH_Sequence".

4. Save the project.

Result
You have inserted a switch and interconnected it with the "Start_GRAPH_Sequence" tag.
When Runtime starts, the sequencer is initially not activated. When the switch is engaged,
the "Start_GRAPH_Sequence" obtains the value "1". There is a positive signal edge at the
"INIT_SQ" input parameter of the GRAPH F B and the sequencer is started.

229
Visualizing the process
5.3 Creating the "Production" root screen

5.3.1 Labeling objects in the HMI


1 screen
Introduction
In the following, you will create the text fields to label the various objects in the "Production"
root screen.

Requirement
You have inserted the required graphics in the "Production" root screen.

Procedure
To create the labels for the text fields, follow these steps:
1. Open the "Basic objects" palette in the "Toolbox" task card.
2. Insert a text field as follows:
– Select the "Text field" object and insert it over the beverage tank in the "Production"
root screen with click of the mouse.
– Enter "Ingredients" as text.

230
Visualizing the process
5.3 Creating the "Production" root screen

3. Create a text field for each beverage tank and label the tanks with the letters "O", "A" and
"W".

4. Create a text field over the filling station and label it with "Filling station / mixer".

5. Create two text fields, one above the rectangle and one above the I/O field. Label them
with "Labeling station" and "Best before:".

6. Save the project.

231
Visualizing the process
5.4 Creating the "Recipes" screen

Result
You have successfully completed the "Production" root screen. You can use this screen to
visualize the entire process, which you have programmed in the previous chapter.

5.4 Creating the "Recipes" screen

5.4.1 Basics of using recipes

Introduction
In the following, the structure of a recipe is explained as it is used in the "Filling Station"
example project.

232
Visualizing the process
5.4 Creating the "Recipes" screen

Project progress
The following graphic shows you which step you perform next:

Recipe
There may be several different recipes in an HMI device. A recipe can be compared to an
index card box that contains several index cards. All the data for each production variant is
contained on a single index card.
In the "Filling Station" example project, a recipe with three recipe records is created for the
production of each beverage variant. The beverage variants are apple juice, orange juice
and water.
The recipe contains three recipe records that are needed for the production of the various
beverage variants.

233
Visualizing the process
5.4 Creating the "Recipes" screen

Recipe data record


Each index card represents a recipe data record needed to produce a beverage variant. The
records differ in the value of the individual recipe elements. In the "Filling Station" example
project, the recipe record for apple juice contains for example the recipe elements water
(80%), apple juice concentrate (20%) and orange juice concentrate (0%).

Recipe elements
Each line on the index card corresponds to one recipe element. In the "Filling Station"
example project, three recipes elements are used (water, apple juice concentrate and
orange juice concentrate). The recipe elements are filled in the "S2 Fill recipe ingredients"
step of the GRAPH sequencer.

5.4.2 Creating a
recipe
Introduction
In the following, you will create a recipe for the production of the three beverage variants,
water, apple juice and orange juice. The recipe elements and the recipe records within this
recipe are defined in the following sections.

Requirement
You have created the "TP900 Comfort" HMI panel.

234
Visualizing the process
5.4 Creating the "Recipes" screen

Procedure
To create the recipe follow these steps:
1. Open the "Recipes" dialog in the project tree.

2. Double-click "<Add new>" in the "Recipes" dialog.

3. Enter "Recipe_Beverage" in the "Name" column and "Beverages" in the "Display name"
column.

4. Save the project.

235
Visualizing the process
5.4 Creating the "Recipes" screen

Result
You have successfully created a recipe. The name of the recipe is used to identify the recipe
in the process. The display name is shown in the process above the recipe view.

5.4.3 Creating a recipe


element
Introduction
In the following, you will create the three elements for the recipe data records. The "Water",
"Concentrate_Apple_Juice" and "Concentrate_Orange_Juice" recipe elements are the
ingredients that are used in the recipe data records. The values of the recipe elements are
stored in the global data block of the CPU and are linked to the recipe data records via tags.

Procedure
To create the recipe elements follow these steps:
1. Double click "<Add new>" in the "Name" column of the "Elements" tab.

2. Enter "Water" in the "Name" column and "Water" in the "Display name" column.

236
Visualizing the process
5.4 Creating the "Recipes" screen

3. Link the recipe element using the according tag of the global data block as follows:
– Open the tag overview in the "Tag" column.
– Select the "Global_DB" data block under "S7-300 Master" > "Program blocks".
– Link the "Recipe_element_water" tag to the recipe element with a double click.

4. Create a second recipe element with the following properties:


– Name: "Concentrate_Apple_Juice"
– Display name: "Apple juice concentrate"
– Tag: "Recipe_element_concentrate_apple_juice" of the "Global_DB" global data block
5. Create a third recipe element with the following properties:
– Name: "Concentrate_Orange_Juice"
– Display name: "Orange juice concentrate"
– Tag: "Recipe_element_concentrate_orange_juice" of the "Global_DB" global data
block
6. Save the project.

Result
You have successfully created the three recipe elements for the recipe record. The following
figure shows the defined recipe elements.

237
Visualizing the process
5.4 Creating the "Recipes" screen

Each of the three recipe elements are linked with a tag of a global data block. This forms the
connection between the recipe function of the HMI panel and the program of the PLC. The
values for each recipe element are read in the "S2 Fill recipe ingredients" GRAPH step to
control the fill amount at the valves of the tanks with the ingredients.

5.4.4 Creating recipe data


records
Introduction
In the following, you will create the three recipe data records.
● The "Recipe_Water", "Recipe_Apple_Juice" and "Recipe_Orange_Juice" recipe data
records contain the mixing ratios for the individual beverage variants. The recipe
elements created in the previous section are listed in separate columns in the "Data
records" tab. Enter values for the mixing ratios of the beverage variants in these columns.
● The various mixing ratios result from the different durations for which a valve is opened at
the tank of the respective ingredient during the filling process. The values for the individual
recipe elements are stored as a "Time" data type in the corresponding global data block.
A value of "1000" in the "Time" data type corresponds to a filling time of one second.

Requirement
You have created the three recipe elements.

238
Visualizing the process
5.4 Creating the "Recipes" screen

Procedure
To create the recipe records follow these steps:
1. Open the "Data records" tab and double-click "<Add new>" in the "Name" column.

2. Enter "Recipe_Water" in the "Name" column and "Recipe water" in the "Display name"
column.

3. Assign a value of "10000" to the "Water" recipe element. Leave the values for the
remaining recipe elements, "Concentrate_Apple_Juice" and "Concentrate_Orange_Juice",
at "0".

4. Click "<Add new>" to create a second recipe record with the following properties:
– Name: "Recipe_Apple_Juice"
– Display name: "Recipe apple juice"
– Water: "8000"
– Concentrate_Apple_Juice: "2000"
– Concentrate_Orange_Juice: "0"

239
Visualizing the process
4. Creating the "Recipes" screen

5. Click "<Add new>" to create a third recipe record with the following properties:
– Name: "Recipe_Orange_Juice"
– Display name: "Recipe orange juice"
– Water: "8000"
– Concentrate_Apple_Juice: "0"
– Concentrate_Orange_Juice: "2000"
5. Save the project.

Result
You have successfully created the three recipe data records and entered the appropriate
values for the mixing ratios.

● When the "Recipe orange juice" data record is selected later in Runtime, the value "8000"
is written for the "Water" recipe element and the value "2000" is written for the
"Concentrate_Orange_Juice" recipe element in the respective tag of the global data block.
● Accordingly, the value at the tank for the "Water" ingredient is opened for 8 seconds and
the valve at the tank for the "Orange juice concentrate" ingredient is opened for 2
seconds in the "S2 Fill recipe ingredients" GRAPH step.

5.4.5 Creating a recipe


view
Introduction
In the following, you will create a recipe view in the "Recipes" HMI screen and link it to recipe
you have previously created. You can use the recipe view to select the recipe data records in
Runtime. Based on this selection, the respective values of the recipe elements are written in
the global data block.

Requirement
You have created the recipe with the recipe data records and elements.

240
Visualizing the process
5.4 Creating the "Recipes" screen

Procedure
To create the recipe view, follow these steps:
1. Open the "Recipes" HMI screen in the "Screens" folder of the project tree and delete the
text field.

2. Open the "Controls" palette in the "Toolbox" task card.


3. Insert the recipe view by selecting "Recipe view" and dragging into the screen.

241
Visualizing the process
5.4 Creating the "Recipes" screen

4. Select the Recipe view and open the "General" dialog in the Inspector window under the
"Properties" tab.

5. Select the "Recipe_Beverage" recipe from the "Recipe" drop-down list.

6. Save the project.

242
Visualizing the process
5.4 Creating the "Recipes" screen

Result
You have successfully created the recipe view in the "Recipes" HMI screen.

● As soon as Runtime is started, you can navigate in this HMI screen using the "Recipes"
button in the "Production" root screen.
● Select the desired recipe record in the "Recipes" HMI screen.
● You can navigate back to the "Production" root screen using the "Back" button.

5.4.6 Creating the specification for the expiration


date
Introduction
In the following, you will create a slider control next to the recipe view to specify the
expiration date. The expiration date is written to the global data block of the CPU with a tag
and used to calculate the expiration date in the "SCL- Best before date" data block. The
duration is added to the year of the system clock and displayed in the "Production" root
screen.

Requirement
You have created the "Recipes" HMI screen.

243
Visualizing the process
4. Creating the "Recipes" screen

Procedure
To create the slider control, follow these steps:
1. Create a slider control next to the recipe view from the "Elements" palette.

2. Select the slider control and open the "General" dialog in the Inspector window under the
"Properties" tab.

244
Visualizing the process
5.4 Creating the "Recipes" screen

3. Assign the slider control the "BBD_Duration" PLC tag of the global data block.

4. Assign the scale of the slider control the maximum value of "5" and change the label to
"Exp. Duration/Years".

5. Save the project.

245
Visualizing the process
5.4 Creating the "Recipes" screen

Result
You have created the slider control for setting the expiration date.

● You can set the expiration date to a value between 0 and 5 years.
● The current setting is displayed at the lower section of the slider control.
● If you change the value in Runtime, the newly set value is written to the data block and
used at the input of the S C L function to calculate the expiration date.

5.4.7 Creating a navigation


button
Introduction
In the following, you will create a button in the "Production" root screen, which will enable
you to navigate in the "Recipes" HMI screen in Runtime.

Requirement
You have created the "Production" root screen.

246
Visualizing the process
5.4 Creating the "Recipes" screen

Procedure
To create the navigation button, follow these steps:
1. Open the "Production" HMI screen.
2. Click the "Recipes" HMI screen in the project tree and drag it onto an empty area above
the labeling station.

3. Scale the button to about twice the height.

247
Visualizing the process
5.4 Creating the "Recipes" screen

4. Change the label of the button to "Change expiration duration". Use the key combination
<Shift> and <Enter> to insert a line break.

5. Save the project.

Result
You have successfully created the "Expiration duration" button in the "Production" root
screen. An event is automatically created along with the button. This event executes the
"ActivateScreen" function for the "Production" root screen when the button is clicked.

248
Configure alarms 6
6.1 Alarms in GRAPH

6.1.1 Create supervision

Introduction
In the following, you will create a sequence monitoring for the step "S5 Filling" of the
sequence. In this case you should monitor how long the step executed. Because the filling
process takes 3 seconds per bottle in this step, the sequence should stop and an error
message should be generated as soon as this time is exceeded by half a second.
To monitor the step, you first create a supervision that you use to define when the execution
time is exceeded.

Progress of project
The following graphic shows you which step you perform next:

249
Configure alarms
1. Alarms in GRAPH

Definition: Supervision
A supervision is a programmable monitoring condition within a step.
● If the condition is not met, this the good case.
● A met supervision leads to an error message.
You can use the "Alarms" pane in the area navigation of the programming window to define
the properties and contents of alarms. The next step is only enabled if the monitoring error is
no longer pending and the following transition is satisfied.

Requirement
You have created the GRAPH sequence and programmed the step "S5 Filling".

Procedure
1. Open the step "S5 Filling" in the GRAPH FB.

250
Configure alarms
6.1 Alarms in GRAPH

2. Open the section "Supervision" in step "S5 Filling".

3. Insert the comparator "CMP >T" in the " Supervision".

The comparator is automatically assigned the tag "#Filling.T" as high value. The value of
this tag of data type "Time" specifies how long the step has already been executed. The
value is reset with every call of the step.
The comparator is automatically assigned the time "T#100MS" (0.1 seconds) in the
format "Time" as the low value. This means the supervision condition is met as soon as
the step takes longer than 0.1 seconds.

251
Configure alarms
6.1 Alarms in GRAPH

4. Increase the lower value of the comparator to "T#3S_500MS" (3.5 seconds).

Result
You have successfully created a supervision for the step "S5 Filling".

If the transition condition of the previous step has been met and the step "S5 Filling" is
activated, the timer of the tag "T" of the step is started automatically:
● If the step is completed within 3.5 seconds, the supervision condition has not been met
and the sequence is continued without interruption.
● If the step is not completed within 3.5 seconds, the supervision condition has been met.
The status bit of the "V1" tag (incoming monitoring error) is set to "1" for the step in the
instance data block of the sequence. The execution of the sequence is stopped.
In the next step, you will create an error message for the event that the condition for
"Supervision" has been met.

252
Configure alarms
6.1 Alarms in GRAPH

6.1. Create alarm for sequence


2 monitoring
Introduction
You are going to activate the alarm generation for supervisions and create an alarm text that
is displayed on the HMI Panel if the previously programmed condition of the supervision has
been met.

Requirement
You have created the supervision for the step "S5 Filling".

Procedure
1. Open the "Alarms" pane in the navigation of the step and enable the alarms for the step.

253
Configure alarms
6.1 Alarms in GRAPH

2. In the field "Supervision alarms" replace the alarm text


"GRAPH7_SUPERVISION_FAULT" with "Timeout during bottle filling".

3. Compile the complete programming of the CPU by clicking the "S7-300 Master" CPU with
the right mouse button in the project tree on and selecting "Compile" > "All" from the
shortcut menu.

254
Configure alarms
6.2 Reporting system errors

Result
While compiling the blocks, the alarms and alarm classes for the newly created GRAPH
alarm are created automatically:
● Two new alarms with their own alarm classes have been created in the project tree under
"S7-300 Master" > "PLC alarms". The PLC alarm "M_EVSV" contains the alarm of the
Supervision.

● Alarm classes are created for the enabled alarms in the project tree under "Common
data" > "Alarm classes". The setting "With acknowledgment" is set automatically. If the
alarm is output on the HMI Panel, the alarm text will be displayed until the alarm has
been acknowledged.

6.2 Reporting system errors

6.2.1 System diagnostics with "Report System Errors"

Introduction
In the following section you create blocks with the system diagnostics "Report system errors"
that analyzes errors in the system and create alarms with an error description and the error
location. You then create a System diagnostics view to output the error messages on the
HMI panel.

255
Configure alarms
6.2 Reporting system errors

Progress of project
The following graphic shows you which step you perform next:

Functionality of the system diagnostics "Report System Errors"


Hardware components can trigger calls of organization blocks in case of a system error and
provide information on the system error that has occurred. The system diagnostics with
"Report system errors" (RSE) offers the user-friendly option to evaluate this diagnostic
information and display it in the form of alarms. The required blocks and alarm texts are
created in the properties of the PLC. You must only download the created blocks to the CPU.
To display diagnostic events on an HMI device, you can generate one or more status DBs.
These status DBs are updated by the system diagnostics blocks and then contain
information on the current state of the system.

Note
If you use system diagnostics, the system response of the plant may change if an error
occurs. For example, the CPU may not change to "STOP" mode as it would without system
diagnostics.

256
Configure alarms
6.2 Reporting system errors

6.2.2 Activating system diagnostics of the


CPU
Introduction
You will now activate the system diagnostics for the "S7-300 Master" CPU. If the system
diagnostics is activated, all alarms and blocks required for diagnostics are automatically
generated during the next compilation of the hardware.

Procedure
1. Select the CPU in the device configuration and open the "Properties" tab in the Inspector
window.

2. Activate the system diagnostics for the CPU under "System diagnostics" > "General".

257
Configure alarms
2. Reporting system errors

3. Check whether the functions Send alarms" and "Load system diagnostic block when
loading hardware configuration" were enabled during activation of the system diagnostics
(default setting). If necessary, enable both functions.
4. Open the diagnostic support.

With the activation of the system diagnostics, the data block


"RSE_DIAGNOSTIC_STATUS_DB" for acquisition of diagnostic data has been activated
automatically.

258
Configure alarms
6.2 Reporting system errors

5. To generate the required system diagnostics blocks, switch to the work area of the device
view and compile the hardware configuration of the CPU.

6. In the project tree, open the organization block "Main".

Result
In the final network of the organization block, a call of the system diagnostics block has been
added automatically during compilation of the hardware configuration.
In addition to the entry in the organization block "Main", additional organization blocks were
generated for different error cases. If an error occurs within the module, the corresponding
organization block is called automatically (for example, OB 83 in the event of a remove/insert
alarm). A call of the "RSE_FB" system diagnostics block has been added in each
organization block which reads out the error information.
The error information is stored in the diagnostic status DB
"RSE_DIAGNOSTIC_STATUS_DB".

259
Configure alarms
6.2 Reporting system errors

6.2.3 Creating a diagnostics view in


HMI
Introduction
You will now create a "System diagnostics view" in the HMI screen "Diagnostics view". You
can use it to output the diagnostic data of the devices configured in the "Devices &
Networks" editor.

Progress of project
The following graphic shows you which step you perform next:

260
Configure alarms
6.2 Reporting system errors

Procedure
1. In the project tree, open the HMI screen "Diagnostics view".

2. Delete the automatically generated text field in the HMI screen.

261
Configure alarms
6.2 Reporting system errors

3. Select the "System diagnostics view" from the "Controls" palette in the "Toolbox" task
card and drag open the diagnostics view in the HMI screen.

Result
You have successfully created the system diagnostics view. After the start of Runtime, you
can use the "Diagnostics view" button in the "Production" root screen to open the system
diagnostics view and check the diagnostic status of the devices used.

262
Testing the sample project
online
7
7.1 Test program

7.1.1 Start simulation in PLCSIM

Introduction
You will now test the functionality of the program with the PLCSIM simulation software. You
can use this simulation to test the program for errors before you start the production. First
download the configuration and the user program into the simulated module and insert view
objects for monitoring and control of outputs and bit memories.

Progress of project
The following graphic shows you which configuration step you carry out next:

263
Testing the sample project online
1. Test program

Requirement
You have created the hardware configuration and the user program.

Procedure
To start the PLCSIM software, follow these steps:
1. Right-click the S7-300 Master CPU in the project tree. From the shortcut menu select the
menu item "Start Simulation".

2. Confirm the following dialog with "OK".

The PLCSIM software starts in the background and the dialog "Extended download to
device" opens.

264
Testing the sample project online
7.1 Test program

3. In the "Extended download to device" dialog window, select the following settings:
– Type of PG/PC interface: PN/IE
– PG/PC interface: PLCSIM V5.x
–Connection to subnet: PN/IE_1
Then click the "Load" button.

The "Compile" dialog is processed.

265
Testing the sample project online
7.1 Test program

4. Confirm the load procedure in the module simulated with PLCSIM.

5. Insert a "Bit Memory" view object to control and output the PLC tags with memory bits in
the address area M10.0 to M10.7.

266
Testing the sample project online
7.1 Test program

6. Enter the memory byte MB10 as address area. Leave the format set to "Bits".

7. Create an additional "Bit Memory" view object as shown in the last two steps to control
and output the memory bits in the address area M100.0 to M100.7. Enter the memory
byte MB100 as address area. Leave the format set to "Bits".
8. Insert an "Output Variable" view object to output the outputs in the address area Q0.0 to
Q0.7.

Leave the address area set to QB0. This area is used by default when you create a new
view object "Output Variable".

267
Testing the sample project online
7.1 Test program

9. Create another "Output Variable" view object to output the outputs in the address area
Q1.0 to Q1.7.

10.In the second "Output Variable view object, set the address area to the output byte QB1.
Leave the format set to "Bits".

268
Testing the sample project online
7.1 Test program

11.Switch the simulation of the CPU to RUN mode.

Result
You have successfully set up the simulation of the CPU in PLCSIM. After the transition to
RUN, the two LEDs "RUN" (operating mode) and "DC" (power supply) are lit in green.

Leave the PLCSIM window open. You will now use the simulation to test the sample project
"Filling Station" with the online and diagnostics functions.

269
Testing the sample project online
7.1 Test program

7.1. Testing execution of the GRAPH


2 sequence
Introduction
You will now test the call of the GRAPH sequence with PLCSIM. For this purpose, you will
first establish an online connection with the simulated module. In the online view, start the
call of the GRAPH block and check the sequence.

Requirement
You have downloaded the hardware configuration and the program blocks to PLCSIM.

Procedure
To test the GRAPH sequence, follow these steps:
1. Open the "Main" organization block with double-click and click the "Monitor" icon in the
toolbar.

The title bar of the project tree is highlighted in orange. This indicates that the online view
for this window is enabled. An additional column with diagnostic icons is displayed to the
right of the blocks. The green circle indicates that the blocks between the online view on
the simulated module and the configuration in the TIA Portal are identical.

270
Testing the sample project online
7.1 Test program

2. The GRAPH F B is not called yet. To start the sequence, you open the simulation in
PLCSIM and set the memory bit with the address M100.0. To do this, check the "0" (Bit 0)
of the memory byte "100" (MB100).

After setting the memory bit, you can monitor in PLCSIM how individual outputs are set
and reset by the user program.
3. Go back to the TIA Portal.
In the "Main" organization block, the input "OFF_SQ" is reset and the input "INIT_SQ" is
set when you call the GRAPH FB.
4. Open the "GRAPH-Sequence" block and activate the "Monitor" function.

5. Confirm the prompt for switching to test mode with "Yes".

271
Testing the sample project online
1. Test program

6. The CPU switches to test mode. The sequence was enabled with activation of the
M100.0 memory bit. The currently active step is highlighted in green in test mode.
7. Open the "Filling" step to monitor the changes of the used tags.

Result
The current value of the tag "GRAPH_Count_Bottle" as well as the state of the output
"Valve_Fill_Bottle" is output in the right-hand column of the section "Actions".

272
Testing the sample project online
7.1 Test program

7.1. Testing with sequence


3 control
Introduction
You will now test the execution of the GRAPH sequence with the manual mode of the
sequence control. Different operating modes are available in sequence control.
● Automatic mode
In this operating mode the sequence does automatically switch to the next step as soon
as the transition is satisfied.
● Semi-automatic mode
In this mode, the sequence switches to the next step if the transition is met or the "Ignore
transition" button is pressed.
● Manual mode
In this operating mode the system does not automatically switch to the next step when
the transition is satisfied. Instead you select the step to be tested manually.

Procedure
1. Certain interventions in the execution of the program, such as control of the sequence in
manual mode, are blocked in the RUN operating mode. To control the sequence in
manual mode, set the CPU to RUN-P operating mode in PLCSIM.

2. Go back to the TIA Portal and open the "Testing" tab in the task card.
"Automatic" is set as operating mode.

273
Testing the sample project online
7.1 Test program

3. Switch the sequence control to manual mode.

4. Manual mode has been enabled for testing of the sequence. The dialog gives you the
following options for testing the sequence:
– You can switch to the next step with the "Next" button. This button will let you check
the sequence.
– Use the "Step number" input field to select any step regardless of the processing
status of the sequence. Use the respective buttons to enable or disable the previously
selected step.

274
Testing the sample project online
7.1 Test program

5. Once you have completed testing in manual mode, reset the sequence back to automatic
mode.

6. Then switch back to PLCSIM and reset the memory bit M100.0.

Result
You have successfully tested calling the sequence. Leave the PLCSIM running and retain
the online connection after testing is complete to continue with the test of visualization.

275
Testing the sample project online
7.2 Testing process visualization

7.2 Testing process


visualization

7.2.1 Starting WinCC Runtime

Introduction
You can test the functionality of visualization with the simulation software "WinCC Runtime
Advanced". You will now start simulation of the HMI Panel. Using this simulation, you can
test whether visualization works without errors before you start production.

Progress of project
The following graphic shows you which step you perform next:

Requirements
The hardware configuration and the program blocks of the CPU are downloaded to PLCSIM
and the TIA Portal is in online view. The "WinCC Runtime Advanced" software was installed
with the TIA Portal.

276
Testing the sample project online
7.2 Testing process visualization

Procedure
1. Right-click on the HMI panel in the project tree and start the simulation of Runtime from
the shortcut menu.

Before the start of Runtime, the configured elements of the HMI Panel are automatically
compiled. The compilation status is displayed in the Inspector window in the "Info" tab.
2. Check in the Inspector window if the compilation was executed without errors. For an
programming error, you can navigate to the affected object with a double-click on the
output alarm and make any necessary changes.

Result
The "WinCC Runtime Advanced" software is started. The "Production" root screen is the first
screen that is displayed.

7.2.2 Testing the recipes


screen
Introduction
You will now test the functions of the recipe view in Runtime. Then you will test the
Production root screen, because the recipe you want to produce must be specified before you
start the sequence. To do this, select the recipe "Orange juice" and download the data to the
simulated CPU. Then specify the expiration date for the recipe.

277
Testing the sample project online
2. Testing process visualization

Requirement
The PLC program was downloaded to PLCSIM and the CPU is RUN-P operating mode. The
HMI Panel was loaded in the "WinCC Runtime Advanced" simulation software.

Procedure
1. Open the "Recipes" screen in Runtime.

2. Select the recipe data record "Recipe orange juice" and transfer the data record to the
CPU. Select an expiration duration of three years using the slide ruler. To return to the
root screen "Production", click on the "Back" button.

278
Testing the sample project online
7.2 Testing process visualization

3. Change to the project tree of the TIA portal and open the "Global_DB" data block.

4. Activate the function "Monitor all" in the data block.

279
Testing the sample project online
7.2 Testing process visualization

Result
By selecting the recipe "Orange Juice" in WinCC Runtime and downloading it to the CPU,
the duration for filling of the ingredients was transferred to the CPU. The corresponding
values for the fill times of the ingredients of the recipe data record are displayed in the data
block.

7.2.3 Testing production


screen
Introduction
You will now test the visualization of the individual GRAPH steps in the root screen
"Production".

Requirement
The PLC program was downloaded to PLCSIM and the CPU is in RUN mode. The HMI
Panel was downloaded to "WinCC Runtime Advanced".

280
Testing the sample project online
7.2 Testing process visualization

Procedure
1. In the TIA Portal open the GRAPH sequence in the "GRAPH Sequence" function block.
2. Make sure that the function "Monitor on/off" is enabled and that the GRAPH sequence is
not being executed at the moment.
3. Switch to the "WinCC Runtime Advanced" software and start the sequence with the rotary
switch.

Result
After starting the sequence, the animations for the respective steps are activated.

281
Testing the sample project online
7.2 Testing process visualization

Parallel to the visualization in WinCC Runtime, you can monitor the processing status of the
sequence in the online view of the TIA Portal.

7.2.4 Testing the diagnostics view


screen
Introduction
The system diagnostics window gives you an overview of all available devices in your plant.
You will first open the device view of the system diagnostics window to check the current
status of the module. Then you open the detailed view to display detailed information on the
selected device.

Requirement
The PLC program was downloaded to PLCSIM and the CPU is RUN operating mode. The
HMI Panel was downloaded to "WinCC Runtime Advanced".

282
Testing the sample project online
7.2 Testing process visualization

Procedure
1. Open the "Diagnostics view" screen.

In the open diagnostics view, a green check mark against a green backdrop is displayed
next to the module. It indicates that the device is currently in operation and that no error
has occurred.
2. Open the detail view of the module to display the detailed diagnostics status of the
module. Then use the "Back" button to return to the root screen "Production".

283
Testing the sample project online
7.2 Testing process visualization

Result
You have successfully tested the status of the module. If an error should occur during
operation, if the module enters STOP or if there is a maintenance request pending, it will be
indicated by a corresponding symbol in the system diagnostics windows.

7.2.5 Testing system


screens
Introduction
At the end of the Getting Started, you will test the function "SIMATIC PLC Status/Force" to
simulate a group error via the HMI Panel for the entire sequence.
In the GRAPH sequence, an NC contact has been added during program creation for the
transition of each individual step and was interconnected with the tag
"GRAPH_Group_Fault". You will now set the "GRAPH_Group_Fault" tag to "1" and disable
the execution of the sequence.

System screens
When creating the HMI Panel, the following system screens were automatically created with
the HMI Device Wizard:
● SIMATIC PLC Status/Force
You can use this system screen to control and monitor the values of different data areas
via HMI connection.
● Project information
This system screen includes the general project information.
● Different jobs
You use this system screen to execute basic functions of the HMI Panel, such as
changing the language or shutting down Runtime.
● System settings
This system screen includes the functions for calibrating the screen and a clean screen.
The clean screen is used for brief disabling of all operator controls to clean the HMI
Panel.
● User administration
If several users with different rights are defined in the project, you can use this function to
change the user. Additional information regarding user administration is available in the
online help of the TIA Portal.
● System information
The system Information contains information on the used HMI Panel, the connections and
the connected PLC.

284
Testing the sample project online
7.2 Testing process visualization

Requirement
The PL C program was downloaded to PLCSIM and the CPU is RUN operating mode. The
online connection is enabled in the TIA Portal and the sequence is switched to test mode.
The HMI Panel was downloaded to "WinCC Runtime Advanced".

Procedure
1. Open the system screens in the simulation in "WinCC Runtime Advanced".

2. Select the system screen "SIMATIC PLC Status/Force" from the overview.

285
Testing the sample project online
2. Testing process visualization

3. Select the "HMI connection" to the PLC under "Connection" and enter the following
values in the other columns:
– Type: M (bitmemory)
– Offset: 10 (Memory Byte 10)
– Bit: 0
The bit number can only be entered after you have selected "BOOL" as data type.
– Data type: BOOL
– Format: BIN
Then click on the button for monitoring the status value.

The column "Status Value" outputs a "0".

286
Testing the sample project online
7.2 Testing process visualization

4. Change to the TIA Portal and open the step "S5 Filling" in the online view of the GRAPH
sequence.

The bit of the NC contact for the tag "GRAPH_Group_Fault" in not set in the section
"Transitions". After execution of the actions, the sequence switches to the next step
"Transport Filling".
5. Switch to the "WinCC Runtime Advanced" software and stop the ongoing monitoring of
the status value. In the Control Value column of the memory bit of the
"GRAPH_Group_Fault" tag enter "1" as value and activate the control of the memory bit.

287
Testing the sample project online
7.2 Testing process visualization

6. Change to the TIA Portal and open the step at which the sequence was stopped in the
online view of the GRAPH sequence. The last active step is shown in green in the left
section of the overview of the sequence.

The "Transition" section shows that the step enabling condition is not met as long as the
bit for the "GRAPH_Group_Fault" tag is set to "1".
7. Change once again to the "WinCC Runtime Advanced" software and set the control value
for the "GRAPH_Group_Fault" tag back to "0".

Result
You have successfully tested the function SIMATIC PLC Status/Force" of the system
screens.

288
Testing the sample project online
7.2 Testing process visualization

Project completion
You have successfully completed this Getting Started by testing the visualization.

289

You might also like