REMOTE PROGRAMMING
4-14
EXAMPLE PROGRAM 2
Using Microsoft C with the Capital Equipment Corp. (CEC) GPIB card on the IBM PC.
To successfully interface the SR715/720 to a PC via the GPIB interface, the instrument, interface card, and
interface drivers must all be configured properly. To configure the SR715/720, the GPIB address must be set
using the switches SW2 on the rear panel.
Make sure that you follow all the instructions for installing the GPIB card. The CEC GPIB card needs to be
located in memory where it will not conflict with any other devices in the PC.
Once the hardware is configured, use "TRTEST". This terminal emulation program (supplied by CEC) allows
you to send commands to the SR715/720 directly from your computer's keyboard. If you cannot talk to the
SR715/720 via "TRTEST", then your programs will not run.
/
*************************************************************************************
/
/
*
This program demonstrates the use of the SR720's binary return format. A measurement is taken and
returned to the computer along with the type of reading (R,L,Q, etc.) and measurement status.
This program is written in Microsoft C version 5.1. The header file for the GPIB interface is ms-c488.h
(supplied by Capitol Equipment Corp). To compile this program, use CL/AL/c. Then link the resulting object file
with GPIB.OBJ (supplied by CEC).
*
/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ms-c488.h>
#define sr720 17
/
*
GPIB address (make this equal to the SR720 address on SW2
*
/
/
*
function prototypes
*
/
void main (void);
void InitGpib (void);
void TxGpib (int,char
*
);
void GetGpib (int);
void MakeTalk (int);
void StatCheck (int);
/
*
Global variables
*
/
int status, length, count;
char recv[80];
unsigned char data[100];
/
*
Major and minor parameter types
*
/
char mmaj[4][20] = {"Resistance", "Inductance", "Capacitance", "Capacitance"};
char mmin[4][20] = {"Q", "Q", "Dissipation", "Resistance"};
void main ()
{
float
maj,min;
int
seg,mtype,errs;
InitGpib
();
TxGpib (sr720,"
*
RST;MMOD1;PMOD0");
/
*
reset LCR meter, triggered mode, set to auto
measurement mode
*
/
Содержание SR715
Страница 5: ...SR715 720 LCR METER iv ...
Страница 46: ...ACCURACY 3 3 ...
Страница 94: ...MAINTENANCE 6 8 ...