LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Turn a light off after a certain amount of time

I'm creating an elevator and I want it to flash a light once for each floor number it's on. I have it so it will stay on for the right number of iterations but the light won't then off between each iteration. Is there a way to turn it off between iterations through the use of a timer or something ?
0 Kudos
Message 1 of 4
(3,194 Views)

Here's my code for it.

0 Kudos
Message 2 of 4
(3,192 Views)

A couple of comments on your code...

 

You could read all three floor switches in one acquisition reading three channels at once, then extract each value from the array using one index array vi if you pull the bottom if the vi downwards to give three outputs.

 

Your true/false case statements are redundant - if the value is false then the select node chooses the other value anyway. Work through your logic!!!

 

Your code is VERY difficult to folow because you do everything NI say not to do in their style guidelines - wired going right to left, too many corners, wires entering vis in strange places so its hard to tell where they are connected, wires hidden under other objects, and no comments. I gave up trying to answer your original question because I just couldn't follow your code easily.

 

Actually, if you put in comments explaining what each bit did, you would probably spot the errors in logic yourself!

0 Kudos
Message 4 of 4
(3,130 Views)