Agilent Technologies 66lxxA User Manual

Programming Guide
Agilent Technologies
Series 66lxxA
MPS Power Modules
Agilent Part No. 5959-3362 Printed in USA: September 1997 Microfiche Part No. 5959-3363 Update April 2000
The beginning of the Users Guide for GPIB Power Modules Series 66lxxA has a Safety Summary page. Be sure you are familiar with the information on that page before programming the power module for operation from a controller.
Printing History
The current edition of this guide is indicated below. Reprints of this guide containing minor corrections and updates may have the same printing date. New editions are identified by a new printing date and, in some cases, by a new part number. A new edition incorporates all new or corrected material since the previous edition. Changes to the guide occurring between editions are covered by change sheets shipped with the guide.
Edition 1......... October, 1991
Edition 2......... February, 1992
Update............. August, 1992
Update............. February, 1993
Edition 3.......... September, 1997
Update.......... April, 2000
© Copyright 1991,1992, 1997 Agilent Technologies, Inc. This document contains proprietary information protected by copyright. All rights are reserved. No part of this document may be photocopied, reproduced, or translated into another language without the prior consent of Agilent Technologies. The information contained in this document is subject to change without notice.
2
1. Introduction
About this Guide..........................................................................................................................................7
Documentation Summary.............................................................................................................................7
External References......................................................................................................................................7
VXIPlug&Play Power Products Instrument Drivers....................................................................................8
2. Introduction to Programming
GPIB Capabilities of the Power Module......................................................................................................9
Module GPIB Address.................................................................................................................................9
Introduction to SCPI.....................................................................................................................................9
Conventions...............................................................................................................................................9
Types of SCPI Messages.........................................................................................................................10
Types of SCPI Commands......................................................................................................................10
Structure of a SCPI Message...................................................................................................................10
The Message Unit.................................................................................................................................10
Combining Message Units....................................................................................................................10
Parts of a SCPI Message.........................................................................................................................11
Headers.................................................................................................................................................11
Query Indicator..........................................................................................................12
Message Unit Separator........................................................................................................................12
Root Specifier.......................................................................................................................................12
Message Terminator.............................................................................................................................12
Traversing the Command Tree................................................................................................................13
Active Header Path...............................................................................................................................13
The Effect of Optional Headers............................................................................................................13
Moving Among Subsystems.................................................................................................................14
Including Common Commands...............................................................................................................14
SCPI Data Formats.....................................................................................................................................14
Numerical Data........................................................................................................................................14
Boolean Data...........................................................................................................................................15
String Data...............................................................................................................................................15
Character Data.........................................................................................................................................15
System Considerations...............................................................................................................................16
Assigning the Address in Programs.........................................................................................................16
DOS Drivers............................................................................................................................................16
Types of Drivers...................................................................................................................................16
Agilent 82335A Driver.........................................................................................................................16
National Instruments GPIB Driver.......................................................................................................16
Error Handling......................................................................................................................................17
Agilent BASIC for Series 300.................................................................................................................17
Translation Among Languages...................................................................................................................17
General Setup Information for GWBASIC.............................................................................................17
Using the Agilent 82335A/82990A/16062B GPIB Command Library................................................17
Using the National Instruments GPIB Interface...................................................................................18
General Setup Information for Microsoft C............................................................................................18
Using the Agilent 82335A/82990A/16062B GPIB Command Library................................................18
Using the National Instruments GPIB Interface...................................................................................18
Sending Commands to and Receiving Data from the Module.................................................................19
Contents
3. Language Dictionary
Introduction................................................................................................................................................23
Parameters..................................................................................................................................................23
3
Related Commands.....................................................................................................................................23
Order of Presentation.................................................................................................................................23
Common Commands..................................................................................................................................23
Subsystem Commands................................................................................................................................23
Description of Common Commands..........................................................................................................24
*CLS........................................................................................................................................................24
*ESE........................................................................................................................................................25
*ESR?......................................................................................................................................................25
*IDN?......................................................................................................................................................26
*OPC.......................................................................................................................................................26
*OPC?.....................................................................................................................................................26
*OPT?.....................................................................................................................................................27
*PSC........................................................................................................................................................27
*RCL.......................................................................................................................................................28
*RST.......................................................................................................................................................28
*SAV.......................................................................................................................................................29
*SRE.......................................................................................................................................................29
*STB?......................................................................................................................................................30
*TRG.......................................................................................................................................................31
*TST?......................................................................................................................................................31
*WAI.......................................................................................................................................................31
Description of Subsystem Commands........................................................................................................31
ABOR......................................................................................................................................................31
Calibration Subsystem.............................................................................................................................32
CAL:AUTO..........................................................................................................................................32
CAL:CURR..........................................................................................................................................33
CAL:CURR:LEV.................................................................................................................................33
CAL:PASS...........................................................................................................................................33
CAL:SAV.............................................................................................................................................34
CAL:STAT...........................................................................................................................................34
CAL:VOLT..........................................................................................................................................34
CAL:VOLT:LEV.................................................................................................................................34
CAL:VOLT:PROT...............................................................................................................................35
Current Subsystem...................................................................................................................................35
CURR...................................................................................................................................................35
CURR:MODE......................................................................................................................................35
CURR:PROT:STAT.............................................................................................................................36
CURR:TRIG.........................................................................................................................................36
DISP:STAT..........................................................................................................................................36
INIT......................................................................................................................................................36
INIT:CONT..........................................................................................................................................36
List Subsystem.........................................................................................................................................37
LIST:COUN.........................................................................................................................................37
LIST:CURR.........................................................................................................................................37
LIST:CURR:POIN?.............................................................................................................................38
LIST:DWEL.........................................................................................................................................38
LIST:DWEL:POIN?.............................................................................................................................38
LIST:STEP...........................................................................................................................................38
LIST:VOLT..........................................................................................................................................39
LIST:VOLT:POIN?.............................................................................................................................39
MEAS:CURR?.....................................................................................................................................39
MEAS:VOLT?.....................................................................................................................................39
Output Subsystem....................................................................................................................................39
OUTP...................................................................................................................................................39
OUTP:DFI............................................................................................................................................40
4
OUTP:DFI:LINK .................................................................................................................................40
OUTP:DFI:SOUR ................................................................................................................................40
OUTP:PROT:CLE ...............................................................................................................................40
OUTP:PROT:DEL ...............................................................................................................................41
OUTP:REL...........................................................................................................................................41
OUTP:REL:POL ..................................................................................................................................41
OUTP:TTLT ........................................................................................................................................42
OUTP:TTLT:LINK..............................................................................................................................42
OUTP:TTLT:SOUR.............................................................................................................................42
Status Subsystem.....................................................................................................................................42
STAT:OPER?.......................................................................................................................................43
STAT:OPER:COND? ..........................................................................................................................43
STAT:OPER:ENAB.............................................................................................................................43
STAT:OPER:NTR ...............................................................................................................................44
STAT:OPER:PTR ................................................................................................................................44
STAT:PRES .........................................................................................................................................44
STAT:QUES? ......................................................................................................................................45
STAT:QUES:COND? ..........................................................................................................................45
STAT:QUES:ENAB ............................................................................................................................45
STAT:QUES:NTR ...............................................................................................................................45
STAT:QUES:PTR................................................................................................................................45
SYST:ERR? .........................................................................................................................................46
SYST:VERS?.......................................................................................................................................46
Trigger Subsystem...................................................................................................................................46
TRIG ....................................................................................................................................................46
TRIG:DEL............................................................................................................................................47
TRIG:LINK..........................................................................................................................................47
TRIG:SOUR.........................................................................................................................................47
Voltage Subsystem..................................................................................................................................48
VOLT...................................................................................................................................................48
VOLT:MODE ......................................................................................................................................48
VOLT:PROT........................................................................................................................................48
VOLT:SENS:SOUR?...........................................................................................................................49
VOLT:TRIG.........................................................................................................................................49
Link Parameter List.................................................................................................................................50
Power Module Programming Parameters................................................................................................50
4. Status Reporting
Power Module Status Structure..................................................................................................................51
Status Register Bit Configuration...............................................................................................................51
Operation Status Group..............................................................................................................................51
Register Functions...................................................................................................................................51
Register Commands.................................................................................................................................51
Questionable Status Group.........................................................................................................................52
Register Functions...................................................................................................................................52
Register Commands.................................................................................................................................52
Standard Event Status Group......................................................................................................................53
Register Functions...................................................................................................................................53
Register Commands.................................................................................................................................53
Status Byte Register ...................................................................................................................................54
The RQS Bit............................................................................................................................................54
The MSS Bit............................................................................................................................................54
Determining the Cause of a Service Interrupt..........................................................................................54
Output Queue .............................................................................................................................................54
5
Location of Event Handles.........................................................................................................................54
Initial Conditions at Power On...................................................................................................................55
Status Registers.......................................................................................................................................55
The PON Bit............................................................................................................................................55
Examples....................................................................................................................................................55
Servicing an Operation Status Event.......................................................................................................55
Adding More Operation Events...............................................................................................................56
Servicing Questionable Status Events.....................................................................................................56
Monitoring Both Phases of a Status Transition.......................................................................................56
5. Synchronizing Power Module Output Changes
Introduction................................................................................................................................................57
Trigger Subsystem......................................................................................................................................57
Model of Fixed-Mode Trigger Operation................................................................................................57
Idle State...............................................................................................................................................58
Initiated State........................................................................................................................................58
Delaying State......................................................................................................................................58
Output Change State.............................................................................................................................59
Model of List-Mode Trigger Operation...................................................................................................59
Output Change State.............................................................................................................................59
Dwelling State......................................................................................................................................59
The INIT:CONT Function.......................................................................................................................59
Trigger Status and Event Signals.............................................................................................................59
Trigger In and Trigger Out......................................................................................................................60
List Subsystem............................................................................................................................................61
Basic Steps of List Sequencing...............................................................................................................61
Programming the List Output Levels.......................................................................................................61
Programming List Intervals.....................................................................................................................61
Automatically Repeating a List...............................................................................................................62
Triggering a List......................................................................................................................................62
Dwell-Paced Lists.................................................................................................................................62
Trigger-Paced Lists..............................................................................................................................62
DFI (Discrete Fault Indicator) Subsystem..................................................................................................64
RI (Remote Inhibit) Subsystem..................................................................................................................64
SCPI Command Completion......................................................................................................................64
6. Error Messages
Power Module Hardware Error Messages..................................................................................................65
System Error Messages..............................................................................................................................65
A. SCPI Conformance Information............................................................................................................67
B. Application Programs..............................................................................................................................69
Index..........................................................................................................................................................111
6

Introduction

About This Guide

You will find the following information in the rest of this guide:
Chapter 2 Introduction to SCPI messages structure, syntax, and data formats. Examples of SCPI programs. Chapter 3 Dictionary of SCPI commands. Table of module programming parameters. Chapter 4 Description of the status registers. Chapter 5 Description of synchronizing outputs with triggers and lists. Chapter 6 Error messages. Appendix A SCPI conformance information. Appendix B Application programs that illustrate features of the power module.
Note Instructions for the Agilent 60001A MPS Keyboard are in the User’s Guide supplied with each module.

Documentation Summary

The following related documents shipped with the system have information helpful to programming the power module:
Mainframe User’s Guide. Information on the GPIB address switch, trigger connections, fault (FLT) and
remote inhibit (INH) connections.
Module User’s Guide. Includes specifications and supplemental characteristics, use of the module
configuration switch, device related error messages, calibration procedures and use of the MPS keyboard.
1

External References

SCPI References
The following documents will assist you with programming in SCPI:
To obtain a copy of the above documents, contact your local Agilent Technologies Sales and Support Office.
GPIB References
The most important GPIB documents are your controller programming manuals - GW BASIC, GPIB Command Library for MS DOS, etc. Refer to these for all non-SCPI commands (for example: Local Lockout). The following are two formal documents concerning the GPIB interface:
The above two documents are available from the IEEE (Institute of Electrical and Electronics Engineers), 345 East 47th Street, New York, NY 10017, USA.
Beginner’s Guide to SCPI. Part No. H2325-90001. Highly recommended for anyone who has not had previous
experience programming with SCPI.
Tutorial Description of the GPIB . Part No. 5952-0156. Highly recommended for those not familiar with the
IEEE 488.1 and 488.2 standards.
2
ANSI/IEEE Std. 488.1-1987 IEEE Standard Digital Interface for Programmable Instrumentation . Defines the technical details of the GPIB interface. While much of the information is beyond the need of most programmers, it can serve to clarify terms used in this guide and in related documents.
2
ANSI/IEEE Std. 488.2-1987 IEEE Standard Codes, Formats, Protocols, and Common Commands . Recommended as a reference only if you intend to do fairly sophisticated programming. Helpful for finding precise definitions of certain types of SCPI message formats, data types, or common commands.
Introduction 7
VXI
plug&play
VXIplug&play instrument drivers for Microsoft Windows 95 and Windows NT are now available on the Web at http://www.agilent.com/find/drivers. These instrument drivers provide a high-level programming interface to your Agilent Technologies electronic load. VXIplug&play instrument drivers are an alternative to programming your instrument with SCPI command strings. Because the instrument driver’s function calls work together on top of the VISA I/O library, a single instrument driver can be used with multiple application environments.
Supported Applications
ñ Agilent VEE ñ Microsoft Visual BASIC ñ Microsoft Visual C/C++ ñ Borland C/C++ ñ National Instruments LabVIEW ñ National Instruments LabWindows/CVI
System Requirements
The VXIplug&play instrument driver complies with the following:
ñ Microsoft Windows 95 ñ Microsoft Windows NT 4.0 ñ HP VISA revision F.01.02 ñ National Instruments VISA 1.1
Power Products Instrument Drivers
Downloading and Installing the Driver
NOTE: Before installing the VXIplug&play instrument driver, make sure that you have one of the supported
applications installed and running on your computer.
1. Access Agilent Technologies Web site at http://www.agilent.com/find/drivers.
2. Select the instrument for which you need the driver.
3. Click on the driver, either Windows 95 or Windows NT, and download the executable file to your PC.
4. Locate the file that you downloaded from the Web. From the Start menu select Run <path>:\agxxxx.exe - where
<path> is the directory path where the file is located, and agxxxx is the instrument driver that you downloaded .
5. Follow the directions on the screen to install the software. The default installation selections will work in most cases. The readme.txt file contains product updates or corrections that are not documented in the on-line help. If you decide to install this file, use any text editor to open and read it.
6. To use the VXIplug&play instrument driver, follow the directions in the VXIplug&play online help for your
specific driver under “Introduction to Programming”.
Accessing Online Help
A comprehensive online programming reference is provided with the driver. It describes how to get started using the instrument driver with Agilent VEE, LabVIEW, and LabWindows. It includes complete descriptions of all function calls as well as example programs in C/C++ and Visual BASIC.
ñ To access the online help when you have chosen the default Vxipnp start folder, click on the Start button and select
Programs | Vxipnp | Agxxxx Help (32-bit).
- where Agxxxx is the instrument driver.
8 Introduction
2

Introduction To Programming

GPIB Capabilities Of The Power Module

All power module functions except for setting the GPIB address are programmable over the GPIB. The IEEE 488.1 capabilities of the power module are listed in the User’s Guide.

Module GPIB Address

The power module operates from a primary GPIB address that is set by a switch on the mainframe. The power module’s secondary GPIB address is determined by its slot position within the mainframe. See the mainframe Installation Guide for details.

Introduction To SCPI

SCPI (Standard Commands for Programmable Instruments) is a programming language for controlling instrument functions over the GPIB (IEEE 488) instrument bus. SCPI is layered on top of the hardware-portion of IEEE 488.2. The same SCPI commands and parameters control the same functions in different classes of instruments. For example, you would use the same DISPlay command to control the power module display state and the display state of a SCPI-compatible multimeter.
Conventions
The following conventions are used throughout this chapter:
Angle brackets < > Items within angle brackets are parameter abbreviations. For example, <NR1>
indicates a specific form of numerical data.
Vertical bar | Vertical bars separate one of two or more alternative parameters. For example,
0|OFF indicates that entering either "0" or "OFF" performs the same function.
Square Brackets [ ] Items within square brackets are optional. The representation [SOURce]:LIST
means that SOURce may be omitted.
Braces { } Braces indicate parameters that may be repeated zero or more times. It is used
especially for showing arrays. The notation <A>{<,B>} shows that parameter "A" must be entered, while parameter "B" may be omitted or may be entered one or more times.
Boldface font Boldface font is used to emphasize syntax in command definitions.
TRIGger:DELay <NRf> shows a command definition.
Computer font Computer font is used to show program lines in text. TRIGger: DELay .5 shows a
program line.
Introduction To Programming 9
Types of SCPI Messages
There are two types of SCPI messages, program and response.
Types of SCPI Commands
SCPI has two types of commands, common and subsystem. Common commands generally are not related to specific operation but to controlling overall power module functions, such as reset, status, and synchronization. All common commands consist of a three-letter mnemonic preceded by an asterisk:
Subsystem commands perform specific power module functions. They are organized into an inverted tree structure with the "root" at the top (see Figure 3-2). Some are single commands while others are grouped within specific subsystems.
A program message consists of one or more properly formatted SCPI commands sent from the controller to the power module. The message, which may be sent at any time, requests the power module to perform some action.
A response message consists of data in a specific SCPI format sent from the power module to the controller. The power module sends the message only when commanded by a special program message called a "query."
*RST *IDN? *SRE 8
Note If you have the optional Agilent 66001A MPS Keyboard, you may want to use it as a quick introduction
to message structure. See "Appendix A".
Structure of a SCPI Message
SCPI messages consist of one or more message units ending in a message terminator. The terminator is not part of the syntax, but implicit in the way your programming language indicates the end of a line (such as a newline or end-of-line character).
The Message Unit
The simplest SCPI command is a single message unit consisting of a command header (or keyword) followed by a message terminator.
ABOR<newline> VOLT?<newline>
The message unit may include a parameter after the header. The parameter usually is numeric, but it can be a string:
VOLT 20<newline> VOLT MAX<newline>
Combining Message Units
The following command message is briefly described here, with details in subsequent paragraphs.
10 Introduction To Programming
Figure 2-1. Command Message Structure
The basic parts of the above message are:
Message Component
Headers VOLT LEV PROT CURR Header Separator The colon in VOLT:LEV Data 8.0 8.8 Data Separator The space in VOLT 8. 0 and PROT 8. 8 Message Units VOLT:LEV 8.0 PROT 8.8 CURR? Message Unit Separator Root Specifier The colon in PROT 8. 8; : CURR? Query Indicator The question mark in CURR? Message Terminator
Parts of a SCPI Message
Headers
Headers are instructions recognized by the power module interface. Headers (which are sometimes known as "keywords") may be either in the long form or the short form.
Long Form The header is completely spelled out, such as VOLTAGE, STATUS, and DELAY. Short Form The header has only the first three or four letters, such as VOLT, STAT, and DEL.
Short form headers are constructed according to the following rules:
If the header consists of four or fewer letters, use all the letters. (DFI LIST)
If the header consists of five or more letters and the fourth letter is not a vowel (a,e,i,o,u), use the first four
letters. (CURRent STATus)
If the header consists of five or more letters and the fourth letter is a vowel (a,e,i,o,u), use the first three letters.
(DELay RELay)
Example
The semicolons in VOLT: LEV 8. 0; and PROT 8. 8;
The <NL> (newline) indicator. Terminators are not part of the SCPI syntax.
You must follow the above rules when entering headers. Creating an arbitrary form, such as POLAR for POLarity, will result in an error.
Introduction To Programming 11
The SCPI interface is not sensitive to case. It will recognize any case mixture, such as TRIGGER, Trigger, TRIGger, triGgeR.
Note Shortform headers result in faster program execution.
Header Convention
upper-case letters, such as DELay.
Header Separator
OUTPut:RELay:POLarity).
Optional Headers
OUTPut[: STATe] ON. However, if you combine two or more message units into a compound message, you may need to enter the optional header. This is explained under "Traversing the Command Tree."
. In this manual, headers are emphasized with boldface type. The proper short form is shown in
. If a command has more than one header, you must separate them with a colon (VOLT: PROT
. The use of some headers is optional. Optional headers are shown in brackets, such as
Note The optional Agilent 66001A MPS Keyboard does not display optional headers.
Query Indicator
Following a header with a question mark turns it into a query (VOLT?, VOLT:PROT?). If a query contains a parameter, place the query indicator at the end of the last header (VOLT: PROT? MAX).
Message Unit Separator
When two or more message units are combined into a compound message, separate the units with a semicolon (STATus:OPERation?;QUEStionable?). You can combine message units only at the current path of the command tree (see "Traversing the Command Tree").
Root Specifier
When it precedes the first header of a message unit, the colon becomes the root specifier. It indicates that the parser is at the root or top node of the command tree. Note the difference between root specifiers and header separators in the following examples:
OUTP:PROT:DEL .1 All colons are header separators. :OUTP:PROT:DEL .1 Only the first colon is a root specifier. OUTP: PROT: DEL . 1; :VOLT 12.5 Only the third colon is a root specifier.
Message Terminator
A terminator informs SCPI that it has reached the end of a message. Three permitted messages terminators are:
newline (<NL>), which is ASCII decimal 10 or hex 0A.
end or identify (<END>)
both of the above (<NL><END>).
In the examples of this guide, there is an assumed message terminator at the end of each message. If the terminator needs to be shown, it is indicated as <NL> regardless of the actual terminator character.
12 Introduction To Programming
Traversing the Command Tree
Figure 2-2 shows a portion of the subsystem command tree (you can see the complete tree in Figure 3-2). Note the location of the ROOT node at the top of the tree. The SCPI interface is at this location when:
Active Header Path
The power module is powered on.
A device clear (DCL) is sent to the power module.
The interface encounters a message terminator.
The interface encounters a root specifier.
Figure 2-2. Partial Command Tree
In order to properly traverse the command tree, you must understand the concept of the active header path. When the power module is turned on (or under any of the other conditions listed above), the active path is at the root. That means the interface is ready to accept any command at the root level, such as OUTPUT or STATUS in Figure 2-2. Note that you do not have to proceed either command with a colon; there is an implied colon in front of every root-level command.
If you enter OUTPUT, the active header path moves one colon to the right. The interface is now ready to accept :STATE, :PROTECTION, or :RELAY as the next header. Note that you must include the colon, because it is required between headers.
If you now enter :PROTECTION, the active path again moves one colon to the right. The interface is now ready to accept either :CLEAR or :DELAY as the next header.
If you now enter :CLEAR, you have reached the end of the command string. The active header path remains at :CLEAR. If you wished, you could have entered :CLEAR; DELAY 20 and it would be accepted. The entire message would be OUTPUT:PROTECTION:CLEAR;DELAY 20. The message terminator after DELAY 20 returns the path to the root.
The Effect of Optional Headers
If a command includes optional headers, the interface assumes they are there. For example, if you enter OUTPUT OFF, the interface recognizes it as OUTPUT: STATE OFF (see Figure 2-2). This returns the active path to the root (:OUTPUT). But if you enter OUTPUT: STATE OFF, then the active path remains at :STATE. This allows you to send OUTPUT: STATE OFF; PROTECTION: CLEAR in one message. If you tried to send OUTPUT OFF;PROTECTION:CLEAR, the header path would return to :OUTPUT instead of :PROTECTION.
Introduction To Programming 13
The optional header SOURCE precedes the current, list, and voltage subsystems (see Figure 3-2). This effectively makes :CURRENT, :LIST, and :VOLTAGE root-level commands.
Note The optional Agilent 66001 Keyboard does not display optional headers.
Moving Among Subsystems
In order to combine commands from different subsystems, you need to be able to restore the active path to the root. You do this with the root specifier (:). For example, you could clear the output protection and check the status of the Operation Condition register as follows (see Figure 2-2):
OUTPUT:PROTECTION:CLEAR STATUS:OPERATION:CONDITION?
By using the root specifier, you could do the same thing in one message:
OUTPUT:PROTECTION:CLEAR;:STATUS:OPERATION:CONDITION?
Note The SCPI parser traverses the command tree as described in Appendix A of the IEEE 488.2 standard.
The "Enhanced Tree Walking Implementation" given in that appendix is not implemented in the power module.
The following message shows how to combine commands from different subsystems as well as within the same subsystem (see Figure 3-2):
VOLTAGE:LEVEL 7;PROTECTION 8;:CURRENT:LEVEL 3;MODE LIST
Note the use of the optional header LEVEL to maintain the correct path within the voltage and current subsystems and the use of the root specifier to move between subsystems.
Including Common Commands
You can combine common commands with system commands in the same message. Treat the common command as a message unit by separating it with the message unit separator. Common commands do not affect the active header path; you may insert them anywhere in the message.
VOLT:TRIG 7.5;INIT;*TRG OUTP OFF;*RCL 2;OUTP ON

SCPI Data Formats

All data programmed to or returned from the power module is ASCII. The data may be numerical or character string.
Numerical Data
Table 2-1 and Table 2-2 summarize the numerical formats.
14 Introduction To Programming
Table 2-1. Numerical Data Formats
Symbol Data Form
Talking Formats
<NR1> Digits with an implied decimal point assumed at the right of the least-significant
digit. Examples: 273 0273
<NR2> Digits with an explicit decimal point. Example: 273. .0273 <NR3> Digits with an explicit decimal point and an exponent. Example: 2.73E+2 273.0E-2
Listening Formats
<NRf> Extended format that includes <NR1>, <NR2> and <NR3>. Examples: 273 273.
2.73E2
<NRf+> Expanded decimal format that includes <NRf> and MIN MAX. Examples: 273 273.
2.73E2 MAX. MIN and MAX are the minimum and maximum limit values that are implicit in the range specification for the parameter.
Table 2-2. Suffixes and Multipliers
Class Suffix Unit Unit with Multiplier
Current A Ampere MA (milliampere) Amplitude V Volt MV (millivolt) Time S second MS (millisecond)
Common Multipliers
lE3 K kilo 1E-3 M milli 1E-6 U micro
Boolean Data
Either form 1 | 0 or ON | OFF may be sent with commands. Queries always return 1 or 0.
OUTPut OFF CURRent:PROTection 1
String Data
Strings are used for both program (listening) and response (talking) data. String content is limited to the characters required for the link command parameters (see "Chapter 3 - Language Dictionary").
Note The IEEE 488.2 format for a string parameter requires that the string be enclosed within either single
(’ ’) or double (" ") quotes. Be certain that your program statements comply with this requirement.
Character Data
Character strings returned by query statements may take either of the following forms, depending on the length of the returned string:
<CRD> Character Response Data. Permits the return of character strings. <AARD> Arbitrary ASCII Response Data. Permits the return of undelimited 7-bit ASCII. This data type has an
implied message terminator.
Introduction To Programming 15

System Considerations

The remainder of this chapter addresses some system issues concerning programming. These are power module addressing and the use of the following types of GPIB system interfaces:
1. HP Vectra PC controller with Agilent 82335A GPIB Interface Command Library
2. IBM PC controller with National Instruments GPIB-PCII Interface/Handler
3. Agilent controller with Agilent BASIC Language System
Note Some specific application programs are given in Appendix B.
Assigning the GPIB Address in Programs
The power module address cannot be set remotely. It is determined by the position of the mainframe address switch and the position of power module (slot position) within the mainframe. ( See the Mainframe Users Guide for details.)
The following examples assume that the GPIB select code is 7, the mainframe interface address is 6, and that the power module address will be assigned to the variable PM3 (power module in the third mainframe slot).
1060 ! Power Module installed in Primary Mainframe 1070 PM3=70602 ! Agilent 82335A Interface 1070 ASSIGN @PM3TO 70602 ! Agilent BASIC Interface 1080 ! 1080 ! Power Module installed in Auxiliary Mainframe 1090 PM=70610 ! Agilent 82335A Interface 1090 ASSIGN @PM3 TO 70610 ! Agilent BASIC Interface
For systems using the National Instruments DOS driver, the address is specified in the software configuration program (IBCONFIG.EXE) and assigned a symbolic name. The address then is referenced only by this name within the application program (see the National Instruments GPIB documentation).
DOS Drivers
Types of Drivers
The Agilent 82335A and National Instruments GPIB are two popular DOS drivers. Each is briefly described here. See the software documentation supplied with the driver for more details.
Agilent 82335A Driver.
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 GPIB 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).
For GW-BASIC programming, the GPIB library is implemented as a series of subroutine calls.
16 Introduction To Programming
Your application program will not include the power module 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 module 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 "Chapter 5 - Error Messages".

TRANSLATION AMONG LANGUAGES

This section explains how to translate between Agilent BASIC and several other popular programming environments. For explicit information on initializing interface cards or syntax of language, see the documentation that accompanies your GPIB interface product.
General Setup Information for GWBASIC
Using the Agilent 82335A/82990A/61062B GPIB Command Library
The GPIB Command Library supports strings, numeric and array data formats. However, multiple data types
Error handling is accomplished by checking the variable PCIB.ERR. If it is nonzero, an error has occurred.
When CALLs are made to the GPIB Command Library, all parameters are passed as variables.
The address of a module is a real number, determined in the same manner as in Agilent BASIC. For example, the address 70501 means 7 is the select code of the GPIB interface, 05 is the GPIB address of the mainframe, 01 is the slot number (secondary address) of the module.
The module expects each command to be terminated by line feed (character 10) and/or EOI. The default configuration of the GPIB Command Library is carriage return + line feed for end-of-line termination and EOI at the end of a line. Therefore, the defaults are correct for use with the module.
cannot be sent in a single command. To send both string and numeric data in one command, convert all numeric data to strings, concatenate with the string data and send the combined string to the module. To read multiple data types, read the data into a string, and then manipulate the string by converting each piece into the appropriate data format.
See the command library documentation for trapping and interpreting this error variable.
Introduction To Programming 17
Using the National Instruments GPIB Interface
General Setup Information for Microsoft C
Using the Agilent 82335A/82990A/61062B GPIB Command Library
When CALLs are made to the GPIB driver, all parameters are passed as variables.
The module is identified as a device in two ways. First, the GPIB.COM driver is modified to include the module. Use the mainframe address as the primary bus address and the slot address as the secondary address. The driver requires secondary address 0 (which is for slot 0) to be entered as 96, secondary address 1 to be entered as 97, etc.
It is recommended that you disable auto serial poll in the GPIB.COM driver.
The module expects each command to be terminated by a line feed (character 10) and/or EOI. Configure the GPIB.COM driver to terminate all reads and writes with EOI.
The GPIB driver does all communication via strings. To send numeric data, number to-string conversion must be performed before the IBWRT( ). To read numeric data, string-to-number conversion must be performed after each IBRD( ).
Error handling is accomplished by checking the variable IBSTA%. If it is less than zero, an error has occurred. See the GPIB interface documentation for trapping and interpreting this error variable.
The address of a module is of type long and is determined the same as with Agilent BASIC. For example, the address 70501L means 7 is the select code of the GPIB interface, 05 is the GPIB address of the mainframe, 01 is the slot number (secondary address) of the module.
The module expects each command to be terminated by a line feed (character 10) and/or EOI. The default configuration of the GPIB Command Library is carriage return+line feed for end-of-line termination and EOI at the end of a line. Therefore, the defaults are correct for use with the module.
Using the National Instruments GPIB Interface
It is recommended that you disable the auto serial poll in the GPIB.COM driver.
The module expects each command to be terminated by either a line feed (character 10) and/or EOI.
The GPIB driver does all communication via strings. To send numeric data, number to-string conversion
Error handling is accomplished by checking the variable IBSTA%. If bit 15 is set, an error has occurred. See
The GPIB Command Library supports strings, numeric and array data formats. However, multiple data types cannot be sent in a single command. To send both string and numeric data in one command, convert all numeric data to strings, concatenate with the string data and send the combined string to the module. To read multiple data types, read the data into a string, and then manipulate the string by converting each piece into the appropriate data format.
Each command library call returns an int. If the value is zero, no error has occurred. Error handling is accomplished by checking the return value. See the command library documentation for interpretation of this error value.
The module is identified as a device in two ways. First, the GPIB.COM driver is modified to include the module. Use the mainframe address as the primary bus address. Use the slot address as the secondary address. The driver requires that secondary address 0 (which is for slot 0) be entered as 96, secondary address 1 be entered as 97, etc.
Configure the GPIB.COM driver to terminate all reads and writes with EOI.
must be performed before the ibwrt( ). To read numeric data, string-to-number conversion must be performed after each ibrd( ).
the GPIB interface documentation for the interpretation of this error variable.
18 Introduction To Programming
Sending Commands to and Receiving Data from the Module Sending the Command “VOLT 5”
********************************************** Agilent BASIC ************************************************
2100 OUTPUT 70501;"VOLT 5" ! where 70501 means 7 is the select code of the GPIB interface 05 is the 2110 ! GPIB address of the mainframe, 01 is the slot number (secondary address) 2120 ! of the module
************************* GWBASIC (Agilent 82335A/82990A/61062B GPIB Command Library) ************************
2100 MODULE.ADDRESS=70501 2110 COMMAND$ - "VOLT 5" 2120 L - LENGTH(COMMAND$) 2130 CALL IOOUTPUTS(MODULE.ADDRESS,COMMAND$,L)
2140 IF PCIB.ERR&<>O THEN ERROR PCIB.BASERR’ ! ERROR TRAP
********************************** GWBASIC (National Instruments GPIB Interface) ********************************
2100 COMMAND$ = "VOLT 5" 2110 CALL IBWRT(MODULE.ADDRESS%, COMMAND$) 2120 IF IBSTA% &< 0 GOTO 5000 ! TRAP ERROR WITH ERROR HANDLER 2130 ! AT LINE 5000
Sending the Command “VOLT 5” in BASIC
*********************** Microsoft C (Agilent 82335A/82990A/61062B HPIB Command Library) *************************
/* Assumes that you have an error handler routine, called ‘error_handler’ that accepts a float. The error handler in then passed the float that is returned from each call to the library. */
*include &<stdio.h> *include &<chpib.h> *include &<cfunc.h>
*define module_address 70501L
char *cmd; cmd = "VOLT 5”; error = iooutputs(MODULE_ADDRESS, cmd, strlen(cmd)); error_handler(error);
****************************** Microsoft C (National Instruments GPIB Interface) ************************************
/* Assumes that you have an error handler routine, called ‘error-handler’. The error handler is then passed the float that is returned from
each call to the library. */
*include &<stdio.h> *include &<decl.h>
*define ERR (l&<&<15) /* Error is detected as bit i5 of ibsta */
int module-address; /* Device is configured in the GPIB.COM handler. Use ibfind() to assign a value to module-address. */
char *cmd; cmd - "VOLT 5” ibwrt(MODULE_ADDRESS, cmd, strlen(cmd)); if (ibsta & ERR)
error_handler();
Sending the Command "VOLT 5” in C
Introduction To Programming 19
Receiving Data from the Module
The following screens show how to enter data from the module with various interfaces.
******************************************* Agilent BASIC ******************************************
2100 ENTER 70501; MEASUREMENT ! where 70501 means 7 is the select code of the GPIB interface, 2110 ! 05 is the GPIB address of the mainframe, 01 is the slot number 2120 ! (secondary address) of the module, MEASUREMENT is a real number 2130 ! sent by the module
**************** GWBASIC (Agilent 82335A/82990A/61062B GPIB Command Library) ***********************
2100 MODULE.ADDRESS=70501 2110 CALL IOENTER(MODULE.ADDRESS,MEASUREMENT) 2120 IF PCIB.ERR&< >0 THEN ERROR PCIB.BASERR ! ERROR TRAP
************************** GWBASIC (National Instruments GPIB Interface) *******************************
2100 MEASUREMENT$ - SPACE$(20) ! DRIVER CAN ONLY READ STRINGS, SO RESERVE 2110 ! SPACE IN A STRING 2120 CALL IBRD(MODULE.ADDRESS%, MEASUREMENT$) 2130 IF IBSTA% &< 0 GOTO 5000 ! TRAP ERROR WITH ERROR HANDLER AT LINE 5000 2140 MEASURED.VALUE=VAL(MEASUREMENT$)” ! CONVERT THE STRING TO A NUMBER
Receiving Module Data with BASIC
20 Introduction To Programming
***************** Microsoft C (Agilent 82335A/82990A/61062B GPIB Command Library) *********************
/* Assumes that you have an error handler routine, called ’error_handler’ that accepts a float. The error handler is then
passed the float that is returned from each call to the library. */
#include &<stdio.h> #include k<chpib.h> #include &<cfunc.h>
#define MODULE_ADDRESS 70501L
char *cmd; float measurement; error = ioenter(MODULE_ADDRESS, &&measurement); error_handler(error);
**************************** Microsoft C (National Instruments GPIB Interface) ****************************
/* Assumes that you have an error handler routine, called ’error_handler’. The error handler is then passed the float that is
returned from each call to the library. */
#include &<stdio.h> #include &<stdlib.h> #include &<decl.h>
#define ERR (1&<&<15) /* Error is detected as bit 15 of ibsta */ #define STRING_LENGTH 20 /* Length of string to hold measurement */
int module_address; /* Device is configured in the GPIB.COM handler. Use
ibfind( ) to assign a value to module_address. */ char measurement[STRING_LENGTH]; float measured_value; /* Holds float conversion of measurement */
ibwrt(module_address, measurement, STRING_LENGTH); if (ibsta & ERR)
error_handler();
measured_value = atof(measurement); /* Converts measurement string to float */
Receiving Module Data with C
Introduction To Programming 21
3

Language Dictionary

Introduction

This section gives the syntax and parameters for all the IEEE 488.2 SCPI commands and the Common commands used by the Agilent Series 66l0xA power modules. It is assumed that you are familiar with the material in "Chapter 2 - Introduction to Programming". That chapter explains the terms, symbols, and syntactical structures used here and gives an introduction to programming.
The programming commands function the same way in all Agilent Series 66l0xA power modules. Since SCPI syntax remains the same for all programming languages, the examples are generic.
Syntax definitions use the long form, but only short form headers (or "keywords") appear in the examples. If you have any concern that the meaning of a header in your program listing will not be obvious at some later time, then use the long form to help make your program self-documenting.

Parameters

Most commands require a parameter and all queries will return a parameter. The range for a parameter may vary according to the model of power module. Parameters for all current models are listed in Table 3-3, at the end of this chapter.

Related Commands

Where appropriate, related commands or queries are included. These are listed either because they are directly related by function or because reading about them will clarify or enhance your understanding of the original command or query.

Order of Presentation

The dictionary is organized as follows:

COMMON Commands

Common commands begin with an * and consist of three letters (command) or three letters and a ? (query). Common commands are defined by the IEEE 488.2 standard to perform some common interface functions. The Agilent Series 6610xA power modules respond to the 13 required common commands that control status reporting, synchronization, and internal operations. The power modules also respond to five optional common commands controlling triggers, power-on conditions, and stored operating parameters.

Subsystem Commands

Subsystem commands are specific to power module functions. They can be a single command or a group of commands. The groups are comprised of commands that extend one or more levels below the root. The description of subsystem commands follows the description of the common commands.
IEEE 488.2 common commands, in alphabetical order. Subsystem commands.
Language Dictionary 23

Description Of Common Commands

Figure 3-1 shows the common commands and queries. These commands are listed alphabetically in the dictionary. If a command has a corresponding query that simply returns the data or status specified by the command, then both command and query are included under the explanation for the command. If a query does not have a corresponding command or is functionally different from the command, then the query is listed separately. The description for each common command or query specifies any status registers affected. In order to make use of this information, you must refer to "Chapter 4 - Status Reporting", which explains how to read specific register bits and use the information that they return.
Figure 3-1. Common Commands Syntax Diagram
*CLS
Meaning and Type
Clear Status Device Status
Description
This command causes the following actions (see "Chapter 4 - Status Reporting" for descriptions of all registers):
Clears the following registers:
Standard Event Status
Operation Status Event
Questionable Status Event
Status Byte
Clears the Error Queue
24 Language Dictionary
*ESE
Meaning and Type
Event Status Enable Device Status
Description
This command programs the Standard Event Status Enable register bits. The programming determines which events of the Standard Event Status Event register (see *ESR?) are allowed to set the ESB (Event Summary Bit) of the Status Byte register. A "1" in the bit position enables the corresponding event. All of the enabled events of the Standard Event Status Event register are logically ORed to cause the Event Summary Bit (ESB) of the Status Byte register to be set. See "Chapter 4 - Status Reporting" for descriptions of all three registers.
Bit Position Bit Name Bit Weight
CME = Command error; DDE = Device-dependent error; EXE = Execution error; OPC = Operation complete; PON Power-on; QYE = Query error
If *CLS immediately follows a program message terminator (<NL>), then the output queue and the MAV bit
are also cleared.
Command Syntax *CLS
Parameters (None)
Query Syntax (None)
Bit Configuration of Standard Event Status Enable Register
76543210
PON 0 CME EXE DDE QYE 0 OPC
1286432168421
Command Syntax *ESE <NRf>
Parameters 0 to 255
Power On Value (See *PSC)
Suffix (None)
Example *ESE 129
Query Syntax *ESE?
Returned Parameters <NR1> (Register value)
Related Commands *ESR? *PSC *STB?
If PSC is programmed to 0, then the *ESE command causes a write cycle to nonvolatile memory. The
nonvolatile memory has a finite maximum number of write cycles (see in the power module User’s Guide). Programs that repeatedly cause write cycles to nonvolatile memory can eventually
exceed the maximum number of write cycles and may cause the memory to fail.
*ESR?
Meaning and Type
Event Status Register Device Status
Description
This query reads the Standard Event Status Event register. Reading the register clears it. The bit configuration of this register is the same as the Standard Event Status Enable register (*ESE). See "Chapter 4 - Status Reporting" for a detailed explanation of this register.
Query Syntax *ESR?
Parameters (None)
Returned Parameters <NR1> (Register binary value)
Related Commands *CLS *ESE *ESE? *OPC
Language Dictionary 25
*IDN?
Identification Query
Meaning and Type
Identification System Interface
Description
This query requests the power module to identify itself. It returns a string composed of four fields separated by commas.
Query Syntax *IDN?
Returned Parameters <AARD>
Field Information
Agilent Technologies Manufacturer xxxxxA 5-digit model number followed by a letter
nnnnA-nnnnn 10-character serial number or 0 <R>.xx.xx Revision levels of firmware
Example Agilent Technologies,66101A,0,A.00.01
Related Commands (None)
*OPC
Meaning and Type
Operation Complete Device Status
Description
This command causes the interface to set the OPC bit (bit 0) of the Standard Event Status register when the power module has completed all pending operations. (see *ESE for the bit configuration of the Standard Event Status register.) Pending operations are complete when:
*OPC does not prevent processing of subsequent commands but Bit 0 will not be set until all pending operations are completed.
*OPC?
Meaning and Type
Operation Complete Device Status
Description
This query causes the interface to place an ASCII "1" in the Output Queue when all pending operations are completed. Pending operations are as defined for the *OPC command. Unlike *OPC, *OPC? prevents processing of all subsequent commands. *OPC? is intended to be used at the end of a command line so that the application program can then monitor the bus for data until it receives the "1" from the power module Output Queue.
All commands sent before *OPC have been executed. This includes overlapped commands. Most commands
are sequential and are completed before the next command is executed. Overlapped commands are executed in parallel with other commands. Commands that affect output voltage, current or state, relays, and trigger actions are overlapped with subsequent commands sent to the power module. The *OPC command provides notification that all overlapped commands have been completed.
Any change in the output level caused by previous commands has been completed (completion of settling
time, relay bounce, etc.)
All triggered actions are completed.
Command Syntax *OPC
Parameters (None)
Related Commands *OPC? *WAI
26 Language Dictionary
Do not follow *OPC? with *TRG or GPIB bus triggers. Such triggers sent after *OPC? will be prevented from executing and will prevent the power module from accepting further commands. If this occurs, the only programmable way to restore operation is by sending the power module a GPIB
DCL (Device Clear) command.
Query Syntax *OPC?
Returned Parameters <NR1> ASCII 1 is placed in the Output Queue when the
power module has completed operations.
Related Commands *OPC *TRIG *WAI
*OPT?
Identification Query
Meaning and Type
Identification System Interface
Description
This query requests the power module to identify any options that are installed. Options are identified by number, as shown below. A 0 indicates no options are installed.
Query Syntax *OPT?
Returned Parameters <AARD>
Related Commands (None)
*PSC
Meaning and Type
Power-on Status Clear Device Initialization
Description
This command controls the automatic clearing at power on the following registers (see "Chapter 4 - Status Reporting" for register details):
If the command parameter = 1 (or any non-zero value), then the above registers are cleared at power on. If the command parameter = 0, then the above registers are not cleared but are programmed to their last state prior to power turn on. This is the most common application for *PSC and enables the power module to generate an SRQ (Service Request interrupt) at power on.
repeatedly write to nonvolatile memory can eventually exceed the maximum number of write cycles and may cause the memory to fail.
Service Request Enable. Standard Event Status Enable.
Command Syntax *PSC <bool>
Parameters 0 | 1 | OFF | ON
Example *PSC 0 *PSC 1
Query Syntax *PSC?
Returned Parameters <NR1> 0 | 1
Related Commands *ESE *SRE
*PSC causes a write cycle to nonvolatile memory. If *PSC is programmed to 0, then the *ESE and *SRE commands also cause a write cycle to nonvolatile memory. The nonvolatile memory has a finite
number of write cycles (see Table 1-2 in the power module User’s Guide). Programs that
Language Dictionary 27
*RCL
Meaning and Type
Recall Device State
Recalling a previously stored state may place hazardous voltage at the power module output.
Description
This command restores the power module to a state that was previously stored in memory with a *SAV command to the specified location. The following states are recalled:
CAL:AUTO LIST:COUN OUTP:REL[:STAT] TRIG:LINK CURR[:LEV][:IMM] LIST:STEP OUTP:REL:POL TRIG:SOUR CURR:MODE OUTP[:STAT] OUTP:TTLT[:STAT] VOLT[:LEV][IMM] CURR:PROT:STAT OUTP:DFI[:STAT] OUTP:TTLT:LINK VOLT:MODE DISP:STAT OUTP:DFI:LINK OUTP:TTLT:SOUR VOLT:PROT[:LEV] INIT:CONT OUTP:PROT:DEL TRIG:DEL
Sending *RCL also does the following:
Forces an ABORt command before resetting any parameters (this cancels any uncompleted trigger actions). Disables the calibration function by setting CAL:STATe to OFF.
The device state stored in location 0 is automatically recalled at power turn-on when the power module configuration switch
is set for this mode of operation (see the power module User’s Guide).
Note Whenever the power module is powered up, the state stored in location 0 is written to the 5 volatile
locations (5 through 9).
Command Syntax *RCL <NRf>
Parameters 0 through 9
Example *RCL 3
Query Syntax (None)
Related Commands *PSC *RST *SAV
*RST
Meaning and Type
Reset Device State
Description
This command resets the power module to a factory-defined state as defined below. *RST also forces an ABORt command.
COMMAND STATE COMMAND STATE COMMAND STATE
CAL:AUTO CAL:STAT CURR[:LEV][:IMM] CURR:PROT:STAT CURR:MODE DISP[:WIND]:STAT INIT:CONT LIST:STEP LIST:COUN
OFF OFF
1
OFF
FIX
ON
OFF
A UTO
1
OUTP[:STAT] OUTP:DFI OUTP:DFI:SOUR OUTP:DFI:LINK OUTP:PROT:DEL OUTP:REL[:STAT] OUTP:REL:POL OUTP:TTLT[STAT] OUTP:TTLT:SOUR
OFF OFF
LINK
“SUM3”
1
OFF
NORM
OFF BUS Table 3-2.
OUTP.TTLT:LINK TRIG:DEL TRIG:LINK TRIG:SOUR VOLT[:LEV][:IMM] VOLT:MODE VOLT:PROT:LEV
1
Model-dependent value. See
OFF
0
OFF
BUS
0
FIX
MAX
28 Language Dictionary
Command Syntax *RST
Parameters (None)
Query Syntax (None)
Related Commands *PSC *SAV
*SAV
Meaning and Type
Save Device State
Description
This command stores the present state of the power module to a specified location in memory. Up to 10 states can be stored. Storage locations 0 through 4 are in nonvolatile memory and locations 5 through 9 are in volatile memory. If a particular state is desired at power on, it should be stored in location 0. It then will be recalled at power on if the power
module configuration switch is set for this mode of operation (see the power module User’s Guide).
The following power module states are stored by *SAV:
CAL:AUTO LIST:COUN OUTP:REL[:STAT] TRIG:LINK CURR[:LEV][:IMM] LIST:STEP OUTP:REL:POL TRIG:SOUR CURR:MODE OUTP[:STAT] OUTP:TTLT[:STAT] VOLT[:LEV][IMM] CURR:PROT:STAT OUTP:DFI[:STAT] OUTP:TTLT:LINK VOLT:MODE DISP:STAT OUTP:DFI:LINK OUTP:TTLT:SOUR VOLT:PROT[:LEV] INIT:CONT OUTP:PROT:DEL TRIG:DEL
Command Syntax *SAV
Parameters 0 to 9
Query Syntax (None)
Related Commands PSC *RCL *RST
*SRE
Meaning and Type
Service Request Enable Device Interface
Description
This command sets the condition of the Service Request Enable register. This register determines which bits from the Status Byte register (see *STB for its bit configuration) are allowed to set the Master Status Summary (MSS) bit and the Request for Service (RQS) summary bit. A 1 in any Service Request Enable register bit position enables the corresponding Status Byte register bit and all such enabled bits then are logically ORed to cause Bit 6 of the Status Byte register to be set. See "Chapter 4 - Status Reporting" for more details concerning this process.
When the controller conducts a serial poll in response to SRQ, the RQS bit is cleared, but the MSS bit is not. When *SRE is cleared (by programming it with 0), the power module cannot generate an SRQ to the controller.
Command Syntax *SRE <NRf>
Parameters 0 to 255
Default Value (See *PSC)
Example *SRE 20
Query Syntax *SRE?
Returned Parameters <NR1> (Register binary value)
Related Commands *ESE *ESR *PSC
Language Dictionary 29
If *PSC is programmed to 0, then the *SRE command causes a write cycle to nonvolatile memory. The nonvolatile memory has a finite number of write cycles (see Table 1-2 in the power module User’s Guide). Programs that repeatedly write to nonvolatile memory can eventually exceed the
maximum number of write cycles and may cause the memory to fail.
*STB?
Meaning and Type
Status Byte Device Status
Description
This query reads the Status Byte register, which contains the status summary bits and the Output Queue MAV bit. Reading the Status Byte register does not clear it. The input summary bits are cleared when the appropriate event registers are read
(see “Chapter 4 - Status Reporting”) for more information). The MAV bit is cleared at power on or by *CLS.
A serial poll also returns the value of the Status Byte register, except that bit 6 returns Request for Service (RQS) instead of Master Status Summary (MSS). A serial poll clears RQS, but not MSS. When MSS is set, it indicates that the power module has one or more reasons for requesting service.
Bit Configuration of Status Byte Register
Bit Position Condition
76543210
OPER MSS ESB MAV QUES
222
(RQS)
Bit Weight
128 64 32 16 8 4 2 1 ESB = Event status byte summary; M = Message available MSS = Master status summary; OPER = Operation status summary; QUES = Questionable status summary; RQS = Request for service
1
Also represents RQS. 2These bits are always zero.
Query Syntax *STB?
Returned Parameters <NR1> (Register binary value)
Related Commands (None)
*TRG
Meaning and Type
Trigger Device Trigger
Description
This command generates a trigger to any subsystem that has BUS selected as its source (for example, TRIG:SOUR BUS, OUTP:TTLT:SOUR BUS). The command has the same affect as the Group Execute Trigger (<GET>) command.
Command Syntax *TRG
Parameters (None)
Query Syntax (None)
Related Commands ABOR CURR:TRIG INIT TRIG[:IMM] VOLT:TIUG
30 Language Dictionary
*TST?
Meaning and Type
Test Device Test
Description
This query causes the power module to do a self-test and report any errors (see "Selftest Error Messages" in Chapter 3 of the power module User’s Guide).
Query Syntax *TST?
Returned Parameters <NR1>
0 Indicates power module passed self-test. Nonzero Indicates an error code.
Related Commands (None)
*WAI
Meaning and Type
Wait to Continue Device Status
Description
This command instructs the power module not to process any further commands until all pending operations are completed. "Pending operations" are as defined under the *OPC command. *WAI can be aborted only by sending the power module a GPIB DCL (Device Clear) command.
Command Syntax *WAI
Parameters (None)
Query Syntax (None)
Related Commands *OPC

Description of Subsystem Commands

Figure 3-2 is a tree diagram of the subsystem commands. Commands followed by a question mark (?) take only the query form. Except as noted in the syntax descriptions, all other commands take both the command and query form. The commands are listed in alphabetical order and the commands within each subsystem are grouped alphabetically under the subsystem.
ABOR
This command cancels any trigger actions presently in process. Pending trigger levels are reset equal to their corresponding immediate values. ABOR also cancels any programmed lists that may be in process.
ABOR also resets the WTG bit in the Operation Condition Status register (see "Chapter 4 - Status Reporting"). If INIT:CONT ON has been programmed, the trigger subsystem initiates itself immediately after ABORt, thereby setting
WTG. ABOR is executed at power turn on and upon execution of *RCL, RST, or any implied abort command (see List Subsystem).
Command Syntax ABORt
Parameters (None)
Examples ABOR
Query Syntax (None)
Related Commands INIT *RST *TRG TRIG
Language Dictionary 31
Loading...
+ 84 hidden pages