Agilent Technologies 66lxxA Execute 1 Point PER Trigger, Standard Event Register = BIT 5 = Value

Page 97

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

Image 97
Contents Programming Guide Agilent Part No Microfiche Part No Update AprilSafety Guidelines Contents Abor Status Reporting Error Messages Synchronizing Power Module Output ChangesAbout This Guide IntroductionDocumentation Summary External ReferencesDownloading and Installing the Driver VXIplug&play Power Products Instrument DriversAccessing Online Help Supported ApplicationsIntroduction To Programming Gpib Capabilities Of The Power ModuleModule Gpib Address Introduction To ScpiRST *IDN? *SRE Voltlev 8.0 Prot 8.8 CURR? Volt LEV Prot CurrOutpprotdel Effect of Optional Headers Traversing the Command TreeOUTPUTPROTECTIONCLEARSTATUSOPERATIONCONDITION? Outputprotectionclear STATUSOPERATIONCONDITION?Voltagelevel 7PROTECTION 8CURRENTLEVEL 3MODE List Volttrig 7.5INIT*TRG Outp OFF*RCL 2OUTP onNumerical Data Formats Talking Formats SymbolListening Formats Suffixes and Multipliers Class Unit Unit with MultiplierAssign @PM3TO System ConsiderationsAgilent Basic Controllers Error HandlingUsing the National Instruments Gpib Interface Sending the Command Volt 5 in C Sending the Command Volt 5 in BasicReceiving Module Data with Basic Receiving Data from the ModuleReceiving Module Data with C Introduction Language DictionaryCLS Description Of Common CommandsMeaning and Type DescriptionESE Bit Configuration of Standard Event Status Enable RegisterESE ESR?OPC IDN?OPC? PSC OPT?RCL RCLRST SRE SAVSRE STB? Bit Configuration of Status Byte RegisterTRG TST? Description of Subsystem CommandsWAI AborCalauto Subsystem Tree Diagram Calibration SubsystemCalcurr Calauto 1 Calauto OnceCalcurrlev CalpassCalstat CalsaveCalvolt CalvoltlevCurr CalvoltprotCurr 500 MA Currlev CurrmodeCurrprotstat OFF CurrprotstatCurrtrig Currtrig 1200 MA CurrlevtrigListcoun Init Initcont 1 Initcont onListcoun Listcoun INF ListcurrListdwel LISTCURRPOIN?LISTDWELPOIN? ListstepListvolt 2.0,2.5,3.0 Listvolt MAX,2.5,MIN ListvoltLISTVOLTPOIN? MEASCURR? MEASVOLT?Outpprot Outp Outpstat ON,NORELAYOutprel Outpprotcle Outpprotdel 75E-1Outprelpol NormOutpttlt 1 Outpttlt OFF OutpttltOutpttltlink Outpttltsour LinkSTATOPEREVEN? STATOPER?STATOPERCOND? StatoperenabStatpres Stat Oper NTR 32 Stat Oper PTRSTATQUESEVEN? STATQUES?STATQUESCOND? Stat Ques COND?SYSTVERS? SYSTERR?Trigger Subsystem TrigTrigdel Trig Trig IMMTrigdel .25 Trigdel MAX TriglinkVoltlev VoltVoltmode Voltmode List Voltmode FIXVolttrig VOLTSENSSOUR?Volttrig 1200 MV Voltlevtrig Link Parameter List Power Module Programming ParametersStatus Register Bit Configuration Power Module Status StructureStatus Reporting Operation Status GroupStatus Questionable Commands Query Bit Signal Bit Configurations of Status Registers MeaningQuestionable Status Group Standard Event Status Group Power Module Status ModelOutput Queue Status Byte RegisterLocation Of Event Handles Examples Initial Conditions At Power OnStatquesptr 18ENAB Statoperptr 5376ENABSTATOPEREVEN?QUESEVEN? Statoperptr 1024NTR Statoperenab 1024*SRETrigger Subsystem Synchronizing Power Module Output ChangesModel of Fixed-Mode Trigger Operation Idle State Delaying StateInitiated State INITiateCONTinuous Command Model of List Mode Trigger OperationTrigger Status and Event Signals Output Change StateOutpttltsour List Subsystem Automatically Repeating a List Listvolt 3.0,3.25,3.5,3.75 Listdwel 10,10,25,40Listcurr 2,3,12,15 Triggering a ListTiming diagrams of Liststep Operation Scpi Command Completion DFI Discrete Fault Indicator SubsystemRI Remote Inhibit Subsystem Power Module Hardware Error Messages Error MessagesSystem Error Messages Standard Event Status Register Error Bits222 -223 -241 -310 -330 -350 -400 -410 -420 -430 Scpi Approved Commands Scpi Confirmed CommandsScpi Conformance Information Scpi VersionNon-SCPI Commands Application Programs Application 1. Sequencing Multiple Modules During Power Up Variations On This Implementation Figure B1-1. Block Diagram of Application #1Figure B1-2. Timing Diagram of Application #1 Enable Backplane TTL Trigger Drive Reset and Clear ModuleEnable Output Enable Response to TriggerImplementation Details How The MPS Implements The Solution MPS Set Up Figure B2-1. Block Diagram of Application #2 Enable TTL Trigger Drive When a CV-TO-CC Transition OccursEnable Response to TTL Trigger Start AT 15Application 3. Controlling Output Voltage Ramp Up at Turn On Figure B3-1. Simulating a Slow Voltage Ramp Generating the Desired Voltage Ramp for Application #3 Start Voltage for Ramp Option BaseStop Voltage for Ramp SecondsFigure B4-1. Voltage Waveform for Application #4 Application 4. Providing Time-Varying VoltagesModule set up Variations On This Implementation No Delay Before Protection Occurs Enable OCPEnable Detection of OC Condition Enables Detection on Positive TRANSITION, I.EApplication 5. Providing Time-Varying Current Limiting Figure B5-1. Typical DUT Current vs. Time Implementation Details How The MPS Implements The Sequence Current Limit Data GO to 12 V When TriggeredDwell Time Data SET to GET Current from ListNominal 12 Application 6. Output Sequencing Paced by the ComputerMPS Set Up Figure B6-1. Block Diagram of Application #6 Supply Limit Conditions These are the BiasTo be Tested Number of Bias Supply Limit C0MBINATIONSReturn Overview Of Application Advantages/Benefits Of The MPS Solution Figure B7-1. Block Diagram of Application #7 When IT Completes the LIST. OPC Generates SRO When the Module Indicates SIC Step CompletedEnable SRQ Interrupt Enable Intr Identify Handler SubroutineSupplemental Information CMD$ = Initiate ‘ Enable Trigger to Start List CMD$ = Output on ‘ Enable Output‘ Conversion to Send Real Numbers Over the BUS CMD$ = Voltmode List ‘ SET to GET Voltage from ListWaiting for Trigger BIT 5 of the Operation Status Register Call Iooutputs SLOTO, CMDS, LCONDITION.DATA = WendIf IBSTA% 0 then Goto ‘ AS Part of the Command String ‘ Disable Auto Serial Poll‘ Program N3.BAS ‘ INSTRUMENT.NAME$ = SlotoIf IBSTA% 0 then Goto Selected AS a Trigger Source ‘ General Error HandlerStop Dwell = ramptime Application #3 Controlling Voltage Ramp UP AT Turn onTo terminate the iooutputa Int error Char *badstring If error != EOl enabled for both read and write Strcatvlist, vpoint This is a generalized error checking routine Index IndexIndex Index Index United States Latin America Agilent Sales and Support OfficesManual Updates