
2-15
Sample Programs
C Programming Examples
FILE *fp;
unsigned char setup[MAX_LRNSTR] ={0};
int actualcnt = 0;
write_IO (":SYSTem:SETup?");
/* request learnstring */
actualcnt = read_IO (setup, MAX_LRNSTR);
fp = fopen ( "learn2","wb");
if ( fp != NULL )
{
fwrite ( setup,sizeof (unsigned char), (int) actualcnt,fp);
printf ("Learn string stored in file Learn2\n");
fclose ( fp );
}
else
printf ("Error in file open\n");
}/* end store_learnstring */
/*
* Function name: change_setup
* Parameters: none
* Return value: none
* Description: This routine places the scope into local mode to allow the customer to change the system setup.
*/
void change_setup ( )
{
printf ("Please adjust setup and press ENTER to continue.\n");
getchar();
} /* end change_setup */
/*
* Function name: get_learnstring
* Parameters: none
* Return value: none
* Description: This routine retrieves the system setup known as a
* learnstring from a disk file called Learn2. It then restores the system setup to the scope.
*/
void get_learnstring ( )
{
FILE *fp;
unsigned char setup[MAX_LRNSTR];
unsigned long count = 0;
fp = fopen ( "learn2","rb");
if ( fp != NULL )
{
count = fread ( setup,sizeof(unsigned char),MAX_LRNSTR,fp);
Summary of Contents for 86100A
Page 18: ...1 14 Introduction Status Reporting Figure 1 4 Status Reporting Data Structures...
Page 19: ...1 15 Introduction Status Reporting Status Reporting Data Structures continued...
Page 94: ...2 40 Sample Programs BASIC Programming Examples...
Page 124: ...4 16 Root Level Commands VIEW...
Page 132: ...5 8 System Commands TIME...
Page 140: ...6 8 Acquire Commands SWAVeform RESet...
Page 152: ...7 12 Calibration Commands STATus...
Page 192: ...11 12 Display Commands SSAVer...
Page 202: ...12 10 Function Commands VERTical RANGe...
Page 203: ...13 AREA 13 2 DPRinter 13 2 FACTors 13 3 IMAGe 13 3 PRINters 13 4 Hardcopy Commands...
Page 316: ...21 12 TDR TDT Commands Rev A 05 00 and Below STIMulus...
Page 332: ......