Example Programs
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.
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);
/* Set Controller to Addr 0 */
Send(0,k2002,":form:elem read",24L,NLend);
/* Include only reading in data string */
while( !kbhit() )
{
Send(0,k2002,":conf:freq",20L,NLend);
/* Configure for one-shot FREQ measure-
ments */
Send(0,k2002,":read?",6L,NLend);
/* Make measurement */
Receive(0,k2002,ki2002,20L,STOPend);
printf("%s",ki2002);
/* Display reading */
}
}
: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
Содержание 2002
Страница 123: ...Front Panel Operation 2 106...
Страница 145: ...IEEE 488 Reference 3 22...
Страница 167: ...IEEE 488 Reference 3 44...
Страница 284: ...A Specifications A 1...
Страница 362: ......
Страница 364: ...This page left blank intentionally...
Страница 365: ......