Agilent Technologies 42D Guide de l'utilisateur Page 75

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 110
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 74
6-9
Status Reporting
Status Byte Register (SBR)
Example The following example uses the *STB? query to read the contents of the
oscilloscopes Status Byte Register.
10 OUTPUT 707;"*STB?" !Query the Status Byte Register
20 ENTER 707;Result !Place result in a numeric variable
30 PRINT Result !Print the result
40 End
The next program prints 112 and clears bit 6 (RQS) of the Status Byte Register.
The difference in the decimal value between this example and the previous one
is the value of bit 6 (weight = 64). Bit 6 is set when the first enabled summary
bit is set and is cleared when the Status Byte Register is read by the serial poll
command.
Example The following example uses the HP BASIC serial poll (SPOLL) command (GPIB
only) to read the contents of the oscilloscopes Status Byte Register.
10 Result = SPOLL(707)
20 PRINT Result
30 END
Use Serial Polling to Read Status Byte Register
Serial polling is the preferred method to read the contents of the Status Byte Register
because it resets bit 6 and allows the next enabled event that occurs to generate a
new SRQ interrupt.
Vue de la page 74
1 2 ... 70 71 72 73 74 75 76 77 78 79 80 ... 109 110

Commentaires sur ces manuels

Pas de commentaire