/* gpblink adr blinks the test lite on an Iotech Digital 488/80 */ /* at the specified address. */ #include #include "GPIBports.h" /*#include */ #include extern int fdGPIB; /* This is the nubmer of the serial port for GPIB */ /* Already in GPIBports.c */ int j; main(int argc, char *argv[]) { int i; int ieeeadr; char gp_buf[1024]; if (argc<2) { printf("gpblink adr blinks the test light on the specified IoTech/80"); 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.\n\n"); gpib_clear(ieeeadr); for (j=0; j< 100; j++) { gpib_wrs(ieeeadr, "T1X"); /* Turn on the light. */ printf("\n On"); sleep( 1 ); gpib_wrs(ieeeadr, "T0X"); /* Turn off the light. */ printf("\n Off"); sleep( 1 ); } printf("\nDone.\n"); }