Incomprehensible Error with my loops

I need the motor (led in this case) to stay on until thE other ILS gets activate, isn't your code just turning it on then stopping it when I release the IRS or the ILS ?