SUBROUTINE LABWT(NSWPS,TIME,IBNUM) C C C This program begins an A/D sweep and waits fo data. C Status is returned in IST C C NSWPS is returned specifying the number of sweeps. C C TIME is returned being the sampling time (secs) C C IBNUM is returned bieng the buffer number (0-3) C C IBUF is returned being four complete primary analog buffers. C IBUF must be in comman. C IBUF is structured as : C C WORD CONTENTS C ---- -------- C 0 Number of sweeps C 1 IPRSET C 2 Clock rate C 3 Unused C 4-259 256 words of channel data C C C STATUS from LMN is the buffer offset. (0-3) C C C LOGICAL IFST REAL CLK(5) INTEGER CMDO(13),SER(8),LMN(2) COMMON /ABUF/IBUF(1040) DATA CLK/1000000.,100000.,10000.,1000.,100./ DATA CMDO/'RU',12*' '/,IFST/.TRUE./ DATA LMN/3R...,3RLMN/ C C CALL REQUES(LMN,,IDS) CALL CNCT(LMN,1,,SER) IF(IFST)CALL SEND(LMN,CMDO,33) IFST=.FALSE. CALL WAITFR(1) !wait for LMN to emit status IBNUM=SER(1) IOF=IBNUM*260+1 NSWPS=IBUF(IOF) X=IBUF(IOF+1) CLOCK=CLK(IBUF(IOF+2)) TIME=0. IF(CLOCK.EQ.0.)GOTO 20 TIME=(0.-X)/CLOCK 20 RETURN END