Snuifhuis Posted December 14, 2012 Posted December 14, 2012 Hello, I've made an elevator with a frame motor, I programmed it with the title "Goup" and "Godown" so when I type it, the whole thing goes up and down, and it works. It goes 41 blocks into the sky. When I did this a couple times, the elevator suddenly stops half way. I try to move it up with 0 IOX!, 1 IOX!, 2 IOX! but it will only go down and not up. My battery box is full, nothing is obscuring it. I have no clue why it doesn't work anymore. Anyone?
Mercalyn Posted December 15, 2012 Posted December 15, 2012 Did it ever fully work? Or is 41 blocks halfway? Also, what did you program 0, 1 and 2 IOX! to do? Sounds like whatever is looping isn't going all the way. Your code must look something like this? (If using redpower control): 41 0 DO 1 IOX! 16 TICKS LOOP
Snuifhuis Posted December 15, 2012 Author Posted December 15, 2012 It worked a couple times all the way up and down, but then it just stops working! The 0 is for like resetting and 1 is for white/orange and 2 is for white/ orange, and with orange and white I mean the cables connected to the frame motors. My program looks like this: 0 IOX! 10 TICKS 1 IOX! 10 TICKS 0 IOX! 10 TICKS 1 IOX! 10 TICKS And this 22 times, 0 and 1 for every block. And btw, im using an IOPS thing, connected to an CPU and Hard Drive, and that connected to a monitor. But I'll try your code soon, thanks already!
Mercalyn Posted December 17, 2012 Posted December 17, 2012 Yeah you should definitely use a loop. And I forgot that you need to reset, so in that case do this: 41 0 DO 0 IOX! 16 TICKS 1 IOX! 16 TICKS LOOP A couple of things: -replace the 41 in 41 0 DO with however many iterations you want. So if the elevator goes up 210 times, it would be 210 0 DO -16 ticks is .8 seconds, and .8 seconds is the miminum cycle I've found for frame motors. The reason it only goes up halfway/arbitrary amount in your code is because 10 TICKS is sometimes too fast for your client / server. If it happens with the provided code, make it higher(20 TICKS, etc)
Snuifhuis Posted December 17, 2012 Author Posted December 17, 2012 Very clear explanation, and it works!! Thank you very much!! Is there any option that I can give you kudo's for? :)
Mercalyn Posted December 17, 2012 Posted December 17, 2012 I don't think so, but thanks for your appreciation :D
Snuifhuis Posted December 17, 2012 Author Posted December 17, 2012 Hehe, and thank you for the awesome explanation! :D
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now