Display Ansteuerung CC2 Station Kategorie: Sonstige Hardware (von Roman - 14.10.2005 15:37) | |
| |
Hallo, Ich hab mir mal ein kleines automatisches Display Menü geschrieben und als ich es dann in die CC2 Station lade schalten sich da bei der Anzeige vom "Wasserstand" die unterschiedlichsten LED's ein und das Relais 1 schaltet bei jedem Bildwechsel um. Also ich hab keine Ahnung, woran das liegen könnte! Hier der betreffende Code ausschnitt vom Main-Modul. function display() { string s; if gbyState > 6 gbyState = 0; if gbyState == 0 { station_lcd.init(); station_lcd.clear(); gbyState = 1; } if gbyState == 2 { s="Initialisierung"; station_lcd.print(s); station_lcd.line2(); s="lalala"; station_lcd.print(s); gbyState = 3; sleep(2000); } if gbyState == 4 { station_lcd.clear(); s="Wasserstand:"; station_lcd.print(s); station_lcd.line2(); s="S:" + str.putintf("0", main.gintRefLevel, 5) + "I:" + str.putintf("0", main.gintLevel, 5); station_lcd.print(s); gbyState = 5; } if gbyState == 6 { station_lcd.clear(); s="Leitapparat:"; station_lcd.print(s); s=""; station_lcd.line2(); if main.gbyCdClose s=" GESCHLOSSEN "; if main.gbyCloseCD s=" SCHLIESSEN "; if not main.gbyOpenCD and not main.gbyCloseCD s=" MITTE "; if main.gbyCdOpen s=" OFFEN "; if main.gbyOpenCD s=" �FFNEN "; station_lcd.print(s); gbyState = 3; } } thread main { loop{ //inputs(); display(); station_io.LEDoff(1); if (not gintIT3 and not gintOT3) { gintIT3 = constant.ON; station_io.LEDon(1); gbyState = gbyState + 1; } gintOT3 = uni_timer.timer(3, gintIT3, 0, 2500); gintIT3 = constant.OFF; } } | |
Antwort schreiben Antworten: ![]() ![]() ![]() ![]() ![]() ![]() ![]() |