Wondering if anyone can help me with a 3 step door lock

    Joined
    Jul 13, 2015
    Messages
    21
    Reaction score
    1
    Curious as to how this would be done, I have 3 Activation blocks. First one is main power, second one is lockout, and Third one is the activation block that turns whatever I need on and off. So both activation blocks 2 and 3 will not function if activation block one is off and button 3 will not function if activation block 1 is off or 2 is on. I can do that, the hard part is I need them to remember if they are off or on when it is disabled, for example I have a door open and lock it open with activation block 2, the door will stay open and any button pushes on the door activation block will bring it back to the on state so that when the door is unlocked it won't shut if someone had pushed the activation block and vice versa if it is in the close state . I also need the main power to function in reverse, it needs to be on to operate both the lock and door activation blocks or else both 2 and 3 will return to there setting when the power was shut off. Not sure if I explained it very well.
     

    Calhoun

    Part-time God
    Joined
    May 26, 2015
    Messages
    872
    Reaction score
    237
    • Purchased!
    • Legacy Citizen 3
    • Thinking Positive
    Flip flops? Maybe a picture would help in explaining.
     

    Calhoun

    Part-time God
    Joined
    May 26, 2015
    Messages
    872
    Reaction score
    237
    • Purchased!
    • Legacy Citizen 3
    • Thinking Positive
    starmade-screenshot-0000.png

    Something like this? For the button "Door" to open or close the door, the Activation Module "Lock" must be off and "Power" must be on. If that's true, then pressing the button will change the flip flop's state to either On or Off.

    It's a pretty simple circuit, Power and Door both go into an AND, along with the NOT from Lock. the AND then goes into a flip flop, which goes into a NOT.

    EDIT: Ah, I understand what you're trying to do now. It's a lot simpler if you have the Door toggle a button, would you prefer an activation module?
     
    Last edited:
    Joined
    Jul 13, 2015
    Messages
    21
    Reaction score
    1
    View attachment 33798

    Something like this? For the button "Door" to open or close the door, the Activation Module "Lock" must be off and "Power" must be on. If that's true, then pressing the button will change the flip flop's state to either On or Off.

    It's a pretty simple circuit, Power and Door both go into an AND, along with the NOT from Lock. the AND then goes into a flip flop, which goes into a NOT.

    EDIT: Ah, I understand what you're trying to do now. It's a lot simpler if you have the Door toggle a button, would you prefer an activation module?
    sorry for the late reply, I would prefer a activation for each block as a light will be toggled with them and displays. if this is possible. I tried for 2 hours and got it half way done but with a block count of like 40 blocks lol. My logic skills are ok but this seems to baffle me
     
    Joined
    Jul 30, 2013
    Messages
    398
    Reaction score
    282
    • Wired for Logic Gold
    • Legacy Citizen 8
    • Purchased!
    hi mate, tell me if this is what you want to do... 1 button for open one door in one side.. other button for open the door in other side, and one activation module for "allow" the last buttons for open the door... that is right?
     
    Joined
    Jul 13, 2015
    Messages
    21
    Reaction score
    1
    ok so, I got my logic to work, I will upload some gifs so you can see them. If you want I can upload a templet so you can see it and if you can try and make it more compact. gif-0000 is power on, lock off and door working. gif-0001 is power on, lock on door button pushed. gif-0002 is power off, lock off both door and lock buttons pushed. gif-0003 is lock on, power off, lock button push after power is off.
    [doublepost=1477356661,1477356548][/doublepost]gif-0003
     

    Attachments

    Joined
    Jul 30, 2013
    Messages
    398
    Reaction score
    282
    • Wired for Logic Gold
    • Legacy Citizen 8
    • Purchased!
    Tell me if i´m wrong:

    1º if "activation POWER" is ON and "activation LOCK" is ON then "PUSH button" can work and remain in that state (switch on/off)
    2º if "activation POWER" is ON and "activation LOCK" is OFF then "PUSH button" can work but can´t remain last state (switch on/off)
    3º if "activation POWER" is OFF then "activation LOCK" and "PUSH button" can´t work and door can´t be open / close

    this is the logic system you want build?
     
    Joined
    Jul 13, 2015
    Messages
    21
    Reaction score
    1
    Tell me if i´m wrong:

    1º if "activation POWER" is ON and "activation LOCK" is ON then "PUSH button" can work and remain in that state (switch on/off)
    2º if "activation POWER" is ON and "activation LOCK" is OFF then "PUSH button" can work but can´t remain last state (switch on/off)
    3º if "activation POWER" is OFF then "activation LOCK" and "PUSH button" can´t work and door can´t be open / close

    this is the logic system you want build?

    more like this, :):)

    1º if "activation POWER" is ON and "activation LOCK" is ON then "activation DOOR" can't work and remain in that state (switch on/off). so if "activation DOOR" is pushed the activation block returns to the same state as before.

    2º if "activation POWER" is ON and "activation LOCK" is OFF then "activation DOOR" can work and remain in that state (switch on/off) until pushed again.

    3º if "activation POWER" is OFF then "activation LOCK" and "activation DOOR" can't work, activation DOOR and activation LOCK will remain in that state (open/close and lock/unlock). so if either "activation DOOR" or "activation LOCK" are pushed then the activation block returns to the same state as before.
    [doublepost=1477432072,1477431725][/doublepost]
    more like this, :):)

    1º if "activation POWER" is ON and "activation LOCK" is ON then "activation DOOR" can't work and remain in that state (switch on/off). so if "activation DOOR" is pushed the activation block returns to the same state as before.

    2º if "activation POWER" is ON and "activation LOCK" is OFF then "activation DOOR" can work and remain in that state (switch on/off) until pushed again.

    3º if "activation POWER" is OFF then "activation LOCK" and "activation DOOR" can't work, activation DOOR and activation LOCK will remain in that state (open/close and lock/unlock). so if either "activation DOOR" or "activation LOCK" are pushed then the activation block returns to the same state as before.

    basically it is a normal door with a remote lockout, the reason for the power option is for RP, when the ships health, power, ect falls below a set amount the ship / station loses power and all controls are then locked out, I want the option for the activation blocks to return to there current states so if its lock or loses power people don't run around pushing all kinds or door buttons ect and then when power or unlock happends all the doors open or close or locks someone walks into room when it was open and unlocked and then ship lost power, someone walks by pushing both lock and open button. if the power come back online, then the door will shut and lock with said person inside. I want to avoid that if at all possible
     
    Joined
    Sep 5, 2013
    Messages
    527
    Reaction score
    109
    • Legacy Citizen 4
    • Community Content - Bronze 2
    • Purchased!
    The lock can lock the door in the open state or the closed state? So it's kind of like an elevator "hold door" button? Or are you just looking to make the door inactive when the lock is engaged? If the latter, you just need to connect the activation buttons for the door and the lock to an AND block, and have the AND connect to the door's logic.
     

    Calhoun

    Part-time God
    Joined
    May 26, 2015
    Messages
    872
    Reaction score
    237
    • Purchased!
    • Legacy Citizen 3
    • Thinking Positive
    Problem is the OP wants an activation module to control the door. So an on module is door open, and off is closed.
     
    Joined
    Jul 13, 2015
    Messages
    21
    Reaction score
    1
    KiloZulu you are correct with the hold door, and Calhoun is correct also. I want all 3 button to be activation blocks, so let say door is open, and I press door lock, the door is now locked open and even if someone pushes the door activation block I know the activation block will switch even if the rest of the circuit does not switch, but I want the door activation block to return to what ever on/off it was in before someone pushed it but after the lock was turned on, that way when I do unlock the door the switch will no cause the state to switch and close the door. I know i'm making this difficult, I'm sorry if I can't explain it better.
    [doublepost=1477448332,1477448241][/doublepost]but both the lock and door activation blocks must do the same if the power is turned off.
    [doublepost=1477448562][/doublepost]in my gif's orange light means power off, red light on mean door locked, green light means door open
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    ------ I assume these as facts: just to clarify we both know the same ------

    You cannot change a "block state" twice in the same "clock cycle".
    → Resetting "Activation Blocks" requires a "Delay Block".

    Buttons automatically reset, but you need a nearby (like beneath) light block to show the state if buttons turn always off
    → I guess that's why you prefer activation modules.


    The 3rd activation block should represent the state of the door AND ALSO be used as a conditional switch.

    ------ Solution: -----

    In this logic, I use FlipFlops for "Input" and for "State". Input is visible, State is in the background - a copy of the previously accepted state.

    (Input XOR State) AND "requirements met" => Swap State.
    (Input XOR State) AND "requirements not met" => Swap Input (swap back, reset).​

    XOR is the "exclusive OR" - think about it as "unequal", "only one of two can be true/on".