EMASK
174 Chapter 6 Command Reference
memory/output format, no format conversions are necessary.)
• Related Commands: DSDC, FUNC, LEVEL, LFILTER, SLOPE, NRDGS,
PRESET FAST, PRESET DIG, SSAC, SSDC, SSPARM?, SWEEP, TARM,
TIMER, TRIG
Example The following program is an example of DC-coupled, direct-sampled digitizing.
The SWEEP command specifies an interval of 30µs and 200 samples. Level
triggering is set for 250% of the 10V range (250% of 10V = 25V). The samples
are sent to reading memory in DINT format. The samples are then sent to the
controller, converted, and printed. By deleting line 110, samples will be
transferred directly to the controller instead of using reading memory. However,
the controller and GPIB must be able to transfer samples at a rate of at least
134k-bytes/second or the multimeter will generate the TRIGGER TOO FAST
error. Refer to "High-Speed Transfer Across the Bus" in Chapter 4 for more
information.
10 OPTION BASE 1 !COMPUTER ARRAY NUMBERING STARTS AT 1
20 INTEGER Num_samples,I,J,K !CREATE INTEGER VARIABLES
30 Num_samples = 200 !200 SAMPLES
30 ASSIGN @Dvm TO 722 !DESIGNATE MULTIMETER ADDRESS
40 ASSIGN @Buffer TO BUFFER [4*Num_samplesl!ASSIGN BUFFER I/O PATH NAME
45 !SAMPLES, (4-BYTES/SAMPLE * 200 SAMPLES = 800 BYTES)
50 ALLOCATE REAL Samp(1:Num_samples)!CREATE REAL ARRAY FOR SAMPLES
60 OUTPUT @Dvm;"PRESET FAST" !DINT FORMATS, TARM SYN, TRIG AUTO
70 OUTPUT @Dvm;"SWEEP 30E-6,200" !30µs INTERVAL, 200 SAMPLES
80 OUTPUT @Dvm;"DSDC 10" !DIRECT-SAMPLING, 10V RANGE
90 OUTPUT @Dvm;"LEVEL 250, DC" !LEVEL TRIGGER AT 250% OF RANGE (25V)
100 OUTPUT @Dvm;"TRIG LEVEL" !LEVEL TRIGGER EVENT
110 OUTPUT @Dvm;"MEM FIFO" !ENABLE READING MEMORY, FIFO MODE
120 TRANSFER @Dvm TO @Buffer;WAIT !TRANSFER SAMPLES TO CONTROLLER
130 OUTPUT @Dvm;"ISCALE?" !QUERY SCALE FACTOR FOR DINT FORMAT
140 ENTER @Dvm;S !ENTER SCALE FACTOR
150 FOR I=1 TO Num_samples
160 ENTER @Buffer USING "
#,W,W";J,K !ENTER ONE 16-BIT 2'S COMPLEMENT
161 !WORD INTO EACH VARIABLE J AND K (# = STATEMENT TERMINATION NOT
165 !REQUIRED; W = ENTER DATA AS 16-BIT 2'S COMPLEMENT INTEGER)
170 Samp(I)=(J*65536.+K+65536.*(K<O))!CONVERT TO REAL NUMBER
180 R=ABS(Samp(I)) !USE ABSOLUTE VALUE TO CHECK FOR OVLD
190 IF R>2147483647 THEN PRINT "OVLD"!IF OVERLOAD OCCURRED, PRINT MESSAGE
200 Samp(I)=Samp(I)*S !APPLY SCALE FACTOR
210 Samp(I)=DROUND(Samp(1),8) !ROUND CONVERTED READING
220 PRINT Samp(I) !PRINT READINGS
230 NEXT I
240 END
EMASK
Error Mask. Enables certain error condition(s) to set the error bit (bit 5) in the
status register.
Syntax EMASK [value]
value You enable an error condition by specifying its decimal weight as the value
parameter. To enable more than one error condition, specify the sum of the