Agilent Technologies E1330B User's Manual And Scpi Programming Manual page 139

75000 series b quad 8-bit digital i/o module
Hide thumbs Also See for E1330B:
Table of Contents

Advertisement

Appendix B
10 !re-save "DIG_NDL".
20 !Program to demonstrate the non-data lines—FLAG/CONTROL,RES/STS, PIR.
30 !This main line code is reserved as a error handling shell.
40 !All application code must be at lower level context.
50 ASSIGN @Sys TO 70900
60 ASSIGN @Dvm TO 70903
70 ASSIGN @Dig TO 70910
80 COM @Sys,@Dvm,@Dig
90 ON TIMEOUT 7,3 GOTO End
100 ON ERROR RECOVER Kaboom
110
!at lower level contexts.
120
Main
121
PRINT ""
130
E13xx_errors
140
GOTO End
150 Kaboom:PRINT ""
160
PRINT ERRM$
170
PRINT "HERE IS THE E13XX ERROR STATUS"
180
El3xx_errors
190 End:END
200
!
210
SUB E13xx_errors
220
COM @Sys,@Dvm,@Dig
230
DIM A$[128]
240
ABORT 7
250
CLEAR @DVM
260
REPEAT
270
OUTPUT @Dvm;"SYST:ERR?"
280
ENTER @Dvm;A,A$
290
PRINT "DVM ERROR ";A$
300
UNTIL A=0
310
!
320
CLEAR @Sys
330
REPEAT
340
OUTPUT @Sys;"SYST:ERR?"
350
ENTER @Sys;A,A$
360
PRINT "SYSTEM ERROR ";A$
380
370
!
UNTIL A=0
390
CLEAR @Dig
400
REPEAT
410
OUTPUT @Dig;"SYST:ERR?"
420
ENTER @Dig;A,A$
430
PRINT "DIG I/O ERROR ";A$
440
UNTIL A=0
450
SUBEND
460
!
470
SUB Main
480
COM @Sys,@Dvm,@Dig
490
Cnt_flg_io
500
Res_sts_io
510
Res_pir_io
520
Res_pi_io
530
!Put Application code here.
Agilent E1330B Digital I/O Module Register Information
!Define I/O paths.
!Turn TIMEOUTS to errors—this
branch never taken.
!This handles timeouts and errors not
handled.
!Put application code in this sub.
!This sub reads all errors from E13xx
instruments.
!This subroutine is treated as the main line.
!Demonstrate driving CONTROL0,
receiving FLAG0.
!Demonstrate driving RES0, receiving STS0.
!Demonstrate driving RES0, receiving PIR0.
!Demonstrate driving RES0, receiving PI0.
137

Advertisement

Table of Contents
loading

Table of Contents