LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

is there a case structure that can catch the rising edge of a data line?

 
hi, I have a integer data line that increases in value as the program runs.  I'd like to catch some of its transition points, for example, when it changes from 4 to 5, and use that as a trigger to activate a sequence of other actions.  the integer line is within a while loop, and it doesn't increase its value after every loop (its value could stay the same for several loops).  what's the best way to catch a particular transition of this line and use it to trigger some other events?
 
thanks much
 
0 Kudos
Message 1 of 5
(3,042 Views)

Feed your data in a shift register or feedback node to have the current value and the value from the previous iteration available.

The rest is could just be boolean logic (IF "current=5 AND previous=4" ) to be fed to a case structure containing your special code. There are many possible ways to do this.

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

 

ah ok that makes sense, thanks.  Is there any way to specify more than one conditions such as like you said IF something AND something with one case structure?  or would I need to use one case structure layer for every condition.  sorry I'm kind of new to the program

 

thanks

 

0 Kudos
Message 3 of 5
(3,018 Views)
Just do some boolean logic and combine the output of several comparisons. 😄
 
For example, the code in the picture executes the TRUE case if"  x is 5 and previously was 4. In all other cases, the FALSE case is active.
 
 

Message Edited by altenbach on 09-28-2006 12:01 AM

0 Kudos
Message 4 of 5
(3,010 Views)

lol you make it look so easy. 

thanks man

 

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