LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time command Labview Elevator

Solved!
Go to solution

@Somarita wrote:

I've made event structure (with proper button "value change" - if I can name it like that 😜 ), then I put the time condition in case structure. . 


Assuming you programmed proper simulation of the elevator movement, an event structure seems inappropriate for this, because reaching a floor is determined by time, not user interaction. Also it should only go to the target floor if nobody remains in the elevator. Right? Events are for user interactions!

0 Kudos
Message 11 of 16
(264 Views)

Okay let me clarify 🙂 It has interaction with user. User can choose where to go (buttons 0,1,2,3) but I wanted to make kind of optimisation. Like during the peak hours (7-9 when people start work) elevator shoudl wait for them always on the ground floor. 
condition:
ad. 2 people who work on level 1 finish between 3 and 4 so elevator will be waiting for them

ad. 3 people who work on level 2, finish between 4 and 5 etc 🙂 
This is why I needed time condition in my application. 

0 Kudos
Message 12 of 16
(258 Views)

So far you have not really defined what should happen during the times not mentioned.

0 Kudos
Message 13 of 16
(224 Views)

I would do something like this:

hf.png

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 14 of 16
(221 Views)

@Somarita wrote:

Here is the list of my conditions: 
1. When it's between 7am and 9am eleavtor after reaching each floor (1,2,3) is going back to level 0. 
2. When it's between 3pm and 4pm elevator after reaching each floor (0,2,3) is going back to level 1. 
3. When it's between 4pm and 5pm elevator after reaching each floor (0,1,3) is going back to level 2.

4. When it's between 5pm and 6pm elevator after reaching each floor (0,1,2) is going back to level 3. 


Note that you can take advantage of the polymorphism and do all comparisons at once, then just check which (if any) of the booleans is true.

 

altenbach_0-1704904249480.png

 

0 Kudos
Message 15 of 16
(221 Views)

can i see your vi, as i m also working on similar project

 

0 Kudos
Message 16 of 16
(22 Views)