LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pulse led for 100ms

i have an incoming boolean state, when true the led turns on. all i need is after 100ms turn the led off again. i'm having real difficulties coming up with a solution. the attached image shows i tried with Elapsed Time but it only works the first go-around and I can't figure out how to reset this timer to 0 at the beginning of the loop.

0 Kudos
Message 1 of 5
(3,324 Views)

I think I got it to work, although it may not be the correct approach, but if it works it works right?!

 

 

0 Kudos
Message 2 of 5
(3,297 Views)

Be careful with the exagerated use of local variables. Why don't you simply wire the "Numeric" indicator instead of using several read/write local variables for the same value?

I've made something. It's still not the best approach, but it's way more simple.

 

[EDIT: Today it's not my day. I'm having issues to attach an image. What I would do is to create a case structure: IF something is TRUE, then your led is true. Use wait(ms) to determine the delay.]

Mondoni
0 Kudos
Message 3 of 5
(3,275 Views)

Here's an option:

100ms.png

 

If your program is going to become more complex, consider using a state machine.

 

steve

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 4 of 5
(3,227 Views)

HI,

Can you attach an image for the program? I am getting problems in creating one. 

Thank You

0 Kudos
Message 5 of 5
(3,157 Views)