ich habs nun so gelößt das klappt so ganz gut.

Code:
If Pind.1 = 1 Then
'ZV zu lampe aus
Portd.6 = 0
Else
' ZV auf lampe an
Portd.6 = 1
Wait 14
Goto B

End If

Loop
B:
If Pind.0 = 1 Then
Portd.6 = 0                                                 'lampe aus
Goto A
Else
Portd.6 = 1 'lampe an
Wait 30
Portd.6 = 0                                                 ' lampe aus
Goto A
End If
'Programmende (nur formal)
End