1-8
Agilent E5270 TIS User’s Guide, Edition 1
Starting TIS Programming
TIS Programming
Programming
The measurement program should be created as shown below. For programming
example, see Figure 1-1.
1. Include the header files.
To use the TIS library, the header file
E5270_TIS.h
must be included at the
beginning of measurement program. The header file contains various necessary
information for the function, such as function declaration and macro definitions.
The header file has been stored in the folder created when you install the TIS
library. The following example includes the header file in the \Agilent\E5270
folder.
Example:
#include "\Agilent\E5270\E5270_TIS.h"
2. Define the
open_E5270
function to establish the connection with the Agilent
E5270. The following example connects the Agilent E5270 of GPIB address 17.
Example:
main()
{
int ret;
#ifdef E5270_TIS_H
ret = open_E5270( "GPIB0::17::INSTR" , ERR_DETECT_ON,NULL);
if ( ret != 0 ) {
printf( "E527x device open failed. Exit program.\n" );
return( -1 );
}
#endif
3. Create measurement routine. Then use TIS functions:
•
to initialize the Agilent E5270,
•
to connect device under test or to enable source/measurement channels,
•
to set source outputs,
•
to perform measurements, and
•
to disconnect device under test or to disable source/measurement channels.
Also, program lines to display, store, or calculate data should be added.
For programming example, see Figure 1-1. This example performs resistance
measurement.