EasyManua.ls Logo

Agilent Technologies Infiniium DCA

Agilent Technologies Infiniium DCA
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-16
Sample Programs
C Programming Examples
fclose ( fp );
}
write_lrnstr (setup,count); /* send learnstring */
write_IO (":RUN");
}/* end get_learnstring */
SICL I/O Example
File: sicl_IO.c
/* sicl_IO.c */
#include <stdio.h> /* location of: printf ( ) */
#include <string.h> /* location of: strlen ( ) */
#include "hpibdecl.h"
/* This file contains IO and initialization routines for the SICL libraries. */
/*
* Function name: init_IO
* Parameters: none
* Return value: none
* Description: This routine initializes the SICL environment. It sets up
* error handling, opens both an interface and device session, sets timeout
* values, clears the interface by pulsing IFC, and clears the instrument
* by performing a Selected Device Clear.
*/
void init_IO ( )
{
ionerror (I_ERROR_EXIT); /* set-up interface error handling */
/* open interface session for verifying SRQ line */
bus = iopen ( INTERFACE );
if ( bus == 0 )
printf ("Bus session invalid\n");
itimeout ( bus, 20000 ); /* set bus timeout to 20 sec */
iclear ( bus ); /* clear the interface - pulse IFC */
scope = iopen ( DEVICE_ADDR ); /* open the scope device session */
if ( scope == 0)
printf ( "Scope session invalid\n");
itimeout ( scope, 20000 ); /* set device timeout to 20 sec */
iclear ( scope ); /* perform Selected Device Clear on scope */
} /* end init_IO */
/*
* Function name: write_IO

Other manuals for Agilent Technologies Infiniium DCA

Related product manuals