
|
INFO - FAQ - CC2-Forum - CCPro-Forum |
|
||
|
Hallo, bei meinem Zeit-Steuerprogramm habe ich den Fehler,dass nach dem ersten "gosub zustell" oder "gosub zurueck" der Port und damit mein Motor im Sekundentackt klickt(kurzrs LED-Blinken) Wie kann ich das abstellen? Danke. Gruß Max 'IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 'III BASIC DEMO Zeitsteuerung IIIII 'IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII '-------------------------------------------------------------------- INCLUDE "omac.def" define OLDSEC byte dim stopp port[9]'Endschalter dim Mot1 port[4] 'Motor_1 dim Mot2 port[12] 'Motor_2 dim ein port[11] 'Port einschalten dim led port[10] 'Anzeige LED 'Konstanten led=off 'LED-Anzeige aus Mot1=off Mot2=off ein=off #morgen '-------- VOREINSTELLUNG Programmstart------------- hour=07 minute=59 second=30 '-------------------------------------------------------------------- ' Beispielprogramm Abfrage ECHTZEITUHR '-------------------------------------------------------------------- #LOOP '------- AUF DEN SEKUNDENWECHSEL WARTEN ---------- if OLDSEC=SECOND then goto LOOP OLDSEC=SECOND pause 5 '------- ZEIT AUSGEBEN ------------------- print "Stunde: ";hour;" Minute: ";minute;" Sekunde: ";second if hour=08 and minute>=00 then gosub zustell if hour=08 and minute>=00 and second>=30 then gosub motaus if hour=08 and minute>=01 then gosub zustell if hour=08 and minute>=01 and second>=30 then gosub motaus if hour=08 and minute>=02 then gosub zurueck if hour=08 and minute>=03 then gosub morgen ' '------------------------------------------------- goto LOOP '___________________________________________________________ 'UP Zustell #zustell 'print "zustellen" ein=on Mot1 = off ' Motor Rechtslauf, Zustellung Mot2 = on return 'UP Motor stopp _______________________________________________ #motaus 'print "warten" Mot1 = off 'Motor stopp Mot2 = off ein= off return '___________________________________________________________ 'UP Zurück #zurueck 'print "zurück" #oben ein=on Mot1 = on ' Motor Linkslauf Mot2 = off '(if stopp= off then) prüfe Endschalter if stopp= off then Mot1 = off 'Motor stopp Mot2 = off ein=off else goto oben end if return |
| Antwort schreiben |