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 

 Re: mehrmaliges Drücken der Funktionstaste auswerten Kategorie: C-Control I V1.1 (von Dierk, Homepage - 9.07.2005 15:56)
 Als Antwort auf mehrmaliges Drücken der Funktionstaste auswerten von Tomsky - 9.07.2005 1:42
Hallo, ich weiss zwar nicht genau was Du willst, aber in Basic++ kannst Du z.B. in Verbindung mit der Station 1 das z.B. so machen:


Declare function Station_FKeys()

type TStation
  F1 as port[9]
  F2 as port[10]
  F3 as port[11]
  F4 as port[12]
end type

define Station as TStation
define TasteF1 as byte
define TasteF2 as byte
define TasteF3 as byte
define TasteF4 as byte

#Mainloop

 
  'FTasten-Abfrage
  Select Case Station_FKeys()
    case 1
      TasteF1=TasteF1+1
    case 2
      TasteF2=TasteF2+1
    case 3
      TasteF3=TasteF3+1
    case 4
      TasteF4=TasteF4+1
  end select
 
  print "F1:" & TasteF1 'Ausgabe Anzahl F1s auf Schnittstelle
  print "F2:" & TasteF2 'Ausgabe Anzahl F2s auf Schnittstelle
  print "F3:" & TasteF3 'Ausgabe Anzahl F3s auf Schnittstelle
  print "F4:" & TasteF4 'Ausgabe Anzahl F4s auf Schnittstelle
 
  goto mainloop    'und nächste Abfrage

'////////////////////////////////
'// Funktionen

function Station_FKeys()
  if not Station.F1 then
    Return 1
  else
    if not Station.F2 then
      Return 2
    else
      if not Station.F3 then
        Return 3
      else
        if not Station.F4 then
          Return 4
        else
          Return 0
        end if
      end if
    end if
  end if
end function




Meine Homepage: http://www.csslabs.de/ccontrol

 Antwort schreiben

Bisherige Antworten:

Re: mehrmaliges Drücken der Funktionstaste auswerten (von Tomsky - 10.07.2005 15:46)
    Re: mehrmaliges Drücken der Funktionstaste auswerten (von Topmail - 10.07.2005 18:06)