You are on page 1of 54

PID CONTROL AND

COMMUNICATION IN
SIEMENS PLC

PLC PROGRAMMING (DAY1)


5 MARCH 2022 PART 1
1. What is PLC

A programmable logic controller (PLC), also referred to as


a programmable controller, is the name given to a type of
computer commonly used in commercial and industrial control
applications. PLCs differ from office computers in the types of
tasks that they perform and the hardware and software they
require to perform these tasks. While the specific applications
vary widely, all PLCs monitor inputs and other variable values,
make decisions based on a stored program, and control outputs
to automate a process or machine.
Blok Diagram

The basic elements of a PLC include


input modules or points, a central
processing unit (CPU), output modules or points, and
and a programming device.
PLC follows the standard of IEC 61131-2 (https://plcopen.org/iec-61131-2). So the devices
meeting above criteria can only be called PLCs, that are specifically designed for industries to work
in real time, bear harsh environments and capable to control processes efficiently.

.
Advantages

Some of the additional advantages of PLCs are as follows:


• Smaller physical size than hard-wire solutions.
• Easier and faster to make changes.
• PLCs have integrated diagnostics and override functions.
• Diagnostics are centrally available.
• Applications can be immediately documented.
• Applications can be duplicated faster and less expensively.
How It Work

The scan cycle provides consistent logic through


the execution of the user program for a given
cycle and prevents the flickering of physical
output points that might change state multiple
times in the process image output area. Each
scan cycle includes writing the outputs, reading
the inputs, executing the user program instructions,
and performing system maintenance or background
processing.Under default conditions, all digital and
Analog I/O points use an internal memory area called
the "process image" to update the I/O synchronously
with the scan cycle. The process image contains a snapshot of the physical
inputs ("I memory") and outputs ("Q memory") on the CPU, signal board, and signal modules.
2. Digital Input Device
Digital(Discrete) inputs are binary inputs (0 or 1) that are
applied to the PLC. Binary inputs are basically voltages,
varying from 5V to 230V depending upon the type of card
used. In simple words, any push-button, switches or
sensors produces digital inputs to a PLC. Digital inputs
are used to check the status of any devices whether it is
ON or OFF. For an Input module of 24Vdc, 0Vdc acts as
OFF state (Binary 0) and 24Vdc acts as ON state (Binary1).
3. Digital Output Device
Digital(Discrete) outputs are binary outputs (0 or 1) from
the PLC.It is a processed control output from the PLC to
the field. It is used to ON or OFF any piece of field
equipment. DO is like a contact of a relay when the
preprogrammed conditions are satisfied the contacts are
closed. DO can be used to operate solenoid valves,
relays, indicating lamps or as a command to any other
devices.
4. Analog Input Device
Analog input is a continuous input from the field to the
PLC. Unlike digital signals, is not a constant voltage
signal. It can vary depending on the field conditions.
The commonly used analogue signals are 4-20mA signal
and 0-10Vdc Signal. Depending on the field conditions
the input signal can vary between 4-20mA or 0-10Vdc.
5. Analog Output Device
Analogue output is a continuous output from PLC to the
field devices. For example, if you have a variable frequency
drive and you want to give a speed reference signal to it you
can use analogue output. Otherwise, if you are measuring
the pressure using analogue input as explained above and
you would like to display it on an analogue meter you can
use an analogue output of PLC.
6. Tipe-tipe PLC

Compact:- I/O number fixed.


.
Modular: I/O can be as per selection.
7. Sinking-Sourcing
8. Wiring Diagram
Wiring Diagram
Wiring Diagram
Wiring Diagram
PID CONTROL AND
COMMUNICATION IN
SIEMENS PLC

PLC PROGRAMMING (DAY1)


5 MARCH 2022 PART 2
1. Menentukan Tipe PLC
berdasarkan:
- Cost (efisiensi)
- Pengaplikasian
- Technology

Menggunakan:
- Siemens Support
- Tia Portal
Siemens Support
Tia Portal
2. Data Types
Data Types
3. Create New Project
Fill the project Description
Create
Configure Device
Add new device, choose your PLC
Add
Start Simulation
Start search then loaded
4. (Down)Load your program
(Down)Load your program
Go OnLine your program by clicked “Go Online” button
5. Case programming
Case programming

- Case 1: B1 pressed then L2 energized


- Case 2: B2 pressed then L1 & L3 energized
- Case 3: B1 & B2 pressed then L1 & L2 & L3 energized
- Case 4: B1 & B2 pressed then L1 & L2 & L3 energized , when Bstop pressed
then L1 & L2 & L3 de-energized
PID CONTROL AND
COMMUNICATION IN
SIEMENS PLC

PLC PROGRAMMING
(DAY 1) 5 MARCH 2022 PART 3
1. P_Trig (Scan RLO for positive signal edge)
N_Trig (Scan RLO for negative signal edge)
2. Set Reset
3. Interlock – Self Holding
4. Counter Operation
5. Timer Operation
6. CMP Operation
7. Math Operation
8. Move Operation
9. Shift Operation
10. Scaling
11. IO Table
12. Case programming 1

Imagine a Conveyor System and Write the PLC Program


1. When START button pressed
2. Motor will be started
3. RUN (Green Lamp) indication lamp will be activated
4. Motor Running, so Box will start Move
5. Proximity Sensor will detect when the box arrives at other end
6. Motor will be stopped
7. RUN (Green Lamp) indication lamp will be de-activated
8. STOP (Red Lamp) indication lamp will be activated
9. An Emergency Stop push button will be used to stop the motor at any time.
13. Case programming 2

Imagine a Conveyor System


Objects are moving on the conveyor. We need to count the total number of objects collected
at the end of conveyor and display it on the local control panel. Write PLC program for this
application.

You might also like