Measurement-computing Personal488 rev.3.0 For DOS & Windows 3.Xi Bedienungsanleitung Seite 173

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 400
  • Inhaltsverzeichnis
  • FEHLERBEHEBUNG
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 172
9E. C Languages II. SOFTWARE GUIDES - 9. Driver488/SUB
II-158 Personal488 Users Manual, Rev. 3.0
100u sec scan interval (I3)
No pre-trigger scans, 100 post-trigger scans (n100)
Continuous trigger on GET (T1)
*/
Output (adc,G10I3N100T1X) ;
/*Wait for the ready bit of the ADC488 to be asserted*/
while ((SPoll (adc) &32)==0) ;
/*Trigger the ADC488 */
Trigger(adc);
/*Wait for the acquisition complete bit to be asserted*/
while ((SPoll (adc) &128)==0) ;
/*Reset the buffer pointer of the ADC488 */
Output (adc,BOX) ;
/*Take 100 readings from the ADC488* /
noterm.EOI=0;
noterm.nChar=0;
EnterX(adc, (char*)hundred,200,1,&noterm,1,0L);
/*Check the Status before and after waiting */
Status (ieee,&substat) ;
showstat (&substat) ;
/* Wait for completion of input operation */
Wait (adc);
/*Display the Driver488/SUB system status */
Status (ieee,&substat) ;
showstate (&substat) ;
/* Print the received characters */
for (i=0;id;i++) {
printf(%6d,hundred[i]) ;
if ((i%10)==9)
printf (\n) ;
}
}
/*Interrupt service routine for Driver488/SUB interrupts */
void isr (OpaqueP param) {
int sp,
stadc,
errnum;
char errtext [64] ;
/*Print parameter passed to isr to screen */
printf ( In interrupt handler, param=%d\n,param) ;
/* Check if the interrupt was due to a Service Request */
sp=SPoll (ieee) ;
if (sp==0) {
printf ( No SRQ detected\n) ;
exit (1) ;
}
/* Check that the Service Request was from the ADC488 */
stadc=SPoll (adc) ;
if ((stadc&0x40)==0) {
printf( Not an ADC488 SRQ.\n) ;
exit (1) ;
}
/* Interpret the Serial Poll response */
Seitenansicht 172
1 2 ... 168 169 170 171 172 173 174 175 176 177 178 ... 399 400

Kommentare zu diesen Handbüchern

Keine Kommentare