Agilent Technologies 66309B, D Error Handling, Example 1. National Instruments Interface Example

Page 166

D – Example Programs

Error Handling

If there is no error-handling code in your program, undetected errors can cause unpredictable results. This includes "hanging up" the controller and forcing you to reset the system. National Instruments drivers have routines for detecting program execution errors. Error detection should be used after every call to a subroutine.

Example 1. National Instruments Interface Example

990’---------------------- Merge DECL.BAS here ------------------------

1000 ’DC Source Variable = PS% ; Stand-Alone Address = 706 1005 CODES$=SPACE$(50):MODE$=SPACE$(5):OEVENT$=SPACE$(20)

1010 D$=SPACE$(60):OUTPUT$=SPACE$(40):BDNAME$="PS%"

1015 DIM OUTPUT(2)

1020 ’

1025 ’Set up dc source interface for DOS driver

1030 CALL IBFIND(BDNAME$,PS%)

1035 IF PS%

1040 CALL IBCLR(PS%)

1045 ’

1050 ’Program dc source to CV mode with following voltage and current 1055 CODES$ = "VOLTAGE MAX;CURRENT MAX" :GOSUB 2000

1060 ’

1065 ’Query dc source outputs and print to screen

1070

CODES$ = "MEASURE:VOLTAGE?;CURRENT?"

:GOSUB 2000

:GOSUB 3000

1075

VOUT = OUTPUT(1)

 

 

 

 

 

1080

IOUT = OUTPUT(2)

 

 

 

 

 

1085

PRINT"The programmed levels are "VOUT" Volts and "IOUT" Amps"

1090

 

 

 

 

 

1095

’Program triggered current level to value insufficient to maintain

1100

’supply within its CV operating characteristic

 

1105

CODES$ = "CURR:TRIG MIN"

:GOSUB 2000

 

 

1110

 

 

 

 

 

1115

’Set operation status mask to detect mode change from CV to CC

1120

CODES$ = "STAT:OPER:ENAB 1024;PTR 1024"

:GOSUB 2000

 

1125

 

 

 

 

 

1130

’Enable Status Byte OPER summary bit

 

 

1135

CODES$ = "*SRE 128"

:GOSUB 2000

 

 

1140

 

 

 

 

 

1145

’Arm trigger circuit and send trigger to dc source

 

1150

CODES$ = "INITIATE:SEQUENCE1;TRIGGER"

:GOSUB 2000

 

1160

’Wait for supply

to respond to trigger

 

 

1165

FOR I= 1 to 100

:NEXT I

 

 

 

1170

 

 

 

 

 

1175

’Poll for interrupt caused by change to CC mode and print to screen

1180

SPOL%=0

 

 

 

 

 

1185

CALL IBRSP(PS%,SPOL%)

 

 

 

 

1190

IF (SPOL% AND 128) = 128 THEN POLL = 1 ’Set interrupt flag on OPER bit

1195

IF POLL <> 1 THEN GOTO 1230

 

’No interrupt to service

1200

"CODES$ = "STAT:OPER:EVEN?"

:GOSUB 2000 ’Query status oper register

1205

CALL IBRD(PS%,OEVENT$)

 

 

’Read back event bit

1210

IF IBSTA%

 

 

 

 

 

1215

OEVENT=VAL(OEVENT$)

 

 

 

 

1220

IF (OEVENT AND 1024) = 1024 THEN PRINT "Supply switched to CC mode."

166

Image 166
Contents USER’S Guide Warranty Information CertificationSafety Summary GeneralSafety Symbols Declaration EMCDeclaration of Conformity Acoustic Noise Information Printing HistoryTable of Contents Types of Scpi Commands Checkout Procedure Case of TroubleVXIplug&play Power Products Instrument Drivers DVM ConnectionsIntroduction Programming the Output Types of Scpi MessagesScpi Data Formats Triggering Output ChangesDisplay Commands 103 Inhibit/Fault IndicatorCalibration Commands 100 Measurement Commands 104System Commands 125 Output Commands 114Status Commands 121 Trigger Commands 126Specifications 143 Supplemental Characteristics 144 Common CommandsAdditional Commands Performing the Calibration Procedure 154Basic Error Number List 161Introduction 165 Introduction 177Quick Reference Front Panel At a GlanceUse the front panel Address key to configure the interface Instrument ConfigurationRear Panel At a Glance Front Panel Number Entry Use the Function keys and Entry keys to enter a new valueFront Panel Annunciators Immediate Action KeysFront Panel Menus At a Glance Scpi Programming Commands At a Glance ABORt CALibrateProgramming the unit using Scpi COMPatibility commands Using the front panelUsing the programming interface Installing the VXIplug&play instrument driverOption Safety ConsiderationsOptions and Accessories DescriptionAgilent 66309B Description and Model DifferencesAgilent Agilent 66309DFront Panel Controls Common CapabilitiesRemote Programming Output 1 Characteristic Dc Source Output 1 CharacteristicOutput 2 Characteristic Output 2 CharacteristicOption 521 Description Agilent 66309B/D only Option 521 Factory SettingsOption 521 Relay Modes Page Additional Agilent 66311/66309 Operating Settings Checks Installation and Operation ChecklistCheck the Operating Settings and Conditions Check the Phone ConnectionsLocation CleaningInspection Damage Packaging MaterialBench Operation Connect the Power CordInput Connections Rack MountingOutput Turn the unit off before connecting any wiresOutput Connections Current RatingsRemote Sense Connections Remote Sense ConnectionsRemote Sense Connections with External Relays Load Regulation and Voltage Drop in the Remote Sense Leads Maintaining Stability while Remote SensingOpen Sense Lead Protection Local Sensing Message DescriptionOutput Compensation DVM Connections OVP ConsiderationsMeasuring Circuits that are Not Powered by the Main Output Measuring Circuits Not Powered by the Main OutputMeasuring Circuits Floating with Respect to the Main Output External Protection Connections 10. FLT/INH ExamplesComputer Connections FLT/INH DIGital I/O ConnectorDigital I/O Connections Gpib InterfaceRS-232 Interface Pin Input/Output DescriptionPress Output On/Off Checkout ProcedureProcedure Display Explanation Press ProtectProcedure Display Explanation Press Shift, Channel Selftest Error MessagesCase of Trouble Enter Number 12, Enter Press Output On/OffRuntime Error Messages Runtime Error MessagesPower-On Selftest Errors Line FuseIntroduction Front Panel DescriptionFront Panel Operation System Keys Display Command FunctionOFF Immediate Action Keys Function KeysScrolling Keysq Metering Keys Display MeasurementOutput Control Keys Over CurrentEntry Keys Entry KeysSelecting an output on Agilent 66309B/D units Using the Front Panel DisplayExamples of Front Panel Programming Selecting the DVM on Agilent 66311D/66309D unitsSet the output compensation Set the output voltageSet the output current limit Typecap HighSet the output 2 current limit Enable the outputSet the output 2 voltage Keypad, press Enter Number, 7, EnterQuery and Clear Errors as follows Querying and Clearing Output Protection and ErrorsDisable Overvoltage Protection as follows OvercurrentMaking Basic Front Panel Measurements Use the Meter menu for making front panel measurementsDefault Front Panel Measurement Parameters Making Enhanced Front Panel MeasurementsCurrrang Auto Making DVM Measurements Agilent 66311D/66309D onlyUse the Meter menu for making DVM measurements Currdet AcdcTo configure the Digio mode of the port, proceed as follows Setting the Gpib Address and Programming LanguageTo configure the Ridfi mode of the port, proceed as follows Set the Gpib address as followsStoring and Recalling Instrument States Gpib References External ReferencesScpi References Supported Applications VXIplug&play Power Products Instrument DriversDownloading and Installing the Driver System RequirementsRS-232 Capabilities of the DC Source Accessing Online HelpGpib Capabilities of the DC Source Gpib AddressRS-232 Flow Control Introduction to ScpiBaud Rate Conventions Used in This Guide Types of Scpi CommandsBoldface font Including Common Commands Multiple Commands in a MessageMoving Among Subsystems Message Unit Using QueriesTypes of Scpi Messages HeadersScpi Data Formats Response Data Types Scpi Command CompletionSuffixes and Multipliers Class Suffix Unit Unit with MultiplierNon-SCPI Commands Using Device ClearScpi Conformed Commands Scpi Conformance InformationProgramming the Output Power-on InitializationEnabling the Output Output Voltage Output CurrentScpi Triggering Nomenclature Setting the Voltage or Current Transient LevelsTriggering Output Changes Output Trigger ModelGenerating Triggers Enabling the Output Trigger SystemSelecting the Output Trigger Source Single TriggerAverage Measurements Making Basic MeasurementsControlling Measurement Samples Making Enhanced Measurements Window FunctionsCurrent Ranges and Measurement Detector RMS MeasurementsMinimum and Maximum Measurements Pulse MeasurementsHigh/Low Measurements Making DVM Measurements Returning All Measurement Data From the Data BufferMeasurement Trigger Model Triggered MeasurementsSequence Form Alias SEQuence2 ACQuire Selecting the Sensing Function Enabling the Measurement Trigger SystemSelecting the Measurement Trigger Source INTernalGenerating Measurement Triggers Single TriggersTrigacqcouncurr number or Trigacqcounvolt number Programming the Status Registers Pre-trigger and Post-trigger Data AcquisitionPower-On Conditions DC Source Status ModelBit Configurations of Status Registers Operation Status GroupStandard Event Status Group PON Power On BitQuestionable Status Group Status Byte RegisterMSS Bit Determining the Cause of a Service InterruptServicing Operation Status and Questionable Status Events RQS BitMonitoring Both Phases of a Status Transition Inhibit/Fault IndicatorRemote Inhibit RI Bit Weight Discrete Fault Indicator DFIUsing the Inhibit/Fault Port as a Digital I/O PinSubsystem Commands Subsystem Commands Syntax Language Dictionary Language Dictionary Common Commands Programming ParametersCALibrateCURRent2 Calibration CommandsCALibrateCURRent CALibrateCURRentMEASureLOWRangeCALibrateDATE CALibratePASSwordCALibrateDATA CALibrateDVMCALibrateVOLTage CALibrateSAVECALibrateSTATe CALibrateVOLTage2DISPlayCHANnel Display CommandsDISPlay DISPlayMODEFORMat Measurement Commands104 MEASureARRayVOLTage? FETChARRayVOLTage? FORMatBORDerMEASureARRayCURRent? FETChARRayCURRent? Query SyntaxMEASureCURRentACDC? FETChCURRentACDC? MEASureCURRent? FETChCURRent?MEASureCURRent2? NR3MEASureCURRentMAXimum? FETChCURRent MAXimum? MEASureCURRentHIGH? FETChCURRentHIGH?MEASureCURRentLOW? FETChCURRentLOW? 107MEASureDVMACDC? FETChDVMACDC? MEASureCURRentMINimum? FETChCURRentMINimum?MEASureDVM? FETChDVM? MEASureVOLTage? FETChVOLTage?MEASureVOLTageHIGH? FETChVOLTageHIGH? MEASureVOLTage2MEASureVOLTageACDC? FETChVOLTageACDC? 109MEASureVOLTageMINimum? FETChVOLTageMINimum? MEASureVOLTageLOW? FETChVOLTageLOW?MEASureVOLTageMAXimum? FETChVOLTageMAXimum? 110Query Syntax SENSeCURRentDETector? SENSeCURRentDETectorSENSeCURRentRANGe 111SENSeSWEepOFFSetPOINts SENSeFUNCtionSENSePROTectionSTATe SENSeSWEepPOINtsQuery Syntax SENSeSWEepTINTerval? SENSeSWEepTINTervalSENSeWINDow Query Syntax SENSeWINDowTYPE?OUTPut1 Output CommandsINSTrumentCOUPleOUTPutSTATe OUTPut1 2RELayMODEOUTPutPONSTATe OUTPutDFIOUTPutDFISOURce 115OUTPutRIMODE OUTPutPROTectionDELayOUTPutPROTectionCLEar OUTPutTYPESOURceCURRent2 SOURceCURRent117 SOURceCURRentTRIGger Command Syntax Parameters RST Value ExamplesSOURceCURRentPROTectionSTATe SOURceCURRent2TRIGgerSOURceVOLTage SOURceDIGitalDATASOURceDIGitalFUNCtion 119SOURceVOLTagePROTectionSTATe SOURceVOLTage2SOURceVOLTagePROTection 120SOURceVOLTageTRIGger Status CommandsSTATusPRESet SOURceVOLTage2TRIGgerSTATusOPERation? STATusOPERationENABleBit Configuration of Operation Status Registers STATusOPERationCONDition?STATusOPERationNTR STATusOPERationPTR Parameters Preset ValueBit Configuration of Questionable Status Registers STATusQUEStionable?STATusQUEStionableNTR STATusQUEStionablePTR STATusQUEStionableENABleSTATusQUEStionableCONDition? 124SYSTemLANGuage System CommandsSYSTemERRor? SYSTemVERSion?ABORt Trigger CommandsRelated Commands INITiateSEQuence INITiateNAMETRIGgerSOURce TRIGger127 TRIGgerSEQuence2COUNtDVM TRIGgerACQuireCOUNtDVM TRIGgerSEQuence2 TRIGgerACQuireTRIGgerSEQuence2COUNtCURRent TRIGgerACQuireCOUNtCURRent 128Unit TRIGgerSEQuence2COUNtVOLTage TRIGgerACQuireCOUNtVOLTage129 TRIGgerSEQuence2HYSTeresisDVM TRIGgerACQuireHYSTeresisDVM 130TRIGgerSEQuence2LEVelDVM TRIGgerACQuireLEVelDVM TRIGgerSEQuence2LEVelCURRent TRIGgerACQuireLEVelCURRent131 Returned Parameters TRIGgerSEQuence2LEVelVOLTage TRIGgerACQuireLEVelVOLTageTRIGgerSEQuence2SLOPeCURRent TRIGgerACQuireSLOPeCURRent 132TRIGgerSEQuence2SLOPeVOLTage TRIGgerACQuireSLOPeVOLTage TRIGgerSEQuence2SLOPeDVM TRIGgerACQuireSLOPeDVM133 TRIGgerSEQuence1DEFine TRIGgerSEQuence2DEFine TRIGgerSEQuence2SOURce TRIGgerACQuireSOURce134 Bit Configuration of Standard Event Status Enable Register Common CommandsCommand Syntax *CLS Parameters None 135Example Field Information136 Parameters Example Query Syntax *OPT? Returned Parameters AardRCL NRf 137Example *SAV Related Commands *RCL *RST 138 Command Syntax *SAV NRfRST Settings Query Syntax *STB? Power-on ValueBit Configuration of Status Byte Register 139TRG Query Syntax TST? Returned Parameters NR1Additional Commands VOLTageLIMitLOW? CURRentPROTectionTRIPped?VOLTageLIMitHIGH? VOLTagePROTectionTRIPped?Table A-1. Performance Specifications Specifications143 144 Supplemental CharacteristicsTable A-2. Supplemental Characteristics Agilent 66309B/D145 Table A-4. Agilent 66309B/D Option 521 Characteristics 146147 Test SetupEquipment Required Table B-1. Equipment RequiredTurn-On Checkout Performing the Verification Tests148 Output terminals on both outputs 1 Voltage Programming and Measurement AccuracyCurrent Programming and Measurement Accuracy Steps 6-10 apply to Agilent 66309B/D output 2 onlyCurrent Sink Measurement Steps 7-11 apply to Agilent 66309B/D output 2 only150 DVM Measurement Accuracy 151152 153 DVM Voltage Measurement Agilent 66309D onlyFront Panel Calibration Menu Performing the Calibration Procedure154 Enable Calibration Mode Front Panel Calibration ProcedureCheck the Language Setting Voltage Programming and Measurement CalibrationCurrent Programming and High-Range Measurement Calibration Steps 11-16 apply to Agilent 66309B/D output 2 onlyOvervoltage Protection Calibration 156157 Steps 27-32 apply to Agilent 66309B/D output 2 onlyCalcurrmeas AC Saving the Calibration Constants Restore the Language SettingDVM Calibration applies to Agilent 66311D, 66309D only 158Table B-3. Gpib Calibration Error Messages Calibration Error MessagesChanging the Calibration Password Calibration Over the GpibPage Table C-1. Error Numbers Error Number List161 Error Messages 162Error Messages C 163Page National Instruments Gpib Driver Assigning the Gpib Address in Programs165 Example 1. National Instruments Interface Example Error Handling166 167 Example Programs DExample 2. Controller Using Basic 168Example 3. Current Pulse Measurement Using Basic 169170 171 172 DFI Programming Example Example 5. DFI Example Using Basic173 Page Open the Unit Configure the Power TransformerInstall the Correct Line Fuse Close the UnitFigure E-1, Power Transformer AC Input Connections 176Table F-1. COMPatibility Power-on Settings Command Setting177 Table F-2. COMPatibility Commands Compatibility CommandSimilar Scpi Command 178179 Table F-3. COMPatibility Errors ErrorNumberError String Description/Explanation/Examples 180Table F-5. Bit Configuration of Serial Poll Register 181Page Index 183Index 184185 OVERTEMPERATURE, 47 OVERVOLTAGE, 47 OVLD, 47, 60, 61 186Subsystem commands syntax, 96 suffixes 187188 Type CAPEurope Asia Pacific United States Latin AmericaCanada Australia/New Zealand JapanManual Updates
Related manuals
Manual 8 pages 56.17 Kb

66111A, 66309B, 66311B, D specifications

Agilent Technologies D,c,83440b is an advanced electronic measurement solution designed for engineers and scientists who require precise and reliable performance in their testing environments. This modular test system offers a comprehensive suite of features that cater to a wide range of applications, from high-frequency testing to complex signal analysis.

One of the main features of the D,c,83440b is its impressive frequency range, allowing users to conduct tests across a wide spectrum of signals. The system is capable of handling frequencies up to 26.5 GHz, making it ideal for RF and microwave applications. This broad range ensures that users can work with a variety of devices, including communication systems, radar, and satellite technology.

In addition to its frequency capabilities, Agilent Technologies has engineered the D,c,83440b with exceptional dynamic range and low noise figures. This ensures that even the smallest signals can be accurately measured, allowing for greater precision in testing. The full spectrum analysis feature enables users to capture transient events and analyze them in real-time, which is crucial for troubleshooting and performance evaluations.

The D,c,83440b is built on a modular platform, allowing users to customize their systems according to specific testing needs. This modularity not only enhances flexibility but also simplifies maintenance and upgrades. Users can easily swap out different modules without the need for extensive system reconfiguration, which can significantly reduce downtime in testing environments.

Another standout characteristic of the D,c,83440b is its user-friendly interface. With a large, high-resolution display and intuitive controls, engineers can quickly navigate through settings and data, streamlining the testing process. This ease of use is complemented by powerful software solutions that can automate test sequences, aiding in efficiency and accuracy.

The integration of advanced digital signal processing technologies further enhances the capabilities of the D,c,83440b. These technologies enable more sophisticated measurements and improved signal integrity, which is essential for modern communication systems.

In summary, the Agilent Technologies D,c,83440b is a multifaceted electronic measurement solution that boasts a wide frequency range, excellent dynamic range, modular design, and user-friendly interface. This combination of features makes it suitable for various applications, ensuring that engineers and scientists have the tools they need to succeed in their testing and measurement endeavors.