Command summary – Measurement Computing Personal488 rev.3.0 For DOS & Windows 3.Xi User Manual
Page 190

II. SOFTWARE GUIDES - 9. Driver488/SUB
9G. Pascal
Personal488 User’s Manual, Rev. 3.0
II-175
{ Display a reading }
lrv: = ioEnter (adc,response);
Val (response,voltage,code);
Writeln (‘ADC488 channel #1 reading value is ‘,voltage);
{ Display the average of 10 readings }
sum: = 0.0;
for i: 0 to 9 do begin
lrv: = ioEnter (adc,response);
Val (response,voltage,code);
sum: = sum + voltage;
end;
Writeln (‘The average of 10 readings is ‘,sum/10.0);
{ Set up the ADC488:
Compensated binary output format (G10)
100uSec scan interval (I3)
No pre-trigger scans, 100 post-trigger scans (n100)
Continuous trigger on GET (T1)
}
lrv: = ioOutput (adc,’G10I3N100T1X’);
{ Wait for the ready bit of the ADC488 to be asserted }
while not bitset (ioSPoll (adc),32 do begin end;
{ Trigger the ADC488 }
rv: = ioTrigger (adc);
{ Wait for the ready bit of the ADC488 to be asserted }
while not bitset (ioSPoll (adc),128) do begin end;
{ Reset the buffer pointer of the ADC488 }
lrv: = ioOutput (adc,’BOX’);
{ Take 100 readings from the ADC488 }
noterm.EOI: = false;
noterm.nChar: = 0;
lrv: = ioEnterX (adc,hundred,200,true,noterm,true,nilptr);
{ Check the Status before and after waiting }
rv: = ioStatus (ieee,substat);
{ Wait for completion of input operation }
rv: = ioWait (adc);
rv: = ioStatus (ieee,substat);
showstat (@substat);
{ Print the received characters }
for i: = 0 to 99 do begin
Write (hundred[i]);
if (i mod 10) = 9 then
Writeln (‘’);
end;
end.
Command Summary
To obtain a summary of the Pascal language commands for Driver488/SUB, turn to the “Section III:
Command References” of this manual.