10! APPLICATION #7: OIJTPUT SEQUENCING WITHOUT COMPUTER INTERVENTION

20! PROGRAM: APP_7

30

!

 

 

40

ASSIGN @Slot0 TO 70500

!

SELECT CODE 7, MAINFRAME ADDRESS 05, SLOT 00

50

!

 

 

60

DIM Vlist$[80]

 

 

70Vlist$=”8, 8.5, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.5, 13, 13.5, 14” ! VOLTAGE LIST POINTS

80

!

 

 

 

 

90

OUTPUT

@Slot0;"*RST;*CLS;STATUS:PRESET"

!

RESET AND CLEAR MODULE

100

OUTPUT

@Slot0;”VOLT 0”

!

START AT 0 V

110

OUTPUT

@Slot0;”CURR 1"

!

SET CURRENT LIMIT

120

OUTPUT

@Slot0;"OUTPUT ON"

!

ENABLE OUTPUT

130

OUTPUT

@Slot0;”VOLT:MODE LIST"

!

SET TO GET VOLTAGE FROM LIST

140

OUTPUT

@Slot0;”LIST:VOLT ";Vlist$

!

DOWNLOAD VOLTAGE LIST POINTS

150

OUTPUT

@Slot0;”LIST:DWELL .050”

!

DOWNLOAD 1 DWELL POINT (ASSUMES SAME FOR ALL POINTS)

160

 

 

!

USE A 50 ms SETTLING TIME AS THE DWELL TIME

170

OUTPUT

@Slot0;”LIST:STEP ONCE"

!

EXECUTE 1 POINT PER TRIGGER

180

!

 

 

 

 

190

OUTPUT

@Slot0;"*ESE 1”

!

ENABLES DETECTION OF OPC IN THE STANDARD EVENT REGISTER.

200

 

 

!

OPC = BIT 0 = VALUE 1 OF THE STANDARD EVENT REGISTER.

210

OUTPUT

@Slot0;"*SRE 32”

!

ENABLES THE SERVICE REQUEST REGISTER TO GENERATE AN SRQ WHEN

220

 

 

!

ANY EVENT IN THE STANDARD EVENT REGISTER IS ASSERTED.

230

 

 

 

THE STANDARD EVENT REGISTER = BIT 5 = VALUE 32.

240

!

 

 

 

 

250

OUTPUT

@Slot0;"OUTPUT:TTLTRG:STATE ON"

!

ENABLE BACKPLANE TTL TRIGGER DRIVE

260

OUTPUT

@Slot0;”OUTPUT:TTLTRG:SOURCE LINK"

!

WHEN THE MODULE INDICATES SIC (STEP COMPLETED),

270

OUTPUT

@Slot0;”OUTPUT:TTLTRG:LINK ‘STC’”

!

GENERATE A BACKPLANE TTL TRIGGER

280

OUTPUT

@Slot0;”TRIGGER:SOURCE EXTERNAL" !

USE EXTERNAL TRIGGER IN BNC AS TRIGGER SOURCE

290

OUTPUT

@Slot0;’INITIATE"

!

ENABLE RESPONSE TO TRIGGER

300

OUTPUT

@Slot0;"*OPC”

!

TELLS MODULE TO ASSERT OPC (OPERATION COMPLETE)

310

 

 

!

WHEN IT COMPLETES THE LIST. OPC GENERATES SRO.

320

!

 

 

 

 

330

ON INTR.7 GOSUB Srq_handler

!

ENABLE SRQ INTERRUPT AND

340

ENABLE INTR 7;2

!

IDENTIFY HANDLER SUBROUTINE

350

!

 

 

 

 

360! BEFORE TRIGGERING THE MODULE, DETERMINE IF IT IS READY BY CHECKING FOR

370! 'WAITING FOR TRIGGER' (BIT 5 OF THE OPERATION STATUS REGISTER).

380!

390! YOU COULD ELIMINATE THIS STEP BY SIMPLY INSERTING A PAUSE IN THE PROGRAM. HOWEVER, BY

400! CHECKING THE INSTRUMENT STATUS, YOU CAN AVOID TIMING PROBLEMS. ALSO, ANY OTHER OPERATIONS

410! THAT TAKE TIME WILL GIVE THE MODULE A CHANCE TO COMPLETE PROCESSING.

420!

430REPEAT

440

OUTPUT @Slot0;”STATUS:OPERATION:CONDITION?"

 

450

ENTER @Slot0;Condition_data

 

 

460

UNTIL BIT(Condition_data,5)

!

TEST FOR BIT 5 = TRUE

470

!

 

 

480! BEGIN THE SELF-PACED TEST LOOP BY TRIGGERING THE MODULE TO START THE LIST

490!

500

OUTPUT @Slot0;”TRIGGER:IMMEDIATE"

!

THIS IS AN IMMEDIATE TRIGGER, WHICH IS ALWAYS ACTIVE.

510

 

!

IT DOES NOT NEED TO BE SELECTED AS TRIGGER SOURCE.

520

!

 

 

530

GOTO 530

!

IDLE IN LOOP WAITING FOR SRQ OR GO DO OTHER TASKS

540

!

 

 

550Srq_handler: !

560!

570! ADD LINES HERE TO READ THE DATA BUFFER FROM THE DMM

580!

590END

Figure B7-3. Agilent BASIC Program Listing of Application #7

98 Application Programs

Page 97
Image 97
Agilent Technologies 66lxxA manual Execute 1 Point PER Trigger, OPC = BIT 0 = Value 1 of the Standard Event Register