Industrial Automation Lab Manual 2 89
Industrial Automation Lab Manual 2 89
Industrial Automation Lab Manual 2 89
(SUBJECT CODE-2021509)
LIST OF EXPERIMENTS
4. PLC programming using Relay ladder Logic for AND, OR, XOR and NOR gate.
1
Introduction /Familiarization PLC and Arduino trainer & its
instruction with PC.
APPARATUS REQUIRED:
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.
➢ 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.
Traditional ladder logic is graphical programming language. Initially programmed with simple
contacts that simulated the opening and closing relays, counters, timers, shift registers etc.
Useful for expressing the interconnection of control system algorithms and logic.
HARDWARE/SOFTWARE REQUIREMENT:
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
5
PROCEDURE: (PLC SETUP)
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.
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.
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
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
TTL serial data. The connection of these pins can be done with the equivalent pins of the ATmega8
U2
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
of Wire library.
analog Reference().
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.
void setup() {
// Initialize serial communication
Serial.begin(9600);
}
void loop() {
// Read the analog voltage from the LM35 sensor
int sensorValue = analogRead(sensorPin);
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
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
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.
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+𝑠𝐶𝑅 )
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.
𝐺(𝑠)=𝑘𝑒−𝑠𝑇2/(1+𝑠𝑇1)
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
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
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
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
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
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
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
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
******
26
EXPERIMENT NO. 3
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.
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
PROCEDURE:-
28
Table1:On/Off 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
APPARATUS REQUIRED:
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
APPARATUS REQUIRED:
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
APPARATUS REQUIRED:
THEORY:
̅. 𝑩 + 𝑨. 𝑩
𝐀 ̅=𝑪
36
PROGRAMMING:-
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
AIM OF EXPERIMENT:
APPARATUS REQUIRED:
38
THEORY:
̅. 𝑩
𝐀 ̅ + 𝑨. 𝑩 = 𝑪
PROGRAMMING:-
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
AIM :
INTRODUCTION
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.
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.
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.
▪ 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.
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.
X0
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
▪ 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 .
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.
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.
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
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.
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.
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
(i) Write and implementation of simple ladder logic program using timer
1) On delay timer
2) Off delay timer
ON DELAY TIMER
APPARATUS REQUIRED:
• Ethernet cable
• Patch chords
THEORY:
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.
CONCLUSION:
Thus the ladder logic program of ON Timer was written and implemented successfully using PLC
Software.
******
59
OFF DELAY TIMER
APPARATUS REQUIRED:
• Ethernet cable
• Patch chords
THEORY:
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
APPARATUS REQUIRED:
• 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
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
67
7. After Resetting the Counter Block
CONCLUSION:
Thus the UP Counter operation was successfully performed using PLC software
*****
68
DOWN COUNTER
APPARATUS REQUIRED:
• 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.
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
Write and implement ladder logic program to on-off the DC motor using PLC.
APPARATUS REQUIRED:
THEORY:
▪ 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:
RESULT:
Thus the ON-OFF operation of DC motor using PLC was studied successfully.
******
84
EXPERIMENT NO. 8
AIM :
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.
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.
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