I was wondering if anyone could tell me if the structure of this statement is valid

if 130 < ch1_input < 170 then
xxx
endif

Or, do I need to break it up into 2 conditional statements?
Your statement should throw an error. You could try the following code instead
Code:
   if (ch1_input > 130) and (ch1_input < 170) then
        xxx
   endif
Jerson