Measurement-computing Personal488 rev.3.0 For DOS & Windows 3.Xi Instrukcja Użytkownika Strona 264

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
Przeglądanie stron 263
II. SOFTWARE GUIDES - 10. Driver488/W31 10F. Visual Basic
Personal488 Users Manual, Rev. 3.0 II-249
Next i%
sum = sum / 10
mystring = “”
mystring = mystring + The average of 10 readings is + Str$(sum) +
nl
TextWindow.Text = TextWindow.Text + mystring
Setup the ADC488:
Compensated binary output format (G10)
100 uSec scan interval (I3)
No pre-trigger scans, 100 post-trigger scans (N100)
Continuous trigger on GET (T1)
rv% = iooutput (adc, G10I3N100T1X)
Wait for ready bit of the ADC488 to be asserted
While ((spoll (adc) And 32) = 0)
Wend
Trigger the ADC488
rv% = Trigger (adc)
Wait for the ready bit of the ADC488 to be asserted
While ((spoll (adc) And 32) = 0)
Wend
Reset the buffer pointer of the ADC488
rv% = iooutput (adc, B0X)
Take 100 readings from the ADC488
noterm.eoi = 0
noterm.nChar = 0
rv% = EnterXI(adc, intResp(0), 200, 1, noterm, 0, 0)
If rv% = -1 Then
TextWindow.Text = TextWindow.Text + Error in data transfer!
End
End If
Display DRIVER488/W31 status
rv% = Status (ieee%, substat)
Call showstat (substat)
Wait for completion of input operation
rv% = ioWait (adc)
Display DRIVER488/W31 status
rv% = Status (ieee%, substat)
Call showstat (substat)
Print the received characters
mystring = “”
For i% = 0 to 99
mystring = mystring + Str$(intResp(i%) + nl
Next i%
mystring = mystring + nl
TextWindow.Text = TextWindow.Text + mystring
End Sub
Sub Form_Unload (Cancel As Integer)
Unload the IEEE driver
loaderName$ = Driver488/W31 Loader
winName$ = Driver488/W31
Hdriver% = FindWindow(loaderName$, winName$)
asdf = SendMessage (Hdriver%, &H2, 0, 0)
End Sub
Sub showstat (substat As IeeeStatus)
nl = Chr$(13) + Chr$(10)
Przeglądanie stron 263
1 2 ... 259 260 261 262 263 264 265 266 267 268 269 ... 399 400

Komentarze do niniejszej Instrukcji

Brak uwag