LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

leds

Hi...I am using labview 2011...when i wire up the conditions to the input of the compound arithmetic, the output will be wire up to leds such as slapping, baby abuse detected and suspicious action detected. The leds i am referring to is on the front panel...My question is how do i make the leds to light up for a longer period of time?

0 Kudos
Message 1 of 10
(3,356 Views)

 

please post your vi.....hard to tell without the WHOLE PICTURE

0 Kudos
Message 2 of 10
(3,334 Views)

the whole picture is too big, it is not clear to see the whole thing...i just want to know how do i light up the led for a longer period of time...i have tried using the elapsed time but i couldn't wire it to the output of the compond arithmetic

0 Kudos
Message 3 of 10
(3,321 Views)

You want to wire it to a Time Delay VI, not Elapsed Time.

0 Kudos
Message 4 of 10
(3,309 Views)

If you want the lights to stay on for a certain period of time you need to make the delay after the LEDs turn on, not before.

I'm not saying this is the best way or only way to do it (or even that it's a good way to do it), but it's one way.

keep an LED on.PNG

 

This may not even be a good way. Without seeing what other code you have, there's no way of knowing how this will influence the running of your code.

If it's in a loop for instance (which I suspect it is), it'll increase the time it takes each loop to run by ~5 seconds regardless of whether the LED is on or off. If you're tracking motion, you'd want the loop to be able to actually track the motion smoothly and quickly.

You could also use shift registers with some lifty logic to work out how long the LEDs have been on, which would allow the loop to run at (essentially) full speed and still turn off the LED after a certain time period.

0 Kudos
Message 5 of 10
(3,305 Views)

Hi,

   I am using the exact flat sequence shown in the screen shot within a while loop. Each iteration of the while loop checks for a condition. When the condition becomes true for the first time, the led lights up, but stays on for subsequent iterations even though the condition changes to false. Is there something I am missing? Please help.

0 Kudos
Message 6 of 10
(3,231 Views)

I have no idea if you are missing anything.  Please post a VI so we can see what you are doing.  Then we might be able to help.

0 Kudos
Message 7 of 10
(3,214 Views)

I am attaching the vi here. Thanks for your help.

0 Kudos
Message 8 of 10
(3,195 Views)

Ok, figured it out. I had put the boolean within the case structure. I should have it outside the case. I also did not have to use the flat sequence for my case. I appreciate your quick response, though. Thank You.

0 Kudos
Message 9 of 10
(3,179 Views)

If I understood what you want you simply need a feedback node and an OR to latch the True condition.

example_BD.png

I also enabled auto-indexing to simplify that for loop just a bit.  That might be a good spot for you to read up on in the help file.


"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 10
(3,168 Views)