Einzelnen Beitrag anzeigen
Alt 27.08.2003, 22:29   #12
bartels
Jr. Member
 
Registriert seit: 01.10.2002
Alter: 57
Beiträge: 90


Standard

Hä Timer? Alles mit Timer1 in dem Beispiel hat nichts mit dem FS Zugriff zu tun, es ist ein Timer im Programm der immer wieder aufgerufen wird.
Das Eigentliche ist wie schon gesagt der Zugriff auf FSUIPC_Read und FSUIPC_Process. Wie schon oben erwähnt ist der Offset für Oil Temp 08BA, also FSUIPC_Read(&H238,... durch FSUIPC_Read(&H8BA,... ersetzen, fertig. D.h. vermutlich müssen noch der Variablentyp, und ein paar Umrechnungen angepasst werden.
z.B. so was:

Private Sub Timer1_Timer()
Dim dwResult As Long
Dim uiPress As Long

' As an example of retrieving data, we will get the FS clock time.
' If we wanted additional reads/writes at the same time, we could put them here
If FSUIPC_Read(&H8BA, 2, VarPtr(uiPress), dwResult) Then
' "Read" proceeded without any problems
If FSUIPC_Process(dwResult) Then
' "Process" proceeded without any problems
lblClock.Caption = uiPress * 55# / 16384#

Else
' Unable to "Process"
lblClock.Caption = "Processing: " & ResultText(dwResult)
End If
Else
' Unable to "Read"
lblClock.Caption = "Reading: " & ResultText(dwResult)
End If
End Sub

Nur mal so zusammengehauhen. VB ist wie gesagt nicht ganz mein Metier.
Arne Bartels
bartels ist offline   Mit Zitat antworten