3-level elevator program for a lift

General discussion on mikroBasic PRO for PIC.
Post Reply
Author
Message
absthi
Posts: 1
Joined: 17 Jul 2022 14:37

3-level elevator program for a lift

#1 Post by absthi » 17 Jul 2022 19:11

Hello, I have a c language project on controlling a three level elevator, but I'm very weak in programming. Can you help me ?

Here is the topic:

The implemented system is an elevator responsible for moving people in an apartment building. This system is controlled by a microcontroller.

the elevator can move between three levels (1st, 2nd, 3rd) and the floor push buttons are respectively E1, E2, E3.

The presence of the elevator at each level is detected by sensors (P1, P2 and P3).

The ascent (KM) and descent (KD) of the lift cabin are ensured by a motor with two directions of rotation.

The opening of the cabin door (Kmo) and the closing of the cabin door (KmF) are ensured by another motor with two directions of rotation.

The car door is controlled by two sensors (A=door open; B=door closed). At the beginning the cabin is on floor 3, the P3 sensor is activated and the cabin door is open.

An impulse on push button E2 closes the car and lowers the elevator (KD is activated) to the second floor (2nd), the sensor (P2) is active and the car door opens .

An impulse on push button E1 closes the car and the lift goes down (KD is activated) to the first floor (1st), the sensor (P1) is active and the car door opens.

An impulse on push button E3 causes the car to close and the lift to rise (KM is activated) to the third floor (3rd), the sensor (P3) is active and the car door opens .

Thus a new cycle can be restarted by simplifying again on the push button.

Nomenclature and address of inputs and outputs

E1: 1st stage push button (RB1)

KM: mounted contactor (RD2)

E2: 2nd floor push button (RB2)

Kmo: cabin opening contactor (RD3)

E3: 3rd floor push button (RB3)

KmF: car closing contactor (RD4)

P1: 1st stage sensor (stage 1) (RB4)

A: open door sensor (RB7)

P2: 2nd stage sensor (stage 2) (RB5)

B: closed door sensor (RB0)

P3: 3rd stage sensor (stage 3) (RB6)

KD: descent contactor (RD1)

Questions :

1-Propose a Program in Micro C with pic 16f877a

2-Propose a diagram on PROTEUS (for the sensor use the LOGICSTAT, for the Motor use the LEDS,

for push buttons use SW-SPST MOM.

pv31
Posts: 20
Joined: 28 Feb 2015 00:44
Location: Dnep

Re: 3-level elevator program for a lift

#2 Post by pv31 » 18 Jul 2022 23:55

We're talking more about BASIC here.
C is in a neighboring forum.

Post Reply

Return to “mikroBasic PRO for PIC General”