Keithley 2002 User Manual page 321

Hide thumbs Also See for 2002:
Table of Contents

Advertisement

Example Programs
:CONFigure and :READ? Commands
Microsoft QuickC 2.0
National GPIB PC Interface
©1992, Keithley Instruments, Inc.
Description
This program demonstrates the use of the :CONFigure and
:READ? commands. In general, :CONFigure is used to
select the FREQ function and then performs a *RST. The
:READ? command is used to make a measurement, which is
Program (confnat.c)
#include <stc.h>
#include <stdio.h>
#include <stdlib.h>
#include <decl.h>
#include <math.h>
#include <graph.h>
#include <string.h>
#include <time.h>
#define k2002 16
main()
{
int
stat, l;
char
status, keych;
char
cmd[255];
char
ki2002[10];
_clearscreen(_GWINDOW);
SendIFC(0);
Send(0,k2002,":form:elem read",24L,NLend);
while( !kbhit() )
{
Send(0,k2002,":conf:freq",20L,NLend);
Send(0,k2002,":read?",6L,NLend);
Receive(0,k2002,ki2002,20L,STOPend);
printf("%s",ki2002);
}
}
G-4
then sent to the computer and displayed. This process contin-
ues until a keystroke occurs.
Required equipment
• Model 2002 Multimeter
• Microsoft QuickC 2.0
• National GPIB PC Interface (interface software must be
installed and configured as explained in the instruction
manual).
The program assumes that the Model 2002 is set to address
16.
/* Set Controller to Addr 0 */
/* Include only reading in data string */
/* Configure for one-shot FREQ measure-
ments */
/* Make measurement */
/* Display reading */

Advertisement

Table of Contents
loading

Table of Contents