Agilent Technologies 665xA, 664xA DOS Drivers, Agilent Basic Controllers, Sample Program Code

Page 20

DOS Drivers

Types of Drivers

The Agilent 82335A and National Instruments GP-IB are two popular DOS drivers. Each is briefly described here. See the software documentation supplied with the driver for more details.

Agilent 82335A Driver. For GW-BASIC programming, the GPIB library is implemented as a series of subroutine calls. To access these subroutines, your application program must include the header file SETUP.BAS, which is part of the DOS driver software.

SETUP.BAS starts at program line 5 and can run up to line 999. Your application programs must begin at line 1000. SETUP.BAS has built-in error checking routines that provide a method to check for GPIB errors during program execution. You can use the error-trapping code in these routines or write your own code using the same variables as used by SETUP.BAS.

National Instruments GP-IB Driver. Your program must include the National Instruments header file DECL.BAS. This contains the initialization code for the interface. Prior to running any applications programs, you must set up the interface with the configuration program (IBCONF.EXE).

Your application program will not include the power supply symbolic name and GPIB address. These must be specified during configuration (when you run IBCONF.EXE). Note that the primary address range is from 0 to 30 but any secondary address must be specified in the address range of 96 to 126. The power supply expects a message termination on EOI or line feed, so set EOI w/last byte of Write. It is also recommended that you set Disable Auto Serial Polling.

All function calls return the status word IBSTA%, which contains a bit (ERR) that is set if the call results in an error. When ERR is set, an appropriate code is placed in variable IBERR%. Be sure to check IBSTA% after every function call. If it is not equal to zero, branch to an error handler that reads IBERR% to extract the specific error.

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. Both of the above DOS drivers have routines for detecting program execution errors.

Important Use error detection after every call to a subroutine.

Agilent BASIC Controllers

The Agilent BASIC Programming Language provides access to GPIB functions at the operating system level. This makes it unnecessary to have the header files required in front of DOS applications programs. Also, you do not have to be concerned about controller "hangups" as long as your program includes a timeout statement. Because the power supply can be programmed to generate SRQ on errors, your program can use an SRQ service routine for decoding detected errors. The detectable errors are listed in Table 5-1 of "Chapter 5 - Error Messages".

Sample Program Code

The following programs are intended only to show how some of the same power supply functions can be programmed to each of the three previously mentioned GPIB interfaces. The first two are for the DOS interfaces and the third for the Agilent BASIC interface.

20 Remote Programming

Image 20
Contents Programming Guide Gpib DC Power Supplies Agilent Part No Microfiche Part No JulySafety Guidelines Printing HistoryContents Description of Subsystem Commands System CommandsCurrent Subsystem Display SubsystemCommand Summary Programming Parameters Power Supply Status Structure Operation Status GroupVoltage Subsystem Questionable Status GroupPage General Information About this GuideDocumentation Summary User’s GuidePrerequisites for Using this Guide VXIplug&play Power Product Instrument DriversDownloading and Installing the Driver Accessing Online HelpGpib Capabilities Of The Power Supply Remote ProgrammingIntroduction To Scpi ConventionsTypes of Scpi Commands Scpi MessagesStructure of a Scpi Message Voltlev 4.5PROT 4.8CURR?NLVoltlev 4.5 Prot 4.8 CURR? Parts of a Scpi MessageVolt LEV Prot Curr Traversing the Command Tree Query IndicatorMessage Unit Separator Root SpecifierEffect of Optional Headers Moving Among SubsystemsOutputprotectionclear STATUSOPERATIONCONDITION? OUTPUTPROTECTIONCLEARSTATUSOPERATIONCONDITION?Including Common Commands Scpi QueriesValue Coupling Scpi Data FormatsExamples Controlling the Output Programming Status Saving and Recalling StatesWriting to the Display System Considerations Programming the Digital I/O PortGpib Address DigdataAction Display Shows Assigning the Gpib Address In ProgramsError Handling DOS DriversAgilent Basic Controllers Sample Program CodeProgramming Some Power Supply Functions Iout = OUTPUTS2Call Ioenter PS,OEVENT SPOL%=O While C O Language Dictionary IntroductionDescription Of Common Commands Common Commands Syntax DiagramCLS ESEOPC ESR?IDN? OPC? OPT?PSC PSC 0 *PSCCommand Syntax RCL NRf Parameters Example Query Syntax None Related CommandsRCL PSC *RST *SAVSAV RSTSAV Bit Configuration of Status Byte Register SRESTB? SREWAI TRGTST? Description of Subsystem Commands Calibration CommandsAbor AborCurrprotstat Current SubsystemCurr Currtrig Display Subsystem DigdataDisp Digdata 7 DigitaldatavalueDisptext Defaultmode DispmodeDisptext Dispmode Norm Displaymode Normal Displaywindowmode TextInitiate Subsystem Measure SubsystemInit Initcont MEASCURR? MEASVOLT?Outpprotcle Outpprotdel Output SubsystemOutp Outprel OutprelpolOutprel 1 Outprel OFF Outprelpol NormStatus Subsystem StatpresStatus Operation Registers STATOPER?STATUSOPERATIONENABLE? StatoperenabStatoper NTR Statoper PTR Statoperenab 1312 StatoperenabStatus Questionable Registers STATQUES?STATQUESCOND? StatquesenabSystem Commands SYSTERR? SYSTEMERROR?Statques NTR Statques PTR SYSTERR?Trigger Subsystem SystlangSYSTVERS? TrigVoltage Subsystem TrigsourVolt Volttrig Trigsour BUS Triggersource BUSCommand Summary Command SummaryCommand Parameters Subsystem Commands VoltprotCommand Parameters Common Commands ParametersProgramming Parameters Currlevtrig MAXVoltlevtrig MAX Voltprot MAXPage Power Supply Status Structure Register CommandsStatus Reporting Operation Status GroupCAL WTGUNR OPCStatus Questionable Commands Register Query Cleared By Questionable Status GroupStandard Event Status Group STATQUESNTR?Service Request Enable Register Initial Conditions At Power OnStatus Byte Register Output QueuePON Power-On Bit Servicing an Operation Status Mode EventDefault Power On Register States Condition Caused By StatpreServicing Questionable Status Events Monitoring Both Phases of a Status TransitionAdding More Operation Events Scpi Command Completion DFI Discrete Fault IndicatorRI Remote Inhibit WAIPage Error Messages Power Supply Hardware Error MessagesCalibration Error Messages System Error MessagesSummary of System Error Messages Error Error String Description/Explanation/Examples NumberScpi Confirmed Commands1 Scpi Approved CommandsScpi Conformance Information Scpi VersionNON-SCPI Commands1 Compatibility Language Compatibility LanguageParallel Polling Volt CurrVSET? ISET? CURR? VOUT?Hold OFF VolttrigHold CurrtrigFAULT? UNMASK?SRQ OFF SRQIndex IndexOperation status group, 51 optional header Trig SOUR, 46 VOLT, 46 Volt PROT, 47 Volt Trig United States Latin America Canada Australia/New ZealandEurope Asia Pacific Japan
Related manuals
Manual 142 pages 24.05 Kb Manual 67 pages 46.05 Kb

668xA, 669xA, 667xA, 664xA, 665xA specifications

Agilent Technologies has long been a pioneer in the production of high-performance electronic test and measurement instruments, particularly in the field of power sources. Among its notable offerings are the Agilent 667xA, 669xA, 665xA, 664xA, and 668xA series of power supplies. These instruments are designed to provide stable, reliable power for a variety of applications, including electronic testing, industrial processes, and research laboratories.

The Agilent 667xA series is characterized by its programmability and advanced measurement functions. These power supplies support a wide range of output voltages and currents, allowing for flexible configurations that cater to different testing needs. The built-in measurement capabilities enable users to monitor the voltage, current, and power with high precision, which is essential for ensuring optimal performance in electronic applications.

The Agilent 669xA series stands out with its high-power outputs, making it suitable for demanding applications. These power supplies deliver high voltage and current levels, making them ideal for testing high-performance devices, such as power amplifiers and motor drives. Additionally, the 669xA series includes features such as overvoltage protection and complex output sequencing to enhance the safety and reliability of the testing process.

The Agilent 665xA and 664xA series focus on delivering high accuracy and excellent regulation. These models are particularly known for their low noise operation, which is critical for sensitive applications where precision is paramount. The integrated programming capabilities allow users to automate testing sequences, thus improving efficiency in research and development settings.

The 668xA series features advanced digital signal processing that enhances the precision and stability of the output. Users benefit from features like remote sensing and monitoring, allowing feedback adjustments that maintain output accuracy despite cable losses. Furthermore, the 668xA models can integrate seamlessly with various test environments thanks to their LAN, GPIB, and USB connectivity options.

Overall, the Agilent 667xA, 669xA, 665xA, 664xA, and 668xA power supplies provide a comprehensive range of solutions for diverse electronic testing needs. With their advanced features, superb measurement capabilities, and robust performance, these instruments empower engineers and researchers to conduct their work with confidence, precision, and efficiency.