Industrial Automation Lab Manual 2 89

Download as pdf or txt
Download as pdf or txt
You are on page 1of 88

INDUSTRIAL AUTOMATION LAB

(SUBJECT CODE-2021509)

LIST OF EXPERIMENTS

1. Develop a data acquisition system using Arduino.

2. Temperature control system using PID.

3. Level control system based on error feedback.

4. PLC programming using Relay ladder Logic for AND, OR, XOR and NOR gate.

5. PLC, RLL programming using CASCADE method.

6. PLC timer, counter, registers and analog input/output functions.

7. Variable Speed drive of an induction motor.

8. PLC /microcontroller-based computer numerical control machine job completion.

1
Introduction /Familiarization PLC and Arduino trainer & its
instruction with PC.

AIM OF THE EXPERIMENT:


Introduction /Familiarization PLC trainer , Arduino kit & its instruction with PC.

APPARATUS REQUIRED:

Sl. no. Name of Equipment


1 Programmable Logic
Controller (PLC) kit and
Arduino uno kit
2 Personal Computer

THEORY:

What is PLC?

A programmable logic controller (PLC) is an industrial computer control system that continuously
monitors the state of input device and makes decisions based upon a custom program to control the
state of output devices.

What is inside a PLC?

➢ The central processing unit, the CPU, contains an internal program that tells the PLC how
to perform the following functions.
➢ 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 input 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 input and changes the outputs according to the logic of your
user program, which can include Boolean logic, counting, timing, complex math
operations and communication with other intelligent devices.
➢ To communicate with a programming device, the CPU provides a built in PROFINET
2
port.
➢ With the PROFINET network, the CPU can communicate with HMI panels or another
CPU.

➢ To provide security for your application, every S7-1200 CPU provides password
protection that allows you to configure access to the CPU functions.

3
➢ The CPU supports only a preformatted SIMATIC memory card. To insert a memory
card, open the top CPU door and insert the memory card in the slot.
➢ Use the optional SIMATIC memory card either as a program card or as a transfer card.
➢ Digital inputs in the controller are 14 and voltage is 24. Digital outputs in the
controller are 10 and voltage is 24.
➢ Back panel is available to connect extra I/O modules and communication modules.
➢ Analog input in the controller is two.
➢ Input power supply to the controller is 120/240 VAC.
➢ Three communication modules and eight I/O expansion modules can be used.
➢ Modbus communication board, output board and analog input board can be used.

PLC Languages:

The function of all programming languages is to allow the user to communicate with
the programmable controller via a programming device. They all convey to the system,
by means of instructions, a basic control plan.

➢ The most common types of languages encountered in programmable controller


system design is ;
a) Ladder Diagram (LD)
b) Function Block Diagram (FBD)

LADDER DIAGRAM (LD)

Traditional ladder logic is graphical programming language. Initially programmed with simple
contacts that simulated the opening and closing relays, counters, timers, shift registers etc.

FUNCTION BLOCK DIAGRAM (FBD)

Useful for expressing the interconnection of control system algorithms and logic.

HARDWARE/SOFTWARE REQUIREMENT:

Processor type - Intel Pentium i3, 2.5 GHZ or

similar RAM - 4GB

Available hard disk space - 10 GB on system drive C:

Operating systems- windows XP professional SP3, windows 2003 server R2 SP2, windows 7
(professional, enterprise, ultimate) SP1, windows 10 pro

4
Graphics card - 32MB RAM 24-bit color depth

Screen resolution - 1024 x 768

Network – 20 M bit/s Ethernet or faster

Optical drive- DVD-ROM

5
PROCEDURE: (PLC SETUP)

1. First select TIA portal 14.0 and double click on it.


2. Double click on “Create new project” then select the “Project name” and select
the location path to save project and then click “Create”.

3. Double click on “Configure a device”.


4. Click “Add new device”. After device is added click “Controller” and then
click on “SIMATIC S71200”.
5. Click on “CPU” and “CPU 1214 DC/DC/DC”, then select the required “MLFB”
number and click “Add”.
6. Now select the signal module AQ1x12 BIT and Add to the CPU and save the
project by pressing CTRL+S key.
7. The select respective expansion module 3 no’s of DI 16/DQ 16x24VDC, 1 no.
of DI 8/DQ8 x 24 VDC and 1 no. of AI 4 x 13 BIT/AQ 2 x 14 BIT from the
hardware catalogue.
8. Double click on the “RJ 45” symbol in the controller, now “Properties” of the
controller will be open and Ethernet configuration also open, if it is not opened just
click on the Ethernet address and change IP address and change IP address as
required then save the project.
9. Then go to “Downloading the program” setting for click on the “Compile” icon
and then click on the “Download” icon.
10. Then automatically the “Extended to download device” window open. Select the
“PN/IE” into the type of the “PG/PC” interface and also select the “Show all
compatible devices”. Finally click the “Start search” option and then click the
“Load” button.
11. In software synchronization before loading to a device window in opens and then clicks
the “Continue without synchronization” option below.

6
12. “Stop modules”, “Stop all” option and then “Load” option and then load option
and also goes to “Load results” window tick the “Start all” and click the “Finish”
option.

PROGRAMMING METHOD IN PLC:

1. Click “PLC-1” in the project tree then click “Program block” and click “main OB1”.
Now OB1 is created (object block1).
2. Now select the network and double click on “normally open” icon (⊣⊢).
3. Now normally open is added. Now add the “output coil” (‒ ( ) ‒) in the network.
Then double click on the both NO contact and output coil to enter their addresses
simultaneously.
4. After it click on the “Compile” icon then “Download to device” icon.
5. For make an online process goes to click the “Monitoring on/off” icon. Then the
window shows the online mode of the PLC.

ARDUINO
Introduction :

The Arduino UNO R3 is frequently used microcontroller board in the family of an Arduino. The main
advantage of this board is if we make a mistake we can change the microcontroller on the board. The
main
features of this board mainly include, it is available in DIP (dual-inline-package), detachable and
ATmega328 microcontroller. The programming of this board can easily be loaded by using an Arduino
computer program. This board has huge support from the Arduino community, which will make a very
simple way to start working in embedded electronics, and many more applications.

Arduino Uno R3 Specifications


The Arduino Uno R3 board includes the following specifications.

• It is an ATmega328P based Microcontroller


• The Operating Voltage of the Arduino is 5V
• The recommended input voltage ranges from 7V to 12V
• The i/p voltage (limit) is 6V to 20V
• Digital input and output pins-14
• Digital input & output pins (PWM)-6
• Analog i/p pins are 6
• DC Current for each I/O Pin is 20 mA
• DC Current used for 3.3V Pin is 50 mA
• Flash Memory -32 KB, and 0.5 KB memory is used by the boot loader

7
• SRAM is 2 KB
• EEPROM is 1 KB
• The speed of the CLK is 16 MHz
• In Built LED
• Length and width of the Arduino are 68.6 mm X 53.4 mm

Arduino Uno R3 Pin Diagram


The Arduino Uno R3 pin diagram is shown below. It comprises 14-digit I/O pins. From these pins,
6-pins can be utilized like PWM outputs. This board includes 14 digital input/output pins, Analog
inputs-6,
a USB connection, quartz crystal-16 MHz, a power jack, a USB connection, resonator-16Mhz, a
power
jack, an ICSP header an RST button.

Power Supply
power supply of the Arduino can be done with the help of an exterior power supply otherwise USB
connection. The exterior power supply (6 to 20 volts) mainly includes a battery or an AC to DC
adapter.
The connection of an adapter can be done by plugging a center-positive plug (2.1mm) into the power
jack
8
on the board. The battery terminals can be placed in the pins of Vin as well as GND. The power pins
of an
Arduino board include the following.
Vin: The input voltage or Vin to the Arduino while it is using an exterior power supply opposite to
volts
from the connection of USB or else RPS (regulated power supply). By using this pin, one can supply
the
voltage.
5Volts: The RPS can be used to give the power supply to the microcontroller as well as components
which are used on the Arduino board. This can approach from the input voltage through a regulator.
3V3: A 3.3 supply voltage can be generated with the onboard regulator, and the highest draw current
will be 50 mA.
GND: GND (ground) pins
Memory
The memory of an ATmega328 microcontroller includes 32 KB and 0.5 KB memory is utilized for the

Boot loader), and also it includes SRAM-2 KB as well as EEPROM-1KB.

Input and Output


We know that an arguing Uno R3 includes 14-digital pins which can be used as an input otherwise
output
by
using the functions like pin Mode (), digital Read(), and digital Write(). These pins can operate with
5V,
and
every digital pin can give or receive 20mA, & includes a 20k to 50k ohm pull up resistor. The
maximum
current on any pin is 40mA which cannot surpass for avoiding the microcontroller from the damage.
Additionally, some of the pins of an Arduino include specific functions.
Serial Pins
The serial pins of an Arduino board are TX (1) and RX (0) pins and these pins can be used to transfer
the

TTL serial data. The connection of these pins can be done with the equivalent pins of the ATmega8
U2

USB to TTL chip.

External Interrupt Pins


The external interrupt pins of the board are 2 & 3, and these pins can be arranged to activate an interrupt
on

rising otherwise falling edge, a low-value otherwise a modify in value

PWM Pins
9
The PWM pins of an Arduino are 3, 5, 6, 9, 10, & 11, and gives an output of an 8-bit PWM with the

function analog Write ().

SPI (Serial Peripheral Interface) Pins


The SPI pins are 10, 11, 12, 13 namely SS, MOSI, MISO, SCK, and these will maintain
the SPI communication with the help of the SPI library.
LED Pin
An arguing board is inbuilt with a LED using digital pin-13. Whenever the digital pin is high, the LED
will glow otherwise it will not glow.
TWI (2-Wire Interface) Pins
The TWI pins are SDA or A4, & SCL or A5, which can support the communication of TWI with the
help

of Wire library.

AREF (Analog Reference) Pin


An analog reference pin is the reference voltage to the inputs of an analog i/ps using the function like

analog Reference().

Reset (RST) Pin


This pin brings a low line for resetting the microcontroller, and it is very useful for using an RST
button

toward shields which can block the one over the Arduino R3 board.

Communication
The communication protocols of an Arduino Uno include SPI, I2C, and UART serial
communication.
UART
An Arduino Uno uses the two functions like the transmitter digital pin1 and the receiver digital pin0.
These pins are mainly used in UART TTL serial communication.
I2C
An Arduino UNO board employs SDA pin otherwise A4 pin & A5 pin otherwise SCL pin is used
for I2C communication with wire library. In this, both the SCL and SDA are CLK signal and data
signal.
SPI Pins
The SPI communication includes MOSI, MISO, and SCK.

MOSI (Pin11)
This is the master out slave in the pin, used to transmit the data to the devices

MISO (Pin12)
This pin is a serial CLK, and the CLK pulse will synchronize the transmission of which is produced
by the
10
master.

SCK (Pin13)
The CLK pulse synchronizes data transmission that is generated by the master. Equivalent pins with
the SPI
library is employed for the communication of SPI. ICSP (in-circuit serial programming) headers can
be
utilized for programming ATmega microcontroller directly with the boot loader.
Arduino Uno R3 Programming

• The programming of an Arduino Uno R3 can be done using IDE software. The microcontroller on
the
• board will come with pre-burned by a boot loader that permits to upload fresh code without using
an
exterior hardware programmer.
• The communication of this can be done using a protocol like STK500.
• We can also upload the program in the microcontroller by avoiding the boot loader using the header
like
• the In-Circuit Serial Programming.
Arduino Uno R3 Projects

The applications of Arduino Uno mainly involves in Arduino Uno based projects which include the
following
• Visitor Alarm in Office using Arduino Uno
• Arduino Uno based Soccer Robot
• Arduino Uno based Automatic Medication Reminder
• Motion Detecting with Static Electricity
• Arduino Uno based Taxi with Digital Fare Meter
• Arduino Uno based Smart Stick
• Robot Car Controlled by Smartphone and Arduino
Arduino Uno R3 Pin Diagram

The Arduino Uno R3 pin diagram is shown below. It comprises 14-digit I/O pins. From these pins,
6-pins can be utilized like PWM outputs. This board includes 14 digital input/output pins, Analog
inputs-6,
a USB connection, quartz crystal-16 MHz, a power jack, a USB connection, resonator-16Mhz, a power
jack, an ICSP header an RST button.

RESULT:
We studied introduction of PLC , Arduino and its installation with PC, hardware components, building
various
blocks and determine no. of digital inputs/outputs & analog inputs/outputs’

*****

11
EXPERIMENT NO. 1
DEVELOP A DATA ACQUISITION SYSTEM USING ARDUINO.
AIM: The aim of this experiment is to design and implement a data acquisition system using Arduino
to
measure temperature with a temperature sensor and display the results.

EQUIPMENTS/COMPONENTS REQUIRED:

Component Description
Arduino Uno board Microcontroller board
LM35 temperature sensor Precision temperature sensor
Breadboard Prototyping board for circuit connections
Jumper wires Wires for connecting components
USB cable For connecting Arduino to computer
Computer with Arduino IDE For programming Arduino

THEORY:
Temperature Sensing with LM35:
The LM35 is a precision integrated-circuit temperature sensor whose output voltage is linearly
proportional
to Celsius (Centigrade) temperature. It doesn't require any external calibration or trimming to
provide
accurate temperature readings. The sensor operates in the range of -55°C to +150°C, with an output
voltage scaling of 10 mV/°C. This linear relationship simplifies the conversion process of voltage to
temperature,
making it ideal for use with microcontrollers like Arduino.
Arduino Uno:
Arduino Uno is a microcontroller board based on the ATmega328P. It consists of digital input/output
pins, analog inputs, power pins, and communication interfaces such as UART, SPI, and I2C. The
ATmega328P contains an analog-to-digital converter (ADC), which enables it to read analog
voltages from sensors like
the LM35. Arduino Uno can be programmed using the Arduino IDE, allowing users to write code to
interact with sensors, process data, and control external devices.
12
WORKING PRINCIPLE:
Sensor Interfacing: The LM35 temperature sensor is connected to one of the analog input pins (e.g.,
A0)
of the Arduino Uno board. The sensor provides an analog voltage output proportional to the
temperature it senses.
Analog-to-Digital Conversion: The Arduino Uno reads the analog voltage from the LM35 using its
built-in ADC. The ADC converts the analog voltage into a digital value, which represents the
temperature
in the form of a 10-bit integer (0-1023).
Temperature Calculation: The digital value obtained from the ADC is then converted into
temperature
using a simple formula. Since the LM35 provides an output of 10 mV per degree Celsius, the
temperature
(in Celsius) can be calculated as follows:
Temperature (in °C) = (Analog Read Value / 1023) * 500
The factor of 500 is used to scale the analog reading to the temperature range of the LM35 (-55°C to
+150°C).
Displaying Temperature: The calculated temperature value is then displayed on the Serial Monitor
or
an LCD display connected to the Arduino Uno. This allows users to observe real-time temperature
readings.
CONCLUSION:
By combining the LM35 temperature sensor with the Arduino Uno microcontroller board, we can
develop a simple yet effective data acquisition system for temperature measurement. The linear
output of the LM35 simplifies the conversion process, while the Arduino Uno provides the necessary
interfacing and processing capabilities. This system can be utilized in various applications such as
environmental monitoring, HVAC systems, and industrial automation for accurate temperature
sensing and control.

PROCEDURE:

Step Description
Calibrate the LM35 temperature sensor if necessary according to
1. Sensor Calibration manufacturer instructions.

13
Step Description
Set up the Arduino Uno board and connect it to the computer via USB
2. Arduino Setup cable. Open the Arduino IDE.
Connect the LM35 temperature sensor to the Arduino Uno board
3. Sensor Interfacing according to the circuit diagram.
Write the Arduino sketch to read analog voltage from the LM35 and
4. Code Development convert it to temperature.
Upload the code to the Arduino board and verify temperature readings
5. Testing using the Serial Monitor or an LCD display.
6. Data Logging Modify the code to log temperature data to an external storage device
(Optional) if required.
7. Calibration Verify the accuracy of temperature readings against a known
Verification temperature source if necessary.
8. Finalization Finalize the setup and prepare for data acquisition experiments.

Below is an example code for reading temperature from an LM35 temperature sensor connected to
an
Arduino Uno board. This code will read the analog voltage from the sensor, convert it to temperature
in
Celsius, and display the temperature readings on the Serial Monitor.

// Define the analog pin to which the LM35 sensor is connected


const int sensorPin = A0;

void setup() {
// Initialize serial communication
Serial.begin(9600);
}

void loop() {
// Read the analog voltage from the LM35 sensor
int sensorValue = analogRead(sensorPin);

// Convert the analog voltage to temperature in Celsius


float temperatureC = (sensorValue / 1023.0) * 500.0;

// Print the temperature readings to the Serial Monitor


Serial.print("Temperature: ");
Serial.print(temperatureC);
Serial.println(" °C");

14
// Delay before taking the next temperature reading
delay(1000);
}
Explanation:
const int sensor Pin = A0;: Defines the analog pin (A0) to which the LM35 temperature sensor is
connected.
Serial .begin (9600);: Initializes serial communication with a baud rate of 9600 bits per second.
Analog Read (sensor Pin);: Reads the analog voltage from the LM35 sensor connected to the sensor
Pin.
float temperature C = (sensor Value / 1023.0) * 500.0;: Converts the analog voltage to temperature in
Celsius using the formula provided in the LM35 datasheet. The value 1023.0 represents the
maximum
value of the analog reading (corresponding to the maximum voltage), and 500.0 represents the
temperature scaling factor for LM35.
Serial.print () and Serial.print ln(): Prints the temperature readings to the Serial Monitor.
delay(1000);: Adds a delay of 1 second between each temperature reading to avoid rapid serial
output.
Upload this code to your Arduino Uno board using the Arduino IDE, and open the Serial Monitor to
view
the temperature readings in real-time. Adjustments may be necessary based on your specific setup
and requirements.
Graph: Insert graph here
RESULT:
The data acquisition system successfully measures temperature using the LM35 temperature sensor.
The temperature readings are displayed accurately on the Serial Monitor or an LCD display. The
system
demonstrates reliability and accuracy in temperature measurement.
CONCLUSION:
In conclusion, this experiment has demonstrated the development of a data acquisition system for
temperature measurement using Arduino and the LM35 temperature sensor. By interfacing the
sensor with Arduino, we can accurately measure temperature and display the results in real-time.
This system can be further expanded and customized for various applications requiring temperature
monitoring and control.

******
15
EXPERIMENT NO. 2

TEMPERATURE CONTROL SYSTEM USING PID.

AIM : To study the performance of various types of controllers (P, PI, PID) used to control the

temperature of an oven.

COMPONENT REQUIRED:

Component Description
Measures the temperature of the system. Common types include
Temperature Sensor thermocouples, thermistors, or RTDs.
Microcontroller or Acts as the brain of the system, reading the temperature from the sensor
PLC and calculating control signals.
Adjusts the system to maintain the desired temperature. Common types
Actuator include heaters, coolers, or fans.
PID Controller Software that implements the PID control strategy on the microcontroller
Algorithm or PLC.
Power Supply Provides stable power to the microcontroller, sensor, and actuator.
Allows interaction with the system, such as a GUI on a computer or
Interface display/buttons connected to the controller.
Optional - Display: Shows temperature, setpoint, and other information. <br> -
Components Keypad/Buttons: Input for settings.
Switches power to the actuator based on the control signal from the PID
Relay or SSR controller.
Enclosure Protects components from environmental hazards like dust or moisture.

INTRODUCTION :

System description

Temperature control is one of the most common industrial control systems that are in operation. The plant to
be

16
controlled is a specially designed oven having a short heating and cooling time. A solid state temperature
sensor

converts the absolute temperature information to a proportional electrical signal. The reference and actual

temperatures are indicated in degree c elsius on a switch selectable digital display.


The controller unit compares the reference and the measured signals to generate the error.

Fig. 1. Block diagram of the Temperature Controller

THEORY:

The first step in the analysis of control system is to derive the mathematical model of the complete
system. This would help in understanding the working of the complete

17
system.

The Plant (Oven) :


The plant to be controlled is an electric oven, the temperature of which must adjust itself in accordance
with the reference or command. This is a thermal system which basically involves transfer of heat
from one
section to another. In present case we are interested in transfer of heat from heater coil to the oven and
leakage of heat from the oven to the atmosphere. Here, a lumped parameter model is considered. For
precise analysis, a distributed parameter model must be used. Another difficulty associated with
temperature control system is that the temperature rise is produced by energy input, which is
controllable
but the temperature fall is due to heat loss, which is uncontrollable. There are three modes of heat
transfer viz. conduction, convection, radiation. Heat transfer through radiation may be neglected in the
present case since the temperatures involved are quite small.

Fig. 2. Electrical Analogy

Fig. 3. Closed loop Temperature Control System

For conductive and convective heat transfer


18
,Θ=𝛼Δ𝑇....(1)
where,
Θ = Rate of heat flow in Joule/sec.
ΔT = Temperature difference in °C
α = Constant
Under assumption of linearity, the thermal resistance is defined as,

𝑅=𝑇𝑒𝑚𝑝𝑒𝑟𝑎𝑡𝑢𝑟𝑒 𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒/ 𝑟𝑎𝑡𝑒 𝑜𝑓 ℎ𝑒𝑎𝑡 𝑓𝑙𝑜𝑤=Δ𝑇/Θ=1/𝛼.


This is analogous to electrical resistance defined by I = V/R. In a similar manner thermal capacitance
of the
mass is defined by Θ=𝐶 𝑑(Δ𝑇)//𝑑𝑇....(2)

which is analogous to the V - I relationship of a capacitor, namely I = C dV/dt. In the case of heat,
C = Rate of heat flow / Rate of temperature change.

The equation of an oven may now be written by combining the equations 1-2, implying that a part of
the
heat input is used in increasing the temperature of the oven and the rest goes out as loss. Thus

Θ=𝐶 𝑑𝑇/𝑑𝑡+(1/𝑅) 𝑇,with the initial condition T (t = 0) = Tamb.

Now, taking Laplace transform with zero initial condition,

𝑇(𝑠)/Θ(𝑠)=𝑅/(1+𝑠𝐶𝑅 )

An analogous electrical network and block diagram may be drawn as shown in fig-1, defined by the
equation
𝑑𝑉 𝐶
𝐼= C +𝑅
𝑑𝑡

The temperature rise in response to the heat input is not instantaneous. A certain amount of time is
needed
to transfer the heat by convection and conduction inside the oven. This requires a delay or
transportation
lag term, e-sT2, to be included in the transfer function, where T2 is the time lag in seconds.

The open loop transfer function of the plant is given by :

𝐺(𝑠)=𝑘𝑒−𝑠𝑇2/(1+𝑠𝑇1)

where k = DC gain of the system, T1 = Time Constant , T2 = Delay Time

19
Fig. 4. Open loop response of the oven

Controller
Basic control actions commonly used in temperature control systems are,

1) Proportional
2) Proportional-Integral
3) Proportional-Integral-Derivative
These are described below.

Proportional Controller:
Proportional controller is simply an amplifier of gain kp which amplifies the error signal and passes it
to the actuator. A typical proportional controller may have input output characteristics as shown in
Fig. 4. Such controller gives a non-zero steady state error to step input for a type-0 system. The
proportional block in the system consists of a variable gain amplifier having a maximum
value, kp max of 20.

Fig. 5. P Controller
20
Fig. 6. PID Controller

PROCEDURE

Fig. 7. Circuit diagram of experimental setup for Temperature Control System simulation

Steps to perform the simulation

1. Enter your room temperature (°C) in corresponding box under the oven. First open loop control
2. needs to be done on the plant (oven) for system identification and finding out plant open loop

transfer function. Hence connect 1-5 (blue connecting dots) and click on the 'Check
Connection' button.
21
3. 5℃ by rotating the knob beside 'S2' switch.Click on 'ON' button to switch on the unit (plant)
and
4. set the reference temperature to

5. Set P potentiometer to 0.5 which gives kp = 10 and input of 5 V to the driver .

6. Put switch 'S2 to 'MEASURE' position and 'S1 to 'RUN', click on 'Start' button of the stop
watch.

7. Click on 'Table' button to observe the room temperature , now take observation by clicking
'Table'

button after each 10 sec. until the plant temperature becomes stable (two to three temperature

values in observation table will be approximately same).

8. Click on 'Stop' to stop the stop watch.

22
Check connection Plot Table Clear

9. Click on 'Plot' button to observe temperature (°C) vs. time (sec) curve for open loop control.

Click on 'Calculation'.

10. Calculate dc gain (k) of the plant transfer function using the

Formula

( 𝑂𝑣𝑒𝑛 𝑓𝑖𝑛𝑎𝑙 𝑡𝑒𝑚𝑝𝑒𝑟𝑎𝑡𝑢𝑟𝑒 − 𝐸𝑛𝑡𝑒𝑟𝑒𝑑 𝑟𝑜𝑜𝑚 𝑡𝑒𝑚𝑝𝑒𝑟𝑎𝑡𝑢𝑟𝑒)/(𝑅𝑒𝑓𝑒𝑟𝑒𝑛𝑐𝑒 (𝑠𝑒𝑡) 𝑡𝑒𝑚𝑝𝑒𝑟𝑎𝑡


𝑢𝑟𝑒×

𝑃𝑟𝑜𝑝𝑜𝑟𝑡𝑖𝑜𝑛𝑎𝑙 𝑔𝑎𝑖𝑛 (𝑒𝑥: 0.5× 20 = 10))×0.01 ( 𝑎𝑠 𝑠𝑒𝑛𝑠𝑜𝑟 𝑔𝑎𝑖𝑛 𝑖𝑠 10 𝑚𝑉/°𝐶)

Enter dc gain value to corresponding box in 'Result block'.

11. Align the slope line (blue coloured line) with a linear segment of the open loop plot with the
help of

'Adjust slope angle', 'Adjust slope length', 'Horizontal movement' and 'Vertical movement'
buttons.

12. Click on clockwise arrow symbol on 'Adjust slope angle' button to rotate the slope line in

clockwise direction. Click on counter-clockwise arrow symbol on 'Adjust slope angle' button
to

rotate the slope line in anti clockwise direction. Click on plus symbol on 'Adjust slope length'

button to increase the length of the slope line. Click on minus symbol on 'Adjust slope length'

button to decrease the length of the slope line. Click on the arrow symbol in the left side on

'Horizontal movement' button to move the slope line to the right. Click on the arrow symbol in

the right side on 'Horizontal movement' button to move the slope line to the left. Click on the
arrow
23
symbol in the left side on 'Vertical movement' button to move the slope line to the upwards
direction.

Click on the arrow symbol in the right side on 'Vertical movement' button to move the slope
line

to the downwards direction.

Fig. 8. Calculation of time constant (T1) and delay time (T2)

13. To get the time constant (T1) and delay time (T2) observe the intersection points of slope line

with the horizontal red line (drawn from final temperature value) and x-axis as shown in fig 3.

Enter those values in corresponding boxes under 'Result block' and click on 'Submit' button to
get

the plant transfer function. Plot can be downloaded by clicking on 'Download' button.

14. Click on 'Clear' button and reset the stop watch. Switch off the unit. Wait untill the oven
temperature

reaches the room temperature.

24
15. Switch on the unit. Set the reference temperature to 60℃ now. Set P potentiometer to 0.7.
Connect

1-5, 8-9 for proportional control and click on the 'Check Connection' button. Follow the

steps 4 to 7 to observe temperature (°C) vs. time (sec) curve for proportional control. After

plotting click on 'Calculation' to calculate corresponding results (% steady state error and %

overshoot) under 'Result block'. Click on 'Clear' button and reset the stop watch. Switch off the

unit. Wait untill the oven temperature reaches the room temperature.

16. Switch on the unit. Set P potentiometer to 0.6 and I potentiometer to 0.8 now. Connect 1-5, 8-
9,

2-6 for proportional integral control and click on the 'Check Connection' button. Follow the

steps 4 to 7 to observe temperature (°C) vs. time (sec) curve for proportional integral control.

After plotting click on 'Calculation' to calculate corresponding results (% steady state error

and % overshoot) under 'Result block'.

17. Switch on the unit. Similarly, set P potentiometer to 0.8, I potentiometer to 1.0 and D
potentiometer

to 0.3 now. Connect 1-5, 8-9, 2-6, 3-7 for proportional integral derivative control and click on
the

'Check Connection' button. Follow the steps 4 to 7 to observe temperature (°C) vs. time (sec)

curve for proportional integral derivative control. After plotting click on 'Calculation' to

calculate corresponding results (% steady state error and % overshoot) under 'Result block'.
Click

on 'Clear' button and reset the stop watch. Switch off the unit. Bring back all the knobs to zero
value.

25
18. Switch on the unit. Similarly, set P potentiometer to 0.8, I potentiometer to 1.0 and D
potentiometer

to 0.3 now. Connect 1-5, 8-9, 2-6, 3-7 for proportional integral derivative control and click on
the

'Check Connection' button. Follow the steps 4 to 7 to observe temperature (°C) vs. time (sec)

curve for proportional integral derivative control. After plotting click on 'Calculation' to

calculate corresponding results (% steady state error and % overshoot) under 'Result block'.
Click on

'Clear' button and reset the stop watch. Switch off the unit. Bring back all the knobs to zero
value.

CONCLUSION:
In this experiment, we successfully designed and implemented a Temperature Control System using a PID
controller.

The system comprised essential components such as a temperature sensor, microcontroller, actuator, and
PID

controller algorithm. Through careful calibration and tuning of the PID parameters, we achieved efficient

temperature regulation within acceptable tolerances.

******

26
EXPERIMENT NO. 3

LEVEL CONTROL SYSTEM BASED ON ERROR FEEDBACK USING PID


CONTROLLER

APPARATUS REQUIRED: Level control trainer

THEORY:-

In automatic controlled process the parameters to be controlled is measured with the set
point by process controller. The difference between the measured signal and the set point
is error . the controller performs on-line calculations based on error and other setting
parameters and generates an output signal. The output signal drives the final control
elements like control valves or a damper to control the process to the set point.

A special case of proportional control is On-off control. If the proportional band of the
controller is made very low (=0) the controller output will move from one extreme
position to other for slight deviation of process value from the set point. This very
sensitive action is called On-off control because final control element is either open
(on) or close (off) i.e. operates like a switch. There are the simplest controllers.

Hysteresis is a value set in the vicinity of on-off operating point. Upper hysteresis is value
or band in which process value is allowed to operate above the set point and lower
hysteresis is valve or band in which process value is allowed to operate below the set
point.

Proportional-integral-derivative (PID) controllers

The three-mode controllers (PID) are the most common feedback controller used in
industrial control. PID controllers are used for controlling almost all process variables
like temperature, flow, level, pressure, etc. in a continuous or bath process. The output of
a PID controller is given by:
Op= b+100/pb [e+1/ti .dt+td.de/dt]
27
Where op is the output, b is the bias, pb is the proportional band in %,e is the error signal ,t is the
integral time and td is derivative time.

Selection of proportional band, integral time and derivative time to achieve desired process response
to load changes is called tuning of controller.

The method of determination of the optimum mode gains, depending on the nature and complexity of
the process is known as loop tuning. The three parameters should be selected to meet a set of defined
goals. These goals typically require a plant response with minimum steady error, insensitivity to load
disturbances and an acceptance transient response to set point changes and disturbances. In practice
the choice of proportional band, integral time and derivative time is a compromise between the set
point tracking and disturbances. If a mathematical model of the process is known, selecting the
controller parameters is relatively simple. But in many industrial applications, are liable mathematical
model is not a available or it is difficult to determine. So empirical rules are developed for PID tuning
which do not require mathematical model .A widely used set of rules is proposed by Ziegler-Nicholas
by open loop method and closed loop method.

The controllers settings are described by zeigler-nicholos are obtained from the process reaction
curve as follows

Proportional mode KP= 0.5kc

PID model KP= 0.6kc.td=TD /2, td=TC/8

Where KC is critical gain and TC is critical time period

PROCEDURE:-

• Start the setup.


• Select close loop option for the control
• Set the controller to ON-OFF/PID mode. Change the set point.
• Auto set the controller settings.
• Take the process variable (level) readings at regular intervals of 10-15 sec.
• Plot grahs with PV (level) Vs time and controller Output Vs time.

28
Table1:On/Off Controller

Table2: PID Controller

OBSERVATIONS:-
Observe that if the process value exceeds the set point and increases more than the value of upper
hysteresis, controller switches OFF the thyristor and if the process value decrases more than the set
point, thyristor switches ON. i.e. the controller operates like on-off switch.

29
DISCUSSION OF RESULT:

1. In on-off controller student may observe that if process value exceeds the set point and
increases then the value of upper hysteresis controller closes the valve and if process value
decreases than the set point and lower hysteresis, control valve opens. i.e the process
operates as on off switch.
2. In PID controller student may observe that, the transient response steady state response of
the PID controller and note that the response system response is fast.

******

30
EXPERIMENT NO. 4

PLC PROGRAMMING USING RELAY LADDER LOGIC FOR AND, OR, XOR and NOR GATE.

(i) Write and Implement a simple ladder logic program to study and verify AND gate using digital
inputs and outputs for PLC

AND – GATE OPERATION

AIM OF THE EXPERIMENT:

Test the truth table of AND gate using PLC software.

APPARATUS REQUIRED:

Sl. no. Apparatus Name

1. PLC trainer kit


2. Personal computer installed with PLC
software
3. Ethernet cable
4. Patch chords

THEORY:

1) In AND_GATE operation is used to make the multiple operations of 2 inputs. Now using A&B are 2
inputs and C is the output.
2) Now generating the following formula to create the AND gate operation is given belowA.B = C

PROGRAMMING:-

31
Truth table & Symbol of AND gate:

A B C
0 0 0
0 1 0
1 0 0
1 1 1

0 – LOW 1 - HIGH

PROCEDURE:

1. Click “PLC-1” in the project tree then click “Program block” and click
“Main OB1”. Now OB1 is created (object block1).
2. Now write an AND_GATE operation for make a 2 inputs like A and B. It is created by
using two normally open contacts. And their addresses are A(I0.0) and B(I0.1).
3. And the only one output can be used in this program that is C and their address is (Q0.0).
4. After saved the program go to online mode to click GO Online icon directly.

5. After click the online mode goes to select the Monitoring ON/OFF icon.

6. Finally the two inputs [(10.0),(10.1)] are goes to HIGH the output[Q0.0]will goes to HIGH.

CONCLUSION:

32
Thus the AND_GATE operation was studied successfully through PLC Software.

(ii) Write and Implement a simple ladder logic program to study and verify OR gate using digital
inputs and outputs for PLC

OR – GATE OPERATION

AIM OF THE EXPERIMENT:

Test the truth table of OR gate using PLC software.

APPARATUS REQUIRED:

Sl. no. Apparatus Name

1. PLC trainer kit


2. Personal computer installed with PLC
software
3. Ethernet cable
4. Patch chords

THEORY:

➢ In OR_GATE operation is used to make the addition operation of 2 inputs. Now using A&B
are 2 inputs and C is the output.
➢ Now generating the following formula to create the AND_GATE operation is given below.

A+B=C

PROGRAMMING:-

33
34
TRUTH TABLE & SYMBOL OF OR_GATE:

A B C
0 0 0
0 1 1
1 0 1
1 1 1

PROCEDURE:

1. Click PLC-1 in the project tree then click program block and then click main OB1.
2. Now the (object block 1) OB1 is created.
3. Now write an OR_GATE operation for make a 2 inputs like A and B.
4. It is created by using two normally open contacts parallel connection. And their
addresses are A (I0.0) and B (I0.1).
5. And the only one output can be used in this program that is C and their address is
(Q0.0).
6. Then save the program to press (CTRL+S) function it will be saved.
7. After saved the program go to online mode to click GO Online icon directly.
8. After click the online mode goes to select the Monitoring ON/OFF icon.
9. Finally the inputs [(I0.0), (I0.1)] are goes to HIGH the output [Q0.0] will goes to
HIGH. It can be represented in Green color indication.

CONCLUSION:

Thus the OR_GATE operation was studied successfully through PLC Software.

35
(iii) Write and Implement a simple ladder logic program to study and verify EX OR gate using
digital inputs and outputs for PLC

EX OR – GATE OPERATION

AIM OF THE EXPERIMENT:

Test the truth table of EX- OR gate using PLC software.

APPARATUS REQUIRED:

Sl. no. Apparatus Name

1. PLC trainer kit


2. Personal computer installed with PLC
software
3. Ethernet cable
4. Patch chords

THEORY:

➢ In EX-OR_GATE operation is used to make the operation of inequality functions of


inputs. Now using A,B and C is the output.
➢ Now generating the following formula to create the EX-OR_GATE operation is given
below.

̅. 𝑩 + 𝑨. 𝑩
𝐀 ̅=𝑪

36
PROGRAMMING:-

TRUTH TABLE & SYMBOL OF EX-OR_GATE:

A B C
0 0 0
0 1 1
1 0 1
1 1 0

0-LOW ; 1-HIGH

PROCEDURE:

1. Click PLC-1 in the project tree then click program block and then click main OB1.
2. Now the (object block 1) OB1 is created.
37
3. Now write an EX-OR_GATE operation for make a 2 inputs like A and B.
4. Then save the program and go to download into PLC.
5. After saved the program go to online mode to click GO Online icon directly.
6. Finally monitoring all the values of the inputs and outputs.
7. All the inputs are LOW at that time the output is LOW. The inequality functions of
Inputs are HIGH the Output is HIGH.
8. Thus the all input values are HIGH at that time the Output is HIGH.

CONCLUSION:

Thus the EX-0R_GATE operation was studied successfully through PLC Software.

(iv) Write and Implement a simple ladder logic program to study and verify EX NOR gate using
digital inputs and outputs for PLC

EX NOR – GATE OPERATION

AIM OF EXPERIMENT:

Test the truth table of EX- OR gate using PLC software.

APPARATUS REQUIRED:

Sl. no. Apparatus Name

1. PLC trainer kit


2. Personal computer installed with PLC
software
3. Ethernet cable
4. Patch chords

38
THEORY:

➢ In EXNOR_GATE operation is used to make the inverse operation of the


EXNOR_GATE values. Now using A,B and C is the output.
➢ Now generating the following formula to create the EXNOR_GATE operation is given
below.

̅. 𝑩
𝐀 ̅ + 𝑨. 𝑩 = 𝑪

PROGRAMMING:-

TRUTH TABLE & SYMBOL OF EXNOR_GATE:

A B C
0 0 1
0 1 0
1 0 0
1 1 1

0-LOW 1-HIGH

39
PROCEDURE:

1. Click PLC-1 in the project tree then click program block and then click main OB1.
2. Now the (object block 1) OB1 is created.
3. Now write an EXNOR_GATE operation for make a 2 inputs like A and B.
4. Then save the program and go to download into PLC.

40
5. After saved the program go to online mode to click GO Online icon directly.
6. Finally monitoring all the values of the inputs and outputs.
7. All the inputs are LOW at that time the output is HIGH. The inequality
functions of Inputs are HIGH the Output is HIGH.
8. Thus the all input values are HIGH at that time the Output is

HIGH.

9. CONCLUSION:

Thus the EX-N0R_GATE operation was studied successfully through PLC Software.

******

41
EXPERIMENT NO. 5

PLC, RLL PROGRAMMING USING CASCADE METHOD

AIM :

After successfully completing this laboratory, you should be able to:

▪ to convert a simple electrical ladder diagram to a PLC program.


▪ Know the difference between physical components and program components.
▪ sketch the ladder programs using the tools available in WPLSoft.
▪ Download the program to the PLC.

INTRODUCTION

PLCs are special computers designed to operate in the industrial environment


with wide ranges of ambient temperature and humidity. They have a number of
different programming languages which include Ladder logic, Mnemonic
instructions, and Sequential Function Charts. Ladder logic is the main
programming method used for PLCs. It is a graphical language which has been
developed to mimic relay logic. The decision to use the relay logic diagrams
was a strategic one. By selecting ladder logic as the main programming method,
the amount of retraining needed for engineers and tradespeople was greatly
reduced.

a software tool called Wpl runs on a personal computer allows users to sketch
the ladder diagram and then transfers its compiled code serially to the PLC.
Such a software tool is more convenient and it supports mnemonic and SFC
programming languages as well.

WPLSoft Installation and setup

Start-up your computer to Windows 95/98/2000/NT/ME/XP system.


Insert WPLSoft CD into the CD-ROM disk or download installation program
from http://www.delta.com.tw/product/em/plc/plc_main.asp
(If the installation program is downloaded from the website, it needs to be saved
in the designated directory after uncompressing, and then the installation can be
started.) Click “START”, and then click on “RUN”

42
Designate the location where WPLSoft is to be installed

The program show the dialog box explaining the WPLSoft copyright.
Please click "Next" to proceed with the installation.

Enter the user name and the organization then click “Next>” .

43
Click "Next" to comtinue or click "Change“ to install to a different folder.

44
Click “Install” to continue.

Click “Finish” to complete the installation.

45
DELTA’s PLC DVP Series has main processing units and extension units. The
main processing units offer 14-60 points and the extension units offer 8-32
points. The maximum input/output can be extended up to 128 points. It also can
be used on applications according to INPUT/OUTPUT points, power sources,
output modules, digital/analog exchanges (A/D & D/A converter). In addition,
DVP SS Series has the special modules (AD/DA/PT/TC/XA) used for
extending its functions and the maximum special modules can be extended up
to 8 units.

Delta PLC memory map


In the previous section we introduced two types of memory variables in Delta
PLCs; the input relays and the output relays. In Delta PLCs there are total of 8
memory location types as described below.

▪ Input Relays: Single bit variables and can be extended to 128 points. They are indicated with
X sequence in Octal numbering mode.

▪ Output Relays: Single bit variables and can be extended to 128 points. They are indicated with
Y sequence in Octal numbering mode.

▪ Internal Auxiliary Relays: Single bit variables. They are indicated with M sequence in
Decimal numbering mode ranging from M0 to M1279. M1000 and above are used for system
flags and special purpose auxiliary relays.
▪ Steps: Single bit variables indicated by S sequence in Decimal numbering mode ranging from
S0 to S127.

▪ Timers: Indicated by T sequence in Decimal numbering mode ranging from T0 to T127. Each
timer has a 16-bit holding register for its preset value as well as a single bit variable
representing its contact.

▪ Counters: Indicated by C sequence in Decimal numbering system. Similar to Timers, each


counter has a holding register and a single bit contact. There are 128 16-bit counters ranging
from C0 to C127 and there are 13 32-bit counters indicated as C235 to C238, C241, C242,
C244, C246, C247, C249, C251, C252,
and C254. These later counters are referred as high speed counters.

▪ Data Registers: 16-bit variables indicated by D sequence in Decimal numbering


46
mode ranging from D0 to D599 and from D1000 to D1143. D1000 and
above are special purpose registers.
▪ Index Registers: Two pointers indicated by E and F. They are D1028 and D1029
respectively.

These memory locations are reached easily using their names. However one
may reach them by means of the PLC device addresses specified by Delta. This
method is useful when these memory locations are monitored or preset at run
time by an external devise such as a personal computer. The device addresses
table of Delta PLCs is illustrated in Table 2.1. It is not a traditional memory map
where each location is byte width. However, the location size depends on the
variable type.

Table 2.1: Device address table of Delta PLCs.

Ladder logic and mnemonic programming

The instructions from a ladder diagram, mnemonic, or SFC are translated to


machine code that can be stored in the PLC memory. Each horizontal rung on
the ladder in a ladder program represents a line in the program and the entire
ladder gives complete program in “ladder language”. There are three basic
symbols used in ladder logic.

▪ The first one is NO - NC contacts : NO contact is an instruction that tells the


processor to look at a specific bit in its RAM memory. If the bit is 1, the instruction is
true. and if it is 0, the instruction is false. The determining factor in choosing which
bits in its memory to look at is the address. It could be some auxiliary bit (M), a timer
contact (T), a counter contact (C), a state bit (S), or it might be connected to an external
input (X).

X0

Normally Open Contact

NC contact plays the same role as the previous one, except that if the bit
addressed is 1, the instruction is false and if it is 0, the instruction is true.
X0

Normally Closed Contact

▪ The second symbol is output: for outputting to the output module. If the instructions
to the left on its rung have a true path to the leftmost vertical rail, then the PLC will set
the bit to which it is referenced via the address to 1. If no complete true path is available,
47
it will set the bit to 0.
Y0
Device Output

48
▪ The third symbol is special instruction boxes: Along with the basic logic instructions
addressed in the previous part, PLCs are microprocessor-based and they facilitate a
wide area of useful built in functions like timers, counters, comparators .

CNT C0 K10 Counter

Example
Let us assume that we have two inputs buttons and three output devices
connected to a PLC terminals X1, X2, Y1, Y2, and Y3 respectively. Assume
also that the PLC is loaded with the program shown in Figure 2.5.

The program has 3 rungs which are explained as follows:

Rung 1: If we push on button X1, its associated internal bit labeled X1 is logic
1 (true). Thus, when the processor executes this rung via the input instruction -
] [-, it sees the rung’s input condition as true. Therefore it puts a 1 in the output
bit Y1. This ladder program line is converted to mnemonic instruction as
LD X1
OUT
Y1

Rung 2: The processor works through the inputs from left to right, and the
output instruction sees a true condition only when it sees a true path via input
instructions to the left rail. If you push both push buttons connected to terminals
X1 and X2, then the processor sees their associated bits logic 1 and hence puts
a 1 in the output bit Y2. If none or one push button is pushed, the input
conditions to the left of the output instruction do not produce a true path. This
type of program rung is called an AND because both push buttons, X1 AND
X2, must be pushed to activate the output.
This rung is converted to mnemonic instruction
as LD X1
AND
X2
OUT
Y2

Rung 3: This type of instruction is an OR gate because there are two pathes that
will turn the output: either push button X1 OR X2 is pushed. It is implemented
in mnemonics as
LD X1
OR X2
OUT
49
Y3

FUNCTIONS ON PLCS

▪ Counters

When the operation result of instructions preceding the CNT instruction has changed from
OFF to ON, 1 is added to the count value. When the counter has counted out (count value
= set value), the state of the counter contacts are toggled. In the following example the
output Y0 is activated after entering 5 clock pulses at input

When the operation result of the instructions preceding the CNT instruction
remain on, counting is not performed. After the counter has counted out, the
count value and the status of the contact will not change until the RST
instruction is executed. A negative number cannot be used as a set value. When
the set value is 0, the same processing as for 1 is performed.
The instruction CNT uses 16-bit registers to accumulate counted values in the
valid counters domain (C0 to C127). On the other hand, the instruction DCNT
uses 32-bit registers for high speed counters.

▪ Timers

When the operation result of instructions preceding the TMR instruction are on,
the coil of timer turns on and counts up to the set value. When the timer times
out (counted value >= set value), the timer contacts are toggled. In the following
example the output Y0 is activated 3 seconds after activating the input X0.

Delta PLCs support 128 timers (T0 to T127). The timer will be reset when the
operation result of instructions preceding the TMR instruction change from ON
to OFF. Moreover, The RST instruction may be used to reset the timer values.
Timers use 16-bit registers and a negative number (-32768 to -1) cannot be set
as a set value.

▪ Other useful functions


In the User manual you will find plenty of functions that facilitate data
movement, arithmetic, comparison, and other operations similar to instructions
50
provided for traditional microprocessors.
For example, the instruction MOV K14 D0 moves the decimal value 14 to data
register D0.
Another example, the instruction CMP D7 K23 M0 compares the value of D7
with the decimal number 23. If larger M0 will be set, else if equal M1 will be
set, otherwise if smaller then M2 will be set.

Apparatus required
▪ DVP14ES00R
▪ 1x10A mcb.
▪ 230V(coil), 50Hz, 10A Relay
▪ Green and red indicator lamp.
▪ NO and NC pushbuttons.
▪ ON-OFF switch.
▪ Flexible wires.
▪ Single phase power source.
▪ Control board.

2. Procedure

Part 1 : DC motor set-reset circuit


1. Assemble the components of the control circuit on the control board and make the
required wiring and connections as shown in the following figure

SW1

SW2

SW3
PB1

PB2
N

0V/50Hz L

DVP-14ES

+24VDC

24GND
RED

GREEN

2. Make the required wiring and connections for the power circuit as shown in the
+24V

R2
Left D1 D2 R1

LSL LSR
R2

51
R1

GND
following figure
3. Starting a new project in Wpl, you will be prompt to specify the memory
capacity of the target PLC model and a title for the project as shown below.

4. Specify 4000 steps for the DVP14ES00R PLC model and write down a
suitable project title then click OK. In the Ladder diagram window sketch the
program shown below using the tools available in the common tools bar.

X4 X5
M0
Internal Relay
M0

M0
Y0
R1 Relay

M0 Green Lamp
Y3
Red Lamp
END

5. Wpl assumes by default that the target PLC is connected to the PC through
COM1. You may change this default sitting from Option / Comm. port. To
download your program, click on Communication > PLC . Select Write PLC
from the drop menu and click OK.
6. To operate the program, the PLC is placed in the RUN mode from
Communication / PLC Run.

Part 2 : DC motor reversing circuit

52
1. Starting a new project in Wpl. In the Ladder diagram window sketch a
program represents the following control circuit .

53
2. Download your program, click on Communication > PLC . Select Write
PLC from the drop menu and click OK.
3. Operate the program, the PLC is placed in the RUN mode from
Communication / PLC Run.

Part 3 : Sliding Gate system


1. Starting a new project in Wpl. In the Ladder diagram window sketch a
program represents the following control system for a sliding gate

The program should satisfy the following conditions :


54
▪ The motor should be overload protected.
▪ The gate should stop in case of pressing stop-pushbutton.
▪ In case of pressing Up-pushbutton the gate should move up to max limit(limit
switch 2) .

▪ In case of pressing Down-pushbutton the gate should move down to max


limit(limit switch 1) .
▪ In case any one passed the photocell interrupts the down state and activates the up state.
▪ The flusher lamp to be operated in the down state.
▪ Required mechanical and electrical interlocks to be used.

2. Download and operate your program .

Part 4 : Water Pump system


1. Starting a new project in Wpl. In the Ladder diagram window sketch a
program represents the following control system for a water pump

The system consists of one water pump and controlled via two float switches.
The system should satisfy the following conditions :
▪ The pump should run if and only if the well is full and the tank is empty.
▪ The pumps should be protected against :
o Phase failure.
o Changing the phase sequence.
o Under voltage.

55
▪ The pump should run after a time delay of 5 seconds.
▪ The system should be controlled by two float switches (see figure 1).

56
2. Download and operate your program

*******

57
EXPERIMENT NO. 6

PLC TIMER, COUNTER, REGISTERS AND ANALOG INPUT/OUTPUT FUNCTIONS

AIM OF THE EXPERIMENT:

(i) Write and implementation of simple ladder logic program using timer
1) On delay timer
2) Off delay timer

ON DELAY TIMER

To study the ON Delay Timer operation using PLC Software.

APPARATUS REQUIRED:

• PLC Trainer kit

• Personal Computer Installed with PLC Software

• Ethernet cable

• Patch chords
THEORY:

❖ ON Delay Timer is used to make the Delay operation in processes.

❖ It can control the inputs and outputs of the field instruments.

PROCEDURE:

1. Click PLC-1 in the project tree ''1'' then click program block ''2'' and click main OB1 ''3'' as shown in
the below image.
2. Now the (Object Block1) OB1 is created.
3. Now select the On Delay Timer goes to instructions tab and click the Basic Instructions and
select the Timer operations tab and then double click the TON block.
4. Now the call options block is displayed. Then change the data block name. And click the
automatic option finally select the ok button.
5. Now the Timer block is created in network is shown below the diagram. And also that one input and
58
one output coil is created in same network for testing the timer block.
6. The input can be connected with IN of the Timer block. Then output coil connected with Q of the
Timer block.
7. Then given the addresses for input and outputs. And finally given the preset time for the Timer

goes to double click the PT in timer block and write the values in sec.
8. Then save the program and download after that goes to online mode. And monitoring the program
can be displayed in following images.
9. Then given the addresses for input and outputs. And finally given the preset time for the Timer
goes to double click the PT in timer block and write the values in sec.
10. Then save the program and download after that goes to online mode and monitor the program.

11. When the status of the SWITCH 1(I0.0) changes from 0 to 1 the timer instruction will be executed
and it will activate the MOTOR 1(Q0.0) after 10s delay.

LADDER LOGIC PROGRAM:-

CONCLUSION:

Thus the ladder logic program of ON Timer was written and implemented successfully using PLC
Software.

******
59
OFF DELAY TIMER

AIM OF THE EXPERIMENT:

To study the OFF Delay Timer operation using PLC Software.

APPARATUS REQUIRED:

• PLC Trainer kit

• Personal Computer Installed with PLC Software

• Ethernet cable

• Patch chords
THEORY:

❖ OFF Delay Timer is used to make the Delay operation in processes.

❖ It can be control the inputs and outputs of the field instruments.

LADDER LOGIC PROGRAM:

PROCEDURE:

1. Click PLC-1 in the project tree ''1'' then click program block ''2'' and click main OB1 ''3'' as
shown in the below image
2. Now the below image shows (Object Block1) OB1 is created.
3. Now select the OFF Delay Timer goes to instructions tab and click the Basic Instructions and
select the Timer operations tab and then double click the TOF block.
4. Now the call options block is displayed. Then change the data block name. And click the
60
automatic option finally select the ok button.
5. Now the Timer block is created in network. And also that one input and one output coil is
created in same network for testing the timer block.
6. The input can be connected with IN of the Timer block. Then output coil is connected with Q of
the Timer block.
7. Then given the addresses for input and outputs. And finally given the preset time for the
Timer goes to double click the PT in timer block and write the values in seconds.
8. Then save the program and download after that goes to online mode and monitor the program.

9. When the status of the SWITCH 2(I0.1) changes from 0 to 1 the timer instruction will be
executed and it will activate the MOTOR 2(Q0.1) immediately.

10. When the SWITCH 2(I0.1) status changes back to 0 then programmed time (PT) will start and
after time MOTOR 2(Q0.1) will be OFF.

CONCLUSION:

Thus the ladder logic program of OFF Timer was written and implemented successfully using
PLC Software.

******

61
(ii) Write and implementation of simple ladder logic program using counter.

UP Counter

AIM OF THE EXPERIMENT:

To study about the UP Counter operation using PLC Software.

APPARATUS REQUIRED:

• PLC Trainer kit

• Personal Computer Installed with PLC Software

• Ethernet cable

• Patch chords
THEORY:

The counters are mainly used for counting the values from the field equipment. The UP counters
can be used to counting the values in upward manner. It can be performing the incremental purpose.

PROCEDURE:

1. Click PLC-1 in the project tree ''1'' then click program block ''2'' and click main OB1 ''3''.
2. Now the below image shows (Object Block1) OB1 is created.
3. To select the UP Counter block in plc goes to Instructions Tab and click the Basic
Instructions then select the CTU block for UP Counter operation.
4. Now the UP Counter call options block can be opened. Then change the data block name in that
Name block. And then click the ok button.
5. The following details can be entered into the UP Counter block is given below. CU

- Make the counter Input

Q- Counter Output

R - Reset input

CV - Count Value
62
PV - Preset value (Set Value)

6. Then save the program and goes to online mode and monitoring the counter values before and
after enabling the counter block.

63
LADDER LOGIC PROGRAM:-

1.

2.

64
2

65
3.

4. Now the UP Counter block is created in network is shown below the image.

66
5. Before Enabling the Counter Block

6.After Enabling the Counter Block

67
7. After Resetting the Counter Block

CONCLUSION:
Thus the UP Counter operation was successfully performed using PLC software

*****

68
DOWN COUNTER

AIM OF THE EXPERIMENT:

To study about the Down Counter operation using PLC Software.

APPARATUS REQUIRED:

• PLC Trainer kit

• Personal Computer Installed with PLC Software

• Ethernet cable

• Patch chords

THEORY:

The counters are mainly used for counting the values from the field equipment. The DOWN
Counters can be used to counting the values in down ward manner. It can be performing the
decremental purpose.

PROCEDURE:

1. Click PLC-1 in the project tree ''1'' then click program block ''2'' and click main OB1 ''3''.
2. Now the below image shows (Object Block1) OB1 is created.
3. To select the DOWN Counter block in plc goes to Instructions Tab and click the Basic
Instructions then select the CTD block for DOWN Counter operation.
4. Now the DOWN Counter call options block can be opened. Then change the data block
name in that Name block. And then click the ok button.
5. Now the DOWN Counter block is created in network.
6. The following details can be entered into the UP Counter block is given below. CD
- Make the counter Input
Q- Counter Output
LD - load Preset value (After reach the value of 0) CV
- Count Value
PV - Preset value (Set Value)
69
7. Then save the program and goes to online mode and monitoring the counter values before and
after enabling the counter block.

70
LADDER LOGIC PRGRAM

1.

2.

71
3.

4.

72
5. Before Enabling the Counter Block.

6. After Enabling the Counter Block

73
7. After Load Presetting the Counter Block

74
8.

CONCLUSION:

75
Thus the DOWN Counter operation was performed successfully using PLC software.

76
EXPERIMENT NO. 7

VARIABLE SPEED DRIVE OF AN DC MOTOR.

AIM OF THE EXPERIMENT:

Write and implement ladder logic program to on-off the DC motor using PLC.

APPARATUS REQUIRED:

Sl. no. Apparatus Name

1. Speed control module trainer (VPAT-


02)
2. PLC trainer kit
3. Personal computer installed with TIA
portal software
4. DC Motor
5. Patch chords

THEORY:

Speed Control Module:

▪ This module maintains the speed of DC motor to the set point using PLC.
▪ After giving the set point (SP) the PLC produces the analog output, this will be given to
motor.
▪ So initially the motor starts rotating at some speed.
▪ The speed of the motor is measured using Opto coupler sensor.
▪ The output of Opto coupler will be a series of pulses are converted into voltage using
frequency to voltage converter.
▪ This voltage is process variable (PV) and is applied to the analog input of PLC.
▪ In PLC program PID block reads this PV and compares the both set point (SP) and process
variable (PV), it creates error value and produces the control variable (CV) to the motor unit
through analog output.
77
▪ This controlled output will maintain the speed of AC motor at its set point (SP).
▪ Likewise it forms the closed loop control using PLC.

78
79
PLC LADDER DIAGRAM TO CONTROL MOTOR SPEED

80
81
82
Runtime Test Cases:-

83
WIRING DIAGRAM

PROCEDURE:

1. Made the connections based on wiring diagram.


2. Switch ON the PLC kit.
3. Interface the PC to PLC through Ethernet Communication Cable.
4. For configuration of software, programming follows the procedure.
5. Switch ON the DC MOTOR SPEED CONTROL kit.
6. Download and run the program to PLC.
7. Set the set point of motor speed (0-1500 rpm) i.e. 0.0 to 100.0 in PID set point block.
8. Based on set point the PID controller enables the PWM output pulses.
9. By this pulse the DC Motor starts rotating at some speed.
10. Opto coupler sensor senses the feedback of high speed ON pulses.
11. That feedback we can read from High speed counter input channel.
12. Now the PID controller compares the set point (SP) and Process (PV) (SPEED).
13. By varying the Control Output (CV) (PWM pulse) it makes the motor running at set
speed.

RESULT:

Thus the ON-OFF operation of DC motor using PLC was studied successfully.

******

84
EXPERIMENT NO. 8

PLC /MICROCONTROLLER-BASED COMPUTER NUMERICAL CONTROL

MACHINE JOB COMPLETION.

AIM :

1. To study the CNC turning machine.


2. To perform experiments on the CNC turning machine like step turning and facing
3. Cutting mechanism of the CNC machine.

INTRODUCTION :
Computer Numerical Control(CNC) is a self-contained numerical control(NC) system for a
single machine tool including a dedicated minicomputer controlled by stored instructions to
perform some or all of the basic NC functions. It is the automated control of machining tools
such as drills, lathes and mills. CNC machine is the last step in metal manufacturing, sometimes
it will be the only process involved. When compared to the other working techniques, CNC is
capable of satisfying close tolerances and gives an excellent surface finish. CNC turning is a
subtractive machining process that removes unwanted material by using a cutting tool to obtain
the desired shape. The tool moves along the rotating workpiece to create a helical path. The
term turning itself refers to produce the parts by cutting operations on the external surface.
Boring is the opposite operation to the turning for creating hollow parts. The lathe machine is
the earliest machine used to produce parts with semi-automatic version but the CNC turning is
full automated from first to last.

Computer managed numerical control (NC) is a generic term that encompasses.


1. Computer numerical control (CNC)
2. Direct numerical control (DNC)
3. Industrial robots
Steps to setup CNC turning machine are explained below:
Make sure the power is off: Extra care should be taken while operating the CNC machine.
Checking the power switch is the basis for that.
Fixing the part in the chuck: The chuck secures the part in the whole machining process. An
improper loading can lead to wrong dimensions of the finished part.
Loading the tool: Turning consist of many steps, so be sure to choose while choosing the
tools.
Calibration: Both the tool and workpiece has to be installed properly or else final product will
not meet the required

85
Fig 2.1 Ace Micromatic CNC Turnig Machine

THEORY
The most common opertaion in the manufacturing unit. A single point tools moves along the
axis of the part or workpiece to remove unwanted material. CNC turning can produce various
shapes like step, tampered etc. A very few passes are required to get the desired result. The
high precision can be attainable with the turning operation. The limits and fits are usually
choosen on a hole basis system. Reaching the close tolerances is much easier than doing the
same when drilling a hole.
Functions of CNC are described below:
1. Machine tool control: The primary function of the CNC system is control of the
machine tool. This involves conversion of the part program instructions into machine
tool motions through the computer interface and servo system. The main adavantage
of the CNC is the capability to incorporate many control features into the soft-wired
controller unit. Some of the control functions, such as circular interpolation can be
accomplished more efficiently with hard wired circuits than with the computer.
2. In process compensation: A function closely related to machine tool control is in-
process compensation. This involves the dynamic correction of the machine tool
motions for changes or errors which occur during processing. Some of the options
include:
i. Adjustment for errors sensed by gauges and probes.
ii. Re-computation of axis positions
iii. off set adjustments for tool radius and length.
iv. Adaptive control adjustments to speed or feed.
v. Computation of predicted tool life and selection of alternative tooling when
indicated.
86
3. Improved programming and operating features: The features include
i. Editing of part programs at the machine. This permits correction or optimization of
the program.
ii. Graphic display of the tool path to verify the tape.
iii. Use of specially written sub-routines
iv. manual data input
v. Local storage of more than one part program
4. Diagnostics: NC machines are complex and expensive systems. The complexity
increases the risk of component failures which lead to system down time.

Types of CNC Turning


1. CNC chucking center
2. CNC universal turning center
3. 3-Axis center machine
4. 4-Axis center machine
5. 5-Axis center machine

Advantages of CNC:
• Flexibility of operation is improved, as is the ability to produce complex shapes with
good dimensional accuracy, repeatability, reduced scrap loss, and high production
rates, Tooling costs are reduced, since templates and other fixtures are not required.
• Machine adjustments are easy to make with microcomputers More operations can be
performed with each setup, and less lead time for setup and machining is required
compared to conventional methods. Design changes are facilitated, and inventory is
reduced.
• Programs can be prepared rapidly and can be recalled at any time utilizing
microprocessors. Less paperwork is involved.
• Faster prototype production is possible.
• Required operator skill is less than that for a qualified machinist, and the operator
has more time to attend to other tasks in the work area
Applications of CNC:
The applications of CNC include both for machine tool as well as non-machine tool
areas. In the machine tool category, CNC is widely used for lathe, drill press, milling
machine, grinding unit, laser, sheet-metal press working machine, tube bending
machine etc. Highly automated machine tools such as turning center and machining
center which change the cutting tools automatically under CNC control have been
developed. In the non-machine tool category, CNC applications include welding
machines (arc and resistance), coordinate measuring machine, electronic assembly,
tape laying and filament winding machines for composites etc.

PROCEDURE
1. Click on the link in the simulator tab to perform CNC turning experiment.
2. Use right side control panel to give input data.
3. Enter spindle speed in the given space and click on start button.
4. The spindle starts revolving in the given speed.
5. Enter values to move tool towards the workpiece and then click on start button.
NOTE: Values should be in between 0-2
6. After reaching tool towards the workpiece, click on stop button of the respective direction.

87
SIMULATOR
Simulator for the Experiment:-
For detailed instructions, go to procedure to the experiment.

******

88

You might also like