5-26
Remote Programming
void
main(int, char *[]);
void
txLia(char *);
void
initGpib(char *);
void
setupLia(void);
void
printOutBinaryResults(void);
void
printOutIEEEResults(void);
void
printOutLIAResults(void);
/* National Instruments Interface Function Prototypes (488.1 Calls - see the National software manual).
These are declared in "decl.h"
int
ibfind(char*);
void
ibwrt(int,char *,int);
void
ibrd(int,char *,unsigned long);
void
ibrsp(int,char *);
void
ibeos(int,int);
void
ibtmo(int,int);
*/
/* global variables */
int lia;
/* SR830 handle */
int
rxBuf[660*2];
/* FAST mode data buffer */
float
rfBuf[1000];
/* Floating point data buffer */
void main(int argc, char *argv[])
{
int
nPts,i;
char
tstr[20];
if (argc<2) {
printf("\nUsage: liatest <devName>\n");
exit(1);
}
else
initGpib(SR830);
txLia("OUTX1");
/* Set the SR830 to output responses to the GPIB port */
setupLia();
/* Setup the SR830 */
printf("\nAcquiring Data\n");
ibtmo(lia,0);
/* turn off timeout for lia or set the timeout longer than the scan (10 seconds). The
timeout measures the time to transfer the FULL number of bytes, not the time since
the most recent byte is received.*/
txLia("FAST2;STRD");
/* Turn FAST mode data transfer ON, then start scan using the STRD start
after delay command. The STRD command MUST be used if the scan is to
be started by this program! Do NOT use STRT. */
/* take data for 10 seconds and then stop */
ibrd(lia,(char *)rxBuf,2564L);
/* get FAST mode data for 10 seconds.
10 seconds of data at 64 Hz sample rate has 64*10 + 1 points,
each point consists of X (2 bytes) and Y (2 bytes) for a total of
4*(64*10+1) = 2564 bytes. */
i=(int)ibcnt;
/* save total number of bytes read */
Summary of Contents for SR830
Page 5: ...1 4...
Page 11: ...SR830 DSP Lock In Amplifier 1 10...
Page 13: ...2 2 Getting Started...
Page 17: ...2 6 The Basic Lock in...
Page 23: ...2 12 Outputs Offsets and Expands...
Page 25: ...2 14 Storing and Recalling Setups...
Page 31: ...3 4 SR830 Basics...
Page 33: ...3 6 SR830 Basics...
Page 37: ...3 10 SR830 Basics...
Page 53: ...3 26 SR830 Basics...
Page 74: ......
Page 83: ...4 30 Rear Panel...
Page 107: ...5 24 Remote Programming...
Page 113: ...5 30 Remote Programming...
Page 117: ...5 34 Remote Programming...
Page 121: ...6 4 Performance Tests...
Page 123: ...6 6 Performance Tests...
Page 125: ...6 8 Performance Tests...
Page 129: ...6 12 Performance Tests...
Page 131: ...6 14 Performance Tests...
Page 133: ...6 16 Performance Tests...
Page 139: ...6 22 Performance Tests...
Page 145: ...7 2 Circuit Description...