01-13-2012 06:07 AM
I'm new in using LabView, and I've been assigned to create a VI file, that regulates the movement of elevator in a building, and I don't know how to start, what to use...The problem includes a 5 floor building.The elevator moves from one floor to another in 2 seconds,and it only moves when it's been called from outside, or someone inside the elevator.The last 5 calls have been memorised, and the number of memorised commands that are called from inside are 4. The calls from inside must be processed first,and the from outside of the elevator. Every state of the elevator, number of floor, and calls must be on display...
I would be really greatfull if someone give me some inputs, what to use... This is my first project in lab view...and every help is needed . Thank you in advance.
01-13-2012 08:41 AM - edited 01-13-2012 08:41 AM
Is this an actual elevator, or are we talking about a simulation? If it's a simulation this sounds like a homework project. If so, we will not do your homework for you, but we can provide tips.
01-26-2012 04:20 PM - edited 01-26-2012 04:21 PM
You're right this is an exercise project...but I still can't do this... I've started first with shift registers, but it didn't work out for me, and I'm sure that this is an easy project, but not for me 🙂 ... so, I went in another direction and I run into another problem...VI file is in attachment...
the main problem is that my elevator goes each time from zero
and I don't really know how to solve the problem with calling the elevator from inside and outside, I know that I can use arrays , or queues , but I haven't got really into that because I havent solved the first problem... Is there any simillar programs that are controled like this elevator, that we control by pressing the switch with the option that we can press the button more than once , and it is remembered ?
Thanks in advance
01-26-2012 11:20 PM
I am not going to do your homework for you but I will point you in the direction I would head.
This would be a good application for Queues, specifically a Queued State Machine.
When an "outside" button is pressed it would load the queue to send it to the proper "floor".
It an "inside" button is pressed you could insert queue elements that would give it priority.
02-06-2012 09:55 AM
I've resolved most of my problems, but one thing I still haven't been able to do. I don't know how to use this queues, or better to say, I don't know where to use it, inside a while loop, or case structures ... Is there any example of using queues that is similar to this problem..when I press a button it puts a number in the queue... Thanks in advance . My VI is in attachment
02-06-2012 10:21 AM
Smercurio mentioned the shipping examples. I hope it's not too big of a hint but there's one called Multiple Notifiers - Elevator Example. It's a very good example that uses notifiers (obviously). Maybe try re-coding it to use the more powerful queues?
02-06-2012 10:31 AM
Where can I find that example ?
02-06-2012 10:57 AM
Open the Example Finder and search for notifiers maybe???