prt = strtok(lrndata,";"); printf("\n\t%s",prt);

/* Print out each (*LRN? data) token */ while (prt != NULL)

{

prt = strtok(NULL,";");

/* Exit when data returned by *OPC? (1) is reached */ if (atoi(prt) == 1)

break;

/* Print one user screen’s worth of *LRN? data, have user */ /* press ’Enter’ to see the next screen of data */

if (loop >= 23)

{

printf("\n\nPress \’Enter\’ to continue"); scanf("%c", &ch);

fflush(stdin); loop = 0;

}

printf("\n\t%s",prt);

loop ++;/* increment counter */

}

}

Chapter 1

Getting Started 27

Page 27
Image 27
HP E1429A manual Chapter Getting Started