Agilent Technologies E1326B Instrukcja Użytkownika Strona 232

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 291
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 231
/* this function specifies a parameter opcode of 7 for the function */
/* parameter. This is a parameter out of range. */
/* write ’measurement function’ to command register, wait for */
/* ready bit = 1 */
while(!READY);
iwpoke((unsigned short *)(base_addr + 0x08),4);
/* write an opcode of 7 to parameter register, wait for ready bit = 1 */
while (!READY);
iwpoke((unsigned short *)(base_addr + 0x0A),7);
while (!DONE);
/* call function which reads the error if an error has occurred */
if(!NOERR) check_for_error(base_addr);
}
/*******************************************************/
void check_for_error(char *base_addr)
{
unsigned short error_code; /* variable for error code from the */
/* query response register */
/* write ’send error’ to command register, wait for */
/* qryrdy bit = 1 */
iwpoke((unsigned short *)(base_addr + 0x08),15);
while (!QRYRDY);
error_code = iwpeek((unsigned short *)(base_addr + 0x08));
printf("Error code = %x", (error_code & 0xFF));
}
Appendix C HP E1326B/E1411B Multimeter Register-Based Programming 233
Przeglądanie stron 231
1 2 ... 227 228 229 230 231 232 233 234 235 236 237 ... 290 291

Komentarze do niniejszej Instrukcji

Brak uwag