Example
Program
5-129
SR785 Dynamic Signal Analyzer
Example Program
Using Microsoft C with the GPIB interface
To successfully interface the SR785 to a PC via the GPIB interface, the instrument,
interface card and interface drivers must all be configured properly. To configure the
SR785, the GPIB address must be set in the [System]<Remote> menu. The default
address is 10; use this address unless a conflict occurs with other instruments in your
system. The SR785 will be set to GPIB address 10 whenever a reset is performed (power
on with the backspace key down).
Make sure that you follow all of the instructions for installing the GPIB card. The GPIB
card cannot be simply unpacked and put into your computer. To configure the card, you
may need to set jumpers and switches on the card to set the I/O address and interrupt
levels. Refer to your manual for more information.
Capital Equipment Corp. CEC488 GPIB Card
The CEC488 card contains its low level drivers in ROM. The card address needs to be
set so as not to conflict with other devices in your computer. The software interface uses
a header file and a link library. There is no initialization required for the drivers.
Use the TEST488 program to test the card installation. Use TRTEST to communicate
directly from the keyboard with the SR785. If TRTEST doesn’t work, then your
programs will not run.
The example is written using the CEC library routines.
National Instruments GPIB Card
You must run the program “IBCONF” to configure the resident GPIB driver for your
GPIB card. Please refer to the National Instruments manual for more information. For
example, the following options should be set with IBCONF:
Device
Name:
SR785
Device
Address:
10
EOS Character:
0Ah (linefeed)
Terminate Read on EOS:
Yes
Once all the hardware and GPIB drivers are configured, use “IBIC”. Use “IBWRT” and
IBRD” to send to and receive from the SR785. If you cannot talk to the SR785 via
“IBIC”, then your programs will not run.
To modify the example to use a National Instruments card, modify the routines where
indicated.
Other GPIB cards
You need to setup and configure your card according to your manual. The example
program points out the routines which are interface dependent. Your card should have
functions equivalent to those used in the example.
Summary of Contents for SR785
Page 4: ...ii ...
Page 10: ...viii ...
Page 80: ...1 64 Exceedance Statistics ...
Page 158: ...2 78 Curve Fitting and Synthesis SR785 Dynamic Signal Analyzer ...
Page 536: ...5 136 Example Program SR785 Dynamic Signal Analyzer ...