4-34
Example Program
SR844 RF Lock-In Amplifier
Example Program
Using Microsoft C with the GPIB interface
To successfully interface the SR844 to a PC via the GPIB interface, the instrument,
interface card and interface drivers must all be configured properly. To configure the
SR844, the GPIB address must be set with the
Setup
key. The default address is 8; use this
address unless a conflict occurs with other instruments in your system. The SR844 will be
set to GPIB address 8 whenever a reset is performed (power on with the
Setup
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 SR844. 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:
SR844
Device Address:
8
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 SR844. If you cannot talk to the SR844 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 SR844
Page 10: ...viii SR844 RF Lock In Amplifier...
Page 12: ...1 2 Getting Started SR844 RF Lock In Amplifier...
Page 32: ...2 2 SR844 Basics SR844 RF Lock In Amplifier...
Page 60: ...3 2 Operation SR844 RF Lock In Amplifier...
Page 102: ...3 44 Shift Functions SR844 RF Lock In Amplifier...
Page 108: ...4 6 Index of Commands SR844 RF Lock In Amplifier...
Page 144: ...4 42 Example Program SR844 RF Lock In Amplifier...
Page 146: ...5 2 Performance Tests SR844 RF Lock In Amplifier...
Page 150: ...5 6 Performance Tests SR844 RF Lock In Amplifier...
Page 156: ...5 12 Performance Tests SR844 RF Lock In Amplifier...
Page 158: ...5 14 Performance Tests SR844 RF Lock In Amplifier...
Page 162: ...5 18 Performance Tests SR844 RF Lock In Amplifier...
Page 166: ...5 22 SR844 Test Record SR844 RF Lock In Amplifier...
Page 168: ...6 2 Circuitry Parts Lists and Schematics SR844 RF Lock In Amplifier...
Page 246: ...Parts Lists SR844 RF Lock In Amplifier 6 80 Schematic Diagrams...