A project on the control of an elevator using PLC
To design and simulate the working of an elevator
servicing a four story building To develop logic for the operation of the elevator To simulate the working of the logic in a suitable programming software like C++ To implement the hardware for the level translation of PLC to interfacing card voltage and vice versa
Process
Elevator starts off at the ground floor
Calls from various floors are taken in as input Calls answered as elevator moves up
Elevator reaches top floor
Calls answered as elevator moves down Elevator reaches ground floor Process repeats
Process Chart
Ground floor
DOWN calls answered
Calls
UP calls answered
Top floor
Modules
UP cycle
DOWN cycle
PC Implementation
Choice of C++ based on following factors
Simplicity and familiarity Modular function based approach Number comparison functions
Ease in duplicating and assigning variables
Timer functions Counting functions Logic can be scaled to PLC level Relatively easy debugging
The Code
Modules
Function based Four user defined functions
One main function
Modular Approach
Main() function
Check_call_up() Check_call_down()
Up_cycle()
Down_cycle()
Logic and Code
Header files added are as follows
#include <iostream.h> #include <stdio.h> #include <conio.h> #include <windows.h>
Global Variables defined are as follows
int cur_pos = 0; int calls[4];
Check_call_up()
Checks for up calls
void check_call_up() {
int t; for (int i=cur_pos;i<3;i++) For loop to input calls if (calls[i]==0) { cout<<"Is call pressed in floor "<<(i+1)<<" (Press 1 or 0):"; cin>>t; calls[i]=t; } }
Binary input Temporary variable t Stored in array
Check_call_down()
Similar to check_call_up()
void check_call_down() { int t; for (int i=cur_pos;i>1;i--) if (calls[i]==0) { cout<<"Is call pressed in floor "<<(i-1)<<" (Press 1 or 0):; cin>>t; calls[i]=t; } clrscr(); }
Up_cycle()
Status display messages
Movement of elevator Check for call
Door status message
Check for new calls Repeat cycle
Level Translator Circuit
Elevator interface consists of ICs of 3.5 to 5V high and
0 to 2.5V low PLCs work at a voltage level of 24V high and 0V low Step down part mainly consists of optocoupler ICs Step up part is a TTL circuit
Applications of elevator
Transport of people from floor to floor. Eliminates the
need for stairs or escalators. Carrying loads. Can be used as a scaled down and inexpensive version of a crane or lift. Control via remote location for lifting of heavy goods.
Thank You