Exp 1-Merged
Exp 1-Merged
Exp 1-Merged
CPU
Programming
Device /Interfacing
Module
Digital or Analog Digital or Analog
Input Module Output Modules
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.
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.
1
The CPU provides a PROFINET port for communication over a PROFINET network.
Additional modules are available for communicating over PROFIBUS, GPRS, RS485,
RS232, IEC, DNP3, and WDC networks.
Input Module
S. No Type Terminals Description
1 Digital 14 24V DC, 0.5A Sinking
2 Analog 2 0 – 10V DC, Sinking
Output Module
S. No Type Terminals Description
1 Digital 10 24V DC, 0.5A Sourcing
2 Analog 2 0-20mA DC, Sourcing
Other Specifications
S. No Type Terminals Description
1 Power Supply 1 20.4-28.8V DC
2 Memory 1 125KB (Internal)
3 Communication 2 Profinet (PN)
2
II. MicroLogix 1400 (Allen Bradley) PLC:
The Allen-Bradley MicroLogix 1400 from Rockwell Automation ensures the features
such as EtherNet/IP, online editing, and a built-in LCD, plus provides you with enhanced
features, such as: higher I/O count, faster High Speed Counter/PTO and enhanced network
capabilities.
Input Module
S. No Type Terminals Description
12 Fast, 8 Normal 24V DC, 0.5A
1 Digital 20
Sinking
2 Analog 4 0 – 10V DC, Sinking
Output Module
S. No Type Terminals Description
1 Digital 12 12 Relay, 24V DC, 0.5A Sourcing
2 Analog 2 0-10V DC, Sourcing
Other Specifications
S. No Type Terminals Description
1 Power Supply 1 20.4 - 28.8V DC
2 Memory 1 128KB (Internal)
3 1 EtherNet/IP Port
Communication
4 1 Serial Port RS232/RS485
3
IO Modules interfacing to field device
When choosing the type of input or output module for your PLC system, it is very important
to have a solid understanding of sinking and sourcing concepts. Use of these terms occurs
frequently in discussion of input or output circuits.
Isolation: The simplified circuit and the block diagram of input modules is shown in fig. input
modules perform four basic tasks in PLC system.
4
1. It sense when signal is received from the sensor on the input module.
2. It converts the input voltage into appropriate voltage level for the PLC.
3. It isolate input signal in order to prevent from fluctuation.
4. It sends the Boolean signal to the PLC.
The output module is used to interface between output load and the processor, the output
module function is similar to input module but in reverse method.
Procedure:
1. Open TIA Portal in the PC, Click, on create new project>>assign a project name.
5
2. Configure the device>>add new device>>select the controller>>S7 1200>>then
CPU>>CPU1215C DC/DC/DC>>select the part no. mentioned on the PLC
device>>select version 4.0 then click on add.
3. Expand the project tree located at the top left of the screen (2 in below image).
4. Under PLC>>open the program block>>double click on Main OB1>> here ladder
designing can be done by selecting the instruction.
5. Write the ladder logic in Main OB>>Compile the program>>and save the
project>>minimize the window.
6. Click on Simulation icon at top >> a small window of virtual PLC will be opened
then click on download icon in main window.
7. A window will be opened, click on load>>once the logic gets transferred click on
monitor icon.
8. Now it is ready to execute and verify the ladder logic. If any modification done to
main OB then repeat the step 5 and click on download.
Procedure:
1. First, connect the PLC and PC to the network through LAN.
2. Open the RS Linx application in the PC; check the connection status of PLC by click
on RS Who.
6
3. If the IP address is found in the RS Who, then open the RS Logix Micro application.
If the IP is not found then request lab technician to assign IP.
4. In RS Logix Micro>>click on new>>select the controller i.e. Micrologix1400 Series
B>>then a new window will be opened, here you can start developing the program or
logic.
5. Before downloading the program into the PLC, make sure the proper Ethernet Drive
is set.
6. For setting Ethernet drive, click on communication at top of the window then click on
system communication>>select the PLC IP>>then click on ok.
7. If the IP connection is broken, then check with the RS Linx. Repeat step 2.
Conclusion: The Overview of PLC and its parts of Siemens S7 1200 and Allen Bradley 1400
MicroLogix, IO module specifications, Field device interfacing methods, Power Supply and
need for Isolation has been analyzed.
7
Experiment – 2
2. Ladder logic programming for industrial application using timers and counters of PLC.
✓ Timers: On Delay Timer function and its programming with example,
Off Delay Timer function and its programming with example
✓ Counters: Up & Down Counter functions and its programming with example
Aim: To design the ladder logic program using Timers and Counters. Design of basic
applications and simulation using Siemens S7 PLCSIM Software and Allen Bradley RS
Logix Micro
Theory: The Timers are classified into two types they are
Off Delay Timer (TOF): The TOF timer resets output Q to OFF after a pre-set time delay.
PT (pre-set time) and ET (elapsed time) values are stored in the specified IEC_TIMER DB
data as signed double integers that represent milliseconds of time. TIME data uses the T#
identifier and can be entered as a simple time unit (T#200ms or 200) and as compound time
units like T#2s_200ms.
Procedure: Example 1:
In order to drive a DC Motor 30 seconds by a button (START and STOP) the following
ladder diagram can be used. Using On Delay Timer (TON)
8
Ladder Logic:
Example 2: To stop the machining 20sec after the main gets off. Using Off Delay Timer
(TOF)
Use the counter instructions to count internal program events and external process events.
Each counter uses a structure stored in a data block to maintain counter data. You assign the
data block when the counter instruction is placed in the editor.
• CTU is a count-up counter
• CTD is a count-down counter
• CTUD is a count-up-and-down counter
9
The CTU counter counts up by 1 when the value of parameter CU changes from 0 to 1.
1. If the value of parameter CV (current count value) is greater than or equal to the value
of parameter PV (pre-set count value), then the counter output parameter Q = 1.
2. If the value of the reset parameter R changes from 0 to 1, then the current count value
is reset to 0.
The CTD counter counts down by 1 when the value of parameter CD changes from 0 to 1.
1. If the value of parameter CV (current count value) is equal to or less than 0, the
counter output parameter Q = 1.
2. If the value of parameter LOAD changes from 0 to 1, the value at parameter PV
(preset value) is loaded to the counter as the new CV (current count value).
The CTUD counter counts up or down by 1 on the 0 to 1 transition of the count up (CU) or
count down (CD) inputs.
1. If the value of parameter CV is equal to or greater than the value of parameter PV,
then the counter output parameter QU = 1.
2. If the value of parameter CV is less than or equal to zero, then the counter output
parameter QD = 1.
3. If the value of parameter LOAD changes from 0 to 1, then the value at parameter PV
is loaded to the counter as the new CV.
4. If the value of the reset parameter R is changes from 0 to 1, the current count value is
reset to 0.
Result: Designing of ladder logic using Timers and Counter in TIA portal is done.
Use the TON instruction to delay turning on an output. The TON instruction begins to count
time base intervals when rung conditions become true. As long as rung conditions remain
true, the timer increments its accumulator until the pre-set value is reached. When the
accumulator equals the pre-set, timing stops. The accumulator is reset (0) when rung
conditions go false, regardless of whether the timer has timed out. TON timers are reset on
power cycles and mode changes.
10
Basic Ladder Logic
The accumulator is reset (0) when rung conditions go true, regardless of whether the timer is timed
out. TOF timers are reset on power cycles and mode changes.
How Counters Work: The figure below demonstrates how a counter works. The count value
must remain in the range of -32,768…+32,767. If the count value goes above +32,767, the
11
counter status overflow bit (OV) is set (1). If the count goes below -32,768, the counter status
underflow bit (UN) is set (1). A reset (RES) instruction is used to reset (0) the counter.
The CTU and CTD instructions are used to increment or decrement a counter at each false-to-true
rung transition. When the CTU rung makes a false-to-true transition, the accumulated value is
incremented by one count. The CTD instruction operates the same, except the count is decremented.
b. Accumulator - The accumulator contains the current count. The accumulator data range
is from -32768…32767.
Result: The configuration of PLC with RS Linx, RS Logic Micro programming software and
verifying a ladder logic programming is done.
12
Experiment – 3
3. Ladder Logic programming using advanced functions of PLC.
a. Scale and Normalization function
b. PID Instruction and Tuning
Aim: To study the properties of various instructions in TIA portal.
Description: Scales the normalized real parameter VALUE where (0.0 <= VALUE <= 1.0)
in the data type and value range specified by the MIN and MAX
Description: Normalizes the parameter VALUE inside the value range specified by the MIN
and MAX
Parameters: OUT = (VALUE - MIN) / (MAX - MIN), where (0.0 <= OUT <= 1.0)
Ladder Logic:
Note that if the analog input was from an analog signal module or signal board using voltage,
the MIN value for the NORM_X instruction would be -27648 instead of 0.
b) PID_Compact Instruction:
PID instruction (PID_Compact) can calculate the P, I, and D components during startup (if
configured for "pretuning"). You can also configure the instruction for "fine tuning" to allow
you to optimize the parameters. You do not need to manually determine the parameters.
Note
Execute the PID instruction at constant intervals of the sampling time (preferably in a cyclic
OB). Because the PID loop needs a certain time to respond to changes of the control value,
do not calculate the output value in every cycle. Do not execute the PID instruction in the
main program cycle OB (such as OB 1).
The PID controller uses the following formula to calculate the output value for the
PID_Compact instruction.
𝟏 𝑻𝑫 ∗ 𝒔
𝒚 = 𝑲𝒑 [(𝒃 ∗ 𝒘 − 𝒙) + (𝒘 − 𝒙) + (𝒄 ∗ 𝒘 − 𝒙)]
𝑻𝟏 ∗ 𝒔 𝒂 ∗ 𝑻𝑫 ∗ 𝒔 + 𝟏
Where
y Output value x Process value
w Setpoint value s Laplace operator
Kp Proportional gain a Derivative delay coefficient
(P component) (D component)
T1 Integral action time b Proportional action weighting
(I component) (P component)
TD Derivative action time c Derivative action weighting
(D component) (D component)
PID_Compact instruction
Ladder Logic:
PID_Compact provides a PID controller with self-tuning for automatic and manual mode.
Case Study 1
Case Study 2
The standard (IEEE 802.3) format for printing MAC addresses in human-friendly form is six
groups of two hexadecimal digits, separated by hyphens (-) or colons (:), in transmission
order, (for example, 01-23-45-67-89-ab or 01:23:45:67:89:ab).
Note: Each CPU is loaded at the factory with a permanent, unique MAC address. You cannot
change the MAC address of a CPU.
The MAC address is printed on the front, lower-left corner of the CPU. Note that you have to
lift the lower door to see the MAC address information.
Initially, the CPU has no IP address, only a factory-installed MAC address. PROFINET
communications requires that all devices be assigned a unique IP address.
Communication: The CPU can communicate with other CPUs, with programming devices,
with HMI devices, and with non-Siemens devices using standard TCP communications
protocols.
Ethernet switching
The PROFINET port on the CPU 1211C, 1212C, and 1214C does not contain an Ethernet
switching device. A direct connection between a programming device or HMI and a CPU
does not require an Ethernet switch. However, a network with more than two CPUs or HMI
devices requires an Ethernet switch.
The CPU 1215C does have a 2-port Ethernet switch built into it. You can have a network
with a CPU 1215C and two other S7-1200 CPUs. You can also use the rack-mounted
CSM1277 4-port Ethernet switch or basic Ethernet switch for connecting multiple CPUs and
HMI devices.
S7 communication
GET and PUT instructions
You can use the GET and PUT instructions to communicate with S7 CPUs through
PROFINET and PROFIBUS connections:
Use the GET instruction to read data from a remote S7 CPU. The
remote CPU can be in either RUN or STOP mode. STEP 7
automatically creates the DB when you insert the instruction.
Apparatus Required:
1. VLPS-011
2. PC with TIA Portal Software
3. S7 1200 PLC
4. Patch Chords
5. Loop cable
Block Diagram:
Connections:
Procedure: (for Transmitter Characteristics)
1. Electrical and pneumatic connection should be given as per above fig. shown.
2. Interfacing connection should be given as per a fig.1 shown.
3. Air Pressure regulator input should be more than 25 psi and maintain the air regulator
output pressure (G2) to 20 psi by varying the air regulator knob.
4. Switch ON the VLPS-011 and S7 1200 unit.
5. Open “TIA Portal” software in PC and create a project
6. Design the ladder logic using PID_Compact instruction and configure it in manual mode
7. Compile the program, download and click on monitor in TIA portal, Enter manual value
to open the valve.
8. Now, the control valve is in open condition and switch ON the water circulating
Pump and fully close the process tank outlet valve (HV2) and partially open HV3.
9. The process tank level increases. Note down the current reading and digital
equivalent value in TIA portal for every 5 cm rise in water level, upto the maximum
level of the measuring Level transmitter, Switch OFF the pump,
10. Now, gradually open the hand valve (HV2). The process tank level will decrease
corresponding current and digital reading also noted.
11. Plot the graph between the process tank level (cm) & Level Transmitter current
output (mA) along x, y axis respectively
Ladder Logic Program:
PID_Compact Function:
0
5
10
-
-
70
Results: Interfaced Level Process Station to PLC (Siemens S7 1200) and controlled.
Experiment – 6
Flow Process Station: The Flow Process Station is truly versatile and highly reliable standard
PLC based flow process Controller. The Flow Process Station has flow sensor (Orifice and
Differential Pressure Transmitter-DPTR) for sensing and Data Acquisition through PLC
controlling. Flow controller is a module for analyzing and controlling the flow in pipe line. Liquid
is made to flow through the pipe line from reservoir tank and can be measured and controlled.
Block Diagram
Connections:
Procedure:
1. Ensure the availability of required air pressure from compressor.
2. Interface the PLC with Process.
3. Maintain Gauge (G1) pressure at 100 psi and Gauge (G2) pressure at 20 psi by
using air regulator knob.
4. Patch CO & PV terminals through Patch chords.
5. Open the TIA Portal in PC, create project for flow process control.
6. Connect the flow transmitter (FT) signal to input terminal of analog module in PLC
similarly the control output (CO) signal from PLC through analog output module terminal
to I to P converter of flow process station.
7. Switch ON the PLC.
8. Download the program from PC to PLC, open the monitor and observe the process by
varying the setpoints.
9. Enter the PID parameters in logic and observe the responses.
10. Save the response and conclude the behavior of flow process.
Observation:
S. No Parameters Values
1 Kp – Proportional
2 Ki – Integral
3 Kd - Derivative
Result: Thus, the performance of PID controller on flow process using PLC was studied.
Experiment – 7
Pressure Process Station: The Pressure Process Station is truly versatile and highly reliable
standard PLC based Pressure process Controller. The Pressure Process Analyzer has Pressure
sensor for sensing and Data Acquisition through PLC controlling. Pressure controller is a module
for analyzing and controlling the Air Pressure in pipe line. Air is made to flow through the pipe
line from compressor and can be measured and controlled.
Block Diagram
Connections:
Procedure:
1. Ensure the availability of required air pressure from compressor.
2. Interface the PLC with Process.
3. Maintain Gauge (G1) pressure at 100 psi and Gauge (G2) pressure at 20 psi by
using air regulator knob.
4. Position the Hand valve HV1, HV2, HV5, HV6 fully open & HV3, HV4
should be partially open.
5. Patch CO & PV terminals through Patch chords.
6. Open the TIA Portal in PC, Create project for pressure process control.
7. Connect the pressure transmitter (PT) signal to input terminal of analog module in PLC
similarly the control output (CO) signal from PLC through analog output module terminal
to I to P converter of pressure process station.
8. Switch ON the PLC.
9. Download the program from PC to PLC, open the monitor and observe the process by
varying the setpoints.
10. Enter the PID parameters and observe the responses.
11. Save the response and conclude the behavior of pressure process.
Observation:
S. No Parameters Values
1 Kp – Proportional
2 Ki – Integral
3 Kd - Derivative
Result: Thus, the performance of PID controller on Pressure process using PLC was studied.
Experiment – 8
Aim: To Interface Remote Terminal Unit (Siemens IM151-3PN) to PLC (Siemens S7 1200) and
design its programming.
An RTU monitors the field digital and analog parameters and transmits data to the Central
Monitoring Station. It contains setup software to connect data input streams to data output
streams, define communication protocols, and troubleshoot installation problems.
Procedure:
1. Create a project in TIA portal by configuring the device (PLC S7 1200) with proper CPU
and part no.
2. Design the ladder logic application by placing the instructions given in TIA portal.
3. Before, assigning the address for instructions first we need to check the availability of IO
terminals in the given hardware, for that we need to analyse both PLC and RTU IO
modules and its address range.
4. Once the address range is known then we can assign the proper address for the instruction
in TIA portal and then compile the program.
5. Once the application is designed in TIA portal, now we need to add a new device to the
existing project i.e. IM151-3PN Distributed IO module (RTU).
6. Select the device properly with part no. and add to the project.
7. Later we need to add the IO modules which are connected physically to the IM151-3PN
remote station.
8. After adding IO module into the project then check the connections i.e. networking
topology in the TIA Portal. The hardware and virtual connection topology both must
match.
9. Now, compile the hardware. If any errors, then check the step 7 and 8.
10. Now download the program into the target PLC.
11. Click on load, check start all then click on monitor option and verify the logic.
Result: The interfacing of Remote Terminal Unit (Siemens IM151-3PN) to PLC (Siemens S7
1200) and its programming is done.
Experiment – 9
Aim: To study and analyze the importance of Supervisory Control and Data Acquisition (SCADA)
in industries and its application.
Theory: Supervisory Control and Data Acquisition (SCADA) is a control system architecture
that uses computers, networked data communications and graphical user interfaces for high-level
process supervisory management but uses other peripheral devices such as programmable logic
controllers and discrete PID controllers to interface to the process plant or machinery. The operator
interfaces which enable monitoring and the issuing of process commands, such as controller set
point changes, are handled through the SCADA supervisory computer system.
About Siemens Simatic WinCC: SIMATIC WinCC is a supervisory control and data acquisition
(SCADA) and Human-Machine Interface (HMI) system from Siemens. SIMATIC WinCC can be
used in combination with Siemens controllers. WinCC is written for the Microsoft Windows
operating system. It uses Microsoft SQL Server for logging and comes with a VBScript and ANSI
C application programming interface.
Procedure:
Result: The designing of SCADA screen, tag assigning, its programming and interfacing with PLC
is done and verified.
Experiment – 13
Aim: To interface Siemens Human Machine Interface (HMI - Modal: KTP600) to PLC (Siemens
S7 1200) and its programming.
The integration of a human machine interface (HMI) and programmable logic controller (PLC)
provides a best automation solution. A powerful method to boost efficiencies in production
processes.
Procedure:
1. First, we need to create a project in TIA portal by configuring the device (PLC S7 1200)
with proper CPU and part no.
2. Design the ladder logic application by placing the instructions with proper address and tag
names in TIA portal.
3. Compile the program.
4. Now, add a new device "HMI KTP 600" into the project.
5. Configure the device, by selecting the properties of HMI.
6. Once the HMI is added into the project, expand the HMI module.
7. Create HMI Screen by inserting the objects.
8. Assign tags to each object from PLC tag table.
9. Check the network topology, IP address, connections of PLC and HMI etc.
10. Select the PLC project and download into PLC, similarly
11. Select the HMI project and download into HMI module KTP600. (before download HMI
device must be in transfer mode)
12. Verify the logic from HMI module directly.
Results: The interfacing of Siemens HMI (KTP600) to PLC (Siemens S7 1200) and its
programming is done and verified.
Experiment – 14
14. PLC based RPM control of 3-Phase Induction Motor using VFD
Aim: To control the speed of 3- Phase induction motor using Variable Frequency Drive (VFD) of
Siemens (SINAMIC G120C Drive) interfaced to PLC (Siemens S7 1200) and its programming.
A Variable Frequency Drive (VFD) is a type of motor controller that drives an electric
motor by varying the frequency and voltage supplied to the electric motor. Other names for a VFD
are variable speed drive, adjustable speed drive, adjustable frequency drive, AC drive,
microdrive, and inverter.
Procedure:
1. First, we need to create a project in TIA portal by configuring the device (PLC S7 1200)
with proper CPU and part no.
2. Add a new device i.e. Sinamics G120C Drive with proper part no. into the project,
configure the properties of drive according to the use.
3. Assign the IP address to the drive.
4. Go to commissioning wizard of drive in TIA Portal.
5. Enter Motor Parameters (Vrms, Arms, Power Factor, Wattage, RPM etc. in Commissioning
wizard.
6. Download the project in Drive, then open control panel
7. Activate and start the motor in forward or reverse direction with given speed from PC
8. After successful test run from PC, Now add PLC controller into project with proper CPU
and part no.
9. Connect the PLC to Drive in device configuration, check the IP address of Drive and PLC,
Names and communication topology.
10. Design the ladder logic with simple two move blocks.
a. First, block is to move command code to drive (i.e. QW256)
b. Second, block is to move speed value into drive (i.e. QW258)
11. Compile and download the program into PLC
12. Send the appropriate commands to drive from PLC to Drive to run the motor.
Observation:
Drive & Motor Specifications:
Drive Specifications : 3-Phase Induction Motor Drive, 0.75KW, 414 Volts.
Motor Specifications : 3-Phase Motor, 414 Vrms, 1.4Arms, 0.55KW, 0.75 PF,
50 Hz, 1422 RPM, Star Connected.
Make : Siemens
Results: Controlling of the speed of 3- Phase induction motor using Variable Frequency Drive
(VFD) of Siemens (SINAMIC G120C Drive) interfaced to PLC (Siemens S7 1200) and its
programming is done.
Experiment – 15
15. SCADA -PLC technology integration for multi process stations monitoring and control.
✓ Design of graphics window for multiple stations
✓ Monitoring and control of process stations using WinCC SCADA software
Aim: To interface and control of Flow and Pressure Process Station using PLC and Remote
Operation, Monitoring using SCADA.
Theory: The Flow Process Station is used to control the flow of fluid in a pipeline. The orifice with
differential pressure transmitter is used to measure the flow of fluid in a pipeline.
The Pressure process station is used to control the pressure inside the Tanks. The pressure
transmitter is used to measure pressure inside the tank. Both the processes are standalone, and these
stations are being controlled and monitored using PLC and SCADA.
Procedure:
1. Check pneumatic supply to both the process stations.
2. The flow station and its reservoir tank must be filled with water.
3. Identify the Input (Transmitter) and Output (Control Valve) signals from these stations.
4. These signals are connected to the PLC Analog IO module terminals.
5. Identify the logical address of PLC Analog IO module terminal for programming.
6. Once the interfacing of process station to PLC is done, open the programming environment
(i.e. TIA Portal Project). Download the program into the controller.
7. Open WinCC Explorer Project (i.e. SCADA), make sure that it is connected to TIA portal
with proper IP configuration.
8. Start both the process station by switching on the power button.
9. Start “Monitor” in TIA Portal and WinCC Runtime in SCADA.
10. Observe the process dynamics by changing the PID parameters in TIA portal as well as
observe the process response during runtime.
Result: The interfacing and controlling of Flow and Pressure Process Station using PLC and
Remote Operation and Monitoring using SCADA is done.