Hi,
wenn ich es richtig verstanden habe sollte es so aussehen:
Code:
waitms 1
if Spur_1 = 1 then
Durchfahrt_1 = 1 : Zeit_1 = 0
end if
if Durchfahrt_1 = 1 then
incr Zeit_1
end if
if Zeit_1 = 50 then
Ampel_1 = 1 : locate 2,1 : lcd "- * -"
incr Runde_Spur_1 : Z_formatiert = str(Runde_Spur_1)
locate 3,19 : lcd ; format(Z_formatiert , " ")
Ampel_1 = 0 : locate 2,1 : lcd "-----"
end if
if Zeit_1 > 1000 then
Durchfahrt_1 = 0 : Zeit_1 = 0
end if
es funktioniert wie meine Version:
Code:
if Spur_1 = 1 or Spur_1PZ <> 0 then
if Spur_1PZ = 0 then
Ampel_1 = 1 : locate 2,1 : lcd "- * -"
incr Runde_Spur_1 : Z_formatiert = str(Runde_Spur_1)
locate 3,19 : lcd ; format(Z_formatiert , " ")
Ist_1 = 0 : Soll_1 = 222 : Spur_1PZ = 1
enable timer0
Ampel_1 = 0 : locate 2,1 : lcd "-----"
else
if Spur_1PZ > 120 then
disable timer0
Spur_1PZ = 0
end if
end if
end if
Grüßle, Hermann
Lesezeichen