Fluke PM6685 Fast Sampling, GW-Basic for National Instruments PC-IIA, Setting Up the Interface

Models: PM6685 PM6685R PM6681 PM6681R

1 276
Download 276 pages 1.51 Kb
Page 47
Image 47
4. Fast Sampling

Programming Examples

4. Fast Sampling

This program makes a quick array measurement and stores the results in the internal memory of the counter. Then it writes the results to a file called MEAS.DAT. The measurement results as a function of the samples can be visualized in a spreadsheet program such as Excel.

50 ‘

60 OPEN “O”, 1, “MEAS.DAT”

70 CNTNAME$ = “DEV10"

80 CALL IBFIND (CNTNAME$, CNT%)

90

100

110—— Clear status ——

120WRT$ = “*CLS”

130CALL IBWRT(CNT%, WRT$)

140

150—— Enable 1000 measurement with maximum speed ——

160WRT$ = “:TRIG:COUN 1000; :ARM:COUN 1"

170CALL IBWRT (CNT%, WRT$)

180WRT$ = “:INP:LEV:AUTO ONCE; :CAL:INT:AUTO OFF”

190CALL IBWRT (CNT%, WRT$)

200WRT$ = “:DISP:ENAB OFF; :INT:FORM PACKED”

210CALL IBWRT (CNT%, WRT$)

220WRT$ = “:ACQ:APER MIN; :AVER:STAT OFF”

230CALL IBWRT (CNT%, WRT$)

240

250—— Enable SRQ on operation complete ——

260WRT$ = “*ESE 1; *SRE 32"

270CALL IBWRT (CNT%, WRT$)

280

290—— Start measurement ——

300PRINT “Measuring”

310WRT$ = “INIT; *OPC”

320CALL IBWRT (CNT%, WRT$)

330

340—— Wait for operation complete ——

350MASK = &H800

360CALL IBWAIT (CNT%, MASK)

370

380—— Read status and event status register ——

390CALL IBRSP (CNT%, SPR%)

400WRT$ = “*ESR?”

410CALL IBWRT (CNT%, WRT$)

420MSG$ = SPACE$(255)

430CALL IBRD (CNT%, MSG$)

GW-Basic for National Instruments PC-IIA, Setting Up the Interface 4-7

Page 47
Image 47
Fluke PM6681R, PM6685R manual Fast Sampling, GW-Basic for National Instruments PC-IIA, Setting Up the Interface