EasyManua.ls Logo

Agilent Technologies 86100A

Agilent Technologies 86100A
366 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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);

Other manuals for Agilent Technologies 86100A

Related product manuals