LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a simple way to build a blink detector VI?

OK, so to get the behavior I want, I have to get the VI to to remember between calls when the most recent transition was. What would be the preferred way to do that? (Local variables don't seem to do the trick -- complain about type incompatibility.) -S.
0 Kudos
Message 11 of 16
(752 Views)
I think what you want to do is to put that VI I gave you into an Event structure that triggers off of the valu change of the boolean you are passing it to, then you'd see results more like what you'd expect. OR just slow the loop down...
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 12 of 16
(745 Views)
<Post deleted>

Message Edited by TWGomez on 04-10-2008 11:45 AM
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 13 of 16
(743 Views)
HOLD UP!! I misunderstood your last post...post-lunch grogyness or soemthing....Try this one....After a second of no transition change it reports false...which I think is what you wanted (along with the if it changed in under 1 sec to report true) rather than just working when a value is changed...
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 14 of 16
(738 Views)
I put both blink detectors into the calling VI. The second one (with the one-second holdoff) seems to work -- sometimes. But neither works if I crank the "milliseconds to wait" value up. Any idea why not?

Thanks,
- Steve.

0 Kudos
Message 15 of 16
(716 Views)

Because of the type of mechanical action in your button the switch might not be read properly. You can either change the mechanical action or capture the event with an event structure.

You should NOT use polling to capture boolean switch events, especially with switch until release actions...polling takes up too much processing power for nothing...best idea is to use event structures.



Message Edited by TWGomez on 04-11-2008 09:06 AM

Message Edited by TWGomez on 04-11-2008 09:06 AM
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 16 of 16
(714 Views)