Side question - these nesting of IF-THEN are used to avoid usage of AND/OR operators?
or even a little binary arithmetic
Code:
if PortB.0 = 0 then
if PortB.1 = 1 then
if PortB.4 = 1 then
runtime = 60
endif
endif
endif
if PortB.0 = 1 then
if PortB.1 = 1 then
if PortB.4 = 1 then
runtime = 90
endif
endif
endif
if PortB.0 = 1 then
if PortB.1 = 0 then
if PortB.4 = 0 then
runtime = 120
endif
endif
endif
shrinks to
Code:
if PortB&19 == 18 then
runtime = 60
elseif PortB&19 == 19 then
runtime = 90
elseif PortB&19 == 1 then
runtime = 120
endif
with regard to the loop
if SSW = 1 then ???????????? what is ssw
snippets are a total failure as usual
could be the pin if its a pin is still set to analog
Bookmarks