48 Programming Examples
SR620 Universal Time Interval Counter
Program Example 4
IBM PC, Microsoft Fortran v4.0, CEC GPIB Card
This example illustrates the binary dump mode via the GPIB interface using Microsoft FORTRAN. To use the
CEC card with FORTRAN a file called FORT488.OBJ (supplied by CEC) is linked to the FORTRAN program
C Program to test TIC binary dump mode- this program will binary dump samples
C from the time interval counter and convert the binary values to numbers in
C units appropriate to the measurement mode. The program also demonstrates
C sending and receiving simple commands from the TIC. The program uses the GPIB
C interface using an IBM PC with a Capital Equipment Co. GPIB Interface card.
C The necessary interface routines to this card are supplied by CEC and are
C linked to the program.
C This program is written in Microsoft Fortran version 4.0.
C To compile this program use the command: FL /AL /FPi /Gt40000 /c bindump.for
C ( the Gt option is needed to force the data array into the default data
C segment, this is needed by the CEC software)
C The resulting object file is then linked with FORT488.OBJ (from CEC) and
C the emulation math library. (which doesn't assume a math coprocessor)
program
bindump
C the data from each point is stored in 4 consecutive location in the
C array data
integer*2 seg,count,mode,status,samples
integer*2 address,tmode,texpd
integer*2 data(0:19999)
real*8 fdata(0:4999)
character*30
command
character*40
rstring
character dummy
common
/data/
fdata
call
InitGpib
()
10
write (*,'(A\)') ' Enter number of samples (<cr> to quit)->'
read
(*,'(BN,I4)')samples
if ( samples .gt. 5000) goto 10
if (samples .eq. 0)goto 11
C set mode for DMA input
mode
=
16#2105
count = 8*samples
address
=
16
C set up TIC
command(1:30) =' '
write
(command,100)samples
100 format
('BDMP',I4)
call
TxGpib
(address,command)
call
TalkGpib
(address)
seg
=
-1
C read data via dma
Содержание SR620
Страница 2: ...SR620 Universal Time Interval Counter...
Страница 6: ...iv Table of Contents SR620 Universal Time Interval Counter...
Страница 8: ...vi Safety and Preparation for Use SR620 Universal Time Interval Counter...
Страница 12: ...x Specifications SR620 Universal Time Interval Counter...
Страница 58: ...42 Programming Commands SR620 Universal Time Interval Counter...
Страница 72: ...56 Programming Examples SR620 Universal Time Interval Counter...
Страница 76: ...60 Troubleshooting Tips SR620 Universal Time Interval Counter...
Страница 82: ...66 Performance Test SR620 Universal Time Interval Counter...
Страница 90: ...74 Calibration Procedure SR620 Universal Time Interval Counter...
Страница 102: ...86 Circuit Description SR620 Universal Time Interval Counter...
Страница 124: ...108 Parts List SR620 Universal Time Interval Counter...