So müsste es funktionieren...
Code:
#Abfrage
define x as Byte[10]
LCD.CLEAR
LCD.POS 1,1
LCD.PRINT "Standby"
LIGHT=ON 'Licht aus
Led1=true

IF RXD = true then
    BAUD R9600
    GET x
   
    IF x = 49 then 'ASCII Zeichen für 1       
        LCD.CLEAR
        LCD.POS 1,1
        LCD.PRINT "ALARM!"
        LIGHT=OFF 'Licht an
        Rel1=true
    ELSE         '<<<< hier fehlte wohl ein ELSE
       
        IF x = 48 then 'ASCCI Zeichen für 0   
            LCD.CLEAR
            LCD.POS 1,1
            LCD.PRINT "Alarm deaktiviert!"
            LIGHT=OFF 'Licht an
            Rel1=false
        END IF
    END IF
    GET x
END IF

GOTO Abfrage