6
Command Reference
220 PRINT Rdgs(I) !PRINT READING
230 END IF
240 NEXT I
250 END
DREAL format
The following program uses the DREAL output format. Notice that no conversion
is necessary using this format since DREAL is the same format that the controller
uses as its internal data format (8-bytes/word).
10 OPTION BASE 1 !COMPUTER ARRAY NUMBERING STARTS AT 1
20 REAL Rdgs(1:10) BUFFER !CREATE BUFFER ARRAY
30 ASSIGN @Dvm TO 722 !ASSIGN MULTIMETER ADDRESS
40 ASSIGN @Rdgs TO BUFFER Rdgs(*) !ASSIGN BUFFER I/O PATH NAME
50 OUTPUT @Dvm;"PRESET NORM;NPLC 10;OFORMAT DREAL;NRDGS 10"
55 !TRIG SYN, 10 PLCs, DCV AUTORANGE, DREAL OUTPUT FORMAT, 10 RDGS/TRIG.
60 TRANSFER @Dvm TO @Rdgs;WAIT !SYN EVENT, TRANSFER READINGS
70 FOR I=1 TO 10
80 IF ABS(Rdgs(I))=1.E+38 THEN !IF OVERLOAD OCCURRED:
90 PRINT "OVERLOAD OCCURRED" !PRINT OVERLOAD MESSAGE
100 ELSE !IF NO OVERLOAD:
110 Rdgs(I)=DROUND(Rdgs(I),8) !ROUND READINGS
120 PRINT Rdgs(I) !PRINT READINGS
130 END IF
140 NEXT I
150 END
The preceding program used the TRANSFER statement to get readings from the
multimeter. The following program uses the ENTER statement to transfer
readings to the computer using the DREAL format. The ENTER statement is easier
to use since no I/O path is necessary but is much slower than the TRANSFER
statement. Also when using the ENTER statement, you must use the FORMAT OFF
command to instruct the cont ]roller to use its internal data structure instead of
ASCII.
10 OPTION BASE 1 !COMPUTER ARRAY NUMBERING STARTS AT
312
Keysight 3458A User's Guide