[QUOTE=HankMcSpank;98799]
Code:
If above_threshold = 1 then; 
above_threshold = 0             
else 
above_threshold = 1
endif
(btw: please excuse the n00b type coding - is there a more elegant way to toggle a variable?)
QUOTE]

Above code could be this:
Code:
 above_threshold = above_threshold ^1