Zur Übersicht - INFO - Neueste 50 Beiträge - Neuer Beitrag - Suchen - FAQ - Zum CC1-Forum - Zum CC-Pro-Forum

Wichtig: Bevor Du wegen einem Problem mit der CC2 postest, stelle sicher, daß Du
die neueste OS-Version, die neuseste Compiler-DLL und die neuesten Modulversionen benutzt!
Beachte, daß sich auf der CD zur CC2-Unit/Station auch jetzt noch die ältesten Dateien befinden!
Es gelten folgende Anleitung und Regeln: Regeln CC2Net.de-Forum
Zurück zum Artikel  (Blaue Felder sind Pflichtfelder)


Name:   UserID: 
 E-Mail:
Kategorie
Betreff
Homepage:
Link-Titel:
Link-URL:
Cookie für Name, UserID, E-Mail, Homepage-URL setzen
(Erspart die Neueingabe bei Beiträgen und Antworten)
(Zum Löschen des Cookies hier klicken)
Ich nutze:
C-Control II Unit
C164CI-Controllerboard
C-Control II Station
CCRP5 mit CC2-Unit (Conrad Roboter)
CC2-Application-Board
CC2-StarterBoard
CC2-ReglerBoard
eigenes Board
original OS     OSOPT_V2     OSOPT V3.0 OSOPT V3.1

Kommentar:
Einfügen von HTML im Kommentar:

Link einfügen: <a href="LINKURL" target="_blank">LINKTITEL</a>
Bild einfügen: <img src="BILDURL">
Text formatieren: <b>fetter Text</b>  <i>kursiver Text</i> <u>unterstrichener Text</u>
Kombinationen sind auch möglich z.B.: <b><i>fetter & kursiver Text</i></b>
C2 Quellcode formatieren: <code>Quellcode</code>
ASM Quellcode formatieren: <asm>Quellcode</asm>
(Innerhalb eines Quellcodeabschnitts ist kein html möglich.)
Wichtig: Bitte mache Zeilenumbrüche, bevor Du am rechten Rand des Eingabefeldes ankommst !  

> Hallo! > Danke nochmal für die schnellen Antworten! > Leider tritt das Problem jetzt immer häufiger auf, nachdem ich das Programm minimiert habe und nun an ein Netzteil > gehängt habe. (stabilisietes Netzteil 12V) > Hier nochmal der gesammte Quellcode (ich hab ihn auf ein Thread verkürzt...) > > <code> > > const t=-142; //Verschiebung auf der x-Achse > const a=0.247; //Steigung > > > function tmp(byte b_a) returns int > { > > int x; > > x=ports.adc(b_a); > x=x*a; > x=x+t; > return x; > } > > > function tempstring() > { > int i_temperatur0, i_temperatur1,i_temperatur2, i_temperatur3, i_h, i_min; > string s_temperatur0, s_temperatur1, s_temperatur2,s_temperatur3,s_disp1, s_disp2, s_h, s_min; > // Temperaturmessen > > i_temperatur0=tmp(0); > i_temperatur1=tmp(1); > i_temperatur2=tmp(2); > i_temperatur3=tmp(3); > i_h=system.hour(); > i_min=system.minute(); > > // Leeren der string-Variablen: > > s_temperatur0=""; > s_temperatur1=""; > s_temperatur2=""; > s_temperatur3=""; > s_h=""; > s_min=""; > // Umwandeln von Temperatur- Int in einen string > > if i_h<10 > { > s_h="0"; > } > else > { > s_h=""; > } > > if i_min<10 > { > s_min="0"; > } > else > { > s_min=""; > } > > str.putint(s_temperatur0,i_temperatur0); > str.putint(s_temperatur1,i_temperatur1); > str.putint(s_temperatur2,i_temperatur2); > str.putint(s_temperatur3,i_temperatur3); > str.putint(s_h,i_h); > str.putint(s_min,i_min); > > > //////////////////////////////////////////////////////////////////////////////// > > // Beschreiben des LCD-Displays: > > > station_lcd.home(); > station_lcd.print("A:"); > station_lcd.cursorpos(1,2); > station_lcd.print(s_temperatur0); > station_lcd.cursorpos(1,4); > station_lcd.print(" "); > station_lcd.cursorpos(1,5); > station_lcd.print("B:"); > station_lcd.cursorpos(1,7); > station_lcd.print(s_temperatur1); > station_lcd.cursorpos(1,9); > station_lcd.print(" "); > station_lcd.cursorpos(1,10); > station_lcd.print("C:"); > station_lcd.cursorpos(1,12); > station_lcd.print(s_temperatur2); > station_lcd.cursorpos(1,14); > station_lcd.print(" "); > > station_lcd.line2(); > station_lcd.print("D:"); > station_lcd.cursorpos(2,2); > station_lcd.print(s_temperatur3); > station_lcd.cursorpos(2,4); > station_lcd.print(" "); > station_lcd.cursorpos(2,5); > station_lcd.print("T:"); > station_lcd.cursorpos(2,7); > station_lcd.print(s_h); > station_lcd.cursorpos(2,9); > station_lcd.print(":"); > station_lcd.cursorpos(2,10); > station_lcd.print(s_min); > station_lcd.cursorpos(2,12); > station_lcd.print(" "); > > > > } > > > > > thread main > { > station_io.init(); > station_lcd.init(); > > station_io.LIGHToff(); > > > int t1,h,m; > loop{ > > if station_io.getkey()==1 > { > station_lcd.clear(); > station_lcd.print("Stunde:"); > h=station_io.getcode(); > sleep 500; > station_lcd.print("Minute:"); > m=station_io.getcode(); > > system.settime(h,m,m); > > station_lcd.print("fertig"); > sleep 500; > station_lcd.clear(); > } > > t1=tmp(1); > > if (system.hour()>=18) and (system.hour()<22) and t1<40 > { > station_io.PORTset(0,1); > } > else > { > station_io.PORTset(0,0); > } > > > if ports.get(9)==-1 > { > station_io.RELon(1); > } > else > { > station_io.RELoff(1); > } > > tempstring(); > > } > } > > </code> > > Ich hoffe ihr könnt mir weiterhelfen... > Gruß Michi >
Dateianhang: (.gif, .png., .jpg, .zip, .rar)
max. 256kB
max. 256kB