You are on page 1of 94

Introduction to the TIA Portal

S7-1200 and Basic Panels

Ken Sechnick

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved. usa.siemens.com/answers


TIA Portal

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 2
Totally Integrated Automation –
Discover efficiencies with the TIA Portal

Totally Integrated Automation Portal

STEP 7 V13 Safety V13 WinCC V13 Startdrive V13

SIMATIC PC & PLC Safety SIMATIC HMI SINAMICS

Single engineering framework for factory automation


Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.
Page 3
TIA Portal editor layout

Main Menu Bar

Task Cards –
HW Catalog

Editor view –
Project Tree – PLC, HMI
Device & Networks
and Drive project data

Inspector
Window

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved. Status Bar
Page 4
TIA Portal editor layout

Editor view – PLC


Programming editor
Task Cards –
Programming
Instructions

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved. Minimized Editors
Page 5
TIA Portal editor layout

Project Tree –
PLC project data

Project Tree –
HMI project data

Task Cards –
Screen objects
and tools

Editor view – Screen


development editor

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 6
Demo Equipment –
S7-1200 Hands-On Workshop

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 7
Module 1 – Intuitive Development
Lab Exercises
Module 1 – Intuitive Development
Goal:
Demonstrate the reduction in engineering time needed to configure an automation system with
PLCs and HMIs.

Module 1 - main take away items:

 A clear understanding of how the TIA Portal can integrate PLC and HMI in ONE software
environment

 Understand how the Library feature can help them reuse program parts that have already
been developed

 Experience how a project with PLC and HMI can be configured and working in a short time

Page 9
Configuring Hardware

Task 1: PLC Hardware Configuration

Overview
1. Create a new project and add an Unspecified CPU S7-
1200
2. Auto-detect the S7-1200 in Demo kit
3. Configure CPU and write a simple latching circuit

Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.


Page 10 April 11, 2016
1

1. Open TIA Portal V13 and click on Create new


project.
2. Name the project “S7-1200 Test Drive” and click
Create. Location Path will be “Student” folder on
Windows Desktop.

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 11
3

1. From Devices & networks, click Add new device.


2. Select Controllers. Expand Controllers ->
SIMATIC S7-1200 -> CPU -> Unspecified CPU
1200. Select 6ES7 2XX-XXXX-XXXX. 2
3. Name the PLC “S7-1200”.
4. Select V4.1 firmware.
5. Ensure Open device view is checked. Click
“Add”.
5

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved. 5


Page 12
2

1. In the Device view, click detect.


2. Select PN/IE for PG/PC interface. Select the
network adapter used to communicate with PLC
(adapter for Field PG is Intel(R) 82574L Gigabit
Network Connection).
1 3. Click Start search.

Customer Benefit -> Auto-detect feature


We could build correct hardware configuration by selecting components from
the Hardware catalog. Instead, we will utilize the Auto-detect feature.
The Auto-detect feature allows the user to easily get started with a project by
“detecting” the real hardware connected to the PLC, and not having to
Unrestricted
manually © Siemens
configure Industry,
each deviceInc. 2016
fromAllthe
rights reserved. Catalog
Hardware
Page 13
1. Once the PLC is located in the network, click on
the PLC in the list and click Flash LED. Lights on
1 the front of the unit will flash. Unclick Flash LED.
2. Click Detect.

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 14
1

1. Save the project.


2. Click on the PLC base unit in the Device view.
3. In the Properties -> General tabs, select System
2 and clock memory. Check the Enable box in both
System and Clock memory bits. Accept default
Memory Byte numbers.

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 15
1. Click Web server.
2. Check the Activate Web server on all modules of
this device box.
3. In user management, use the pulldown and check
all boxes.
4. Click green check box.

3
2

1
4
Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.
Page 16 April 11, 2016
2

2
1
3

1. Expand the Program blocks folder in the PLC


project tree. Double click on OB1 to open.
2. Create latching circuit as shown by dragging and
dropping bit logic elements either from the Bit
logic instructions folder of the Instructions task
card or the Favorites bar.
3. Name the elements Switch1, Switch2 and Red_LT
as shown

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 17
1

1. Split the editor window space vertically by


clicking on the button in the toolbar.
2. In the Device view tab, zoom in on the graphical
representation of the PLC to 400%. Note the I/O Customer Benefit -> Intelligent drag and drop between editors
addresses.
Graphical representation of Hardware configuration and I/O
3. Drag and drop the Switch1, Switch2 and Red_LT addresses coupled with drag and drop linking functionality allows
tag names onto I0.0, I0.1 and Q0.2, respectively. for fast and reliable assignment of tag names to real-world I/O
Note the change from address number to tag addresses.
name in the device view.

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved. 2


Page 18
1
2

1. Unsplit the editor window space vertically by


clicking on the button in the toolbar.
2. Click on the PLC name in the project tree. Click
the download button in the toolbar to download
the project to the PLC.
3. In the Load preview window, use the pulldown to 4
select Stop all.
4. Click Load. The software stops the PLC and
loads the entire configuration. Once complete,
ensure that the Start all box is checked, then click
Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.
Finish. Save project.
Page 19
1

1. Monitor the block OB1 for correct functionality by clicking on


the Monitor button in the toolbar of the LAD window. 2
2. Interface should be set to PN/IE and correct ethernet adapter.
Click Start search.
3. Select PLC from list. Click Go online. Test logic by flipping
Switch1 and Switch2 and noting state of the Red_LT. 3
Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.
Page 20
3 1. While still monitoring OB1, copy and paste
Switch2 so that two Switch2’s are in series.
2. Note that Monitoring is turned off and online
comparison symbols in Project tree are no longer
all green.
3. Download changes. Note that PLC remains in run
mode when downloading a block change. After
download, comparison symbols turn green.
2

Customer Benefit -> Continuous online/offline comparison


While an online connection is established to a PLC, the TIA Portal
software performs a continuous check between the online and
offline code. This allows for easy verification of changes.

Customer Benefit -> Download in RUN mode


Changes to program or data blocks can be downloaded to the
PLC while in RUN mode. This allows program changes while the
machine or process continues to operate.

Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.


Page 21 April 11, 2016
1

1. Undo the Paste command by using the pulldown.


Note that you can undo the last steps or go back
several steps.

Customer Benefit -> Undo while Online


If a change is made to a program and downloaded while in RUN,
the TIA Portal allows the user to undo the changes made and
download the original code back into the PLC.
Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.
Page 22 April 11, 2016
1

1. Right click on the PLC in the project tree. Select


Compare -> Offline/online.

Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.


Page 23 April 11, 2016
1

1. Note that some elements in the Compare editor


online window are identical. OB1, however, is
different.
2. Right click on OB1 and select Start detailed
comparison

Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.


Page 24 April 11, 2016
2

1. Note that networks with differences will be shown


with a blue/orange circle and neworks that are
identical will be shown with a green circle.
2. Close the Code block comparison (OB1) window.

Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.


Page 25 April 11, 2016
3
4
2

1. At this point, you can decide whether to upload or download the


code with differences. In the pulldown for OB1 in the action
column, select Download to device. Note that you can only upload
or download blocks in a single step, not both.
2. Click on the Execute actions toolbar button.
3. The program will be downloaded to (or uploaded from) the PLC.
Note that after this step, all comparisons that an action was
specified for will turn green. Close the Compare editor online
window.
Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.
4. Click Go offline. Save project.
Page 26 April 11, 2016
Configuring and Testing a Program

Task 2: Use the Library to add preconfigured PLC tags and


then add some test logic

Overview:
1. Add preconfigured PLC tag and watch tables from the
Library
2.Use watch tables to monitor and modify I/O values on the
demo unit
3. Add test logic for potentiometers on demo kits
Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.
Page 27
Background Information: LIBRARIES
2 kinds of libraries
1. Project library
 Unique for each project
 Attached to the project (opened,
saved and closed with project) Types

2. Global library
 Independent from projects
Types Master copies
 For cross-project use of objects
 Can be saved on local PC or on
a company server
Master copies
Elements Global library
 Master copies: work as a clipboard
 Type: instance principle
Project library
Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.
Page 28
Background Information: LIBRARIES
Elements that can be stored in a Library
 Program blocks
 Devices (PLC, HMI, etc.) Project library

 Watch tables
Additional folders for
 Data types organization
 Templates
 Variables Global libraries

 HMI screens
Elements in a library
 Scripts are divided in types &
 Alarms master copies

 And others
Parts of the selected
element are shown

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 29
Background Information: LIBRARIES

An existing object can be


copied to a library simply by
Drag & Drop

The object can then be reused


in other parts of the project or
other projects

Master copies can also be


copied from one library to
another

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 30
1. Open the Libraries tab
2. Select “Master copies” under the Project library

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 31
Background Information -> How is a Library object created?
An existing object (PLC block, HMI screen or I/O module) can be copied to a
library by a simple drag and drop. In this module we will create an example
library object using the S7-1200 unit.

1. Select the S7-1200 base unit in the central rack


configuration.
2. Drag and drop the S7-1200 into Master copies folder in the
Project library (it will appear as shown)
Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.
Page 32 April 11, 2016
Adding Preconfigured PLC tags from Global Library:
1. Open Global library by clicking on the Open global library
button in the Global libraries area of the Libraries tab.
Select the library “S7-1200 Intro” located in the Student
folder on the Windows desktop.
2. Drag and drop the S7-1200 Demo IO Tag Table object from
the Master copies folder of the library to the PLC tags folder
of the project tree. A new tag table will be added.

Customer Benefit -> How can a Library object be reused?


Library objects that were previously saved to the Project library or Global
library can be copied back into the existing project via drag and drop.
For this lab exercise, we will copy library objects that contain a PLC tag
tableUnrestricted
and a PLC © Siemens Industry, Inc. 2014 All rights reserved.
Watch table.
Page 33 April 11, 2016
3
1. Drag and drop the S7-1200 Demo IO Watch Table object
from the Master copies folder of the library to the Watch and
force tables folder of the project tree. A new watch table will
be added.
2 2. Click on the S7-1200 PLC in the project tree.
3. Download the configuration to the PLC. This will align the
new tag table from the project to the PLC.

Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.


Page 34 April 11, 2016
4 2
1. Double click on the S7-1200 demo IO watch table
in the Project tree.
2. Click the Monitor all button in the toolbar of the
watch table. Note the Monitor value column
appears with the actual value of the IO. Turn the
potentiometers and actuate the simulator
switches on the PLC and note changes in values.
3. Click in the cell of the Paddle_Motor tag’s Modify
value column. Make the value a “1” or “TRUE”.
4. Click on the Modify all selected values once and
now button in the toolbar of the Watch table. The
Paddle on the demo unit should begin to move.

1
3

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 35
4
2
1. Click in the cell of the Paddle_Motor tag’s Modify
value column. Make the value a “0” or “FALSE”.
2. Click on the Modify all selected values once and
now button in the toolbar of the Watch table. The
Paddle on the demo unit should stop.
3. Feel free to experiment with other I/O in the
3 system.
4. When finished, click Go offline in the main
toolbar.

Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.


Page 36 April 11, 2016
Create a Function to scale the potentiometer analog
3 signals on the demo unit to engineering units:
1. Expand the Program blocks folder of the Project
tree. Double click on Add new block.
2. Click on the Function box.
3. Name the block “Analog_Scaling”
1 4. Make sure the Add new and open box is checked.
Click OK.

Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.


Page 37 April 11, 2016
2

4
1

Configure the interface of the scaling function:


1. Ensure that the block interface is expanded. The Block interface is
used to pass tag values in and out of a configured Function or
Function Block. Temporary memory is also configured here.
2. Add Input parameters “High_Limit” (data type Real), “Low_Limit”
(Real) and “Analog_Value” (Uint).
3. Add Output parameter “Scaled_Value” (Real).
4. Add Temp variable “RealTemp” (Real).

Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.


Page 38 April 11, 2016
1. Expand the Conversion operations folder of the Basic
instructions section of the Instructions task card. Select the
block NORM_X and drag it onto Network 1. NORM_X scales
a value based upon a MIN and MAX between 0 and 1.
2. From the pulldowns on the NORM_X block, select UInt for
the input and Real for the output.

Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.


Page 39 April 11, 2016
1. Assign a value of “0” to MIN and “27648” to MAX. Siemens
full range analog value ranges are 0 to 27648 for unipolar
signals and -27648 to 27648 for bipolar signals. Ranges
beyond 27648 are allocated for analog overages. Values of
32767 and -32767 are for analog overflows.
2. Assign the function Input Parameter “Analog_Value” to the
VALUE input of the block. Note intellisense software
functionality when typing in tag name.
3. Assign the function Temporary Parameter “RealTemp” to the
OUT output of the block.

2
3
1

Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.


Page 40 April 11, 2016
4 1. Select the block SCALE_X and drag it onto Network 1.
SCALE_X scales a value based upon a MIN and MAX
engineering unit value.
2. Assign the function Temporary Parameter “RealTemp” to
the VALUE input of the block. Note that the input data type
of the block will automatically be assigned as Real. Assign
the function Input Parameters “Low_Limit” and
“High_Limit” to the MIN and MAX inputs of the block.
3. Assign the function Output Parameter “Scaled_Value” to the
OUT output of the block. Note that the output data type of
the block will automatically be assigned as Real.
4. Save project.
1

2
3

Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.


Page 41 April 11, 2016
4
3

Create a data type to define the data structure of the


high and low limit and scaled values for the top and
bottom potentiometers:
1. Expand the PLC data types folder in the Project
tree. Double click on Add new data type. Rename
the data type “Scaling Data”.
2. Add the three elements “Low_Limit”, High_Limit”
and “Scaled_Value”, all with Data type Real.
3. Compile the data type.
4. Close the data type.
Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.
Page 42 April 11, 2016
Create a data block to store the high and low limit and
3 scaled values for the top and bottom potentiometers:
1. Expand the Program blocks folder of the Project
tree. Double click on Add new block.
2. Click on the Data block box.

1 3. Name the block “Analog”


4. Make sure the Add new and open box is checked.
Click OK.

Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.


Page 43 April 11, 2016
2 4
3
1

1. Add the element “Potentiometer” to the data


block.
2. The data type will be Array.
3. Use the pulldown in the data type column to
specify the Data type of the Array, “Scaling Data”,
and the Array limits, 0..1.
4. Check the box in the Retain column. This will
ensure that the values in the array are maintained
through a power cycle of the PLC.

Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.


Page 44 April 11, 2016
1
2

1. Expand both Array elements to view the complete


data structure.
2. Change the initial value of the High_Limit for array
element 0 to 100.0. Change the initial value of the
High_Limit for array element 1 to 50.0. This is the
value that each of these elements will have upon
first download of the block. Also, this is the set
value of the elements if the Data Block needs to
be re-initialized.

Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.


Page 45 April 11, 2016
3 Add the function “Analog_Scaling” to the Main
program cycle (OB1) for each Potentiometer:
1. Expand the Program blocks folder of the Project
tree. Double click Main [OB1].
2. Drag and drop the function Analog_Scaling [FC1]
onto Network 2.
1 3. Add a branch to Network 2 using the toolbar item
Open branch in the toolbar of the LAD editor.
4. Drag and drop the function Analog_Scaling [FC1]
to the branch that was just added.

Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.


Page 46 April 11, 2016
1. Add the array elements from Potentiometer[0] to
the High_Limit, Low_Limit and Scaled_Value to
the first Analog_Scaling block.
2. Add the analog input “Potentiometer_Top” from
the PLC tags to the Analog_Value of the first
Analog_Scaling block.
3. Add the array elements from Potentiometer[1] to
1 the High_Limit, Low_Limit and Scaled_Value to
the second Analog_Scaling block.
4. Add the analog input “Potentiometer_Bottom”
2 from the PLC tags to the Analog_Value of the
second Analog_Scaling block.

Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.


Page 47 April 11, 2016
2
1. Click on the PLC in the Project tree
2. Click the Download button in the toolbar.
3. Click Load in the Load preview dialog. Click
Finish when done.
1

Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.


Page 48 April 11, 2016
1 2

1. Save project.
2. Click the Monitor on button in the LAD toolbar.
3 Adjust the top and bottom potentiometers and
note the change in the Scaled_Value.
3. Right click on the Bottom Potentiometer High
Limit setting. Choose Modify -> Modify operand…
4. Change the value to 75.0 and click OK. Note
change in Scaled_Value.
Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.
Page 49 April 11, 2016
1. Right click on the second Analog_Scaling block.
Select Open and monitor…
2. Note the value of 75.0 in the #High_Limit (MAX)
input of the SCALE_X block. This indicates
1 monitoring of the Bottom Potentiometer.

Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.


Page 50 April 11, 2016
4 Customer Benefit -> Troubleshooting multiple block calls?
The ability to easily monitor the specific call of a block in the PLC allows
customers to create re-usable code for specific redundant tasks in the
machine and troubleshoot the specific area or machine task quickly and
easily. Writing re-usable blocks saves engineering time since only one
block needs to be developed to perform the same task in multiple areas
of the machine. It also saves PLC memory since only one block needs to
be loaded to the PLC.
2

1. Click the Change… button in the Call environment section of the


Testing task card. Here you can select which call of the block you
wish to monitor.
2. Choose the first call of the block (for Top Potentiometer) from the
list.
3. Click OK. Note the #High_Limit value changes to correspond with
the Top Potentiometer.
4. Click Go offline.

Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.


Page 51 April 11, 2016
Configuring an HMI

Task 3: Add HMI Panel

Overview:
1. Add a Basic Panel HMI to the project
2. Use the HMI Device Wizard to connect it to the S7-1200
PLC and PROFINET Network, and to create default screens
and screen navigation
3. Complete the S7-1200 demo IO Test Screen

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 52
5
1

2 3

1. Select “Add new Device”


2. Select “HMI” option in dialog
3. Select the 7” TP700 Comfort panel as shown
4. Select Start device wizard if not already checked
5. Change the HMI name to “KTP700”
4 6. Select “OK”

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 53
Customer Benefit -> Easy setup and configuration of HMIs
The HMI Device Wizard allows for fast and easy setup and configuration of HMI
devices. When complete the wizard will have inserted a HMI into the project that is
networked to the desired PLC, contains default screens with navigation, along with
alarm controls and system screens.

Working with the HMI Device Wizard: 3


1. Select S7-1200 to connect the PLC to the HMI.
2
2. Select green check.
3. Click Next
Unrestricted >> Industry, Inc. 2016 All rights reserved.
© Siemens
Page 54
Step through the HMI Device Wizard
1. Accept defaults as shown

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 55
Step through the HMI Device Wizard

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


1. Accept defaults as shown
Page 56
Step through the HMI Device Wizard

Unrestricted © Siemens Industry, Inc. 2014 All rights reserved.


1. Accept defaults as shown
Page 57 April 11, 2016
Customer Benefit -> Easy default screen creation and navigation
The HMI Device Wizard allows for easy default screen creation, with navigation
between the screens already added. Note, the system also remembers the screen
navigation the last time the wizard was run, so the layout below may already be
shown when you come to this step

Use the HMI Device Wizard to create screen navigation for


later labs:
1. Add 2 Screens by clicking on + in the Root screen box.
2. Rename the screens as shown (IO Test Screen, and
Potentiometer). 3
3. Click Next >>
Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.
Page 58
1

Let the HMI Device Wizard create system screens: 2


1. Check the Select all box.
Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.
2. Click Next >>
Page 59
Customer Benefit -> Save setting for HMI Device Wizard:
The Save settings check box allows users to set up a company standard set of default
screens. When the wizard is complete by clicking Finish, if the Save settings box is
checked, any changes made through the wizard are saved for the next launch of the
wizard. The user only needs to select the PLC communications, then click Finish. All
other settings are accepted.

Step through the HMI Device Wizard


1. Accept defaults as shown.
Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.
2. Click Finish.
Page 60
2

1. KTP700 Basic appears as shown


2. Select the text in the center of the
1 screen (Welcome…). Delete.

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 61
1. Drag and drop a Graphic object onto the screen from
the Basic objects section of the Toolbox.
2. Resize the object to take up most of the screen as
shown.
3. Move the Graphic to the background.
3

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 62
1. In the Properties -> General for the Graphic
view, click the Create a new graphic from
file button on the bottom of the window.
2. Navigate to the Student folder on the
Windows desktop. Select the “2016 MiA-
TTO.jpg” file.
3. Click Open.

1 reserved.
Unrestricted © Siemens Industry, Inc. 2016 All rights
Page 63
Adding Preconfigured HMI tags from Library:
1. Click on the Libraries tab on the right side of the
screen.
2. From the S7-1200 Intro library, HMI folder, drag and
drop the S7-1200 Demo IO HMI Tags object into the
HMI tags folder of the Project tree. A new HMI tag
table will be created.

2
Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.
Page 64
Replace IO Test Screen with screen from Library:
1. From the S7-1200 Intro library, HMI folder, drag and drop the IO
Test Screen object into the Screens folder of the Project tree.
2. In the pop-up window, click the Replace existing objects and
move to this location radial button and click OK.
3. Double click on IO Test Screen from the Screens folder to open.

2
3

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 65
IO Test Screen is not yet complete:
1. Click on switch graphic for S2.
2. In Properties -> General, select the button. Navigate to the PLC tags
folder of the S7-1200 and select the Default tag table.
3. Scroll to find and select Switch2. Click the green check.
1

4
Customer Benefit -> Common project database:
The common tag database for a single project in the TIA Portal 2
allows users to browse for tags in multiple connected PLCs
from an HMI. Any time a tag is changed in the PLC
configuration (i.e. assigned to a different address), the HMI tag
Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.
is automatically rectified to match.
Page 66
Add another switch for S1:
1. Click on the Libraries tab on the right. Navigate to Buttons and
switches -> Master copies -> LeverSwitches. Drag and drop
Lever_Vertical_3 onto the screen.
2. Click on switch graphic and position next to S2.
3. In Properties -> General, select the button. Navigate to the
2 PLC tags folder of the S7-1200 and select the Default tag table.
4. Scroll to find and select Switch1. Click the green check.

4
1

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 67
Add Red Pilot light:
1. Click on the Libraries tab on the right. Navigate to Buttons and
switches -> Master copies -> PilotLights. Drag and drop
PilotLight_Round_R onto the screen as shown.
2. Click on pilot light graphic and position under conveyor.
3. In Properties -> General, select the button. Navigate to the
PLC tags folder of the S7-1200 and select the Default tag table.
4. Scroll to find and select Red_LT. Click the green check.

1
3

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 68
1
4

Add and animate a circle to show status of top wiper prox:


1. Click on the Toolbox tab on the left side of the screen.
2. Drag and drop a circle as shown.
3. Click on the lower left circle. HOLD SHIFT then click
on the circle just placed on the screen so both circles
are selected.
4. In the toolbar of the HMI screen window, select the
pulldown of the size objects button. Click on Same
width and height. Circles will be sized identically.
Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.
Page 69
1. Click on the resized circle.
2. Click on the Animations tab.
3. Double click on Add new animation.
4. Select Appearance.
5. Click OK.

1
4

2 5

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 70
1. Add a row in the Range and make the value “0”. Change the
background color to blue as shown.
2. Add a row in the Range and make the value “1”. Change the
background color to green as shown.
3. In Properties -> General, select the button. Navigate to the
HMI tags folder of the KTP700 and select the S7-1200 Demo IO
HMI tag table.
4. Scroll to find and select Paddle_Prox_Top. Click the green
check.

2 reserved.
Unrestricted © Siemens Industry, Inc. 2016 All rights
Page 71
1. Save project.
2. Click on the KTP700 HMI in the project tree.
1 3
3. Click Download.
4. In the Extended download to device window, ensure that
the proper Ethernet settings are chosen. Click Start
search.
5. Once the HMI is found, select it and click Load.

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 72
1

1. In the Load preview window, check the Overwrite all


and Fit boxes.
2. Click Load.
3. Click Download. 2
4. The TIA Portal will proceed to load the proper firmware
of the HMI, then download the configuration. After this
initial load, only delta steps will be loaded. Therefore,
subsequent downloads will be faster than this initial
load.
Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.
Page 73
Add additional PLC and HMI objects
Task 4: Visualize the Raw and Scaled Potentiometer values

Overview:
1. Add tags and code to PLC to display Potentiometer
values
2. Add HMI objects to display Potentiometer values
3. Test CPU and HMI changes

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 74
Add a program group in PLC Program blocks:
1. Right click on the Program blocks folder of the
PLC Project tree. Select Add group.
2. Name the new Group “Analog”
3. Drag and drop the Analog_Scaling [FC1]
function and Analog [DB1] data block into this
folder.
1
2

Customer Benefit -> Add groups (folders) in Project tree:


The TIA Portal provides the ability to organize program code,
HMI screens, PLC and HMI tags, etc., into separate groups
(folders). This allows for intuitive organization of specific
Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.
sections of objects.
Page 75
Add Data Block for HMI value display:
1. Expand the Program blocks folder in the PLC
Project tree. Double click on Add new block
3
2. Click the Data block box.
3. Name the Data Block HMI.
4. Click OK.
1

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 76
1
2
3

1. Add the tag name “Pot_Num”, data type Int.


Check the Retain box.
2. Add the tag name “Raw_Value”, data type Int.
3. Add the tag name “Display”, data type
Scaling_Data. This is the PLC data type we
configured earlier.

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 77
1. Open Main [OB1].
2. From the Comparator operations folder of Basic
instructions, drag and drop a CMP == (Compare Equal)
block onto Netwok 3 as shown.
3. From the Move operations folder, drag and drop a MOVE
block next to the compare statement.
4. Repeat to add second line to Network 3.

1
2

3
4

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 78
1. Populate addresses of compare and move
blocks as shown.

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 79
1. From the Move operations folder, drag and drop a
MOVE block to Network 4.

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 80
Customer Benefit -> Manipulation of entire data structures: Customer Benefit -> Indexed addressing of array elements:
The TIA Portal, when used with S7-1200 and S7-1500 PLCs, The TIA Portal, when used with S7-1200 and S7-1500 PLCs,
allows for the movement of entire structures of data (PLC data allows for indexed (indirect) read and write of addresses and
types, etc) between memory areas by typing in a single entire data structures of array elements in LAD, FBD and SCL.
address. This results in less code and easier troubleshooting. This reduces the amount of complex code required to
manipulate data in a program and eases the complexity of HMI
configurations.
For any array element, simply replace the array number in the
[x] area of the address with whole number tag. For example:
DBName.Array[0] becomes DBName.Array[IndexTag]

2 Move selected Potentiometer to HMI tag.

1 1. Type in an indexed address to the IN input of


the MOVE block. Type address as:
analog.potentiometer[hmi.pot_num]
The software will automatically fill in quotes to
the proper places after pushing Enter.
2. MOVE output OUT1 will be set to address
Unrestricted © Siemens Industry, Inc. 2016 All rights reserved. “HMI”.Display
Page 81
1
Create HMI screen to display Potentiometer values:
1. Save the project.
2. Open the HMI screen Potentiometer
3. Select the “Potentiometer” text in the center of the
screen. Delete text.

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 82
2

1. Open the HMI data block by clicking on the


name in the bottom of the screen or by
opening from the PLC Program blocks folder.
2. “Float” the window by clicking on the “Float”
button in the toolbar.

Unrestricted © Siemens Industry,1


Inc. 2016 All rights reserved.
Page 83
2

1. Highlight the elements of the data block by clicking on


the row number (2), holding Shift and clicking on the
last row number (4).
2. Drag and drop the selection onto the “Potentiometer”
screen.
Dragging and dropping elements from a PLC data block,
PLC tag table or LAD/FBD/SCL program onto an HMI
screen will automatically create an IO Field on the screen
as well as create an HMI tag pointing to the PLC address.
Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.
Both simple and complex data types will work.
Page 84
3

1. Close the HMI Data block (floated window).


2. Double click to open the HMI Default tag table.
2 3. Note the new tags added from the HMI Data block.
4. Expand the HMI_Display tag to see all elements of the
“Scaling Data” data type.

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 85
1. Open Potentiometer Screen.
2. Distribute IO Fields as shown. Pot_Num will be top element, Raw_Value middle,
Display bottom.
3. Drag and drop a Text object onto the screen next to the Raw_Value IO Field.
Change text to “Raw Analog Value”. Repeat for “High Limit” as shown.
4. Select Display IO Field. Change Tag to HMI_Display.High_Limit. Click green check.

2
3

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 86
2

1. Change the Format pattern of the High Limit to


s9999.99
2. Copy and paste the High Limit IO Field and Text field
two times. Place below the High Limit fields as shown.

1
Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.
Page 87
1. Change the text of the Text Field below High
Limit to “Low Limit”.
2. Click on the IO Field. Change the Process Tag
from High_Limit to Low_Limit. Click the green
check.

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 88
1. Change the text of the Text Field below Low
Limit to “Scaled Value”.
2. Click on the IO Field. Change the Process Tag
from High_Limit to Scaled_Value. Click the
green check.

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 89
2

3
4 The next step is to create a method to select which
potentiometer values are displayed on the screen. We will
configure this using a Text list and a Symbolic IO Field.
Configure Text list:
1. Double click on Text and graphic lists in the Project tree
of the KTP700.
2. Add a new Text list. Name it Potentiometer. Set
Selection to Value/Range.
1
3. Add a Text list entry. The value is “0”. The Text value
is “Top Potentiometer Scaling Parameters”.
4. Add a second Text list entry. The value is “1”. The Text
value is “Bottom Potentiometer Scaling Parameters”.
Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.
Page 90
2

Configure Symbolic IO Field:


1. Open Potentiometer screen.
2. Select the top IO Field. Delete.

1 reserved.
Unrestricted © Siemens Industry, Inc. 2016 All rights
Page 91
5

1. From the Elements section of the Toolbox, drag and


drop a Symbolic IO Field onto the screen.
3
2. Change the Process Tag to “HMI_Pot_Num”.
3. Select the Potentiometer Text list in the Contents ->
Text list field. Click the green check.
4. Resize the Symbolic IO Field and position as shown.
5. Save the project.
2

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 92
Customer Benefit -> Downloading to multiple devices at one time:
2
The user has the option to select to download to each device one at a time, OR he can
multi-select the devices in the Project tree to download to all devices in one step.

Download PLC and HMI:


3
1. Select both the S7-1200 and KTP700 in the project tree.
2. Click the Download button in the Toolbar.
3. Verify PG/PC settings. Click Start search.
4. Click Load. Repeat process for KTP700.
5. Navigate to Potentiometer screen on HMI. Test 4
configuration.

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 93
Siemens Industry Inc. IA FA and DT MC

DISCLAIMER/TERMS OF USE: THE INFORMATION PROVIDED HEREIN IS PROVIDED AS GENERAL


EXAMPLES REGARDING THE USE OF THE APPLICABLE PRODUCTS IN GENERIC
APPLICATIONS. THIS INFORMATION IS PROVIDED WITHOUT WARRANTY. IT IS YOUR
RESPONSIBILITY TO ENSURE THAT YOU ARE USING ALL SIEMENS PRODUCTS PROPERLY IN
YOUR SPECIFIC APPLICATION. ALTHOUGH THIS CONTENT STRIVES TO MAINTAIN ACCURATE
AND RELEVANT INFORMATION, THERE IS NO OFFICIAL GUARANTEE THAT THE
INFORMATION PROVIDED HEREIN IS ACCURATE. IF YOU USE THE INFORMATION PROVIDED
HEREIN IN YOUR SPECIFIC APPLICATION, PLEASE DOUBLE CHECK ITS APPLICABILITY AND
BE ADVISED THAT YOU ARE USING THIS INFORMATION AT YOUR OWN RISK. THE
PURCHASER OF THE PRODUCT MUST CONFIRM THE SUITABILITY OF THE PRODUCT FOR
THE INTENDED USE, AND ASSUME ALL RISK AND LIABILITY IN CONNECTION WITH THE USE.

Unrestricted © Siemens Industry, Inc. 2016 All rights reserved.


Page 94

You might also like