HP VXI E1476A User's Manual And Programming Manual page 52

64-channel, 3-wire multiplexer module
Table of Contents

Advertisement

Chapter 2
10
!Assign Switchbox logical address.
20
ASSIGN @Switchbox TO 70914
30
!Assign Voltmeter logical address.
40
ASSIGN @VM3457 TO 722
50
INTEGER Opc_value
60
!Reset voltmeter.
70
OUTPUT @VM3457;"*RESET"
80
!Set VM for external trigger.
90
OUTPUT @VM3457;"TRIG EXT"
100
!Set VM measurement mode.
110
OUTPUT @VM3457;"DCV"
120
!Enable VM reading memory mode.
130
OUTPUT @VM3457;"MEM FIFO"
140
!Reset the switch.
150
OUTPUT @Switchbox;"*RST;*CLS"
160
!Enable the switchbox trigger output.
170
OUTPUT @Switchbox;"OUTPON"
180
!Set switchbox to be triggered by the bus.
190
OUTPUT @Switchbox;"TRIG:SOURBUS"
200
!Set switchbox to scan in voltage mode.
210
OUTPUT @Switchbox;"SCAN:MODEVOLT"
220
!Enable ABUS tree switch control during scan.
230
OUTPUT @Switchbox;"SCAN:PORTABUS"
240
!Set scan list for all 64 channels.
250
OUTPUT @Switchbox;"SCAN(@100:163)"
260
!Start the scan.
270
OUTPUT @Switchbox;"INIT"
280
!Pause until switchbox is set up.
290
OUTPUT @Switchbox;"*OPC?"
300
!Read response to *OPC? command.
310
ENTER @Switchbox;Opc_value
320
!Read the first VM reading.
330
ENTER @VM3457;Results
340
!Print first reading.
350
PRINT "Channel 0",Results
360
!Set up loop for other 63 channels.
370
FOR Chan = 1 TO 63
380
!Trigger switchbox to change channels.
390
OUTPUT @Switchbox;"*TRG"
400
!Enter VM measurement result.
410
ENTER @VM3457;Results
420
!Print results.
430
PRINT "Channel",Chan,Results
440
!Loop back for next channel.
450
NEXT Chan
460
!Reset the switchbox to open all channels.
470
OUTPUT @Switchbox;"*RST"
480
END
HP E1476A Switchbox Application Examples 51

Advertisement

Table of Contents
loading

Table of Contents