Emask - Agilent Technologies 3458A User Manual

Hide thumbs Also See for 3458A:
Table of Contents

Advertisement

EMASK

Example

EMASK

Syntax
value
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
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
20 INTEGER Num_samples,I,J,K
30 Num_samples = 200
30 ASSIGN @Dvm TO 722
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"
70 OUTPUT @Dvm;"SWEEP 30E-6,200" !30µs INTERVAL, 200 SAMPLES
80 OUTPUT @Dvm;"DSDC 10"
90 OUTPUT @Dvm;"LEVEL 250, DC"
100 OUTPUT @Dvm;"TRIG LEVEL"
110 OUTPUT @Dvm;"MEM FIFO"
120 TRANSFER @Dvm TO @Buffer;WAIT !TRANSFER SAMPLES TO CONTROLLER
130 OUTPUT @Dvm;"ISCALE?"
140 ENTER @Dvm;S
150 FOR I=1 TO Num_samples
160 ENTER @Buffer USING "
161 !WORD INTO EACH VARIABLE J AND K (# = STATEMENT TERMINATION NOT
165 !REQUIRED; W
170 Samp(I)=(J*65536.+K+65536.*(K<O))!CONVERT TO REAL NUMBER
180 R=ABS(Samp(I))
190 IF R>2147483647 THEN PRINT "OVLD"!IF OVERLOAD OCCURRED, PRINT MESSAGE
200 Samp(I)=Samp(I)*S
210 Samp(I)=DROUND(Samp(1),8)
220 PRINT Samp(I)
230 NEXT I
240 END
Error Mask. Enables certain error condition(s) to set the error bit (bit 5) in the
status register.
EMASK [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
!COMPUTER ARRAY NUMBERING STARTS AT 1
!CREATE INTEGER VARIABLES
!200 SAMPLES
!DESIGNATE MULTIMETER ADDRESS
!DINT FORMATS, TARM SYN, TRIG AUTO
!DIRECT-SAMPLING, 10V RANGE
!LEVEL TRIGGER AT 250% OF RANGE (25V)
!LEVEL TRIGGER EVENT
!ENABLE READING MEMORY, FIFO MODE
!QUERY SCALE FACTOR FOR DINT FORMAT
!ENTER SCALE FACTOR
#
,W,W";J,K
!ENTER ONE 16-BIT 2'S COMPLEMENT
= ENTER DATA AS 16-BIT 2'S COMPLEMENT INTEGER)
!USE ABSOLUTE VALUE TO CHECK FOR OVLD
!APPLY SCALE FACTOR
!ROUND CONVERTED READING
!PRINT READINGS

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents