Measurement-computing Personal488 rev.3.0 For DOS & Windows 3.Xi Manuel d'utilisateur Page 255

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 400
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 254
10F. Visual Basic II. SOFTWARE GUIDES - 10. Driver488/W31
II-240 Personal488 Users Manual, Rev. 3.0
Setup the ADC488:
Differential inputs (A0)
Scan group channel 1 (C1)
Compensated ASCII floating point output format (G0)
Channel 1 range to +/ 10V (R3)
One shot trigger on talk (T6)
The command to perform this configuration combines the above strings and adds the
Execute
(
X
)
command for the ADC488:
rv% = ioOutput(adc, A0C1G0R3T6X)
Basic Data Acquisition
With both Driver488/W31 and the external device ready for action, we next might try taking a simple
reading using the ADC488. Here, we use the serial poll (
SPoll
) capabilities of Driver488/W31 to
determine when a response is ready and to format the reply. The reply is appended to the existing
contents of the control
TextWindow
so that it will not erase previous responses.
Wait for the ready bit of the ADC488 to be asserted
While ((spoll(adc) And 32) = 0)
Wend
Display the reading
response = “”
mystring = “”
rv% = enter(adc, response)
voltage = Val(response)
mystring = mystring + ADC488 channel #1 reading value is +
Str$(voltage) + nl
TextWindow.Text = TextWindow.Text + mystring
Now acquire and display an average of 10 readings
sum = 0
For I% = 0 to 9
response = “”
rv% = enter (adc, response)
voltage = Val (response)
sum = sum + voltage
Next I%
sum = sum / 10
mystring = “”
mystring = mystring + The average of 10 readings is + Str$(sum) + nl
TextWindow.Text = TextWindow.Text + mystring
Block Data Acquisition
First, we set up the ADC488 (
adc
) in the following configuration:
We then wait for the ADC488 to start the acquisition process. Once the acquisition is complete, which
is determined by the MSB of the ADC488s serial poll response, the buffer pointer of the ADC488 is
reset (
B0
).
rv% = iooutput(adc, G10I3N100T1X)
Wait for the ready bit of the ADC488 to be asserted
While ((spoll(adc) And 32) = 0)
Wend
Trigger the ADC488
rv% = Trigger(adc)
Wait for the acquisition complete bit of the ADC488 to be asserted
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)
Vue de la page 254
1 2 ... 250 251 252 253 254 255 256 257 258 259 260 ... 399 400

Commentaires sur ces manuels

Pas de commentaire