Page 1 of 1

Elevator knowing to go up/down twice

Posted: Fri Jul 29, 2011 2:13 am
by monkeyman611
So I'm working on a 4 floor elevator but I ran into a problem. In some cases, the elevator will need to go up or down twice, but how will it know to do that?
I.E. :
The elevator is on Floor 1, you are on Floor 2.
You call it to your floor, then you request to go to Floor 3.

I know that I'll need a repeater at the top, but how is it going to know when to use the repeater? I'm fairly new to redstone, but I get it enough to do complexish things

Re: Elevator knowing to go up/down twice

Posted: Fri Jul 29, 2011 2:37 am
by blazeboy91
I had an idea on this, which is untested. At each floor there is a corresponding button to each floor. Each button is hooked up to its place in a central hub. The buttons are attached to rs nor latches. the output from those is connected to an and gate. The original button also starts the elevator. A detector block at each floor is hooked up to a corresponding and gate. When the and gate gets a positive output then that goes to a rs-nor latch. Which will then turn off the elevator. That is the only way i have thought of making a working elevator go on multiple floors. That was the hard way.

A simple way which i have just thought of is having a button going to a rs nor latch. That would go to a set of repeaters which is timed so when a person makes it to the floor, the charge would turn the elevator off. Then it would also have button that would reset all the rs nor latches. (there is an rs nor latch for each floor). This is much less hard then the originally way. And all the repeater outputs go to either a piece of redstone that acts as a junction, or to the pulley itself. Explanation: The rs-nor latch is for the output to be permanent until reset by the button at each floor, or timed if you are really good.

In Conclusion:
I know this is a bunch of techno babble. I barely understand it myself but it does make sense. I hope all good luck to you.

Edit : The hard way is more reliable. The easy way will rely on the computer speed. So if this is gonna be used alot, use the hard way. That is all.

Re: Elevator knowing to go up/down twice

Posted: Fri Jul 29, 2011 4:21 am
by Fracture
Easiest way: Buttons for each floor, each button has two outputs. One output goes to one of two paths, "floor higher than" or "floor lower than" which leads to an RS NOR Latch. The output of that latch goes to the gearbox to determine direction. This button's output also functions as the "reset" function for the RS NOR latches for all the floors.

The other output goes to the RS NOR latch that's dedicated to whichever floor that button leads to, and sets it.

When a floor's latch is set, it triggers a BD (extends piston+block, whatever) that connects a circuit leading from that floor's detector to the pulley brakes.

If you check out the thread "12-Floor Elevator" that's exactly the system I used, albeit with a redstone mod as using normal redstone for 12 floors of that would have been totally insane. 4 floors should be manageable though. Just make sure the signal to set the floor's latch is at least 2 ticks slower than the one to reset, otherwise no brakes will ever engage.

Re: Elevator knowing to go up/down twice

Posted: Fri Jul 29, 2011 7:40 pm
by monkeyman611
Ok thanks guys :) I ran into another problem that I didn't think would be a problem, but how do you stop an elevator going up? Do you just make it go past the floor then back down as quick as you can?

Re: Elevator knowing to go up/down twice

Posted: Fri Jul 29, 2011 8:44 pm
by sargunv
monkeyman611 wrote:Ok thanks guys :) I ran into another problem that I didn't think would be a problem, but how do you stop an elevator going up? Do you just make it go past the floor then back down as quick as you can?
Redstone current to the pulley.

Re: Elevator knowing to go up/down twice

Posted: Fri Jul 29, 2011 8:58 pm
by monkeyman611
sargunster wrote:Redstone current to the pulley.
Yeah but that makes it go down instead of stopping it... What I'm thinking the only way is, is to make it go up, piston comes out below, then apply redstone to the pulley. The problem is you can notice it going up then down. I'm wondering if there's a more efficient way of doing this besides just working through timing it?

Re: Elevator knowing to go up/down twice

Posted: Fri Jul 29, 2011 9:19 pm
by Conscript Gary
No, that's if you power the gearbox (turning it off). Redstone current to the pulley itself acts as a brake.

Re: Elevator knowing to go up/down twice

Posted: Fri Jul 29, 2011 9:59 pm
by monkeyman611
Oh wow now I feel stupid :P Thanks everyone for your help :) I'll hopefully be down by the end of the weekend. This is my biggest redstone project so far, but I have so many ideas of projects I can do with this mod!