Lift Controller

download Lift Controller

of 7

Transcript of Lift Controller

  • 8/13/2019 Lift Controller

    1/7

    LIFT CONTROLLERSubmitted by

    Sandesh.N.S,

    1st Mtech, CEDT,

    S.R.NO 461!"1!41!##4$.

    %&'b(em) Design a lift controller for 2 lifts with the following

    specifications.

    1. If one goes up the other goes down.

    *. Call a lift.

    #. Select to stop at a floor.

    4. Open time for the door.

    ". Emergency exit.

    +LOC DI-R-M OF T/E LIFT CONTROLLER)

    Ca((012)3

    C'unt01#)3

    Se(ect012)3

    C'unt0*#)3

    Ca((0*2)3

    M'de01

    Se(ect0*2)3

    M'de0*

    Eme&ency0e5it01 Oen01

    Eme&ency0e5it0* Oen0*

    C('c7

    Sta&t01

    Reset

    Sta&t0*

    LIFT

    CONTROLLER

  • 8/13/2019 Lift Controller

    2/7

    De8inin the inut sina(s) Separate call and select buttons are used for

    each lift. Each floor has has two call buttons , which is specific for each lift.

    ift!" responds only to select!" and call!" buttons and the same assumption

    is made for lift!2 also. #ut the mo$ements of the lifts is restricted by the fact

    that both ha$e to mo$e in the opposite direction.%ere it is assumed that there

    are "& floors in the building. %ence to represent each floor we re'uire ( bits.

    De8inin the 'utut sina(s)

    C'unt ) )sed to indicate the position of the lift i.e the floor number.

    M'de ) *his is used to indicate the direction of the lifts.

    1 + Indicates the lift is mo$ing up.

    + Indicates the lift is mo$ing down.Oen-

    1+ Indicates that the door is open.

    + Indicates the door is closed.

    Sta&t ) *his signal maes the lift mo$e from its current position or stop the

    lift at a floor.

    1 9: /o$e the lift

    9: Stop the lift.

    -&'ach used in desinin the c'nt&'((e& ) 0s the specification demands

    that both the lifts should mo$e in the opposite direction, the logic

    implemented uses toggling of the modes of the 2 lifts. *o mae this more

    clear let us see an e5am(e .

    0ssume that both the lifts are starting from the ground floor. One lift is

    assigned mode up and the other mode down.

    /ode down /ode up

    1nd floor 1nd floor

    ift!2 ift!"

  • 8/13/2019 Lift Controller

    3/7

    ets say that a person from thfloor calls the lift!" . 0fter some time another

    person calls lift!2 from the "st floor before the lift!" reaches the th floor.

    3ow lift!2 cannot go up as lift!" is already mo$ing up. Only when the

    lift!" comes to idle state4i.e it has no more calls from the floors abo$e it5

    lift!2 can go up in response to the caller at "stfloor.

    0t this point the modes of the 2 lifts ha$e to be changed.

    1nd floor thfloor

    0fter the modes of the lifts ha$e been changed lift!2 can go to the first

    floor.

    "st floor thfloor

    -ssumti'ns made-

    ". *o chec whether a lift has reached a particular floor or not, a position

    sensor is used. *his can be simulated by generating an interrupt when a lift

    reaches a particular floor. *o generate the interrupt it is assumed that the

    time the lift taes to tra$el between two successi$e floors is a constantonce the lift starts mo$ing.

    2. 6hen the lift reaches a particular floor an open signal is asserted high to

    open the door. If the lift has no more callers the door remains open,

    otherwise the door closes after a fixed amount of time. *he lift can mo$e

    only when the door is closed.

    ift!2 ift!"

    ift!2 ift!"

  • 8/13/2019 Lift Controller

    4/7

    Inte&na( b('c7 dia&am '8 the (i8t c'nt&'((e&)

    &eset0se(012)3 se(012)3 &eset0se(012)3

    &eset0ca((2)3 ca(012)3 &eset0ca((012)3

    se(ect012)3 c'unt01#)3 'en01

    ca((012)3 int&01 'en0id(e1

    d''&0c('sed01 id(e0st1'en01

    ca(0se(01 sta&t01

    m'de01 ca(0se(0* cen01cen01

    m'de01

    c(7 &eset

    c(7 &eset

    &eset0se(0*2)3 ca(0se(0# m'de0*

    &eset0ca((0*2)3 ca(0se(04 cen0*

    se(ect0*2)3 int&0* sta&t0*

    ca((0*2)3 d''&0c('sed0* 'en0*

    'en0* sel!247-&5 'en0id(e*

    m'de0* cal!247-&5 id(e0st*

    cen0* c'unt0*2)3 &eset0se(0*2)3

    &eset0ca((0*2)3

    c(7 &eset

    c(7 &eset

    L'ic F'&

    ene&atin

    c'nt&'( sina(s

    F'& FSM01 FSM01

    L'ic F'&

    ene&atin

    c'nt&'( sina(s

    F'& FSM0*FSM0*

  • 8/13/2019 Lift Controller

    5/7

    Desc&iti'n '8 the inte&na( c'nt&'( sina(s used)

    M'de01,M'de0*) *his signal indicates whether the lift is mo$ing up or

    down for the 2 lifts.

    Int&01,Int&0*- 1enerates an interrupt when the lift reaches a particular

    floor.

    Se(01,Se(0*,Ca(01,Ca(0*- *hese are the flip flop outputs for the call and

    select switches.

    Ca(0se(01,Ca(0se(0#- 0 high on this signal indicates that there is a re'uest

    for the lift from the floors abo$e the current floor .*he re'uest may be due to

    call or select buttons.

    Ca(0se(0*,Ca(0se(04- 0 high on this signal indicates that there is a re'uest

    for the lift from the floors below the current floor. *he re'uest may be due to

    call or select buttons .

    Reset0se( -6hen a lift reaches a particular floor this signal goes high after

    the lift has ser$iced the select re'uest. *his resets the select flipflop for that

    floor .*his ascertains that any re'uest coming after that is recogni8ed by the

    lift.

    Reset0ca(( -6hen a lift reaches a particular floor this signal goes high after

    the lift has ser$iced the call re'uest. *his resets the call flipflop for that

    floor .*his ascertains that any re'uest coming after that is recogni8ed by the

    lift.

    D''&0c('sed) 1oes high when the door is closed.

    Oen,Oen0id(e) *he open signal goes high when the lift stops at a

    intermediate floor and has to further ser$ice re'uests, whereas the the

    open!idle signal goes high when the lift stops at a particular floor and hasno more re'uests.*hese to separate signals are needed as the logic to to close

    the door at these two states are different.

    Cen- *his enables the counter when the lift starts mo$ing to eep trac of

    the current position of the lift.

  • 8/13/2019 Lift Controller

    6/7

    State machine 8'& the (i8t c'nt&'((e&) *he state machine for one of the lift

    is shown below. *he state machine for the other lift is similar e5cetthat

    u'n &eset the initia( state is m'de d';n.

    &eset

    if tog!2+"

    M'de9d';n M'de9u

    If cal!sel!2+" If tog!"+" If cal!sel!"+"

    if 99 99 if em!exit+" door!closed+" door!closed+" em !exit +"

    If4 sel4cnt5 or If4 sel4cnt5 or

    Cal4cnt5 5 +" If cal!sel!"+" cal4cnt5 5 +"

    intr!"+" 9 door!closed+" 9

    If cal!sel!2+" 9 intr!"+" if

    if door!closed +" cal!sel!"+&

    cal!sel!2+&

    Desc&iti'n '8 the states)*he important part of the state diagram is thetoggling of the modes between idle!" and idle!2 states.*he lift can change

    states only in these states.

    Id(e0*Id(e01

    M'

  • 8/13/2019 Lift Controller

    7/7

    M'de u

    Id(e1 ) %ere the lift is waiting for a re'uest from the floors abo$e the current

    floor.)pon a re'uest it waits for the door to be closed and it goes to the

    mo$ing state. If there is no re'uest and the other lift has a re'uest from the

    floors abo$e then it goes to the idle!2 state where the mode of the lift is

    down. *his is re'uired as the 2 lifts must operate in opposite modes. *he lift

    can also go to idle!2 state when there is a re'uest from the floors below the

    current floor, wherin the lift has to change the direction .It can start mo$ing

    down only when the other lift is not mo$ing downwards and is in the idle

    state.

    M'