Programming Examples 45
SR620 Universal Time Interval Counter
Program Example 2
IBM PC, Microsoft FORTRAN V4.0, National Instruments GPIB Card
This example demonstartes using the SR620 via the GPIB. Microsoft's FORTRAN (for PC compatibles) is
used to program the time interval counter via National Instrument's GPIB interface card.
C Example program demonstrating programming the SR620 over the GPIB using
C the National Instruments GPIB card. The program sets up the SR620 and
C then starts taking data.
C
C This program is written in Microsoft FORTRAN v4.0. To use the National
C card the National device driver must be installed and the IBCONF program
C must be run to tell the driver where everything is. The program is compiled
C with the command FL /AL /FPa example2.for and the resulting object file is
C linked with the file MFIBL.OBJ (supplied by National )
$storage:2
C this line must be in the source file
common
/ibglob/ibsta,iberr,ibcnt
integer*2
sr620
character*80
data
real*8
answer
C initialize gpib card
call ibinit (ibsta)
C get device id for sr620
sr620 = ibfind ('SR620 ')
C setup TIC
call ibwrt (sr620,'*RST;MODE1;SRCE2;SIZE10;AUTM0\n 'c,30)
C
start measurement
100
call ibwrt (sr620,'STRT;*WAI;XAVG?\n 'c,16)
C read answer
data = ' '
call ibrd (sr620,data,20)
read
(data,1000)answer
1000
format
(bn,1D22.16)
write (*,*) answer
C continue forever
goto
100
end
Summary of Contents for SR620
Page 2: ...SR620 Universal Time Interval Counter...
Page 6: ...iv Table of Contents SR620 Universal Time Interval Counter...
Page 8: ...vi Safety and Preparation for Use SR620 Universal Time Interval Counter...
Page 12: ...x Specifications SR620 Universal Time Interval Counter...
Page 58: ...42 Programming Commands SR620 Universal Time Interval Counter...
Page 72: ...56 Programming Examples SR620 Universal Time Interval Counter...
Page 76: ...60 Troubleshooting Tips SR620 Universal Time Interval Counter...
Page 82: ...66 Performance Test SR620 Universal Time Interval Counter...
Page 90: ...74 Calibration Procedure SR620 Universal Time Interval Counter...
Page 102: ...86 Circuit Description SR620 Universal Time Interval Counter...
Page 124: ...108 Parts List SR620 Universal Time Interval Counter...