You are on page 1of 69

 

TECHNOLOGICAL UNIVERSITY (MANDALAY)


DEPARTMENT OF ELECTRONIC ENGINEERING

EcE-61003:
PLC and SCADA Control System
Lab Manual

by

Dr. Nyan Phyo Aung


Associate Professor
Department of Electronic Engineering
Technological University (Mandalay)
စကားချီး

ပထမဦးဆuး SIEMENS PLC S7-1200 , S7-1500 and HMI Programming

Training ကiu Synopsis Company နှင့် Siemens Myanmar တiuပူးeပါင်းဖွင့်လှစ်ခဲ့ ပီး သင်တန်း

တက်ခွင့်ရeသာe ကာင့် ဤ Lab manual စာauပ် ကiueရးသားနiuင်ခဲ့သြဖင့် ဦးစွာ

eကျးဇူးတင်e ကာင်း eြပာ ကားလiuပါတယ်…………သင်တန်းတွင်ပiu့ချeပးခဲ့eသာ ဆရာများကiu

လည်းeကျးဇူးပါတယ်။

ပါeမာက္ခချuပ်(နည်းပညာတက္ကသiuလ်(မန္တeလး)§ဌာနမှူး (aီလက်ထeရာနစ်aင်/ယာဌာန)

(နည်းပညာ တက္ကသiuလ(် မန္တeလး) နှင့် ဆရာ/မများaားလuးကiueကျးဇူးတင်ပါတယ်။

SIEMENS PLC S7-1200 aမျiuးaစား PLC § SIEMENS HMI နှင့် SIEMENS

software ကiuaဓiကထား ပီးeလ့လာနiuင်eaာင်eရးသားထားပါသည်။aသuးြပuမည့် software က

SIEMENS ကထuတe
် သာ TIA Portal (Totally Integrated Automation) version 13

နဲ့သင် ကားeရးကiu မှီခiuပါတယ်။တချiu့ပuစာ္ဆ များက general ပuစကiuယူထား ပီး မiမa


i သuးြပuမည့်

software eပ မူတည် ပီးeြပာင်းလဲနiuင်eစရန်ဉးီ တည်ပါတယ်။ Lab 10 ခuaတွကe


် ရးသားခဲ့ပါတယ်။

Lab 1မှာ networking aeြခခကiuနာလည်နiuင်eစရန်aတွက် Packet tracer ae ကာင်းကiu စတင်

မiတဆ
် က်eလ့လာeစပါတယ်။Lab 2 မှာ PLC S7-1200 ae ကာင်းကiu စတင်eလ့လာနiuင်eစရန်

မiတဆ
် က်eရးသားထားပါတယ်။ HMI program eရးသားနည်းကiu Lab 6 စတင်eဖာ်ြပ ပီး Lab 7

နှင့် Lab 8 မှာ ဆက်လက်eလ့လာနiuငe


် စရန်ရည်ရွယ်ပါသည်။ Lab 9 နှင့် Lab 10 မှာ text

စာauပ်ြဖင့်ဆက်လက်eလ့လာနiuင်eစလiuပါသည်။

ဉာဏ် ဖiuးeaာင်
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

EcE-61003: PLC and SCADA Control System


Lab Instruction
Lab 1: Introduction to Networking
1.1. Introduction to Networking
1.2. Network Cabling
1.3. Simulation of networking with Packet Tracer

1.1. Introduction to Networking


A computer network is defined as the interconnection of two or more computers. It is done
to enable the computers to communicate and share available resources.
 Two or more computers
 Cables as links between the computers
 A network interfacing card(NIC) on each computer
 Switches
 Software called operating system(OS)
1.1.1. Classification Of Area By Their Geography
The network may be classified as followed:
 Personal Area Network(PAN)
 Local Area Network (LAN),
 Metropolitan Area Network (MAN)
 Campus Area Network(CAN)
 Wide Area Network (WAN)
 Wireless LANS And WANS
1.1.2. Network Classification By Their Component Role
Networks can also be classified according to the roles that the networked computers
play in the network’s operation.
 Peer to Peer
 Client Server (Server Based)
 File server
 Print server
 Application server
 Message server
 Database server

DR.NYAN PHYO AUNG  1
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

1.1.3. Network topology


Network Topology is the schematic description of a network arrangement, connecting
various nodes ( sender and receiver) through the line of connection.
 Bus
 Ring
 Star
 Mesh
 Tree

1.1.4. IP Addressing
An IP address has 32 bits divided into four octets. A 32 bit address that is used to
uniquely identify a computer on a network. IP address identifies both a network and a host. To
make the address easier to read, people use decimal numbers to represent the binary digits

Example: 192.168.1.1

 Subnet mask

Indicates how much of the IP address represents the network or subnet.Standard


(default) subnet masks:

 Class A subnet mask is 255.0.0.0


 Class B subnet mask is 255.255.0.0
 Class C subnet mask is 255.255.255.0

 MAC address

Identifies a specific NIC in a computer on a network. Each MAC address is unique.


TCP/IP networks can use MAC addresses in Communication

1.2. Network Cabling


There are three main cable in networking. There is a unique cable in networking in
industry. The three main cable types are as followed:
 Coaxial cable
 Unshielded twisted pair
 Fiber optic

DR.NYAN PHYO AUNG  2
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

1.2.1. UTP Categories


The UTP cable is defined as category. They are as followed:
 Category 1 Voice only (Telephone)
 Category 2 Data to 4 Mbps (Localtalk)
 Category 3 Data to 10Mbps (Ethernet)
 Category 4 Data to 20Mbps (Token ring)
 Category 5 Data to 100Mbps (Fast Ethernet)
 Category 5e Data to 1000Mbps (Gigabit Ethernet)
 Category 6 Data to 2500Mbps (Gigabit Ethernet)

1.2.2. UTP Cable Connector (RJ45)


This section explains about the UTP Cable Connector (RJ45). The making of network
with connector is as following figures. The figures gives the method for making
cabling.
1.3. Introduction to Packet Tracer
Packet Tracer is a powerful network simulator that can be utilized for students to create
networks with an almost unlimited number of devices and to experience troubleshooting
without having to buy real network devices. The tool is developed by Dennis Frezzo and his
team at Cisco Systems. The purpose of Packet Tracer is to offer students a tool to learn the
principles of networking. Packet Tracer is (PT) is a powerful and dynamic tool that displays
the various protocols used in networking, in either Real Time or Simulation mode. This
includes layer 2 protocols such as Ethernet and PPP, layer 3 protocols such as IP, ICMP, and
ARP, and layer 4 protocols such as TCP and UDP. Routing protocols can also be traced.
1.3.1. Creating A New Topology In Packet Tracer
Step 1: Start Packet Tracer

DR.NYAN PHYO AUNG  3
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Menu Bar
Main Tool Bar

Logical/ Physical
Workspace and
Navigation Bar
Common
Tools Bar
Workspace

Realtime/
Simuation Bar
Network Component
Box

Device-Type Device- Specific User Created Packet


Selection Box Selection Box Window

Step 2: Choosing Devices and Connections


A network topology is done by selecting devices and the media in which to connect
them. Several types of devices and network connections can be used. For this lab we will keep
it simple by using End Devices, Switches, Hubs, and Connections. Single click on each group
of devices and connections to display the various choices. When we select a device in the left
panel, in the right panel we see all the listed devices of that type.

DR.NYAN PHYO AUNG  4
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Step 3: Single click on the End Devices

Step 4: Single click on the Generic host

Step 5: Move the cursor into topology area. You will notice it turns into a plus “+” sign

Step 6: Single click in the topology area and it copies the device

Step 7: Add three more hosts

DR.NYAN PHYO AUNG  5
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Add a Hub
Step 1: Select a hub by clicking once on Hubs and once on a Generic hub

Step 2: Add the hub by moving the plus sign “+” below PC0 and PC1 and click once

Step 3: Connect PC0 to Hub0 by first choosing Connections

Cabling between end devices

The straight-through cable is used to connect


Host to switch or hub
Router to switch or hub
The cross-over cable can be used to connect
Switch to hub
Hub to hub
DR.NYAN PHYO AUNG  6
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Host to host
Hub to switch
Switch to switch
Router direct to host
Step 4: Click once on the Copper Straight-through cable

Step 12: Perform the following steps to connect PC0 to Hub0


(a) Click once on PC0
(b) Choose FastEthernet
(c) Drag the cursor to Hub0
(d) Click once on Hub0 and choose Port 0
(e) Notice the green link lights on both the PC0 Ethernet NIC and the Hub0 Port 0 showing
that the link is active.
(a) (b) (c) (d) (e)

Step 5: Repeat the steps above for PC1 connecting it to Port 1 on Hub0. (The actual hub
port you choose does not matter

DR.NYAN PHYO AUNG  7
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Adding a Switch
Step 1: Select a switch, by clicking once on Switches and once on a 2950-24 switch

Step 2: Add the switch by moving the plus sign “+” below PC2 and PC3 and click once

Step 3: Connect PC2 to Hub0 by first choosing Connections

Step 4: Click once on the Copper Straight-through cable

Step 5: Perform the following steps to connect PC2 to Switch0


(a) Click once on PC2
(b) Choose FastEthernet
(c) Drag the cursor to Switch0

DR.NYAN PHYO AUNG  8
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

(d) Click once on Switch0 and choose FastEthernet0/1


(e) Notice the green link lights on PC2 Ethernet NIC and amber light Switch0
FastEthernet0/1 port. The switch port is temporarily not forwarding frames, while it
goes through the stages for the Spanning Tree Protocol (STP) process.
(f) After a about 30 seconds the amber light will change to green indicating that the port
has entered the forwarding stage. Frames can now forward out the switch port.
(a) (b) (c) (d) (e) (f)

Step 6: Repeat the steps above for PC3 connecting it to Port 3 on Switch0 on port
FastEtherent0/2. (The actual switch port you choose does not matter.)

1.3.2. Communication Between 2 Pcs In Packet Tracer


Objective:
To build a simple Peer-to-Peer network between two PCs
To configure an address so that each station can communicate using TCP/IP
Equipment:
PCs and Cross cable
DR.NYAN PHYO AUNG  9
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Addressing Table
PC IP Address Subnetmask

PC-0 192.168.1.10 255.255.255.0

PC-1 192.168.1.11 255.255.255.0

Step 1: Create the network topology in Packet Trace – 2 PCs connected using cross cable

Step 2: Configure IP address manually according to the addressing table


(a) Click on PC0, go to Desktop, then click IP Configuration.
(b) Click on PC1, go to Desktop, then click IP Configuration.

DR.NYAN PHYO AUNG  10
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Step 3: Check IP settings with ipconfig /all command


(a) Click on PC0, go to Desktop, then click Command Prompt and type the above
command
(b) Click on PC1, go to Desktop, then click Command Prompt and type the above
command

Step 4: Test connectivity between PCs with ping command


(a) Click on PC0 or PC1, go to Desktop, then click Command Prompt and type the
above command

Now, communication is enabled and able to communicate from PC0 to PC1.


DR.NYAN PHYO AUNG  11
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

1.3.2. Communication Between Layer 2 And Layer 3 Between Two Devices (Arp And Icmp)
In Packet Tracer

Objective:
To become familiar with the Packet Tracer interface
To understand how the data communication in a network really works
Equipment:
PCs, Hub, Switch and Straight-Through cable
Position of ICMP, ARP in the network layer

ICMP IGMP
Network
Layer
IP
ARP RARP

IETF has designed a new version called TCP/IP version 6. In this version, the only protocols
that are changed ard the ones in the network layer. IPv4 (IP version 4) becomes IPv6 (IP version
6), ICMPv4 becomes ICMPv6, IGMP and ARP are merged into ICMPv6, and RARP is deleted.
Procedure in Realtime mode
Realtime mode performs the operation with all of the sequence of events happening at “real
time”
1. Create the network topology – 3 PCs connected with a hub using straight-through cables
2. Configure IP address manually
PC IP Address Subnetmask

PC-0 192.168.1.10 255.255.255.0

PC-1 192.168.1.11 255.255.255.0

DR.NYAN PHYO AUNG  12
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

PC-2 192.168.1.12 255.255.255.0

3. Check IP settings with ipconfig /all command


4. Test connectivity between PCs with ping command
The ping program generates an IP packet with an encapsulated ICMP Echo Request
message. It is a tool used to test basic layer 2 and layer 3 communications between two
devices. When the user issues the ping command, most operating systems send multiple
(four or five) ICMP Echo messages. When the destination device receives the ping,
Echo Request, it issues an Echo Reply.
5. Check ARP table with arp –a command
Procedure in Simulation mode
Simulation mode allows you to view the sequence of events associated with the
communications between two or more devices.
1. PC0 pinging PC1
2. In order to view only the “pings”, in the Event List, click on ALL/NONE to clear all
protocols, and then click on ICMP to select only that protocol.
3. One method for pinging a device from another device is to use the Simple PDU tool.
This tool performs the ping without having to issue the ping command.
4. Click on the Capture/Forward button and watch the ICMP Echo Requests and ICMP
Echo Replies. Notice that the hub floods all of the frames out all ports except the port
incoming port.
Viewing the frame (Protocol Analyzer)
To examine the actual protocols being sent, click on the colored Info box in the Event
List. The Event List shows where this Ethernet Frame is currently, “At Device”, the previous
devices, “Last Device”, and the type of information encapsulated in the Ethernet Frame, “Info”.
Single click on the second event’s Info box to view the Ethernet frame with the
encapsulated IP Packet and the encapsulated ICMP message “At Device” PC0.
The PDU (Protocol Data Unit) is displayed in two different formats, OSI Model and
Outbound PDU Details. View them both, paying particular attention to the Layer 2 Ethernet
frame. If you only see the IP packet and the ICMP message, and do not see the Ethernet II
frame, click on the next ICMP Info box. This happened because we are looking at the IP packet
before it got encapsulated into an Ethernet frame.

DR.NYAN PHYO AUNG  13
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

The default is the OSI Model view with a brief description with what is occurring with
this packet. Click on the Outbound PDU Details tab to see the protocol details including the
layer 2 Ethernet frame, the layer 3 IP packets and ICMP message.
Looking at the Switch Algorithm and Switch MAC Address Tables
Procedure
1. Create the network topology – 3 PCs connected with a switch using straight-through
cables
2. Configure IP address manually
3. Use the Select tool to view IP address and MAC address information for the various
hosts
4. Use the Inspect tool to view the MAC Address Table of the switch. The MAC Address
Table is empty as it has not learned any Source Ethernet MAC Addresses.
5. Set the Event List Filters to include both ICMP and ARP. Set the Event List Filters
to include both ICMP and ARP.
ARP Request
Before PC0 can send the ICMP Echo Request, ping, it needs to send an ARP Request. ARP
(Address Resolution Protocol) Request is how a host that knows the Destination IP Address of
a device discovers the Ethernet Destination MAC Address for that same device.
So, the ICMP Echo Request, ping is put on hold, stored in memory and an ARP Request is
transmitted first.
To view the ARP Request, click on the Info box in the Event List. Notice the Destination MAC
Address is a broadcast, 48 1 bits or 12 Hexadecimal Fs.
ARP Reply
PC2 ignore the ARP Request because PC0 is only asking for the owner of the IP Address
192.168.1.11 to reply. PC1 now sends back an ARP Reply with its MAC Address. This time
the switch updates its MAC Address Table with the Ethernet Source MAC Address of PC0 and
the incoming port number.
Resetting the Network
Whenever you want to reset the network and begin the simulation again, perform the following
tasks:
Click Delete in the PDU area. Reset the network and confirm the action.

DR.NYAN PHYO AUNG  14
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

PKT-4 DHCP ON PACKET TRACER THROUGH SERVER


Objective
To examine the operation of Dynamic Host Configuration Protocol (DHCP)
Equipment
PCs, Switch and Straight-Through cable
Theory Background
The Dynamic Host Configuration Protocol (DHCP) is a network protocol that is used to
configure network devices. DHCP allows a computer to join an IP-based network without
having a pre-configured IP address. DHCP is a protocol that assigns unique IP addresses to
devices, then releases and renews these addresses as devices leave and re-join the network.
Internet Service Providers (ISPs) usually use DHCP to allow customers to join the Internet
with minimum effort. The DHCP server maintains a database of available IP addresses and
configuration information. When it receives a request from a client, the DHCP server
determines the network to which the DHCP client is connected, and then allocates an IP
address. DHCP servers typically grant IP addresses to clients only for a limited interval.
Step 1: Create the network topology in Packet Tracer

Step 2 Open the server and go to the Desktop tab, click IP Configuration and enter the
IP address 192.168.1.1

DR.NYAN PHYO AUNG  15
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Step 3 Go to the Config tab

DR.NYAN PHYO AUNG  16
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Step 4 Go to the DHCP

i. Enter IP for default Gateway as 192.168.1.1


ii. Start IP address 192.168.1.0
iii.. Maximum number of Users 100
iv. Click Save.

DR.NYAN PHYO AUNG  17
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Step 5 Click on any PC that is attached to the server, go to IP configuration and select
DHCP. You will see that DHCP will successfully assign IP address to the PC

Step 6 Go back to server and assign DNS Server address and then go to any PC and
select DHCP. It will also assign DNS to the PC as well

DR.NYAN PHYO AUNG  18
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Step 7 open the website of the server through any PC by going to the Web Browser option
and entering the IP address of the server

Step 8 ping the server by going to the PC’s command prompt and entering server’s IP
address

DR.NYAN PHYO AUNG  19
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

DR.NYAN PHYO AUNG  20
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Lab 2: Introduction to SIEMENS PLC S7-1200 and Ladder Diagram Programming


using (TIA) Portal

Objective:
To understand the structure of SIEMENS PLC S7-1200
To setup the communication between PLC and PC
To understand the programming software (TIA Portal V13) for SIEMENS PLC
S7-1200
To be able to the program for SIEMENS PLC S7-1200

Requirements
PCs, SIEMENS PLC S7-1200, Cable and (TIA Portal V13) Software

2.1. Introducing the S7-1200 PLC


The S7-1200 controller provides the flexibility and power to control a wide variety
of devices 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 figure 2.1 shows the S7-1200 PLC model. The table 2.1
compares the difference model of CPU. And the difference CPU of S7-1200 PLC is shown
in figure 2.2.
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 the 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.
Each CPU provides dedicated HMI connections to support up to 3 HMI devices. The
total number of HMI is affected by the types of HMI panels in your configuration. For

DR.NYAN PHYO AUNG  21
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

example, you could have up to three SIMATIC Basic panels connected to your CPU, or you
could have up to two SIMATIC Comfort panels with one additional Basic panel.

1 ① Power connector

2 ② Memory card slot under top door

③ Removable user wiring

3 connectors (behind the doors)


④ Status LEDs for the on-board I/O
4
⑤ PROFINET connector (on the
bottom of the CPU)

5
Figure 2.1. The S7-1200 PLC Model

Table 2- 1 comparing the CPU models

Feature CPU 1211C CPU 1212C CPU 1214C CPU 1215C


Physical size 90 x 100 x 75 90 x 100 x 75 110 x 100 x 75 130 x 100 x 75
User memory Work 30 Kbytes 50 Kbytes 75 Kbytes 100 Kbytes
Load 1 Mbyte 1 Mbyte 4 Mbytes 4 Mbytes
Retentive 10 Kbytes 10 Kbytes 10 Kbytes 10 Kbytes
Local on-board Digital 6 inputs/4 8 inputs/6 14 inputs/10 14 inputs/10
I/O Analog 2 inputs 2 inputs 2 inputs 2 inputs / 2
Process image Inputs (I) 1024 bytes 1024 bytes 1024 bytes 1024 bytes
size Outputs (Q) 1024 bytes 1024 bytes 1024 bytes 1024 bytes
Bit memory (M) 4096 bytes 4096 bytes 8192 bytes 8192 bytes
Signal module (SM) None 2 8 8
Signal board (SB), Battery 1 1 1 1

Communication module 3 3 3 3

High-speed 3 built-in I/O, 4 built-in 6 6

Single phase 3 at 100 kHz 3 at 100 kHz 3 at 100 kHz 3 at 100 kHz
SB: 2 at 30 kHz 1 at 30 kHz 3 at 30 kHz 3 at 30 kHz

Quadrature 3 at 80 kHz 3SBat 80


2 tkHz
30 3 at 80 kHz 3 at 80 kHz
SB: 2 at 20 kHz 1 at 20 kHz 3 at 20 kHz 3 at 20 kHz

Pulse outputs1 4 4SB 2 20 4 4

DR.NYAN PHYO AUNG  22
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Figure 2.2 Difference CPU Model of S7-1200

2.1.1. Expansion capability of the CPU


The S7-1200 family provides a variety of modules and plug-in boards for expanding
the capabilities of the CPU with additional I/O or other communication protocols. For detailed
information about a specific module, see the technical specifications. The figure 2.3 shows the
expansion system of S7-1200 PLC.

Figure 2.3. the detail of expansion system of S7-1200 PLC

① Communication module (CM), communcation processor (CP), or TS Adapter


② CPU
③ Signal board (SB), communication board (CB), or Battery Board (BB)
④ Signal module (SM)

DR.NYAN PHYO AUNG  23
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Figure 2.4. The Capability of expansion system of S7-1200 PLC

Figure 2.5. The complete system of S7-1200 PLC with expansion boards

The figure 2.4 shows the maximum Capability of expansion board for of S7-1200
PLC. The complete system of S7-1200 PLC with expansion boards is shown in figure 2.5.
The difference model CPU of PLC has different article numbers as shown in figure 2.6.

DR.NYAN PHYO AUNG  24
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Figure 2.6. The article numbers of difference CPU Model of S7-1200 PLC System.

2.1.2. SIMATIC memory card (MC)


The optional SIMATIC memory card (MC) stores a program as well as data, system
data, files and projects. It can be used for:

– Transferring a program to multiple CPUs

– Firmware update of CPUs, signal modules (SMs) and communication modules (CMs)

– Easy replacement of the CPU

Figure 2.7 Inserting Memory card into PLC

DR.NYAN PHYO AUNG  25
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

2.1.3. Operating states of the CPU

The CPU can have the following three operating states:

– In the STOP operating state, the CPU is not


executing the program and you can download a
project.
– In the STARTUP operating state, the CPU is
starting up.
– In the RUN operating state, the program is
cyclically executed.
The CPU does not have a physical switch for changing the operating state. You use the button
on the operator panel of the STEP 7 Basic software to change the operating state (STOP or
RUN). The operator panel also contains an MRES button for performing a memory reset and
displays the status LEDs of the CPU.

2.2. Connection setting Between PLC and PC


The following figure shows the connection between S7-1200 and PC. The connection
is made by and programming software is installed in PC.

1. Engineering station: requirements for hardware and operating system

2 STEP 7 Basic software in TIA Portal – V14 SP1 or higher

3 SIMATIC S7-1200 controller, e.g. CPU 1214C DC/DC/DC – Firmware V4.2.1 or higher

4 Ethernet connection between engineering station and controller

DR.NYAN PHYO AUNG  26
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

2 STEP 7 Basic
1 Engineering station (PC) (TIA Portal) V13 SP1

or higher

3 SIMATIC S7-1200
controller

Figure 2.8 The connection between PLC and PC with PROFINET

2.2.1. Setting the IP address on the programming device 1

It requires the TCP/IP connection in order to connect the CPU of a SIMATIC S7-
1200 controller and the PC, the programming device or a laptop. It is important that the IP
addresses of both devices match for the computer and SIMATIC S7-1200 to communicate
with each other via TCP/IP. First, three will show that how to set the IP address of a
computer with the Windows operating system.

1. Select the network icon in the taskbar at the bottom and click “Network settings". (Win 10)
or Select the network icon in the taskbar at the bottom and click “Open Network and Sharing
Center:”(win)

3. 2

DR.NYAN PHYO AUNG  27
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING
4. .

Figure 2.9 Network Properties of NIC card

2. You can now use the following IP address, for example - IP address: 192.168.0.99 and enter
the following - subnet mask 255.255.255.0. Accept the settings. (® "OK")

5.

Figure 2.10 Assigning the IP address for PC

DR.NYAN PHYO AUNG  28
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

2.3. STEP 7 Basic programming software (TIA Portal V13) 1

STEP 7 provides a user-friendly environment to develop, edit, and monitor the logic
needed to control your application, including the tools for managing and configuring all of the
devices in your project, such as controllers and HMI devices. To help you find the information
you need, STEP 7 provides an extensive online help system. It provides standard programming
languages for convenience and efficiency in developing the control program for your
application.

 LAD (ladder logic) is a graphical programming language. The representation is based


on circuit diagrams
 FBD (Function Block Diagram) is a programming language that is based on the
graphical logic symbols used in Boolean algebra
 SCL (structured control language) is a text-based, high-level programming language.
STEP 7 Basic V13 (TIA Portal V13) software is the programming tool for the following
automation systems:

 SIMATIC S7-1200
 Basic Panels
STEP 7 Basic V13 provides the following functions for plant automation:

 Configuration and parameter assignment of the hardware


 Specification of the communication
 Firmware update
 Programming
 Testing, commissioning and service with operational/diagnostic functions
 Documentation
 Creation of visualizations for SIMATIC Basic Panels with the integrated WinCC
Basic software
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

DR.NYAN PHYO AUNG  29
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

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.

Figure 2.11 Portal Vies Vs Project View of TIA Portal

Figure 2.12 Portal View of TIA Portal

DR.NYAN PHYO AUNG  30
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Figure 2.12 Project View of TIA Portal

Figure 2.13 Inserting The New Device (PLC CPU name)

From figure 2.13, It shows that how insert the new device for programing of PLC, HMI or
other devices.
DR.NYAN PHYO AUNG  31
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Figure 2.14 Assigning the IP address of PLC

The ip address assignment of PLC is as shown in figure 2.14

Figure 2.15 PLC programing with ladder diagram

DR.NYAN PHYO AUNG  32
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Figure 2.16 Absolute address Vs Symbolic name

DR.NYAN PHYO AUNG  33
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Figure 2.17 Simple 1

Figure 2.18 compile the simple program

Figure 2.19 Downloading the Simple 1 Program into PLC

DR.NYAN PHYO AUNG  34
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Figure 2.20 Online Monitoring of Simple 1 Program

Figure 2.21 saving the simple 1 program

DR.NYAN PHYO AUNG  35
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Figure 2.22 Tag Name appear on PLC

Example 1

Problem Description
Implementation of various Logic Gates AND, OR, NOT, NOR, NAND, EX-OR and
EXNOR in PLC using Ladder Diagram programming language.

Problem Solution
 Assuming that all the gates comprise two inputs and NOT Gate has only one input,
Logic Gates can be well implemented in PLC using Ladder Diagram programming
language as shown in “Program” section.
 To implement Examine if closed, Normally Open contact is used and to implement
Examine if open, Normally Closed contact is used.
 These contacts is said to work as relay contacts.
 In Normally Open / XIC contact, when logic 1, or in other words, when logic high is
provided, the contact closes allowing current to pass through the circuit.

DR.NYAN PHYO AUNG  36
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

 And in Normally Closed / XIO contact, when logic 1 is not present, or in other words,
when logic 0 is present, it allows current to pass through the circuit. But when logic 1
is present in case of XIO, the contact opens inhibiting current to pass through the
circuit.
 By simply using these logics, all Logic Gates can be well implemented using Ladder
Diagram programming language.

Symbol of Logic Gates

Solution

DR.NYAN PHYO AUNG  37
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

DR.NYAN PHYO AUNG  38
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

LAB 3: PLC Program to Control Level of a Single Tank And Burglar Alarm Security
System

Problem 1: PLC Program to Control Level of a Single Tank

Problem 2: Burglar Alarm Security System

Objectives:

To understand the problems

To understand the TIA Potral Programming Software

To write the PLC program for the problems

This is a PLC Program to Control Level of a Single Tank.

Problem 1 Description

One open tank is installed in the plant of which liquid level is to be controlled. When level
reaches the Level Low, Outlet flow is blocked and inlet flow is allowed until high level is
achieved. And when Level High is detected, outlet flow is allowed and inlet flow is blocked.

Problem 1 Diagram

Diagram of a single tank level control

 Problem 1 Solution

DR.NYAN PHYO AUNG  39
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

 To detect high and low level of liquid in the tank, two level switches are used which
gives output in digital terms, that is when corresponding levels are detected, it gives
output high otherwise remain low.
 To control level of this system, Single Acting piston valve can be used which has two
states, either fully open or fully close.
 Low Level Switch is mounted at the bottom of the tank and Level High switch
mounted at the side upper most position.
 When this inputs are detected, output to Control Valve has to be latched in order to
continuously fill or empty the system.
 Master start/stop is also provided to shut down or start the entire process.

PLC Program for Burglar Alarm Security System

Problem 2 Description

Consider the design of a Burglar Alarm for a house. This alarm will be activated if an
unauthorized person is detected by a Window Sensor or a Motion Detector. Implement this
Alarm System in PLC using Ladder Diagram programming language.

Problem 2 Solution

 Basically two sensors are used, one is Motion Detector and other one Window Sensor.
Window sensor is nothing but a loop of wire that is a piece of thin metal foil which
encircles the window.
 The motion detector is designed such that when a person is detected, the output of
sensor goes true.
 Important thing to note here is that in Window Sensor, current is always passing until
there is a breakage in glass of a window. Hence output is always true. When alarm
system is active and someone tries to break the window, current does not flow through
the metal foil causing output to go false.

PLC 2 Program

Here is PLC program for Burglar Alarm Security System, along with program explanation
and run time test cases.

List of Inputs and Outputs


I:1/0 = Master Switch (Input)
I:1/1 = Deactivate system (Input)
I:1/2 = Motion Detector (Input)
I:1/3 = Window Sensor (Input)
I:1/4 = Button to Stop Alarm (not the system) (Input)

DR.NYAN PHYO AUNG  40
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

O:2/0 = Master Coil (Output)


O:2/1 = Alarm Coil (Output)
O:2/2 = Alarm (Output)

Problem 3 : Write the program form your text. Page 162 (Fig 9.6 (b) Motor Sequence)
 

Problem 4: Write the program form your text. Page 167 (Fig 9.16 Traffic Light Sequence)
 

DR.NYAN PHYO AUNG  41
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

LAB 4: Motor in Forward and Reverse Direction and Sort Parts for Quality Control on
Conveyor

Problem 1: PLC Program to Drive Motor in Forward and Reverse Direction

Problem 2: PLC Program to Sort Parts for Quality Control on Conveyor

Objectives:

To understand the problems

To understand the TIA Portal Programming Software

To write the PLC program for the problems

Problem 1 Description
A motor is connected to PLC. Run this motor in the Forward and Reverse direction
using Ladder Diagram programming language.
Problem 1 Solution
For any three-phase AC motor, reversing can be accomplished by reversing any two
leads. For single-phase motor, reversing start lead with respect to the main leads. And for DC
motor, reversing the field leads with respect to the armature leads. There are certain ways to
reverse the motor. One is to use DPDT (Double Poles, Double Throw) switch and another one
is by using Reversing Contactors. DPDT switch is best suitable for reversing a small DC motors
while Reversing Contactor is used to reverse Three-Phase AC motors. Single-phase motors are
not widely used for reversing operation. In fact, these are not even available widely with
reversing capability. As here we have a three-phase AC motor, reversing any two leads will
drive the motor in reverse direction. Contactor is an electrical switch used for switching an
electrical power circuit. Two magnetic contactors are used, one for forward connections and
the other for reverse connections. Only Push Button switches are used to control the direction
of this three-phase AC motor.
We have the input commands to these Push Button switches which are then internally
processed by PLC and then there is the output terminal which activates the corresponding relay
to energize the relevant magnetic contactors.

Configure forward and reverse wiring of the motor with contactors such that forward
contactor is connected directly in the normal direct phasing of the motor terminal and reverse
contactor is connected with two of the motor terminals in the opposite phase. When it is
DR.NYAN PHYO AUNG  42
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

switched to reverse direction, forward rotation does not stop instantaneously hence we have to
determine what time it takes to completely stop one particular direction. Then provide time
delay of a second or two and activate the other contactor.

PLC Program

Here is PLC program to Drive Motor in Forward and Reverse Direction, along with program
explanation and run time test cases.

List of Inputs and Outputs

I:1/0 = Forward Start (Input)

I:1/1 = Reverse Start (Input)

I:1/2 = Stop (Input)

O:2/14 = Latched coil 1 for forward direction (Output)

O:2/0 & O:2/1 = Forward Contactor (Output)

T4:1 = Delay before forward direction (Timer)

O:2/15 = Latched coil 2 for reverse direction (Output)

O:2/2 & O:2/3 = Reverse Contactor (Output)

T4:0 = Delay before reverse direction (Timer)

Ladder Diagram to solve this problem

DR.NYAN PHYO AUNG  43
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Problem 2 Description
Parts are moving on the conveyor from one process line to other with a constant speed.
Out of 1000 part, one part is taken out for quality check. Implement automation of this process
in PLC using Ladder Diagram programming language.
Problem Diagram

DR.NYAN PHYO AUNG  44
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Problem 2 Solution
To detect the parts, detector such as proximity switch, optical sensors or any other
sensor is used. Connect output of this detector to Input Module of PLC which sets and resets
image memory according to parts’ detection. Give this detection, as an input to Up Counter
which is incremented with each part’s detection. Set counter preset value to 1000.
Operate Solenoid for a few seconds until the part is diverted for quality check.

PLC Program
Here is PLC program to Sort Parts for Quality Control on Conveyor, along with program
explanation and run time test cases.

List of Inputs and Outputs


I:1/14 = Start (Input)
I:1/15 = Stop (Input)
I:1/0 = Detector input (Input)
B3:0/0 = Latching Coil (Bit)
O:2/0 = Conveyor Motors (Output)
O:2/1 = Solenoid to operate gate (Output)
C5:0 = Up Counter to count 1000 parts (Counter)
T4:0 = Timer to operate solenoid (Timer)
-(RES)- = Reset counter value (Timer/Counter)

DR.NYAN PHYO AUNG  45
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

LAB 5: Mixing in a Tank and Level of Parallel Tanks

Problem 1: PLC Program to Control Mixing in a Tank.

Problem 2: PLC Program to Control Level of Parallel Tanks

Objectives:

To understand the problems

To understand the TIA Portal Programming Software

To write the PLC program for the problems

Problem 1 Description
Material A and Material B are collected in a tank. These materials are mixed for a while. Mixed
product is then drained out through Outlet valve. Implement this in PLC using Ladder Logic
programming language.
Problem 1 Diagram

Diagram of a mixing tank

DR.NYAN PHYO AUNG  46
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Problem 1 Solution

 To detect level of Material A and Material B, two separate level switches are used.
 And to detect low level, one more level switch is used at the bottom of the tank.
 These give output in digital terms that is when corresponding levels are detected.
 To control level of this system, Single Acting Piston valve can be used which has two
states, either fully open or fully close.
 To control mixing, agitator is used which is connected with Motor shaft.
 Particular time delay is generate to mix the materials for a definite time.
 Control inlet valves on the basis of Level Material switches A and B.
 Outlet valve is then operated to drain the mixed product.

PLC Program 1

Here is PLC program to Control Mixing in a Tank, along with program explanation and run
time test cases.

List of Inputs and Outputs


I:1/14 = Start (Input)
I:1/15 = Stop (Input)
B3:0/0 = Master Coil Bit (Bit)
I:1/0 = Level of Material B (Input)
I:1/1 = Level of Material A (Input)
I:1/2 = Low Level Switch (detects empty tank) (Input)
O:2/0 = Inlet Valve 1 (Material A Feed) (Output)
O:2/1 = Inlet Valve 2 (Material B Feed) (Output)
O:2/2 = Agitator Motor (Mixing) (Output)
O:2/3 = Outlet Valve (Product Outlet) (Output)
T4:0 = Time to mix Materials (Timer)

DR.NYAN PHYO AUNG  47
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Ladder Diagram to control mixing in the tank

DR.NYAN PHYO AUNG  48
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Problem 2: PLC Program to Control Level of Parallel Tanks

Problem 2 Description
Two tanks are connected in parallel with a stream line. Heat and Cool the same material and
control level of both tanks. Implement this in PLC using Ladder Diagram programming
language.
Problem 2 Diagram

Problem 2 Solution

 Heater is used to heat the material and cooling water supply is used to cool down
material temperature.
 Inlet valve feeds Material to both tanks.
 One tank stores material for heating purpose and the other stores material for cooling
purpose.
 Level switches are used to detect Low level and High level in both the tanks.

DR.NYAN PHYO AUNG  49
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

 Outlet valves are installed in the bottom of both the tanks to drain products for further
process.
 Mount temperature sensors to measure temperature of both the tanks.
 Controlling of these tanks is independent of inlet flow assuming inlet flow to be
constant.

PLC Program 2

Here is PLC program to Control Level of Parallel Tanks, along with program explanation and
run time test cases.

List of Inputs and Outputs


I:1/0 = Start PB (Input)
I:1/1 = Stop PB (Input)
I:1/2 = LLST1 Low level of Tank 1 (Input)
I:1/3 = LHST1 High Level of tank 2 (Input)
I:1/4 = LLST2 Low level of Tank 2 (Input)
I:1/5 = LHST2 High level of Tank 2 (Input)
B3:0/0 = Latching bit (Bit)
O:2/0 = V2 To heating tank (Output)
O:2/1 = V4 outlet from heating tank (Output)
O:2/2 = V3 To cooling tank (Output)
O:2/3 = V5 outlet from cooling tank (Output)
N7:0 = Register to store temperature reading of heating tank (Register)
N7:1 = Register to store temperature reading of cooling tank (Register)

DR.NYAN PHYO AUNG  50
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Ladder Diagram to solve this problem 2

DR.NYAN PHYO AUNG  51
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

LAB 6: Introduction to Human Machine Interfacing (HMI) Programming

Objectives:

To understand the TIA Portal Programming Software

To understand the HMI Programming

To communicate the PLC and HMI

SIEMENS HMI Panel

Adding HMI in TIA portal

1. In the portal view, on the “Device and network” menu, select “Add new device”.

2. Select HMI as device to be added.

3. Select the TP700 Comfort panel

4. Start the “Device wizard”.

See the following figures.

DR.NYAN PHYO AUNG  52
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

5. Establish a connection to the controller.

DR.NYAN PHYO AUNG  53
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

6. Activate the “Page header” for the panel.

7. Configure the alarms as shown in the slide.

8. Define the screen navigation as shown in the slide. Name the screens as shown (i.e.: Drives,
PID and Communication).

DR.NYAN PHYO AUNG  54
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

9. Activate the system screens.

DR.NYAN PHYO AUNG  55
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING
10.
Arrange the system buttons as seen in the slide.
11. Close the wizard pressing “Finish”.

After doing these 11steps, it had added HMI into the project.

The following figures show the programming steps for HMI.

DR.NYAN PHYO AUNG  56
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

DR.NYAN PHYO AUNG  57
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

DR.NYAN PHYO AUNG  58
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

DR.NYAN PHYO AUNG  59
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

DR.NYAN PHYO AUNG  60
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

DR.NYAN PHYO AUNG  61
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

DR.NYAN PHYO AUNG  62
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

SIEMENS HMI KTP700 Basic

DR.NYAN PHYO AUNG  63
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Problem 1 Description
Material A and Material B are collected in a tank. These materials are mixed for a while. Mixed
product is then drained out through Outlet valve. Implement this in PLC using Ladder Logic
programming language.
Problem 1 Diagram

Diagram of a mixing tank

Problem 1 Solution

 To detect level of Material A and Material B, two separate level switches are used.
 And to detect low level, one more level switch is used at the bottom of the tank.
 These give output in digital terms that is when corresponding levels are detected.
 To control level of this system, Single Acting Piston valve can be used which has two
states, either fully open or fully close.
 To control mixing, agitator is used which is connected with Motor shaft.
 Particular time delay is generate to mix the materials for a definite time.

DR.NYAN PHYO AUNG  64
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

 Control inlet valves on the basis of Level Material switches A and B.


 Outlet valve is then operated to drain the mixed product.

PLC Program 1

Here is PLC program to Control Mixing in a Tank, along with program explanation and run
time test cases.

List of Inputs and Outputs


I:1/14 = Start (Input)
I:1/15 = Stop (Input)
B3:0/0 = Master Coil Bit (Bit)
I:1/0 = Level of Material B (Input)
I:1/1 = Level of Material A (Input)
I:1/2 = Low Level Switch (detects empty tank) (Input)
O:2/0 = Inlet Valve 1 (Material A Feed) (Output)
O:2/1 = Inlet Valve 2 (Material B Feed) (Output)
O:2/2 = Agitator Motor (Mixing) (Output)
O:2/3 = Outlet Valve (Product Outlet) (Output)
T4:0 = Time to mix Materials (Timer)

DR.NYAN PHYO AUNG  65
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

Ladder Diagram to control mixing in the tank

HMI programming

Draw the above figure in HMI screen.

DR.NYAN PHYO AUNG  66
 
TECHNOLOGICAL UNIVERSITY (MANDALAY)
DEPARTMENT OF ELECTRONIC ENGINEERING

LAB 7 and 8: Human Machine Interfacing (HMI) Programming

Objectives:

To understand the TIA Portal Programming Software

To understand the HMI Programming

To interface between the PLC and HMI

HMI programming

Problem 1.

Draw HMI program for problem in lab4.

Problem 2.

Draw HMI program for problem in lab5.

DR.NYAN PHYO AUNG  67
 

You might also like