Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

PLC AUTOMATION SYSTEM LABORATORY

Lab 1 : Getting familiar with Step 7- TIA Portal and the S7-1200 PLC

OBJECTIVES
 To construct PLC programs in LAD using Siemens Step 7-TIA Portal.
 To run and debug the programs on S7-1200 PLC.

INTRODUCTING THE S7-1200 PLC


The S7-1200 controller provides the flexibility and power to control a wide variety of
device in support of your automation needs. The compact design, flexible configuration, and
powerful instruction set combine to make the S7-1200 a perfect solution for controlling a
wide variety of applications.
The CPU combines a microprocessor, an integrated power supply, input and output
circuits,built-in PROFINET, high-speed motion control I/O, and on-board analog inputs in a
compact housing to create a powerful controller. After you download your program, the CPU
contains the logic required to monitor and control the devices in your application. The CPU
monitors he inputs and changes the outputs according to the logic of your user program,
which can include Boolean logic, counting, timing, complex math operations, and
communications with other intelligent devices.
The CPU provides a PROFINET port for communication over a PROFINET network.
Additional modules are available for communicating over PROFIBUS, GPRS, RS485 or
RS232 networks.

① Power connector

② Memory card slot under top door

③ Removable user wiring connectors


(behind the doors)

④ Status LEDs for the on-board I/O

⑤ PROFINET connector (on the bottom of


the CPU)
INTRODUCTING THE STEP 7
STEP 7 provides a user-friendly environment to develop controller logic, configure HMI
visualization, and setup network communication. To help increase your productivity, STEP 7
provides two different views of the project: a task-oriented set of portals that are organized
on the functionality of the tools (Portal view), or a project-oriented view of the elements
within the project (Project view). Choose which view helps you work most efficiently. With a
single click, you can toggle between the Portal view and the Project view.

Portal view
① Portals for the different tasks

② Tasks for the selected portal

③ Selection panel for the selected


action

④ Changes to the Project view

Project view
① Menus and toolbar

② Project navigator

③ Work area

④ Task cards

⑤ Inspector window

⑥ Changes to the Portal view

⑦ Editor bar

With all of these components in one place, you have easy access to every aspect of
your project. For example, the inspector window shows the properties and information for the
object that you have selected in the work area. As you select different objects, the inspector
window displays the properties that you can configure. The inspector window includes tabs
that allow you to see diagnostic information and other messages. By showing all of the editors
that are open, the editor bar helps you work more quickly and efficiently. To toggle between
the open editors, simply click the different editor. You can also arrange two editors to appear
together, arranged either vertically or horizontally. This feature allows you to drag and drop
between editors.
GETTING STARTED

1. CREATE A PROJECT

 In the Start portal,


click the "Create new
project" task.

 Enter a project
name and click the
"Create" Button.

 After creating the


project, select the
Configure a device.
 Click the "Add new device" task.

 Select the CPU to add to


the project:

1. In the "Add new device" dialog,


click the "SIMATIC PLC" button.
2. Select a CPU from the list.
3. To add the selected CPU to the
project, click the "Add" button.

 Note that the "Open device


view" option is selected. Clicking
"Add" with this option selected
opens the "Device configuration"
of the Project view.

 The Device view displays


the CPU that you added.
2. CONFIGURE THE CPU

2.1. Configuring the properties for the CPU

 You use the properties to configure the operating parameters for the
CPU. For example, general information, Profinet interface, digital inputs
and outputs and etc.

 As you noticed when you


uploaded the CPU configuration,
the CPU does not have a peassigned
IP address. You assign the IP
address for each CPU.
 The "IP protocol" section
displays the default IP address
created by STEP 7 Basic.This
example uses the default IP address.
Based on the needs of your
application andinstallation, you
might need to configure a specific
network address for the CPU.

2.2. Establish a Online Connection with PLC

 Click the “go online” button to establish a connection


with PLC.
 Select PN/IE type for the
type of the PG/PC interface.

 Click “yes” button for an


additional IP address in the
same subnet as the PLC.

 The connection with PLC is established.

3. CREATE A SIMPLE NETWORK IN YOUR USER PROGRAM

Your program code consists of instructions that the CPU executes in sequence. For this
example, use ladder logic (LAD) to create the program code. The LAD program is a
sequence of networks that resemble the rungs of a ladder.
 To open the program editor, follow these steps:

1. Expand the "Program blocks" folder in the Project tree


to display the "Main [OB1]" block.
2. Double-click the "Main [OB1]" block.

 The program editor opens the program block


(OB1).

 Click the "Normally open contact"


button on the "Favorites" to add a
contact to the network.
 For this example, add second
contact.
 Click the "Output coil" button to
insert a coil.

 Select with double click or drag to the network any instruction


to add your program.

 You can add any instruction commonly used to Favorites.


To save the project, click the "Save project" button in the toolbar. Notice that you do not
have to finish editing the rung before saving. You can now associate the tag names with these
instructions.

4. CREATE TAGS FOR THE I/O OF THE CPU

"PLC tags" are the symbolic names for I/O and addresses. After you create a PLC tag,
STEP 7 stores the tag in a tag table. All of the editors in your project (such as the program
editor, the device editor, the visualization editor, and the watch table editor) can access the
tag table.
Using the tag table, you can quickly enter the PLC tags for the addresses of the contacts
and coils. If you do not add a tag table, you can use default tag names like “Tag_1”,”Tag_2”...

 To use tag table, follow these steps:


1. Expand the “PLC tags” folder in the Project tree to display
“Show all tags” and “Add new tag table”.
2. Double-click the “Add new tag table” for specific tag name.

 Enter the PLC tags for the address


of the instructions.

5. DOWNLOAD THE USER PROGRAM TO CPU

 Now you can download your user program. Open the program
editor and simply click the "Download" button.
 After connecting to the
CPU, STEP 7 Basic displays the
"Load preview" dialog. Click
"Load" to download the user
program to the CPU. Before
clicking "Finish", select "Start
all" to ensure that the CPU goes
to RUN mode.

6. CREATE A WATCH TABLE FOR MONITORING

A watch table allows you to monitor or modify the values of tags while the CPU executes
your user program.

 To create a watch table:


1. Expand the "Watch tables" container.
2. Double-click "Add new watch table" to open a new
watch table.

 Enter the tags by clicking in the


"Name" field. Type a character and
select the tag from the list.

To monitor the tags, you must have an online connection to the CPU. Simply click the
"Go online" button in the toolbar.
 To monitor the execution of the user program and
to display the values of the tags,
click the "Monitor all" button in the toolbar. The
"Monitor value" field shows the value
for each tag.

You can also monitor the status of the tags in the LAD editor. Use the editor bar to display the
LAD editor.
In the toolbar of the LAD editor, click the "Monitoring on/off" button to display the status
of your user program.

 The LAD editor displays power flow in


green.

EXPERIMENTAL WORK
1. Construct a LAD for the following Boolean functions operations using the STEP 7-TIA
Portal. Transfer and run your programs on the PLC and verify that the PLC operates
according to the Boolean functions.

a. A  B
b.( AB  CD  EF ).G
c. A  BC  DEF
d . A.( BC  DE ).F

2. A PLC motor controller has two START buttons and two STOP buttons. The motor is
to run if two RUN buttons depressed simultaneously. The motor should run when the
buttons are released. Motor stops by depressing any STOP button stops. Construct a
LAD for this motor control task. Use the following symbols for the inputs and output:

START Button-1 START1


START Button-2 START2
STOP Button-1 STP1
STOP Button-2 STP2
MOTOR Starter MOTOR

You might also like