Simple " IF " is not working
TC
Posts: 1,019
Hello all
I can not figure out why this " IF '' statement is not working. I think it should, but I could be wrong.
It does not matter what I put in " upper_value" (values I tried 0, 30, 20, 40, 50, 100), the upper_output does not go high.
My thinking is;
PWM_counter = 0
upper_value = 25
then using the " IF " statement I have should come up " TRUE " since upper_value is greater than PWM_counter. And since it is " TRUE " the upper_output should be high.
Where am I going wrong? And what is going with this IF statement? Because I don't understand it.
Thanks
TC
I can not figure out why this " IF '' statement is not working. I think it should, but I could be wrong.
upper_value := 50 repeat PWM_counter from 0 to 100 if upper_value => PWM_counter AND upper_value <> 0 outa[upper_output] := 1 else outa[upper_output] := 0
It does not matter what I put in " upper_value" (values I tried 0, 30, 20, 40, 50, 100), the upper_output does not go high.
My thinking is;
PWM_counter = 0
upper_value = 25
then using the " IF " statement I have should come up " TRUE " since upper_value is greater than PWM_counter. And since it is " TRUE " the upper_output should be high.
Where am I going wrong? And what is going with this IF statement? Because I don't understand it.
Thanks
TC
Comments