/* gpclear adr clears the specified GPIB device */ #include #include "GPIBports.h" /*#include */ #include extern int fdGPIB; /* This is the nubmer of the serial port for GPIB */ /* Already in GPIBports.c */ main(int argc, char *argv[]) { int i; int ieeeadr; char gp_buf[1024]; if (argc<2) { printf("gpclear adr clears GPIB device.\n"); exit(1); } ieeeadr = atoi(argv[1]); /* Assume the Micro488A serial<-->gpib interface is already set up */ fdGPIB = 0; fdGPIB = openport(IEEESERIAL, EXTB); setspeed(fdGPIB); printf("Have opened connection to Micro488A."); gpib_clear(ieeeadr); printf(" Done.\n"); }