Computing desk | ||
---|---|---|
< July 25 | << Jun | July | Aug >> | July 27 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
Why does the lastest version of IE not support Unicode in the bottom at the status bar and in the address bar too? Firefox can display proper characters instead of escape codes! Is it because the folks at Microsoft just can't be bothered? I mean, how much effort could it possibly take to do that???
Duomillia ( talk) 01:00, 26 July 2009 (UTC)
please suggest me a wonderful book or a good tutorial or website or anything which can teach me J2EE programming and HTML thoroughly...assuming that I have a basic knowledge of C,C++,JAVA.I am in great need to learn it.pl help —Preceding unsigned comment added by 117.193.128.204 ( talk) 04:26, 26 July 2009 (UTC)
Every now and then I get sudden freezes. The computer completely locks-up. I cant move the mouse or use keyboard everything is frozen, you know what I mean. ALL i can do is restart pc. Another problem is desktop icons, start menu, images (also in internet image) gets broken into pieces and I can't see image properly. It looks like image gets scratched.
First I thought this was a cpu problem, then motherboard, then graphics card, then ram, hard drive etc. I just cant figure it out. It happens when I am on minefield, IE (latest version) firefox 3.5, when I am logging in at facebook. Even this problem persist after closing browser ! This was an issue before as well I don't know what is causing this freezes. If I play any music when I'm on browser the sound also gets crashed (screaming like carrrrr...). These are happening after upgrading my hardware. I am using XP SP 2. My processor is Core 2 Quad 9400 (which requires Vista 64 bit SP 1 though) and motherboard 750i SLI Nvidia Geforce, RAM 2 GB (800MHz), Sapphire ATI 4890 1 GB, Full tower Chassis (Tharmaltake Xaser VI). I have several XP SP 2 OS. The Current XP SP2 that I'm using, bought it 4 years ago.
How can I rectify this problem?-- 119.30.36.47 ( talk) 14:36, 26 July 2009 (UTC)
Update: I have checked the BIOS. It shows CPU temperature is 30 to 31 *C and System temperature is 40 to 41*C.-- 119.30.36.42 ( talk) 15:01, 27 July 2009 (UTC)
Ok. But is temperature from BIOS Ok or not. I should have mentioned that this freezing problem usually occurs when I am on online (after 12 pm) for 5 to 8 hours. Yesterday I run my system for 10 hours and nothing was happened. It seems that it only happens while I'm on online (I tested with all browser). I use Modem for net connection. If It's not overheating issue what else can it be? Is modem incompatible with system (which causes this freezing)? -- 119.30.36.53 ( talk) 12:15, 28 July 2009 (UTC)
I've been having a discussion with some friends and they don't believe that Windows 7 is already up on torrent sites (a full version) and I'm sure it must be. Though at the moment we're unable to access those sites ourselves. I was curious if someone could confirm whether it appears that full versions of Windows 7 are available to torrent. Of course, I wouldn't ask someone to link to them, just a confirmation that they themselves have seen it (and if you have used it, if it was for real). Thanks! 71.75.71.102 ( talk) 14:47, 26 July 2009 (UTC)
As the title suggests, I'm worried that my DS going to become unplayable and I need some links or advice if the thing is on it's last legs or not. My problem is that when turning the DS on, it will be okay for a bit, then have some odd display problems (I can see something that looks like a brownish circuit board through the screens) I took out both of the games I was playing to see if they were the problem, but they weren't, the problem persisted even with both slots empty. If I plug in the headphones, the top display stops being wonky, but the bottom screen remains odd.
Another thing about the DS is that it got fried once by getting drenched by an exploding pop bottle, but when it dried out it worked just fine for a few months. Suddenly the speakers stopped working. I didn't really care, it worked fine with headphones plugged in so I left it and enjoyed it for no problems . Two days ago, the speakers suddenly began working again. And now today I'm getting these display problems. I'm not sure if the display and speaker problems could be linked, but it might explain why the display is okay on the top screen with the headphones plugged in.
So really, all I want to know is if my DS is doomed to die and I need to start looking for a new one. The display doesn't bug me that much, so if it'll be okay how it is and not die, I won't bother replacing it. Also, I can't really send it in for repairs because I have a feeling the pop explosion a year ago is what caused it. Also this DS is an original one (Not a Lite nor a DSi) and is about 4-5 years old now, it's warranty is probably gone by now. Thank you for your time. 69.157.106.254 ( talk) 14:54, 26 July 2009 (UTC)
I'd like to get my Nephew into development, probably with an ultimate goal of working in a MS or web environment (.NET I suppose?). He's a beginner so I guess the question is what's a good starting point or general introduction. Are there any interactive tools you can buy that can take you through lessons/labs? I don't know much about development but I'd be interested in something that's more focused on doing rather than reading...he's 14 so I'm nor sure how much time he'd spend sitting around just reading. Thought? Thanks... RxS ( talk) 15:09, 26 July 2009 (UTC)
I would like to know what a parallel port programming is and how to use it in programming of microcontrollers.i.e.in robotics.Pl suggest some good ebook or website where I can get all the info on this. —Preceding unsigned comment added by Gd iitm ( talk • contribs) 16:43, 26 July 2009 (UTC)
I'm doing things like this:
> (define a 10) :ok > a :10 > (define b '(1 a 2)) :ok > b :(1 a 2) > (cadr b) :a
Basically I can't work how to make the "a" in (1 a 2) act as a variable, and by extension how to control whether it's evaluated, or left as "a" e.g. Are there commands to do stuff like this in scheme? e.g.:
> (define a 10) > (pointer a) ie the command I'm looking for :a > (dereference (cadr '(1 a 2))) the other command I'm looking for :10
?I must be conceptualising the whole language wrong I suspect? 83.100.250.79 ( talk) 19:31, 26 July 2009 (UTC)
1:=> (define a 10) a 1:=> (define b `(1 ,a 2)) ; equivalent to (define b (quasiquote (1 (unquote a) 2))) b 1:=> b (1 10 2) 1:=> (cadr b) 10
> (define a 99) > (define b `a) > b a
> (func b) 99 and not a
(define (change-a! new-value) (set! a new-value) (set-car! (cdr b) new-value))
(define a (car 1 2)) (define b a) (set-car! a 3) (car b) ; evaluates to 3
struct Number : Object { const int value; // or double or complex or ... full numeric tower };
struct Pair : Object { Object* car; Object* cdr; };
Object* a = ONE; // where ONE is a global that points to a Number with value 1 Object* b = a; a = TWO;
Object* a = new Pair(ONE, new Pair(TWO, NULL)); Object* b = a; a->cdr->car = THREE;
(set! a 20)
, it just redirects the pointer to point to another number object. Whether you can modify an object pointed depends on the type of object. There is no mechanism to modify a number object (i.e. they say it is immutable). However, there is a way to modify pair objects, with set-car! and set-cdr!. That's why you can modify a pair object and be able to see the changes through another pointer that points to the same pair object. --
Spoon! (
talk) 19:49, 27 July 2009 (UTC)Thanks for your responses - I've found something that almost does what I want :
(define a 200) (define b (lambda() a)) (b) result 200 (define a 300) (b) result 300
this always evaluates to the current value of a, which is good, but I have to bracket b to get the number, if anyone can suggest a better way, please, as I'm still working out if I can utilise this method easily. 83.100.250.79 ( talk) 15:15, 27 July 2009 (UTC)
(set! a 300)
. --
Spoon! (
talk) 19:44, 27 July 2009 (UTC)As mentioned above I was trying things like (define a 10) , (define b a) , and (cadr (1 a 3)) - now in the first two examples it treats a as a variable, whereas in the third it seems to just think a is "a" ie text. How does it decide? And does ML (mentioned above) or another language (in the family) support a more explicit of distinguishing variables and text?
I know this is very similar to sticking beans up my nose as a hobby , but if anyone end my curiousity I would thank them. :) 83.100.250.79 ( talk) 11:47, 27 July 2009 (UTC)
(define (make-ref val) (cons '*ref* val)) (define ref-get cdr) (define ref-set! set-cdr!)
(try-this-list-as-a-program '(+ 1 2) )
83.100.250.79 (
talk) 16:29, 27 July 2009 (UTC)
(eval '(+ 1 2))
(define a (lambda () '(1 2 3))) (define b (lambda () (cons 4 (cons (a) 6))))
OK thanks for your help , and your patience. I think I can call this resolved, the engine starts, and I've stopped putting sand in the tank unless somebody notices that I'm doing things the wrong way, or knows a more sophisticated solution.. In which case please say. Thanks again.
symbol-value
or any equivalent? I guess that it sort of makes sense, since it has only lexical scoping and no use of a
appears lexically in (symbol-value 'a)
. But if eval
exists (even if it's crippled by the lack of a standard current-environment
special form), it seems silly not to also provide this simplest part of what it does (resolve symbols into variables). --
Tardis (
talk) 21:49, 28 July 2009 (UTC)
I have a video-slideshow created by Photo Story 3 using the Windows Media Video 9.1 Image v2 codec. How can I extract the static images from this file? -- Me ( talk) 20:01, 26 July 2009 (UTC)
Hi there, I'm in the process of creating an app/game/sim/whatever you want to call it that emulates a lift (elevator). I've got the thing working pretty well but am stumped at getting the logic right for handling calls. (Originally asked this on the science desk but this is probably a better place to ask it.)
At the moment, there are two objects: DRUp and DRDown that both contain a variable which can be set to 0 or 1 (0=off, 1=on), this simulates a pair of switches that control the direction. The lift operates a 'mechanical' floor selector (a moving object that triggers events when it touches other objects) that makes contact with various switches to tell the lift where abouts in the shaft it is. When the top floor and bottom floor switches are triggered, it toggles the direction switches so if it's at the top floor then DRUp=0 and DRDown=1, because the lift cannot go up from the top floor! The ground floor switch does the opposite.
This works fine for going in the same direction, however if the lift car is on the ground floor and I am on the second floor and want to go to the ground floor, the lift goes all the way to the top, reverses direction and then stops at the second floor. I need a way of resetting the direction switches from other floors but ONLY if there are no further calls in the original direction.
Example: Lift on ground floor Call from 2nd floor Lift goes UP to second floor Are there any more calls going UP? If yes, continue up, if no, reverse direction.
I can probably do it a long-winded way by setting up a long and protracted if statement along the lines of:
If Floor=1 and LR2Up and LR3Up and CR2 and CR3 and CR4 = 0 then DRUp=0 and DRDown=1 (LR being landing call switches and CR being lift car call switches)
However I'm sure there must be a simpler way of doing it (probably something to do with the floor selector). I can't see how old-fashioned lifts with relay logic could evaluate complex if statements. I think from looking at old and very complex documents about electromechanical lift controllers, the floor selector has three parts on top of each other that tell it which way to go but not sure).
Anyway, if you're interested, I've put the project so far online: http://www.arthurflowers.co.uk/games/Lift2_1.exe , any comments would be good.
Thanks in advance for any information. GaryReggae (talk) 21:44, 26 July 2009 (UTC) —Preceding unsigned comment added by GaryReggae ( talk • contribs)
http://www.arthurflowers.co.uk/games/Lift2_1.exe
GaryReggae ( talk) 22:56, 26 July 2009 (UTC)
(If the power is off then the switching relays need to reset themselves.)
Elevator Logic The number of floors in the building is Nf. The following are independent on/off states. Each could be a latching relay (relay controller), a set/reset latch (logic controller with MSI chips or FPGA), or one-bit flags in memory (µP controller). - For each floor i = [1...Nf] there are 3 state bits: Cdi = Call to descend Cai = Call to ascend Di = Directed to floor Cdi and Cai are set by pushbutton call switches at each floor. Cdi and Cai illuminate their respective call button so the caller gets immediate confirmation. Di are set by pushbuttons inside the elevator and illuminate their respective buttons so riders get immediate confirmation. - For the elevator there are state bits: Kdi = Commit to descend from floor #i Kai = Commit to ascend from floor #i (Kdi AND Cdi) and (Kai AND Cai) are AND functions that illuminate arrows at the respective elevator doors. These give further confirmation to a caller that s/he will soon be served, and they show which of Cdi/Cai will be answered first when both call buttons have been pressed. A "ping" sound is given at the floor when either arrow lights. The elevator logic monitors the location of the elevator f = [1...Nf]. This can be done in various ways such as by a rotary optical encoder in the lifting gear, or interlocking microswitches at each floor. It could be done using a momentary contact switch at each floor thus: as the elevator touches each switch the controller increments or decrements a floor counter, depending on whether the elevator is ascending or descending. Floor #1 has an extra contact switch that keeps the floor counter synchronised to the actual floor numbers. Number f is displayed to riders inside the elevator. Initialisation at switch on and after a power break: All (5 x Nf) - 2* state bits reset. Bring elevator to f = 1 (ground floor) to synchronise floor counter. Self test routine (in µP) may include testing all lamps. The elevator logic executes the following. ----------------------------------------- SCAN UP CALLS Pa = 0 pending ascend flag for i = f to Nf Kai = Cai OR Di if Kai=1 and Pa=0 then fd = i destination floor Pa = 1 next i if Pa=0 goto SCAN DOWN CALLS while f<fd raise elevator (At floor fd) Open doors, Caf = 0, Kaf = 0, Df = 0 (After delay 5 seconds) Close doors. If door is blocked, open and repeat. goto SCAN UP CALLS SCAN DOWN CALLS Pd = 0 pending descend flag for i = f to 1 step -1 Kdi = Cdi OR Di if Kdi=1 and Pd=0 then fd = i destination floor Pd = 1 next i if Pd=0 goto SCAN UP CALLS while f>fd raise elevator (At floor fd) Open doors, Caf = 0, Kaf = 0, Df = 0 (After delay 5 seconds) Close doors. If door is blocked, open and repeat. goto SCAN DOWN CALLS ----------------------------------------- Notes on this simple elevator implementation: 1. When no one uses the elevator the controller alternates between SCAN UP CALLS and SCAN DOWN CALLS. That is innocous for a µP controller but would be unwelcome activity in a relay controller. 2. Calls are not served well while the elevator is in motion. It is possible for the elevator to proceed past a floor if a call to that floor was made after the elevator starts. That will distress a rider who changes their mind during travel. 3. No provision was made for soft acceleration/deceleration so the elevator speed is limited. Possible improvements which are more suitable for tall buildings: Re. 1. When Pa = Pd = 0 the elevator could be sent to an optimum rest floor, such as ground floor or a mid floor. Re. 2. Response to rider controls could be improved by scanning Di's more often than only when the elevator stops. Re. 3. Higher speed without abrupt starts/stops is possible if full speed/stop is reached only after travelling one floor. However for that strategy one cannot respond while the elevator is in motion to a new Di (in 2. above) nor commit to a new Cdi/Cai where i is closer than f +/- 1. Travel from a floor to an adjacent floor can only reach half the maximum speed. Overload, Fast Mode The elevator car should have a load sensor. - EXCESS load causes the doors to stay open, prevents elevator movement and (preferably) shows a warning to occupants. The following improvements to load sensing are possible. - FULL load corresponds to maximum number of adult occupants. Ignore floor calls and obey only occupant directions Di. This avoids serving floor calls with a full elevator that the caller cannot enter. - EMPTY load corresponds to less than the weight of a child. Move elevator at maximum speed with abrupt start and stop. *On floor #1 there is no Cd1 button nor down arrow. On floor Nf there is no CaNf button nor up arrow.
Cuddlyable3 ( talk) 21:04, 27 July 2009 (UTC)
Computing desk | ||
---|---|---|
< July 25 | << Jun | July | Aug >> | July 27 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
Why does the lastest version of IE not support Unicode in the bottom at the status bar and in the address bar too? Firefox can display proper characters instead of escape codes! Is it because the folks at Microsoft just can't be bothered? I mean, how much effort could it possibly take to do that???
Duomillia ( talk) 01:00, 26 July 2009 (UTC)
please suggest me a wonderful book or a good tutorial or website or anything which can teach me J2EE programming and HTML thoroughly...assuming that I have a basic knowledge of C,C++,JAVA.I am in great need to learn it.pl help —Preceding unsigned comment added by 117.193.128.204 ( talk) 04:26, 26 July 2009 (UTC)
Every now and then I get sudden freezes. The computer completely locks-up. I cant move the mouse or use keyboard everything is frozen, you know what I mean. ALL i can do is restart pc. Another problem is desktop icons, start menu, images (also in internet image) gets broken into pieces and I can't see image properly. It looks like image gets scratched.
First I thought this was a cpu problem, then motherboard, then graphics card, then ram, hard drive etc. I just cant figure it out. It happens when I am on minefield, IE (latest version) firefox 3.5, when I am logging in at facebook. Even this problem persist after closing browser ! This was an issue before as well I don't know what is causing this freezes. If I play any music when I'm on browser the sound also gets crashed (screaming like carrrrr...). These are happening after upgrading my hardware. I am using XP SP 2. My processor is Core 2 Quad 9400 (which requires Vista 64 bit SP 1 though) and motherboard 750i SLI Nvidia Geforce, RAM 2 GB (800MHz), Sapphire ATI 4890 1 GB, Full tower Chassis (Tharmaltake Xaser VI). I have several XP SP 2 OS. The Current XP SP2 that I'm using, bought it 4 years ago.
How can I rectify this problem?-- 119.30.36.47 ( talk) 14:36, 26 July 2009 (UTC)
Update: I have checked the BIOS. It shows CPU temperature is 30 to 31 *C and System temperature is 40 to 41*C.-- 119.30.36.42 ( talk) 15:01, 27 July 2009 (UTC)
Ok. But is temperature from BIOS Ok or not. I should have mentioned that this freezing problem usually occurs when I am on online (after 12 pm) for 5 to 8 hours. Yesterday I run my system for 10 hours and nothing was happened. It seems that it only happens while I'm on online (I tested with all browser). I use Modem for net connection. If It's not overheating issue what else can it be? Is modem incompatible with system (which causes this freezing)? -- 119.30.36.53 ( talk) 12:15, 28 July 2009 (UTC)
I've been having a discussion with some friends and they don't believe that Windows 7 is already up on torrent sites (a full version) and I'm sure it must be. Though at the moment we're unable to access those sites ourselves. I was curious if someone could confirm whether it appears that full versions of Windows 7 are available to torrent. Of course, I wouldn't ask someone to link to them, just a confirmation that they themselves have seen it (and if you have used it, if it was for real). Thanks! 71.75.71.102 ( talk) 14:47, 26 July 2009 (UTC)
As the title suggests, I'm worried that my DS going to become unplayable and I need some links or advice if the thing is on it's last legs or not. My problem is that when turning the DS on, it will be okay for a bit, then have some odd display problems (I can see something that looks like a brownish circuit board through the screens) I took out both of the games I was playing to see if they were the problem, but they weren't, the problem persisted even with both slots empty. If I plug in the headphones, the top display stops being wonky, but the bottom screen remains odd.
Another thing about the DS is that it got fried once by getting drenched by an exploding pop bottle, but when it dried out it worked just fine for a few months. Suddenly the speakers stopped working. I didn't really care, it worked fine with headphones plugged in so I left it and enjoyed it for no problems . Two days ago, the speakers suddenly began working again. And now today I'm getting these display problems. I'm not sure if the display and speaker problems could be linked, but it might explain why the display is okay on the top screen with the headphones plugged in.
So really, all I want to know is if my DS is doomed to die and I need to start looking for a new one. The display doesn't bug me that much, so if it'll be okay how it is and not die, I won't bother replacing it. Also, I can't really send it in for repairs because I have a feeling the pop explosion a year ago is what caused it. Also this DS is an original one (Not a Lite nor a DSi) and is about 4-5 years old now, it's warranty is probably gone by now. Thank you for your time. 69.157.106.254 ( talk) 14:54, 26 July 2009 (UTC)
I'd like to get my Nephew into development, probably with an ultimate goal of working in a MS or web environment (.NET I suppose?). He's a beginner so I guess the question is what's a good starting point or general introduction. Are there any interactive tools you can buy that can take you through lessons/labs? I don't know much about development but I'd be interested in something that's more focused on doing rather than reading...he's 14 so I'm nor sure how much time he'd spend sitting around just reading. Thought? Thanks... RxS ( talk) 15:09, 26 July 2009 (UTC)
I would like to know what a parallel port programming is and how to use it in programming of microcontrollers.i.e.in robotics.Pl suggest some good ebook or website where I can get all the info on this. —Preceding unsigned comment added by Gd iitm ( talk • contribs) 16:43, 26 July 2009 (UTC)
I'm doing things like this:
> (define a 10) :ok > a :10 > (define b '(1 a 2)) :ok > b :(1 a 2) > (cadr b) :a
Basically I can't work how to make the "a" in (1 a 2) act as a variable, and by extension how to control whether it's evaluated, or left as "a" e.g. Are there commands to do stuff like this in scheme? e.g.:
> (define a 10) > (pointer a) ie the command I'm looking for :a > (dereference (cadr '(1 a 2))) the other command I'm looking for :10
?I must be conceptualising the whole language wrong I suspect? 83.100.250.79 ( talk) 19:31, 26 July 2009 (UTC)
1:=> (define a 10) a 1:=> (define b `(1 ,a 2)) ; equivalent to (define b (quasiquote (1 (unquote a) 2))) b 1:=> b (1 10 2) 1:=> (cadr b) 10
> (define a 99) > (define b `a) > b a
> (func b) 99 and not a
(define (change-a! new-value) (set! a new-value) (set-car! (cdr b) new-value))
(define a (car 1 2)) (define b a) (set-car! a 3) (car b) ; evaluates to 3
struct Number : Object { const int value; // or double or complex or ... full numeric tower };
struct Pair : Object { Object* car; Object* cdr; };
Object* a = ONE; // where ONE is a global that points to a Number with value 1 Object* b = a; a = TWO;
Object* a = new Pair(ONE, new Pair(TWO, NULL)); Object* b = a; a->cdr->car = THREE;
(set! a 20)
, it just redirects the pointer to point to another number object. Whether you can modify an object pointed depends on the type of object. There is no mechanism to modify a number object (i.e. they say it is immutable). However, there is a way to modify pair objects, with set-car! and set-cdr!. That's why you can modify a pair object and be able to see the changes through another pointer that points to the same pair object. --
Spoon! (
talk) 19:49, 27 July 2009 (UTC)Thanks for your responses - I've found something that almost does what I want :
(define a 200) (define b (lambda() a)) (b) result 200 (define a 300) (b) result 300
this always evaluates to the current value of a, which is good, but I have to bracket b to get the number, if anyone can suggest a better way, please, as I'm still working out if I can utilise this method easily. 83.100.250.79 ( talk) 15:15, 27 July 2009 (UTC)
(set! a 300)
. --
Spoon! (
talk) 19:44, 27 July 2009 (UTC)As mentioned above I was trying things like (define a 10) , (define b a) , and (cadr (1 a 3)) - now in the first two examples it treats a as a variable, whereas in the third it seems to just think a is "a" ie text. How does it decide? And does ML (mentioned above) or another language (in the family) support a more explicit of distinguishing variables and text?
I know this is very similar to sticking beans up my nose as a hobby , but if anyone end my curiousity I would thank them. :) 83.100.250.79 ( talk) 11:47, 27 July 2009 (UTC)
(define (make-ref val) (cons '*ref* val)) (define ref-get cdr) (define ref-set! set-cdr!)
(try-this-list-as-a-program '(+ 1 2) )
83.100.250.79 (
talk) 16:29, 27 July 2009 (UTC)
(eval '(+ 1 2))
(define a (lambda () '(1 2 3))) (define b (lambda () (cons 4 (cons (a) 6))))
OK thanks for your help , and your patience. I think I can call this resolved, the engine starts, and I've stopped putting sand in the tank unless somebody notices that I'm doing things the wrong way, or knows a more sophisticated solution.. In which case please say. Thanks again.
symbol-value
or any equivalent? I guess that it sort of makes sense, since it has only lexical scoping and no use of a
appears lexically in (symbol-value 'a)
. But if eval
exists (even if it's crippled by the lack of a standard current-environment
special form), it seems silly not to also provide this simplest part of what it does (resolve symbols into variables). --
Tardis (
talk) 21:49, 28 July 2009 (UTC)
I have a video-slideshow created by Photo Story 3 using the Windows Media Video 9.1 Image v2 codec. How can I extract the static images from this file? -- Me ( talk) 20:01, 26 July 2009 (UTC)
Hi there, I'm in the process of creating an app/game/sim/whatever you want to call it that emulates a lift (elevator). I've got the thing working pretty well but am stumped at getting the logic right for handling calls. (Originally asked this on the science desk but this is probably a better place to ask it.)
At the moment, there are two objects: DRUp and DRDown that both contain a variable which can be set to 0 or 1 (0=off, 1=on), this simulates a pair of switches that control the direction. The lift operates a 'mechanical' floor selector (a moving object that triggers events when it touches other objects) that makes contact with various switches to tell the lift where abouts in the shaft it is. When the top floor and bottom floor switches are triggered, it toggles the direction switches so if it's at the top floor then DRUp=0 and DRDown=1, because the lift cannot go up from the top floor! The ground floor switch does the opposite.
This works fine for going in the same direction, however if the lift car is on the ground floor and I am on the second floor and want to go to the ground floor, the lift goes all the way to the top, reverses direction and then stops at the second floor. I need a way of resetting the direction switches from other floors but ONLY if there are no further calls in the original direction.
Example: Lift on ground floor Call from 2nd floor Lift goes UP to second floor Are there any more calls going UP? If yes, continue up, if no, reverse direction.
I can probably do it a long-winded way by setting up a long and protracted if statement along the lines of:
If Floor=1 and LR2Up and LR3Up and CR2 and CR3 and CR4 = 0 then DRUp=0 and DRDown=1 (LR being landing call switches and CR being lift car call switches)
However I'm sure there must be a simpler way of doing it (probably something to do with the floor selector). I can't see how old-fashioned lifts with relay logic could evaluate complex if statements. I think from looking at old and very complex documents about electromechanical lift controllers, the floor selector has three parts on top of each other that tell it which way to go but not sure).
Anyway, if you're interested, I've put the project so far online: http://www.arthurflowers.co.uk/games/Lift2_1.exe , any comments would be good.
Thanks in advance for any information. GaryReggae (talk) 21:44, 26 July 2009 (UTC) —Preceding unsigned comment added by GaryReggae ( talk • contribs)
http://www.arthurflowers.co.uk/games/Lift2_1.exe
GaryReggae ( talk) 22:56, 26 July 2009 (UTC)
(If the power is off then the switching relays need to reset themselves.)
Elevator Logic The number of floors in the building is Nf. The following are independent on/off states. Each could be a latching relay (relay controller), a set/reset latch (logic controller with MSI chips or FPGA), or one-bit flags in memory (µP controller). - For each floor i = [1...Nf] there are 3 state bits: Cdi = Call to descend Cai = Call to ascend Di = Directed to floor Cdi and Cai are set by pushbutton call switches at each floor. Cdi and Cai illuminate their respective call button so the caller gets immediate confirmation. Di are set by pushbuttons inside the elevator and illuminate their respective buttons so riders get immediate confirmation. - For the elevator there are state bits: Kdi = Commit to descend from floor #i Kai = Commit to ascend from floor #i (Kdi AND Cdi) and (Kai AND Cai) are AND functions that illuminate arrows at the respective elevator doors. These give further confirmation to a caller that s/he will soon be served, and they show which of Cdi/Cai will be answered first when both call buttons have been pressed. A "ping" sound is given at the floor when either arrow lights. The elevator logic monitors the location of the elevator f = [1...Nf]. This can be done in various ways such as by a rotary optical encoder in the lifting gear, or interlocking microswitches at each floor. It could be done using a momentary contact switch at each floor thus: as the elevator touches each switch the controller increments or decrements a floor counter, depending on whether the elevator is ascending or descending. Floor #1 has an extra contact switch that keeps the floor counter synchronised to the actual floor numbers. Number f is displayed to riders inside the elevator. Initialisation at switch on and after a power break: All (5 x Nf) - 2* state bits reset. Bring elevator to f = 1 (ground floor) to synchronise floor counter. Self test routine (in µP) may include testing all lamps. The elevator logic executes the following. ----------------------------------------- SCAN UP CALLS Pa = 0 pending ascend flag for i = f to Nf Kai = Cai OR Di if Kai=1 and Pa=0 then fd = i destination floor Pa = 1 next i if Pa=0 goto SCAN DOWN CALLS while f<fd raise elevator (At floor fd) Open doors, Caf = 0, Kaf = 0, Df = 0 (After delay 5 seconds) Close doors. If door is blocked, open and repeat. goto SCAN UP CALLS SCAN DOWN CALLS Pd = 0 pending descend flag for i = f to 1 step -1 Kdi = Cdi OR Di if Kdi=1 and Pd=0 then fd = i destination floor Pd = 1 next i if Pd=0 goto SCAN UP CALLS while f>fd raise elevator (At floor fd) Open doors, Caf = 0, Kaf = 0, Df = 0 (After delay 5 seconds) Close doors. If door is blocked, open and repeat. goto SCAN DOWN CALLS ----------------------------------------- Notes on this simple elevator implementation: 1. When no one uses the elevator the controller alternates between SCAN UP CALLS and SCAN DOWN CALLS. That is innocous for a µP controller but would be unwelcome activity in a relay controller. 2. Calls are not served well while the elevator is in motion. It is possible for the elevator to proceed past a floor if a call to that floor was made after the elevator starts. That will distress a rider who changes their mind during travel. 3. No provision was made for soft acceleration/deceleration so the elevator speed is limited. Possible improvements which are more suitable for tall buildings: Re. 1. When Pa = Pd = 0 the elevator could be sent to an optimum rest floor, such as ground floor or a mid floor. Re. 2. Response to rider controls could be improved by scanning Di's more often than only when the elevator stops. Re. 3. Higher speed without abrupt starts/stops is possible if full speed/stop is reached only after travelling one floor. However for that strategy one cannot respond while the elevator is in motion to a new Di (in 2. above) nor commit to a new Cdi/Cai where i is closer than f +/- 1. Travel from a floor to an adjacent floor can only reach half the maximum speed. Overload, Fast Mode The elevator car should have a load sensor. - EXCESS load causes the doors to stay open, prevents elevator movement and (preferably) shows a warning to occupants. The following improvements to load sensing are possible. - FULL load corresponds to maximum number of adult occupants. Ignore floor calls and obey only occupant directions Di. This avoids serving floor calls with a full elevator that the caller cannot enter. - EMPTY load corresponds to less than the weight of a child. Move elevator at maximum speed with abrupt start and stop. *On floor #1 there is no Cd1 button nor down arrow. On floor Nf there is no CaNf button nor up arrow.
Cuddlyable3 ( talk) 21:04, 27 July 2009 (UTC)