Mein Programmauszug

Dim Gmh_3 As Byte
Dim Gmh_4 As Byte
Dim Gmh As Byte
'open channel for output
Open "comc.4:4800,8,n,1" For Output As #1
'Print #1 , "serial output"

'Now open a pin for input
Open "comc.5:4800,8,n,1" For Input As #2

Label:
.
.
.

Put #1 , 254_______'sende die drei werte zur
Put #1 , 0 _______ 'Meßwert abfrage an Gerät 1
Put #1 , 61
' Darauf Antwortet das Gerät mit 6 Byte

Reset Watchdog

Get #2 , Gmh_______ ' Byte 0 wird nicht gebraucht
Get #2 , Gmh_______' Byte 1 wird nicht gebraucht
Get #2 , Gmh_______' Byte 2 wird nicht gebraucht
Get #2 , Gmh_3 _______' Byte 3 wird gespeichert
Get #2 , Gmh_4 _______ ' Byte 4 wird gespeichert
Get #2 , Gmh _______' Byte 5 wird nicht immer gebraucht

'Jetzt erfolgt die Auswertung der Meßdaten wenn alle 6 Byte auch angekommen sind
'Kommen nur 5 oder keine hängt das ganze Programm
'bis dann der Watchdog einen Reset auslöst
'ich will aber keinen Gesamt reset sondern nur ein Sprung zu einem Label
.
.
.



Hauptprogramm


Goto Label