Example Program - Stanford Research Systems SR844 User Manual

Rf lock-in amplifier
Table of Contents

Advertisement

4-34 Example Program

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:
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.
SR844 RF Lock-In Amplifier
Device Name:
Device Address:
EOS Character:
Terminate Read on EOS:
SR844
8
0Ah (linefeed)
Yes

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents