Remote Operation
Sample Programs
5
5-13
*/
/* return TRUE if any errors were found */
/*--------------------------------------------------------------------*/
int check_errors (void)
{
unsigned char status7;
int retval;
/*---------------------------------*/
/* Check for GPIB Interface Errors */
/*---------------------------------*/
if (ibsta & ERR)
{ printf ("GPIB Status=%4X Error=%d\n");
return 1;
}
/*-----------------------*/
/* Check for RUSKA 7252 Errors */
/*-----------------------*/
retval = 0;
while (!kbhit ( ))
{ ibrsp (device, &status7); /* Serial poll */
if ((status7 & 4) == 0) /* Check error bit */
break;
retval = 1;
request_7000 ("SYST:ERR?\n"); /* Get error message */
printf (buffer);
}
return retval;
}
/*--------------------------------------------------------------------*/
/* write_7000 : write a command to the 7250 */
/*--------------------------------------------------------------------*/
void write_7000 (char *s)
{
ibwrt (device, s, strlen (s));
}
/*--------------------------------------------------------------------*/
/* request_7000 : write a query command and read the response */
/*--------------------------------------------------------------------*/
void request_7000 (char *s)
{
ibwrt (device, s, strlen (s));
ibrd (device, buffer, sizeof (buffer));
}
/*--------------------------------------------------------------------*/
Sample Program 2 — RUSKA 7252 GPIB (IEEE-488) — Zero Sequence
/*--------------------------------------------------------------------*/
/* Sample Program 2 - RUSKA 7252 GPIB (IEEE-488)
*/
/* */
/* Zero Sequence */
/*--------------------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
#include "decl.h"
/*--------------------------------------------------------------------*/
int device; /* GPIB Device descriptor */
char buffer[256]; /* buffer for input/output strings */
double pressure; /* Pressure read from unit */
int status; /* Status register from unit */
int check_errors (void);
int zero (void);
void write_7000 (char *s);
void request_7000 (char *s);
/*--------------------------------------------------------------------*/
Содержание RUSKA 7252
Страница 3: ...7252 Change Language Hold key for 5 seconds enter mode ...
Страница 4: ......
Страница 10: ...RUSKA 7252 Users Manual vi ...
Страница 12: ...RUSKA 7252 Users Manual viii ...
Страница 20: ...RUSKA 7252 Users Manual 1 6 ...
Страница 40: ...RUSKA 7252 Users Manual 3 6 ...
Страница 72: ...RUSKA 7252 Users Manual 4 32 ...
Страница 114: ...RUSKA 7252 Users Manual 6 22 ...
Страница 118: ...RUSKA 7252 Users Manual 7 4 ...