PLC Programming and Problem Solving
PLC Programming and Problem Solving
1
3
4
5
Electronics type
• Digital gates
• Limit switch, push-button,
• Relays, Transistor
• Analog switches
>
- • Potentiometer
• Sensors
• Photovoltaic, TOF range, ultrasonic
-
6
Continue
=
• Actuators
• DC motor, solenoid valve
--
• Microcontroller shields
• CPUs, MCUs, GPUs
• Telecommunication modules
• GSM, GPS
7
Analog Vs. Digital Signals
• Example: Wall switches for room light control
On/Off only
Variable
input/output
control
8
How to Control?
• Programmable Logic Controller (PLC)
• For industrial scale automation.
• Expensive and reliable,
• Easy to program and troubleshoot,
• Ready made circuits and codes
• Big memory, expandable module interfaces
9
PLC
• It is similar to a computer,
• Watch:
• https://www.youtube.com/watch?v
=PbAGl_mv5XI
• https://www.youtube.com/watch?v
=nYr8Q21nG0k
10
Arduino MCU & PCB board
11
Arduino Software
12
Pneumatic Sys. Hardware
Components:
• Air compressor
• Pneumatic Flow Control Valve (FCV)
• 2 off 5/2 Directional Control Valve (DCV), 1 off 3/2 Directional
Control Valve (DCV)
• 2 off double acting pneumatic cylinder (solenoid/solenoid) 1
off single acting pneumatics cylinder (solenoid/spring)
• 4 off limit switch & 2 off push button.
4
Hydraulic Pneumatic
Power
Applications • Lift cars using a hydraulic lift • Conveyor systems in pharmaceutical and food industries
• Hydraulic braking system in cars • Precision drills used by dentists
• Wing flaps on aircraft • Manufacturing and assembly lines
• Turbines and Dams • Elevators and train door
5
Valve actuation symbols
3
Control of a double-acting cylinder with solenoid, (a) not activated, (b) activated.
4
Overview
Input variables (I:) Output variables (O:)
Etc. Etc.
6
Understand Ladder Symbols
Counter
Rung (rail) N.O. & N.C. contacts (Preset, Accum, Reset)
3
2
Problem Solving
• Construct, test and verify a ladder diagram that can perform the motions described below using
MTK kit and Allen Bradley SLC500 PLC.
• Press “Start Button” to start the process.
• Move Piston A from point (a) to point (b)
• Move Piston A back from point (b) to point (a)
• Motion (2) and Motion (3) should be repeated five times/cycles.
• Stop Piston A,
• Press the start button to re-start the process again.
5
Solution Step 1: Wiring
1
• Notes:
• Always wire the circuit before constructing ladder program.
• Use states (B:) to simplify the logic
• Always connect switches as normally-open (NO) for safety.
• Can you guess when to use normally-closed (NC) switches?
• Notation assignment (variable:module/Bit)
2
Component Variable type (I/O/B) Module/Bit
6
Continue: Wiring diagram
7
Solution Step 2: Sequence Table
• Press “Start Button” to start the process.
• Move Piston A from point (a) to point (b)
• Move Piston A back from point (b) to point (a)
• Motion (2) and Motion (3) should be repeated five times/cycles.
• Stop Piston A,
• Press the start button to re-start the process again.
8
Solution Step 3: Construct Ladder Diagram