10-01-2015 03:29 AM
HELLO..
I am looking for a code to increase by1 if the condtion satisfied , or else condition not satisfied increment should not be done.
for example i have three variables, let us say X & Y& Z
X is continuously varying value .
Y is threshold value(like constant)
FOR FIRST INCREMENT:
if x>=y
z incremented by 1 (onle one time increment should be happen )
now z=1,
if x<=y
z incremnt should not be done
now z=0.
FOR SECOND INCREMENT:
now Z=1(after the first increment)
again
x>=y
z incremented by 1 (only one time increment should be happen ).
so now z=2
like that process run continuously untill i stop
Note: the increment should be happen after the condition (x>=y) should go false and should come true and at the time of true state increment should be happen.
10-01-2015 03:44 AM
Hi sridhar,
if x>=y
z incremented by 1
if x<=y
z incremnt should not be done
What should happen for x==y? Increment or no increment?
Please define your logic without inconsistencies!
Some simple pseudocode:
IF x>=y THEN z:=z+1 ELSE z:=z ENDIF
z belongs in a shift register…
If you have problems coding this simple expression consider taking the free online courses for LabVIEW beginners!
10-01-2015 04:10 AM
increment should happen if x=y
thank you so much for your reply.
i will go through the tutorials first.