01-23-2010 10:06 AM
Hi
I found similar program about that i want but I failed to insert it into my VI, than...... I need a counter that indicate me how many times the boolean Led switch-on .
My VI is attached
Thanks all
Solved! Go to Solution.
01-23-2010 10:50 AM
01-23-2010 11:01 AM
I modified your code by:
01-23-2010 01:59 PM - edited 01-23-2010 01:59 PM
Jeff, your code is not correct, because it generates multiple counts for each square wave. I think the OP only wants to count low-high transitions.
You need two feedback nodes (or shift regsiters), one for the boolean state and one for the counter.
Here's a quick modification, there are many ways to do all that.
01-23-2010 03:07 PM
Your right!
I was counting iterations where Siganl was true.
I mis-interperated the post If the OP only wants to count transitions
01-23-2010 03:23 PM
Jeff Bohrer wrote:Your right!
I was counting iterations where Siganl was true.
I mis-interperated the post If the OP only wants to count transitions
this works pretty well (reverse the inputs to Implies and init the sr T to count negative transitions)
01-23-2010 03:27 PM
01-23-2010 03:38 PM
01-23-2010 03:45 PM
I used the compound node instead of implies because I also needed to invert the output in this specific implementation. 🙂
(Of course if you use a case structure, you have a choice of what you do in the false or true case) 😉
01-24-2010 04:07 AM
Thank you very much for helping me guys!!
See you next times!!