The system variable #L_IOStatus stores error information in the bottom 8 bits.
Major Fault
"1" is set when it detects a fault that requires stopping the logic.