Output And Edge Detection Examples - Keysight E1459A User & Scpi Programming Manual

64-channel isolated input interrupt module
Table of Contents

Advertisement

Programming Examples

Output and Edge Detection Examples

The following three programming examples demonstrate edge detection, DAV,
and mixed programming methods.
Edge Interrupt Example
This example is coded in BASIC for a System 9000 (Series 300) linked to a
Keysight E1406 Command Module via GPIB. The example enables all four
channel ports to detect both positive and negative edges on any channel of any
port. Any edge will consequently generate an interrupt. When idle, the program
will loop and continuously display the WORD DATA REGISTERS for all four
channel ports and the EDGE INTERRUPT STATUS REGISTER. (This shows the
static state of each channel input.) On interrupt, the program will alternately
display the EDGE DETECT REGISTERS of each port, and the EDGE INTERRUPT
STATUS REGISTER.
90
100
110
120
130
140
150
160
170
180
190
200
210
220
230
240
250
260 !
265
270
275
280
285
290
295
300
Keysight E1459A/Z2404B User and SCPI Programming Guide
CLEAR SCREEN
DIM A$[40]
Vxi_address=70900
!
CLEAR 7
OUTPUT Vxi_address;"*RST;*CLS"
!
REPEAT
OUTPUT Vxi_address;"SYST:ERR?"
ENTER Vxi_address;Error
PRINT "E1406 Reports Error: ";Error
UNTIL (Error=0)
!
OUTPUT Vxi_address;"VXI:WRITE 128,4,1" ! reset E1459A
WAIT .1
OUTPUT Vxi_address;"VXI:WRITE 128,4,0" ! un-reset E1459A
WAIT .1
! unmask all 16 pos bits for port 0
OUTPUT Vxi_address;"VXI:WRITE 128,24,-1"
! unmask all 16 neg bits for port 0
OUTPUT Vxi_address;"VXI:WRITE 128,26,-1"
! unmask all 16 pos bits for port 1
OUTPUT Vxi_address;"VXI:WRITE 128,40,-1"
! unmask all 16 neg bits for port 1
OUTPUT Vxi_address;"VXI:WRITE 128,42,-1"
Keysight E1459A Register Definitions
!reset E1406
105

Advertisement

Table of Contents
loading

This manual is also suitable for:

Z2404a

Table of Contents