Télécharger Imprimer la page

Keysight Technologies 3458A Guide D'utilisation page 154

Multimètre

Publicité

4
Making Measurements
Using the DREAL output 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).
10OPTION BASE 1!COMPUTER ARRAY NUMBERING STARTS AT 1
20REAL Rdgs(1:10) BUFFER!CREATE BUFFER ARRAY
30ASSIGN @Dvm TO 722!ASSIGN MULTIMETER ADDRESS
40ASSIGN @Rdgs TO BUFFER Rdgs(*)!ASSIGN BUFFER I/O PATH NAME
50OUTPUT @Dvm;1'PRESET NORM;NPLC 10;OFORMAT DREAL;NRDGS 10"
55!TRIG SYN, 10 PLCs, DCV AUTORANGE, DREAL OUTPUT FORMAT, 10 RDGS/TRIG.
60TRANSFER @Dvm TO @Rdgs;WAIT!SYN EVENT, TRANSFER READINGS
70FOR I=1 TO 10
80IF ABS(Rdgs(I))=1.E+38 THEN!IF OVERLOAD OCCURRED:
90PRINT "OVERLOAD OCCURRED"!PRINT OVERLOAD MESSAGE
100ElSE!IF NO OVERLOAD:
110Rdgs(I)=DROUND(Rdgs(I),8)!ROUND READINGS
120PRINT Rdgs(I)!PRINT READINGS
130END IF
140NEXT I
150END
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 controller to use its internal data structure instead of
ASCII.
10OPTION BASE 1!COMPUTER ARRAY NUMBERING STARTS AT
20Num_readings=20!NUMBER OF READINGS = 20
30ALLOCATE REAL Rdgs(1:Num_readings)!CREATE ARRAY FOR READINGS
40ASSIGN @Dvm TO 722!ASSIGN MULTIMETER ADDRESS
50OUTPUT @Dvm;"PRESET NORM;OFORMAT DREAL;NPLC 10;NRDGS";Num_readings
55!TRIG SYN, DCV AUTORANGE, DREAL OUTPUT FORMAT, 10 PLC, 20 READINGS/
TRIG
60ASSIGN @Dvm;FORMAT OFF!USE 8-BYTE/WORD DATA STRUCTURE
70FOR I=1 TO Num_readings
80ENTER @Dvm;Rdgs(I)!ENTER EACH READING
90IF ABS(Rdgs(I))=1.E+38 THEN!IF OVERLOAD OCCURRED:
100PRINT "OVERLOAD OCCURRED"!PRINT OVERLOAD MESSAGE
110ELSE!IF NO OVERLOAD OCCURRED
154
Keysight 3458A User's Guide

Publicité

loading