Das Open-Control-Projekt - Die Alternative zur C-Control-I


Das Forum zur C-Control-1
Welche C-Control-Varianten existieren?
Übersicht - Suchen - Neueste 50 Beiträge - Neuer Beitrag - Login - Registrieren
INFO - FAQ - CC2-Forum - CCPro-Forum 

 Hilfe beim Programm Kategorie: Open-Micro/Open-Mini/Open-Midi/Open-Macro/Open-Maxi (von Oppl Max - 6.09.2014 18:25)
Oppl Max nutzt:  Open-Macro
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

Bisherige Antworten:

Re: Hilfe beim Programm (von Dietmar - 9.09.2014 20:25)
    Re: Hilfe beim Programm (von Oppl Max - 10.09.2014 10:06)
        DCF77 (von Dietmar - 10.09.2014 12:08)
Re: Hilfe beim Programm (von gerdl - 9.09.2014 16:39)
    Re: Hilfe beim Programm (von Oppl Max - 9.09.2014 17:41)