Fluke PM6681R Outdoor Timer User Manual


 
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 ——
120 WRT$ = “*CLS”
130 CALL IBWRT(CNT%, WRT$)
140 ‘
150 ‘ —— Enable 1000 measurement with maximum speed ——
160 WRT$ = “:TRIG:COUN 1000; :ARM:COUN 1"
170 CALL IBWRT (CNT%, WRT$)
180 WRT$ = “:INP:LEV:AUTO ONCE; :CAL:INT:AUTO OFF”
190 CALL IBWRT (CNT%, WRT$)
200 WRT$ = “:DISP:ENAB OFF; :INT:FORM PACKED”
210 CALL IBWRT (CNT%, WRT$)
220 WRT$ = “:ACQ:APER MIN; :AVER:STAT OFF”
230 CALL IBWRT (CNT%, WRT$)
240 ‘
250 ‘ —— Enable SRQ on operation complete ——
260 WRT$ = “*ESE 1; *SRE 32"
270 CALL IBWRT (CNT%, WRT$)
280 ‘
290 ‘ —— Start measurement ——
300 PRINT “Measuring”
310 WRT$ = “INIT; *OPC”
320 CALL IBWRT (CNT%, WRT$)
330 ‘
340 ‘ —— Wait for operation complete ——
350 MASK = &H800
360 CALL IBWAIT (CNT%, MASK)
370 ‘
380 ‘ —— Read status and event status register ——
390 CALL IBRSP (CNT%, SPR%)
400 WRT$ = “*ESR?”
410 CALL IBWRT (CNT%, WRT$)
420 MSG$ = SPACE$(255)
430 CALL IBRD (CNT%, MSG$)
Programming Examples
GW-Basic for National Instruments PC-IIA, Setting Up the Interface 4-7