Agilent 66312C Programming
Agilent 66312C Programming
Printing History
The edition and current revision of this manual are indicated below. Reprints of this guide containing minor
corrections and updates may have the same printing date. Revised editions are identified by a new
printing date. A revised edition incorporates all new or corrected material since the previous printing date.
Changes to the manual occurring between revisions are covered by change sheets shipped with the
guide.
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
Table of Contents
Safety Guidelines 2
Printing History 2
Table of Contents 3
1 - GENERAL INFORMATION 7
About this Guide 7
Documentation Summary 7
External References 8
GPIB References 8
SCPI References 8
2 - INTRODUCTION TO PROGRAMMING 9
VXIplug&play Power Products Instrument Drivers 9
Supported Applications 9
System Requirements 9
Downloading and Installing the Driver 9
Accessing Online Help 10
GPIB Capabilities of the DC Source 10
GPIB Address 10
RS-232 Capabilities of the DC Source 10
RS-232 Data Format 10
RS-232 Flow Control 11
RS-232 Programming Example 11
RS-232 Troubleshooting 12
Introduction to SCPI 12
Conventions Used in This Guide 12
Types of SCPI Commands 13
Multiple Commands in a Message 13
Moving Among Subsystems 14
Including Common Commands 14
Using Queries 14
Types of SCPI Messages 14
The Message Unit 15
Headers 15
Query Indicator 15
Message Unit Separator 15
Root Specifier 15
Message Terminator 15
SCPI Data Formats 16
Numerical Data Formats 16
Suffixes and Multipliers 16
Response Data Types 16
SCPI Command Completion 17
Using Device Clear 17
3 - PROGRAMMING THE DC SOURCE 19
Introduction 19
Programming the Output 19
Power-on Initialization 19
Enabling the Output 19
Output Voltage 20
Output Current 20
Triggering Output Changes 21
SCPI Triggering Nomenclature 21
3
Output Trigger System Model 21
Setting the Voltage or Current Trigger Levels 21
Initiating the Output Trigger System 22
Generating Triggers 22
Making Measurements 23
Voltage and Current Measurements 23
Internally Triggered Measurements 25
SCPI Triggering Nomenclature 25
Measurement Trigger System Model 25
Initiating the Measurement Trigger System (Agilent 66312A, 66332A Only) 25
Selecting the Measurement Trigger Source (Agilent 66312A, 66332A Only) 26
Generating Measurement Triggers (Agilent 66312A, 66332A Only) 26
Measuring Output Pulses (Agilent 66312A, 66332A Only) 28
Current Detector 28
Pulse Measurement Queries 28
Controlling Measurement Samples 29
Varying the Voltage or Current Sampling Rate 29
Multiple Measurements (Agilent 66312A, 66332A Only) 29
Pre-event and Post-event Triggering (Agilent 66312A, 66332A Only) 30
Pulse Measurement Example (Agilent 66312A, 66332A only) 30
Programming the Status Registers 32
Power-On Conditions 32
Operation Status Group 33
Questionable Status Group 34
Standard Event Status Group 34
Status Byte Register 34
Determining the Cause of a Service Interrupt 35
Servicing Operation Status and Questionable Status Events 35
Monitoring Both Phases of a Status Transition 36
Inhibit/Fault Indicator 36
Remote Inhibit (RI) 36
Discrete Fault Indicator (DFI) 36
Using the Inhibit/Fault Port as a Digital I/O 37
DFI Programming Example 37
4 - LANGUAGE DICTIONARY 39
Introduction 39
Subsystem Commands 39
Common Commands 43
Programming Parameters 43
Calibration Commands 44
CALibrate:CURRent 44
CALibrate:CURRent:NEGative 44
CALibrate:CURRent:MEASure:LOWRange 44
CALibrate:CURRent:MEASure:AC 44
CALibrate:DATA 45
CALibrate:LEVel 45
CALibrate:PASSword 45
CALibrate:SAVE 45
CALibrate:STATe 46
CALibrate:VOLTage 46
CALibrate:VOLTage:PROTection 46
Measurement Commands 47
MEASure:ARRay:CURRent? FETCh:ARRay:CURRent? 47
MEASure:ARRay:VOLTage? FETCh:ARRay:VOLTage? 47
4
MEASure:CURRent? FETCh:CURRent? 48
MEASure:CURRent:ACDC? FETCh:CURRent:ACDC? 48
MEASure:CURRent:HIGH? FETCh:CURRent:HIGH? 48
MEASure:CURRent:LOW? FETCh:CURRent:LOW? 49
MEASure:CURRent:MAXimum? FETCh:CURRent: MAXimum? 49
MEASure:CURRent:MINimum? FETCh:CURRent:MINimum? 49
MEASure:VOLTage? FETCh:VOLTage? 50
MEASure:VOLTage:ACDC? FETCh:VOLTage:ACDC? 50
MEASure:VOLTage:HIGH? FETCh:VOLTage:HIGH? 50
MEASure:VOLTage:LOW? FETCh:VOLTage:LOW? 51
MEASure:VOLTage:MAXimum? FETCh:VOLTage:MAXimum? 51
MEASure:VOLTage:MINimum? FETCh:VOLTage:MINimum? 51
SENSe:CURRent:RANGe 52
SENSe:CURRent:DETector 52
SENSe:FUNCtion 53
SENSe:SWEep:OFFSet:POINts 53
SENSe:SWEep:POINts 53
SENSe:SWEep:TINTerval 53
SENSe:WINDow 54
Output Commands 55
OUTPut 55
OUTPut:DFI 55
OUTPut:DFI:SOURce 55
OUTPut:PON:STATe 56
OUTPut:PROTection:CLEar 56
OUTPut:PROTection:DELay 56
OUTPut:RELay 57
OUTPut:RELay:POLarity 57
OUTPut:RI:MODE 57
[SOURce:]CURRent 58
[SOURce:]CURRent:TRIGger 58
[SOURce:]CURRent:PROTection:STATe 58
[SOURce:]DIGital:DATA 59
[SOURce:]DIGital:FUNCtion 59
[SOURce:]VOLTage:ALC:BANDwidth? [SOURce:]VOLTage:ALC:BWIDth? 60
[SOURce:]VOLTage:TRIGger 60
[SOURce:]VOLTage:PROTection 60
Status Commands 61
STATus:PRESet 61
STATus:OPERation? 61
STATus:OPERation:CONDition? 61
STATus:OPERation:ENABle 62
STATus:OPERation:NTR STATus:OPERation:PTR 62
STATus:QUEStionable? 63
STATus:QUEStionable:CONDition? 63
STATus:QUEStionable:ENABle 63
STATus:QUEStionable:NTR STATus:QUEStionable:PTR 64
*CLS 64
*ESE 65
*ESR? 65
*OPC 65
*PSC 66
*SRE 66
*STB? 67
*WAI 67
5
System Commands 68
DISPlay 68
DISPlay:MODE 68
DISPlay:TEXT 68
SYSTem:ERRor? 69
SYSTem:LANGuage 69
SYSTem:VERSion? 69
SYSTem:LOCal 70
SYSTem:REMote 70
SYSTem:RWLock 70
*IDN? 70
*OPT? 71
*RCL 71
*RST 71
*SAV 72
*TST? 72
Trigger Commands 73
ABORt 73
INITiate:SEQuence INITiate:NAME 73
INITiate:CONTinuous:SEQuence1 INITiate:CONTinuous:NAME 73
TRIGger 74
TRIGger:SOURce 74
TRIGger:SEQuence2 TRIGger:ACQuire 74
TRIGger:SEQuence2:COUNt:CURRent TRIGger:ACQuire:COUNt:CURRent 75
TRIGger:SEQuence2:COUNt:VOLTage TRIGger:ACQuire:COUNt:VOLTage 75
TRIGger:SEQuence2:HYSTeresis:CURRent TRIGger:ACQuire:HYSTeresis:CURRent 76
TRIGger:SEQuence2:HYSTeresis:VOLTage TRIGger:ACQuire:HYSTeresis:VOLTage 76
TRIGger:SEQuence2:LEVel:CURRent TRIGger:ACQuire:LEVel:CURRent 77
TRIGger:SEQuence2:LEVel:VOLTage TRIGger:ACQuire:LEVel:VOLTage 77
TRIGger:SEQuence2:SLOPe:CURRent TRIGger:ACQuire:SLOPe:CURRent 78
TRIGger:SEQuence2:SLOPe:VOLTage TRIGger:ACQuire:SLOPe:VOLTage 78
TRIGger:SEQuence2:SOURce TRIGger:ACQuire:SOURce 79
TRIGger:SEQuence1:DEFine TRIGger:SEQuence2:DEFine 79
*TRG 79
B - COMPATIBILITY LANGUAGE 83
Introduction 83
C - ERROR MESSAGES 89
Error Number List 89
D - EXAMPLE PROGRAMS 93
Introduction 93
Assigning the GPIB Address in Programs 93
Types of DOS Drivers 93
Error Handling 94
BASIC Controllers 94
Example 1. HP Vectra PC Controller Using Agilent 82335 Interface 94
Example 2. IBM Controller Using National Interface 96
Example 3. Controller Using BASIC 98
INDEX 99
6
1
General Information
You will find the following information in the rest of this guide:
Documentation Summary
The following documents that are related to this Programming Guide have additional helpful information
for using the dc source.
♦ User’s Guide for Agilent 66312A and Agilent 6611C/6612C/6613C/3314C. Includes specifications
and supplemental characteristics, how to use the front panel, how to connect to the instrument,
and calibration procedures.
♦ User’s Guide for Agilent 66332A and Agilent 6631B/6632B/6633B/6634B. Includes specifications
and supplemental characteristics, how to use the front panel, how to connect to the instrument,
and calibration procedures.
7
1 - General Information
External References
GPIB References
The most important GPIB documents are your controller programming manuals - 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:
♦ 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.
♦ 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.
The above two documents are available from the IEEE (Institute of Electrical and Electronics Engineers),
345 East 47th Street, New York, NY 10017, USA. The WEB address is www.ieee.org.
SCPI References
The following documents will assist you with programming in SCPI:
♦ Standard Commands for Programmable Instruments Volume 1, Syntax and Style
♦ Standard Commands for Programmable Instruments Volume 2, Command References
♦ Standard Commands for Programmable Instruments Volume 3, Data Interchange Format
♦ Standard Commands for Programmable Instruments Volume 4, Instrument Classes
To obtain a copy of the above documents, contact: Fred Bode, Executive Director, SCPI Consortium,
8380 Hercules Drive, Suite P3, Ls Mesa, CA 91942, USA
8
2
Introduction to Programming
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 Power Products 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
NOTE: Before installing the VXIplug&play instrument driver, make sure that you have one of the
supported applications installed and running on your computer.
9
2 - Introduction to Programming
6. To use the VXIplug&play instrument driver, follow the directions in the VXIplug&play online help
under “Introduction to Programming”.
GPIB Address
The dc source operates from an GPIB address that is set from the front panel. To set the GPIB address,
press the Address key on the front panel and enter the address using the Entry keys. The GPIB address
is stored in non-volatile memory.
The EIA RS-232 Standard defines the interconnections between Data Terminal Equipment (DTE) and
Data Communications Equipment (DCE). The dc source is designed to be a DTE. It can be connected to
another DTE such as a PC COM port through a null modem cable.
NOTE: The RS-232 settings in your program must match the settings specified in the front panel
Address menu. Press the front panel Address key if you need to change the settings.
10
Introduction to Programming - 2
Baud Rate
The front panel Address key lets you select one of the following baud rates, which is stored in non-volatile
memory:
300 600 1200 2400 4800 9600
NOTE: The power supply must be configured for RS232 and the same baud rate and parity as
the controller.
11
2 - Introduction to Programming
FUNCTION gets$ ‘ Get a new line feed terminated string from device #1
C$ = “” ‘ Set C$ to null
WHILE c$ <> CHR$ (10) ‘ Set loop to stop at Line Feed
C$ = INPUT$ (1, #1) ‘ Read 1 bit into file #1
Resp$ = resp$ + c$ ‘ Concantenate bit with previous bits
WEND ‘ End of WHILE loop
gets$ = resp$ ‘ Assign response to gets$
END FUNCTION
RS-232 Troubleshooting
If you are having trouble communicating over the RS-232 interface, check the following:
♦ The computer and the dc source must be configured for the same baud rate, parity, number of
data bits, and flow control options. Note that the dc source is configured for 1 start bit and 1 stop
bit (these values are fixed).
♦ The correct interface cables or adaptors must be used, as described under RS-232 Connector.
Note that even if the cable has the proper connectors for your system, the internal wiring may be
incorrect.
♦ The interface cable must be connected to the correct serial port on your computer (COM1, COM2,
etc.).
Introduction to SCPI
SCPI (Standard Commands for Programmable Instruments) is a programming language for controlling
instrument functions over the GPIB. 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 dc source display and the display of a
SCPI-compatible multimeter.
12
Introduction to Programming - 2
:OUTPut [:STATe]
:DFI [:STATe]
:SOURce
:PON :STATe
:PROTection :CLEar
:DELay
:CONDition?
The header path can be thought of as a string that gets inserted before each command within a message.
For the first command in a message, the header path is a null string. For each subsequent command the
header path is defined as the characters that make up the headers of the previous command in the
message up to and including the last colon seperator. An example of a message with two commands is:
CURR:LEV 3;PROT:STAT OFF
which shows the use of the semicolon separating the two commands, and also illustrates the header path
concept. Note that with the second command, the leading header "CURR" was omitted because after the
"CURR:LEV 3" command, the header path was became defined as "CURR" and thus the instrument
interpreted the second command as:
CURR:PROT:STAT OFF
In fact, it would have been syntactically incorrect to include the "CURR" explicitly in the second command,
since the result after combining it with the header path would be:
CURR:CURR:PROT:STAT OFF
which is incorrect.
13
2 - Introduction to Programming
The following message shows how to combine commands from different subsystems as well as within the
same subsystem:
VOLTage:LEVel 20;PROTection 28; :CURRent:LEVel 3;PROTection:STATe ON
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 subsytems.
Using Queries
Observe the following precautions with queries:
♦ Set up the proper number of variables for the returned data.
♦ Read back all the results of a query before sending another command to the dc source. Otherwise
a Query Interrupted error will occur and the unreturned data will be lost.
14
Introduction to Programming - 2
Headers
Headers, also referred to as keywords, are instructions recognized by the dc source. Headers may be
either in the long form or the short form. In the long form, the header is completely spelled out, such as
VOLTAGE, STATUS, and DELAY. In the short form, the header has only the first three or four letters,
such as VOLT, STAT, and DEL.
Query Indicator
Following a header with a question mark turns it into a query (VOLTage?, VOLTage:PROTection?). If a
query contains a parameter, place the query indicator at the end of the last header
(VOLTage:PROTection? MAX).
Root Specifier
When it precedes the first header of a message unit, the colon becomes the root specifier. It tells the
command parser that this is the root or the top node of the command tree.
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.
15
2 - Introduction to Programming
NOTE: All RS-232 response data sent by the dc source is terminated by the ASCII character pair
<carriage return><newline>. This differs from GPIB response data which is terminated by
the single character <newline> with EOI asserted.
16
Introduction to Programming - 2
The *WAI, *OPC, and *OPC? common commands provide different ways of indicating when all
transmitted commands, including any parallel ones, have completed their operations. The syntax and
parameters for these commands are described in chapter 4. Some practical considerations for using
these commands are as follows:
*WAI This prevents the dc source from processing subsequent commands until all pending
operations are completed.
*OPC? This places a 1 in the Output Queue when all pending operations have completed.
Because it requires your program to read the returned value before executing the next
program statement, *OPC? can be used to cause the controller to wait for commands
to complete before proceeding with its program.
*OPC This sets the OPC status bit when all pending operations have completed. Since your
program can read this status bit on an interrupt basis, *OPC allows subsequent
commands to be executed.
NOTE: The trigger subsystem must be in the Idle state in order for the status OPC bit to be true.
Therefore, as far as triggers are concerned, OPC is false whenever the trigger subsystem
is in the Initiated state.
The following statement shows how to send a device clear over the GPIB interface using Agilent BASIC:
CLEAR 705 IEEE-488 Device Clear
The following statement shows how to send a device clear over the GPIB interface using the GPIB
command library for C or QuickBASIC:
IOCLEAR (705)
NOTE: For RS-232 operation, sending a Break will perform the same operation as the IEE-488
device clear message.
17
3
Programming the DC Source
Introduction
This chapter contains examples on how to program your dc source. Simple examples show you how to
program:
u output functions such as voltage and current
u internal and external triggers
u measurement functions
u the status and protection functions
NOTE: These examples in this chapter show which commands are used to perform a particular
function, but do not show the commands being used in any particular programming
environment. Refer to Appendix D for some examples of SCPI commands in a specific
programming environment.
*RST is a convenient way to program all parameters to a known state. Refer to the *RST command in
chapter 4 to see how each programmable parameter is set by *RST. Refer to the *PSC command in
chapter 4 for more information on the power-on initialization of the *ESE and the *SRE registers.
19
3 - Programming the DC Source
Output Voltage
The output voltage is controlled with the VOLTage command. For example, to set the output voltage to 25
volts, use:
VOLTage 25
The dc source can be programmed to turn off its output if the output voltage exceeds a preset peak
voltage limit. This protection feature is implemented with the VOLTage:PROTection command as
explained in chapter 4.
Maximum Voltage
The maximum rms output voltage that can be programmed can be queried with:
VOLTage? MAX
Output Current
All models have a programmable current function. The command to program the current is:
CURRent <n>
If the load attempts to draw more current than the programmed limit, the output voltage is reduced to keep
the current within the limit.
Maximum Current
The maximum output current that can be programmed can be queried with:
CURRent? MAX
Overcurrent Protection
The dc source can also be programmed to turn off its output if the current limit is reached. As explained in
chapter 4, this protection feature is implemented the following command:
CURRent:PROTection:STATe ON | OFF
20
Programming the DC Source - 3
ABORt
INITiate:CONTinuous OFF IDLE STATE *RST
*RCL
INITiate[:IMMediate]
TRIGGER RECEIVED
OUTPUT
LEVEL
CHANGE
NOTE: Until they are programmed, uninitialized trigger levels will assume their corresponding
immediate levels. For example, if a dc source is powered up and VOLTage:LEVel is
programmed to 6, then VOLTage:LEVel:TRIGger will also be 6 until you program it to
another value. Once you program VOLTage:LEVel:TRIGger to a value, it will remain at
that value regardless of how you subsequently reprogram VOLTage:LEVel.
21
3 - Programming the DC Source
The INITiate commands move the trigger system from the Idle state to the Initiated state. This enables
the dc source to receive triggers. To initiate for a single triggered action, use:
INITiate:SEQuence1or
INITiate:NAME TRANsient
After a trigger is received and the action completes, the trigger system will return to the Idle state. Thus it
will be necessary to initiate the system each time a triggered action is desired.
To keep a trigger system initiated for multiple actions without having to send an initiate command for each
trigger, use:
INITiate:CONTinuous:SEQuence1 ON or
INITiate:CONTinuous:NAME TRANsient, ON
Generating Triggers
You can only program output triggers over the GPIB bus. Since BUS is the only trigger source for output
triggers, the following command is provided for completeness only:
TRIGger:SOURce BUS
After you have specified the appropriate trigger source, you can generate triggers as follows:
Single Triggers Send one of the following commands over the GPIB:
TRIGger:IMMediate
*TRG
a group execute trigger
Continuous Triggers Send the following command over the GPIB:
INITiate:CONTinuous:SEQuence1 ON
When the trigger system enters the Output Change state upon receipt of a trigger (see figure 3-1), the
triggered functions are set to their programmed trigger levels. When the triggered actions are completed,
the trigger system returns to the Idle state.
22
Programming the DC Source - 3
Making Measurements
The dc source has the ability to make several types of voltage or current measurements. The
measurement capabilities of the Agilent 66312A and Agilent 66332A models are particulary useful for
loads that draw current in pulses.
All measurements are performed by digitizing the instantaneous output voltage or current for a defined
number of samples and sample interval, storing the results in a buffer, and then calculating the measured
result. Many parameters of the measurement are programmable. These include the number of samples,
the time interval between samples, the bandwidth, and the method of triggering. Note that there is a
tradeoff between these parameters and the speed, accuracy, and stability of the measurement in the
presence of noise.
There are two ways to make measurements:
♦ Use the MEASure commands to immediately start acquiring new voltage or current data, and
return measurement calculations from this data as soon as the buffer is full. This is the easiest
way to make measurements, since it requires no explicit trigger programming.
♦ Use an acquisition trigger to acquire the data. Then use the FETCh commands to return
calculations from the data that was retrieved by the acquisition trigger. This method gives you the
flexibility to synchronize the data acquisition with a transition in the output voltage or current.
FETCh commands do not trigger the acquisition of new measurement data, but they can be used
to return many different calculations from the data that was retrieved by the acquisition trigger.
Note that if you take a voltage measurement, you can fetch only voltage data.
Making triggered measurements with the acquisition trigger system is discussed under "Triggering
Measurements".
NOTE: For each MEASure form of the query, there is a corresponding query that begins with the
header FETCh. FETCh queries perform the same calculation as their MEASure
counterparts, but do not cause new data to be acquired. Data acquired by an explicit
trigger or a previously programmed MEASure command are used.
DC Measurements
To measure the dc output voltage or current, use:
MEASure:VOLTage? or
MEASure:CURRent?
Dc voltage and current is measured by acquiring a number of readings at the selected time interval,
applying a Hanning window function to the readings, and averaging the readings. Windowing is a signal
conditioning process that reduces the error in dc measurements made in the presence of periodic signals
such as line ripple. At power-on and after a *RST command, the following parameters are set:
SENSe:SWEep:TINTerval 15.6E-6
SENSe:SWEep:POINts 2048
23
3 - Programming the DC Source
This results in a data acquisition time of 32 milliseconds. Adding a command processing overhead of
about 20 milliseconds results in a total measurement time of about 50 milliseconds per measurement
sample.
Ripple rejection is a function of the number of cycles of the ripple frequency contained in the acquisition
window. More cycles in the aquisition window results in better ripple rejection. If you increase the time
interval for each measurement to 45 microseconds for example, this results in 5.53 cycles in the
acquisition window at 60 Hz, for a ripple rejection of about 70 dB.
Note that the speed of the measurement can be increased by reducing the number of sample points. For
example, the commands
SENSe:SWEep:TINTerval 15E-6
SENSe:SWEep:POINts 1024
speeds up the acquisition period to 16 milliseconds; however, the tradeoff is reduced measurement
accuracy.
Making rms measurements on ac waveforms for which a non-integral number of cycles of data has been
acquired may result in measurement errors due to the last partial cycle of acquired data. The instrument
reduces this error by using a Hanning window function when making the measurement.
Current Ranges
The dc source has two current measurement ranges. The command that controls the ranges is:
SENSe:CURRent:RANGe MIN | MAX
When the range is set to MIN, the maximum current that can be measured is 20 milliamperes.
Returning Measurement Data From the Data Buffer (Agilent 66312A, 66332A Only)
The MEASure and FETCh queries can also return all data values of the instantaneous voltage or current
buffer. The commands are:
MEASure:ARRay:CURRent?
MEASure:ARRay:VOLTage?
24
Programming the DC Source - 3
ABORt
IDLE STATE *RST
*RCL
INITiate[:IMMediate]
INITIATED STATE
TRIGGER RECEIVED
SENSe:SWEep:POINts
ACQUIRED
NO
TRIGger:COUNt
COMPLETE?
YES
The INITiate commands move the trigger system from the Idle state to the Initiated state. This enables
the dc source to receive triggers. To initiate for a measurement trigger, use:
25
3 - Programming the DC Source
INITiate:SEQuence2 or
INITiate:NAME ACQuire
After a trigger is received and the data acquisition completes, the trigger system will return to the Idle state
(unless multiple measurements are desired). Thus it will be necessary to initiate the system each time a
triggered acquisition is desired.
NOTE: You cannot initiate measurement triggers continuously. Otherwise, the measurement data
in the data buffer would continuously be overwritten by each triggered measurement.
To select GPIB bus triggers (group execute trigger, device trigger, or *TRG command), use:
TRIGger:SEQuence2:SOURce BUS or
TRIGger:ACQuire:SOURce BUS
To select internal triggers (measurements triggered off the output signal) use:
TRIGger:SEQuence2:SOURce INTernal or
TRIGger:ACQuire:SOURce INTernal
Providing that you have specified the appropriate trigger source and a measurement acquisition, you can
generate triggers as follows:
GPIB Triggers Send one of the following commands over the GPIB:
TRIGger:IMMediate (not affected by the trigger source setting)
*TRG
a group execute trigger
Internal Triggers To trigger off of the output signal, you must specify the output level that generates
the trigger, the rising or falling edge of the slope, and a hysteresis to qualify trigger
conditions. This is illustrated in figure 3-3.
26
Programming the DC Source - 3
TRIG:ACQ:HYST:CURR <value>
TRIG:ACQ:LEV:CURR <level> TRIG:ACQ:HYST:VOLT
TRIG:ACQ:LEV:VOLT
TRIG:ACQ:SLOP:CURR
TRIG:ACQ:SLOP:VOLT
TRIG:ACQ:SLOP:CURR NEG
TRIG:ACQ:SLOP:VOLT
To specify the output level that will generate triggers for both positive- and negative-going signals use:
TRIGger:SEQuence2:LEVel:CURRent <value> or
TRIGger:ACQuire:LEVel:CURRent <value>
To specify the slope on which triggering occurs use the following commands. You can specify a POSitive,
a NEGative, or EITHer type of slope.
TRIGger:SEQuence2:SLOPe:CURRent <slope> or
TRIGger:ACQuire:SLOPe:CURRent <slope>
NOTE: When using internal triggers, do not INITiate the measurement until after you have
specified the slope, level, and hysteresis.
When the acquisition finishes, any of the FETCh queries can be used to return the results. Once the
measurement trigger is initiated, if a FETCh query is sent before the data acquisition is triggered or before
it is finished, the response data will be delayed until the trigger occurs and the acquisition completes. This
may tie up the controller if the trigger condition does not occur immediately.
One way to wait for results without tying up the controller is to use the SCPI command completion
commands. For example, you can send the *OPC command after INITialize, then occasionally poll the
OPC status bit in the standard event status register for status completion while doing other tasks. You can
also set up an SRQ condition on the OPC status bit going true, and do other tasks until an SRQ interrupt
occurs.
27
3 - Programming the DC Source
Only select DC as the measurement detector if you are making only DC current measurements and you
require a measurement offset better than 2mA on the High current measurement range. Note that this
selection gives inaccurate results on current waveforms that have ac content.
SENSe:CURRent:DETect DC
FETC:CURR:MAX?
FETC:VOLT:MAX?
FETC:CURR:HIGH?
FETC:VOLT:HIGH?
FETC:CURR:LOW?
FETC:VOLT:LOW?
DATA POINTS
FETC:CURR:MIN?
FETC:VOLT:MIN?
To return the maximum or minimum value of a pulse waveform use the following commands. Note that
the data points of the measurement sample may not coincide with the actual maximum or minimum point
on the waveform.
FETCh:VOLTage:MAXimum? or
FETCh:VOLTage:MINimum?
FETCh:CURRent:MAXimum? or
FETCh:CURRent:MINimum?
The average value of the high level or low level of a pulse can also be measured. To return the average
value of the high level, use:
FETCh:CURRent:HIGH? or
FETCh:VOLTage:HIGH?
28
Programming the DC Source - 3
SENS:SWE:TINT <time>
SENS:SWE:POIN <# of points>
At *RST, the output voltage or current sampling rate is 15.6 microseconds. This means that it takes about
32 milliseconds to fill up 2048 data points in the data buffer. You can vary this data sampling rate with:
SENSe:SWEep:TINTerval <sample_period>
SENSe:SWEep:POINts <points>
For example, to set the time interval to 46.8 microseconds per sample with 1500 samples, use
SENSe:SWEep:TINTerval 46.8E-6;POINts 1500.
Note that the time interval values are rounded to the nearest 15.6 microsecond increment.
With this setup, the instrument performs each acquisition sequentially, storing the digitized readings in the
internal measurement buffer. It is only necessary to initialize the measurement once at the start; after
each completed aquisition the instrument will wait for the next valid trigger condition to start another. The
results returned by MEASure or FETCh will be the average of the total data acquired.
NOTE: The total number of data points cannot exceed 4096. This means that the product of the
trigger count multiplied by the sweep points cannot exceed 4096; otherwise an error will
occur.
29
3 - Programming the DC Source
OFFSET = -4096
OFFSET = -2048
OFFSET = 0
9
OFFSET = 0 to 2 4096 DATA POINTS
TIME
ACQUISITION
TRIGGER
To offset the beginning of the acquisition buffer relative to the acquisition trigger, use:
SENSe:SWEep:OFFSet:POINts <offset>
The range for the offset is -4096 to 2,000,000,000 points. As shown in the figure, when the offset is
negative, the values at the beginning of the data record represent samples taken prior to the trigger. When
the value is 0, all of the values are taken after the trigger. Values greater than zero can be used to
program a delay time from the receipt of the trigger until the data points that are entered into the buffer are
valid. (Delay time = Offset X Sample period)
NOTE: MEASure commands cannot be used to return data in this example because they always
acquire NEW measurement data each time they are used.
The program can be run on any controller operating under Agilent BASIC. To generate output pulses, an
electronic load is programmed to generate 3-ampere pulses with a duty cycle of 100 microseconds at
1000 Hz. The power supply address is 705, and the load address is 706. If required, change these
parameters in the appropriate statements.
30
Programming the DC Source - 3
10 !Rev A.00.00
20 OPTION BASE 1
30 DIM Curr_array(100)
40 !
50 ASSIGN @Ps TO 705
60 ASSIGN @Ld TO 706
80 OUTPUT @Ps;"*RST" ! Sets supply to default values
90 OUTPUT @Ps;"OUTP ON" ! Turn on power supply output
100 OUTPUT @Ps;"VOLT 5;CURR 5" ! Program power supply to 5 volts, 5 amps
110 !
120 OUTPUT @Ld;"CURR:LEVEL 0" ! Set up electronic load to produce pulses
130 OUTPUT @Ld;"CURR:TLEVEL 3"
140 !
150 OUTPUT @Ld;"TRAN:FREQ 1000"
160 OUTPUT @Ld;"TRAN:DCYCLE 10"
170 OUTPUT @Ld;"TRAN:MODE CONT"
180 OUTPUT @Ld;"TRAN:STATE ON"
190 !
200 OUTPUT @Ps;"SENS:CURR:DET ACDC" ! Set meter to ACDC
210 OUTPUT @Ps;"SENS:CURR:RANG MAX" ! High Current range
220 OUTPUT @Ps;"TRIG:ACQ:SOUR INT" ! Set to trigger on pulse
230 OUTPUT @Ps;"SENS:FUNC ""CURR""" ! Acquire current reading
240 OUTPUT @Ps;"TRIG:ACQ:LEV:CURR .1" ! Trigger at 0.1 amps
250 OUTPUT @Ps;"TRIG:ACQ:SLOPE:CURR POS" ! Trigger on positive slope
260 OUTPUT @Ps;"TRIG:ACQ:HYST:CURR .05" ! Set hysteresis of trigger
270 OUTPUT @Ps;"SENS:SWE:TINT 30E-6" ! Time interval of 30us will be rounded up to 31.2us
280 OUTPUT @Ps;"SENS:SWE:POIN 100" ! Set number of measurement samples in sweep
290 OUTPUT 705;"SENS:SWE:OFFS:POIN -20" ! Number of sample points before trigger
300 OUTPUT @Ps;"INIT:NAME ACQ" ! Initiate the trigger system.
310 ! Controller now waits for trigger to occur.
320 OUTPUT @Ps;"FETCH:ARRAY:CURR?" ! Get the data after measurement completes.
330 !
340 ENTER @Ps;Curr_array(*) ! Enters all 100 data points
350 PRINT Curr_array(*) ! Print all data points
360 !
370 OUTPUT @Ps;"FETCH:CURR:MAX?" ! Get more data from previous measurement.
380 ENTER @Ps;Curr_max
390 PRINT "MAX CURRENT",Curr_max
400 !
410 OUTPUT @Ps;"FETCH:CURR:MIN?"
420 ENTER @Ps;Curr_min
430 PRINT "MIN CURRENT",Curr_min
440 !
450 OUTPUT @Ps;"FETCH:CURR:HIGH?"
460 ENTER @Ps;Curr_hi
470 PRINT "HIGH CURRENT",Curr_hi
480 !
490 OUTPUT @Ps;"FETCH:CURR:LOW?"
500 ENTER @Ps;Curr_low
510 PRINT "LOW CURRENT",Curr_low
520 !
530 END
When this program runs, it returns 100 measurement data points as well as the MIN, MAX, HIGH, and
LOW data in the following format:
.030585 .031869 .0344369 .031655 .0320829 .0325109 .0333669 .0340089
.0320825 .031449 .031227 .031441 .0337949 .0327249 .031869 .031655
.0327249 .031013 .0325109 .0333669 3.09751 3.1814 3.14266 3.13667
3.13817 3.13624 .977283 .0667496 .0245932 .0280171 .031013 .031655
.0331529 .0350788 .0348648 .0327249 .031227 .0327249 .031227 .030799
.031869 .0329389 .030371 .031655 .031869 .0329389 .031869 .0322869
.0320829 .0325109 .0333669 .0340089 .0348648 .0327249 .031227 .0327249
.0320829 .030371 .031449 .031227 .031441 .0337949 .031449 .0333669
.031441 .0337949 .030371 .031655 .031869 .0329389 .031869 .0293011
.031441 .0337949 .0327249 .031869 .031655 .031655 .0320829 .031227
.0322969 .031655 .0327249 .0340089 2.97661 3.18632 3.14523 3.13496
3.13453 3.13731 1.32438 .0836549 .0258772 .0284451 .0275891 .0329389
.0329389 .0333669 .0322969 .0333669
MAX CURRENT 3.18632
MIN CURRENT .0245932
HIGH CURRENT 3.1371
LOW CURRENT .0314077
31
3 - Programming the DC Source
Figure 3-7 shows the status register structure of the dc source. Table 3-1 defines the status bits. The
Standard Event, Status Byte, and Service Request Enable registers and the Output Queue perform
standard GPIB functions as defined in the IEEE 488.2 Standard Digital Interface for Programmable
Instrumentation. The Operation Status and Questionable Status registers implement functions that are
specific to the dc source.
Power-On Conditions
Refer to the *RST command description in chapter 4 for the power-on conditions of the status registers.
QUESTIONABLE STATUS
OUTPut:DFI:SOURce
4 OFF
OT 16 16 16 16
5-8
N.U.
9
RI 512 512 512 512
10 FLT
Unreg 1024 1024 1024 1024
11-13
N.U.
14
MeasOvld 16384 16384 16384 16384
15
N.U. SERVICE
REQUEST
STANDARD EVENT STATUS STATUS BYTE ENABLE
OUTPUT QUEUE
N.U. 0-2
EVENT ENABLE QUEUE
DATA
QUES 3
0 NOT 8 8
OPC 1 1 DATA
1 EMPTY
LOGICAL OR
MAV 4
N.U. DATA 16 16
2
QYE 4 4 ESB 5
LOGICAL OR
3 32 32
DDE 8 8
4 MSS 6
EXE 16 16 64
5 OPER 7
CME 32 32
128 128
6
N.U.
7
128 128
PON
OPERATION STATUS
RQS
CONDITION PTR/NTR EVENT ENABLE
SERVICE
0
CAL 1 1 1 1 REQUEST
1-4
N.U. GENERATION
5
WTG 32 32 32 32
LOGICAL OR
6,7
N.U.
8
CV 256 256 256 256
9
N.U. 512 512 512 512
10
CC+ 1024 1024 1024 1024
11
CC- 2048 2048 2048 2048
12-15
N.U.
),**$/
32
Programming the DC Source - 3
33
3 - Programming the DC Source
The PON bit in the Standard Event event register is set whenever the dc source is turned on. The most
common use for PON is to generate an SRQ at power-on following an unexpected loss of power. To do
this, bit 7 of the Standard Event enable register must be set so that a power-on event registers in the ESB
(Standard Event Summary Bit), bit 5 of the Service Request Enable register must be set to permit an SRQ
to be generated, and *PSC OFF must be sent. The commands to accomplish these conditions are:
34
Programming the DC Source - 3
This is a real-time (unlatched) summary of all Status Byte register bits that are enabled by the Service
Request Enable register. MSS is set whenever the dc source has one or more reasons for requesting
service. *STB? reads the MSS in bit position 6 of the response but does not clear any of the bits in the
Status Byte register.
The RQS bit is a latched version of the MSS bit. Whenever the dc source requests service, it sets the
SRQ interrupt line true and latches RQS into bit 6 of the Status Byte register. When the controller does a
serial poll, RQS is cleared inside the register and returned in bit position 6 of the response. The remaining
bits of the Status Byte register are not disturbed.
The Output Queue is a first-in, first-out (FIFO) data register that stores dc source-to-controller messages
until the controller reads them. Whenever the queue holds one or more bytes, it sets the MAV bit (4) of the
Status Byte register.
Step 2 Read the corresponding Event register for each summary bit to determine which events
caused the summary bit to be set. Use:
STATus:QUEStionable:EVENt?
STATus:OPERation:EVENt?
ESR?
When an Event register is read, it is cleared. This also clears the corresponding
summary bit.
Step 3 Remove the specific condition that caused the event. If this is not possible, the event
may be disabled by programming the corresponding bit of the status group Enable
register or NTR|PTR filter. A faster way to prevent the interrupt is to disable the service
request by programming the appropriate bit of the Service Request Enable register
Step 1 Program the Operation Status PTR register to allow a positive transition at bit 10 to be
latched into the Operation Status Event register, and allow the latched event to be
summed into the Operation summary bit. Use:
STATus:OPERation:PTR 1024;ENABle 1024
Step 2 Program the Questionable Status PTR register to allow a positive transition at bits 0,
1, or 4 to be latched into the Questionable Status Event register, and allow the latched
35
3 - Programming the DC Source
Step 3 Program the Service Request Enable register to allow both the Operation and the
Questionable summary bits from the Status Byte register to generate RQS. Use:
*SRE 136 (8 + 128 = 136)
Step 4 When you service the request, read the event registers to determine which Operation
Status and Questionable Status Event register bits are set, and clear the registers for
the next event. Use:
STATus:OPERation:EVENt;QUEStionable:EVENt?
The PTR filter will cause the OPERational summary bit to set RQS when CC+ occurs. When the
controller subsequently reads the event register with STATus:OPERational:EVEN?, the register is cleared.
When CC+ subsequently goes false, the NTR filter causes the OPERational summary bit to again set
RQS.
Inhibit/Fault Indicator
The remote inhibit(INH) and discrete fault(FLT) indicators are implemented through the respective INH
and FLT connections on the rear panel. Refer to Table 1-2 for the electrical parameters.
36
Programming the DC Source - 3
The following table shows the bin assignments of the mating plug when used in RI/DFImode as well as
Digital I/O mode. Refer to Table 1-2 for the electrical characteristics of the port.
where the data is an integer from 0 to 7 that sets pins 1 to 3 according to their binary weight. Refer to the
DIGital:DATA command for more information.
37
4
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 dc source. It is assumed that you are familiar with the material in “Chapter 2 -
"Remote Programming". That chapter explains the terms, symbols, and syntactical structures used here
and gives an introduction to programming. You should also be familiar with “Chapter 4 - Front Panel
Operation” (in the Operating Guide) in order to understand how the dc source functions.
The programming examples are simple applications of SCPI commands. Because the SCPI syntax
remains the same for all programming languages, the examples given for each command are generic.
Syntax Forms Syntax definitions use the long form, but only short form headers (or "keywords")
appear in the examples. 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 dc source. When this is the case,
refer to the Specifications table in the Operating Guide.
Models If a command only applies to specific models, those models are listed in the <Model>
Only entry. If there is no <Model> Only entry, the command applies to all models.
Related Where appropriate, related commands or queries are included. These are listed
Commands because they are either directly related by function, or because reading about them will
clarify or enhance your understanding of the original command or query.
Subsystem Commands
Subsystem commands are specific to 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 subsystem command groups are grouped according to function: Calibration, Measurement, Output,
Status, System, and Trigger. Commands under each function are grouped alphabetically. Commands
followed by a question mark (?) take only the query form. When commands take both the command and
query form, this is noted in the syntax descriptions. Table 4-1 lists all of the subsystem commands
inalphabetical order.
39
4 - Language Dictionary
DISPlay
[:WINDow]
[:STATe] <bool> Enable/disable front panel display
:MODE <mode> Set display mode (NORM | TEXT)
:TEXT [:DATA] <string> Sets the text that is displayed
INITiate
[:IMMediate]
:SEQuence[<n>] Initiate a specific numbered sequence (1 | 2)
:NAME <name> Initiate a specific named sequence (TRAN | ACQ)
CONTinuous
:SEQuence1, <bool> Set continuous initialization
:NAME TRANsient, <bool> Set continuous initialization
MEASure | FETCh
:ARRay
:CURRent [:DC]? Returns the digitized instantaneous current
:VOLTage [:DC]? Returns the digitized instantaneous voltage
[:SCALar]
:CURRent [:DC]? Returns dc current
:ACDC? Returns the total rms current (ac+dc)
:HIGH? Returns the HIGH level of a current pulse
:LOW? Returns the LOW level of a current pulse
:MAX? Returns maximum current
:MIN? Returns minimum current
:VOLTage [:DC]? Returns dc voltage
:ACDC? Returns the total rms voltage (ac+dc)
:HIGH? Returns the HIGH level of a voltage pulse
:LOW? Returns the LOW level of a voltage pulse
:MAX? Returns maximum voltage
:MIN? Returns minimum voltage
40
Language Dictionary - 4
41
4 - Language Dictionary
42
Language Dictionary - 4
Common Commands
Common commands begin with an * and consist of three letters (command) or three letters and a ?
(query). They are defined by the IEEE 488.2 standard to perform common interface functions. Common
commands and queries are categorized under System, Status, or Trigger functions and are listed at the
end of each group. The dc source responds to the following commands:
Programming Parameters
The following table lists the output programming parameters for each model.
43
4 - Language Dictionary
Calibration Commands
Calibration commands let you:
u Enable and disable the calibration mode
u Change the calibration password
u Calibrate the current and voltage programming and measurement, and store new calibration
constants in nonvolatile memory.
NOTE: If calibration mode has not been enabled with CALibrate:STATe, programming the
calibration commands will generate an error.
CALibrate:CURRent
This command initiates the calibration of the positive dc output current as well as the high-range current
measurement circuit.
CALibrate:CURRent:NEGative
This command initiates the calibration of the negative dc output current.
CALibrate:CURRent:MEASure:LOWRange
This command initiates the calibration of the low-range current measurement circuit.
CALibrate:CURRent:MEASure:AC
This command initiates the calibration of the high bandwidth (ac) measurement circuit.
44
Language Dictionary - 4
CALibrate:DATA
This command enters a calibration value that you obtain by reading an external meter. You must first
select a calibration level (with CALibrate:LEVel) for the value being entered.
CALibrate:LEVel
This command selects the next point in the calibration sequence.
P1: the first calibration point
P2: the second calibration point
CALibrate:PASSword
This command lets you change the calibration password. A new password is automatically stored in
nonvolatile memory and does not have to be stored with CALibrate:SAVE.
If the password is set to 0, password protection is removed and the ability to enter the calibration mode is
unrestricted.
CALibrate:SAVE
This command saves any new calibration constants after a calibration procedure has been completed in
nonvolatile memory. If CALibrate:STATe OFF is programmed without a CALibrate:SAVE, the previous
calibration constants are restored..
45
4 - Language Dictionary
CALibrate:STATe
This command enables and disables calibration mode. The calibration mode must be enabled before the
will accept any other calibration commands.
The first parameter specifies the enabled or disabled state. The second parameter is the password. It is
required if the calibration mode is being enabled and the existing password is not 0. If the password is not
entered or is incorrect, an error is generated and the calibration mode remains disabled. The query
statement returns only the state, not the password.
NOTE: Whenever the calibration state is changed from enabled to disabled, any new calibration
constants are lost unless they have been stored with CALibrate:SAVE.
CALibrate:VOLTage
This command initiates the calibration of the output voltage and the voltage readback circuit.
CALibrate:VOLTage:PROTection
This command can calibrates the overvoltage protection (OV) circuit. The dc source automatically
performs the calibration. CALibrate:VOLTage:PROTection is a sequential command that takes several
seconds to complete.
46
Language Dictionary - 4
Measurement Commands
Measurement commands consist of measure and sense commands.
Measure commands measure the output voltage or current. Measurements are performed by digitizing
the instantaneous output voltage or current for a defined number of samples and sample interval, storing
the results in a buffer, and calculating the measured result. Two types of measurement commands are
available: MEASure and FETCh. MEASure triggers the acquisition of new data before returning the
reading; FETCh returns a reading computed from previously acquired data. If you take a voltage
measurement, you can fetch only voltage data.
♦ Use MEASure when the measurement does not need to be synchronized with any other event.
♦ Use FETCh when it is important that the measurement be synchronized with either a trigger or
with a particular part of the output waveform.
Sense commands control the current measurement range, the bandwidth detector of the , and the data
acquisition sequence.
MEASure:ARRay:CURRent?
FETCh:ARRay:CURRent?
These queries return an array containing the instantaneous output current in amperes. The output voltage
or output current are digitized whenever a measure command is given or whenever an acquire trigger
occurs. The time interval is set by SENSe:SWEep:TINTerval. The position of the trigger relative to the
beginning of the data buffer is determined by SENSe:SWEep:OFFSet. The number of points returned is
set by SENSe:SWEep:POINts.
MEASure:ARRay:VOLTage?
FETCh:ARRay:VOLTage?
These queries return an array containing the instantaneous output voltage in volts. The output voltage or
output current are digitized whenever a measure command is given or whenever an acquire trigger
occurs. The time interval is set by SENSe:SWEep:TINTerval. The position of the trigger relative to the
beginning of the data buffer is determined by SENSe:SWEep:OFFSet. The number of points returned is
set by SENSe:SWEep:POINts.
47
4 - Language Dictionary
MEASure:CURRent?
FETCh:CURRent?
MEASure:CURRent:ACDC?
FETCh:CURRent:ACDC?
MEASure:CURRent:HIGH?
FETCh:CURRent:HIGH?
These queries return the High level current of a current pulse waveform. The instrument first measures
the minimum and maximum data points of the pulse waveform. It then generates a histogram of the pulse
waveform using 1024 bins between the maximum and minimum data points. The bin containing the most
data points above the 50% point is the high bin. The average of all the data points in the high bin is
returned as the High level. If no high bin contains more than 1.25% of the total number of acquired points,
then the maximum value is returned by these queries.
48
Language Dictionary - 4
MEASure:CURRent:LOW?
FETCh:CURRent:LOW?
These queries return the Low level current of a current pulse waveform. The instrument first measures the
minimum and maximum data points of the pulse waveform. It then generates a histogram of the pulse
waveform using 1024 bins between the maximum and minimum data points. The bin containing the most
data points below the 50% point is the low bin. The average of all the data points in the low bin is returned
as the Low level. If no low bin contains more than 1.25% of the total number of acquired points, then the
minimum value is returned by these queries.
MEASure:CURRent:MAXimum?
FETCh:CURRent: MAXimum?
These queries return the maximum output current reading from the measurement sample.
MEASure:CURRent:MINimum?
FETCh:CURRent:MINimum?
These queries return the minimum output current reading from the measurement sample.
49
4 - Language Dictionary
MEASure:VOLTage?
FETCh:VOLTage?
MEASure:VOLTage:ACDC?
FETCh:VOLTage:ACDC?
MEASure:VOLTage:HIGH?
FETCh:VOLTage:HIGH?
These queries return the High level voltage of a voltage pulse waveform. The instrument first measures
the minimum and maximum data points of the pulse waveform. It then generates a histogram of the pulse
waveform using 1024 bins between the maximum and minimum data points. The bin containing the most
data points above the 50% point is the high bin. The average of all the data points in the high bin is
returned as the High level. If no high bin contains more than 1.25% of the total number of acquired points,
then the maximum value is returned by these queries.
50
Language Dictionary - 4
MEASure:VOLTage:LOW?
FETCh:VOLTage:LOW?
These queries return the Low level voltage of a voltage pulse waveform. The instrument first measures
the minimum and maximum data points of the pulse waveform. It then generates a histogram of the pulse
waveform using 1024 bins between the maximum and minimum data points. The bin containing the most
data points below the 50% point is the low bin. The average of all the data points in the low bin is returned
as the Low level. If no low bin contains more than 1.25% of the total number of acquired points, then the
minimum value is returned by these queries.
MEASure:VOLTage:MAXimum?
FETCh:VOLTage:MAXimum?
These queries return the maximum output voltage reading from the measurement sample.
MEASure:VOLTage:MINimum?
FETCh:VOLTage:MINimum?
These queries return the minimum output voltage reading from the measurement sample.
51
4 - Language Dictionary
SENSe:CURRent:RANGe
This command selects the dc current measurement range. All models have two current measurement
ranges:
High Range: 0 through MAX (see Table 4-3)
Low Range: 0 through 0.02 A (all models)
The High range covers the full current measurement capability of the instrument. The Low range
measures currents up to a maximum of 20 mA. This increases the low current measurement sensitivity for
greater accuracy and resolution. The value that you program with SENSe:CURRent:RANGe must be the
maximum current that you expect to measure. The instrument will select the range that gives the best
resolution. The crossover value is 20 mA. When queried, the returned value is the maximum current that
can be measured on the range that is presently set.
SENSe:CURRent:DETector
This command lets you select the type of detector used for output current measuremants. Two choices for
detecting current measurements are available:
ACDC This is the preferred choice for all dynamic current measurements. When ACDC is selected,
the measured output current includes the current that flows in the instrument’s output
capacitor. It is especially important to use ACDC detection when measuring pulse or other
waveforms with frequency contents greater than several kilohertz.
DC Select DC only if you are making dc current measurements and you require a dc measurement
offset accuracy better than 2mA on the High current measurement range. When DC is
selected, the component of output current that is supplied by the instrument’s output filter is not
sensed. Note that this selections gives inaccurate results on current waveforms with frequency
contents greater than several kilohertz.
NOTE: This command only applies to the High current measurement range.
52
Language Dictionary - 4
SENSe:FUNCtion
This command configures the measurement sensor to measure either voltage or current when an acquire
trigger is used. The query returns the function setting, either VOLT or CURR.
SENSe:SWEep:OFFSet:POINts
This command defines the offset in a data sweep when an acquire trigger is used. Negative values
represent data samples taken prior to the trigger.
SENSe:SWEep:POINts
This command defines the number of points in a data sweep.
SENSe:SWEep:TINTerval
This command defines the time period between samples. The value that you enter for the time interval will
be rounded to the nearest 15.6 microsecond increment.
53
4 - Language Dictionary
SENSe:WINDow
This command sets the window function that is used in output measurement calculations. The following
functions can be selected:
HANNing A signal conditioning window that reduces errors in dc and rms measurement
calculations in the presence of periodic signals such as line ripple. It also
reduces jitter when measuring successive pulse waveforms. The Hanning
4
window multiplies each point in the measurement sample by the function cos .
Do not use the Hanning window when measuring single-shot pulse waveforms.
RECTangular A window that returns measurement calculations without any signal
conditioning. This window may be used for pulse measurements where the
exact period of the pulse waveform is known and the measurement interval can
be set accordingly using the SENSe:SWEep:TINTerval command.
NOTE: Neither window function alters the instantaneous voltage or current data returned in the
measurement array.
54
Language Dictionary - 4
Output Commands
Output commands consist of output and source commands.
Output commands control the output and digital port functions. They also control the output relay on
units with Relay Option 760.
Source commands program the actual voltage, current, and digital port output.
OUTPut
This command enables or disables the dc source output. The state of a disabled output is a condition of
zero output voltage and a model-dependent minimum source current (see *RST). Unless the NORelay
command is programmed, the OUTput command also controls the output relay on Agilent models
66332A, 6631B, 6632B, 6633B, and 6634B with Relay Option 760. If the NORelay command is sent, the
output relay state does NOT change.
OUTPut:DFI
This command enables or disables the discrete fault indicator (DFI) outputfrom the dc source.
OUTPut:DFI:SOURce
This command selects the source for discrete fault indicator (DFI) events.The choices are:
QUEStionable selects the Questionable event summary bit (bit 3 of the Status Byte Register)
OPERation selects the Operation Event summary bit (bit 7 of the Status Byte Register)
ESB selects the Standard Event summary bit (bit 5 of the Status Byte Register)
RQS selects the Request Service bit (bit 6 of the Status Byte Register)
OFF selects no DFI source
55
4 - Language Dictionary
OUTPut:PON:STATe
This command selects the power-on state of the dc source. This information is saved in non-volatile
memory. The following states can be selected:
RST Sets the power-on state to *RST. Refer to the *RST command as described in this chapter
for more information.
RCL0 Sets the power-on state to *RCL 0. Refer to the *RCL command as described in this
chapter for more information.
OUTPut:PROTection:CLEar
This command clears the latch that disables the output when an OverVoltage, OverCurrent,
OverTemperature, Remote Inhibit, or Fuse Status condition is detected. All conditions that generate the
fault must be removed before the latch can be cleared. The output is then restored to the state it was in
before the fault condition occurred.
OUTPut:PROTection:DELay
This command sets the time between the programming of an output change that produces a constant
current condition (CC) and the recording of that condition by the Operation Status Condition register. The
delay prevents the momentary changes in status that can occur during reprogramming from being
registered as events by the status subsystem. Since the constant current condition is used to trigger
overcurrent protection (OCP), this command also delays OCP. Overvoltage protection is not affected by
this comand.
56
Language Dictionary - 4
OUTPut:RELay
Agilent 66332A, 6632B, 6633B, 6634B, 6611C, 6612C, 6613C, 6614C Only
This command is only valid for units with Relay Option 760, otherwise an error will occur. Programming
ON closes the output relay contacts; programming OFF opens them. The relay is controlled independently
of the output state. If the dc source is supplying power to a load, that power will appear at the relay
contacts during switching.
OUTPut:RELay:POLarity
Agilent 66332A, 6632B, 6633B, 6634B, 6611C, 6612C, 6613C, 6614C Only
This command is only valid for units with Relay Option 760, otherwise an error will occur. Programming
NORMal causes the output relay polarity to be the same as the dc source output. Programming REVerse
causes the relay output polarity to be opposite to that of the dc source output. If OUTPut = ON when either
command is sent, the output voltage is set to 0 during the time that the relays are changing polarity.
OUTPut:RI:MODE
This command selects the mode of operation of the Remote Inhibit protection. The RI mode is stored in
non-volatile memory. The following modes can be selected:
LATChing causes a TTL low signal on the INH input to disable the output. The only way
to clear the latch is by sending an OUTPut:PROTection:CLEAR command
while the INH input is false.
LIVE allows the INH input to disable the output in a non-latching manner. In other
words, the output follows the state of the INH input. When INH is low true, the
output is disabled. When INH is high the output is not affected.
OFF the INH input is disabled.
57
4 - Language Dictionary
[SOURce:]CURRent
This command sets the immediate current level of the dc source . The immediate level is the current
programmed for the output terminals.
[SOURce:]CURRent:TRIGger
This command sets the pending triggered current level of the dc source . The pending triggered level is a
stored current value that is transferred to the output terminals when a trigger occurs. In order for a trigger
to occur, the trigger subsystem must be initiated (see the INITiate command in the trigger subsystem).
[SOURce:]CURRent:PROTection:STATe
This command enables or disables the overcurrent protection (OCP) function. If the dc source overcurrent
protection function is enabled and the dc source goes into constant current operation, then the output is
disabled and the Questionable Condition status register OC bit is set (see chapter 3 under Programming
the Status Registers). Note that the [SOURce:]CURRent command sets the current limit, which
determines when the dc source goes into constant current operation. An overcurrent condition can be
cleared with the OUTPut:PROTection:CLEar command after the cause of the condition is removed.
58
Language Dictionary - 4
[SOURce:]DIGital:DATA
This command sets and reads the dc source digital control port when that port is configured for Digital I/O
operation. The port has three signal pins and a digital ground pin. Pins 1 and 2 are output pins controlled
by bits 0 and 1. Pin 3 is controlled by bit 2, and can be programmed to serve either as an input or an
output. It normally serves as an output. Bit 2 must be programmed high to use pin 3 as an input. Pin 4 is
the digital ground. The query returns the last programmed value in bits 0 and 1 and the value read at pin
3 in bit 2.
Program Bit Configuration Pin Setting
Value 2 1 0 4 3 2 1
0 0 0 0 GND Input Lo Lo
1 0 0 1 GND Input Lo Hi
2 0 1 0 GND Input Hi Lo
3 0 1 1 GND Input Hi Hi
4 1 0 0 GND Output Lo Lo
5 1 0 1 GND Output Lo Hi
6 1 1 0 GND Output Hi Lo
7 1 1 1 GND Output Hi Hi
[SOURce:]DIGital:FUNCtion
This command configures the dc source digital control port. The configuration setting is saved in non-
volatile memory.
RIDFi Configures the port for Remote Inhibit/Discrete Fault Interrupt operation
DIGio Configures the port for Digital input/output operation (see DIG:DATA)
[SOURce:]VOLTage
This command sets the output voltage level of the dc source.
59
4 - Language Dictionary
[SOURce:]VOLTage:ALC:BANDwidth?
[SOURce:]VOLTage:ALC:BWIDth?
These queries return the setting of the output mode switch. The output mode switch is used to connect or
disconnect the the output capacitor located inside the unit. The returned value is 15,000 if the switch is set
to Normal and 60,000 if the switch is set to Fast.
[SOURce:]VOLTage:TRIGger
This command sets the pending triggered voltage level of the dc source. The pending triggered level is a
stored voltage value that is transferred to the output terminals when a trigger occurs. In order for a trigger
to occur, the trigger subsystem must be initiated (see the INITiate command in the trigger subsystem).
[SOURce:]VOLTage:PROTection
This command sets the overvoltage protection (OVP) level of the dc source. If the output voltage exceeds
the OVP level, then the dc source output is disabled and the Questionable Condition status register OV bit
is set (see chapter 3 under Programming the Status Registers). An overvoltage condition can be cleared
with the OUTP:PROT:CLE command after the condition that caused the OVP trip is removed. The OVP
always trips with zero delay and is unaffected by the OUTP:PROT:DEL command.
60
Language Dictionary - 4
Status Commands
Status commands program the dc source status registers. The dc source has three groups of status
registers; Operation, Questionable, and Standard Event. The Standard Event group is programmed with
Common commands as described later in this section. The Operation and Questionable status groups
each consist of the Condition, Enable, and Event registers and the NTR and PTR filters. Chapter 3 under
"Programming the Status Registers" explains how to read specific register bits and use the information
they return.
Common commands also perform status functions. The following common commands are discussed in
this section: *CLS *ESE *SR? *OPC *PSC *SRE *STB *WAI.
STATus:PRESet
This command sets all defined bits in the Status Subsystem PTR registers and clears all bits in the
subsytem NTR and Enable registers.
STATus:OPERation?
This query returns the value of the Operation Event register. The Event register is a read-only register
which holds (latches) all events that are passed by the Operation NTR and/or PTR filter. Reading the
Operation Event register clears it.
STATus:OPERation:CONDition?
This query returns the value of the Operation Condition register. That is a read-only register which holds
the real-time (unlatched) operational status of the dc source .
61
4 - Language Dictionary
STATus:OPERation:ENABle
This command and its query set and read the value of the Operational Enable register. This register is a
mask for enabling specific bits from the Operation Event register to set the operation summary bit (OPER)
of the Status Byte register. This bit (bit 7) is the logical OR of all the Operatonal Event register bits that are
enabled by the Status Operation Enable register.
STATus:OPERation:NTR
STATus:OPERation:PTR
These commands set or read the value of the Operation NTR (Negative-Transition) and PTR (Positive-
Transistion) registers. These registers serve as polarity filters between the Operation Enable and
Operation Event registers to cause the following actions:
u When a bit in the Operation NTR register is set to 1, then a 1-to-0 transition of the corresponding
bit in the Operation Condition register causes that bit in the Operation Event register to be set.
u When a bit of the Operation PTR register is set to 1, then a 0-to-1 transition of the corresponding
bit in the Operation Condition register causes that bit in the Operation Event register to be set.
u If the same bits in both NTR and PTR registers are set to 1, then any transition of that bit at the
Operation Condition register sets the corresponding bit in the Operation Event register.
u If the same bits in both NTR and PTR registers are set to 0, then no transition of that bit at the
Operation Condition register can set the corresponding bit in the Operation Event register.
62
Language Dictionary - 4
STATus:QUEStionable?
This query returns the value of the Questionable Event register. The Event register is a read-only register
which holds (latches) all events that are passed by the Questionable NTR and/or PTR filter. Reading the
Questionable Event register clears it.
STATus:QUEStionable:CONDition?
This query returns the value of the Questionable Condition register. That is a read-only register which
holds the real-time (unlatched) questionable status of the dc source.
STATus:QUEStionable:ENABle
This command and its query set and read the value of the Questionable Enable register. This register is a
mask for enabling specific bits from the Questionable Event register to set the questionable summary bit
(QUES) of the Status Byte register. This bit (bit 3) is the logical OR of all the Questionable Event register
bits that are enabled by the Questionable Status Enable register..
63
4 - Language Dictionary
STATus:QUEStionable:NTR
STATus:QUEStionable:PTR
These commands allow you to set or read the value of the Questionable NTR (Negative-Transition) and
PTR (Positive-Transistion) registers. These registers serve as polarity filters between the Questionable
Enable and Questionable Event registers to cause the following actions:
u When a bit of the Questionable NTR register is set to 1, then a 1-to-0 transition of the
corresponding bit of the Questionable Condition register causes that bit in the Questionable Event
register to be set.
u When a bit of the Questionable PTR register is set to 1, then a 0-to-1 transition of the
corresponding bit in the Questionable Condition register causes that bit in the Questionable Event
register to be set.
u If the same bits in both NTR and PTR registers are set to 1, then any transition of that bit at the
Questionable Condition register sets the corresponding bit in the Questionable Event register.
u If the same bits in both NTR and PTR registers are set to 0, then no transition of that bit at the
Questionable Condition register can set the corresponding bit in the Questionable Event register.
*CLS
This command causes the following actions (see chapter 3 under Programming the Status Registers, for
the descriptions of all registers):
u Clears the following registers:
• Standard Event Status
• Operation Status Event
• Questionable Status Event
• Status Byte
u Clears the Error Queue
u If *CLS immediately follows a program message terminator (<NL>), then the output queue and the
MAV bit are also cleared.
64
Language Dictionary - 4
*ESE
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. The query reads the Standard Event The query
reads the Standard Event Status Enable register.
CAUTION: If *PSC is programmed to 0, the *ESE command causes a write cycle to nonvolatile
memory. Nonvolatile memory has a finite maximum number of write cycles. Programs
that repeatedly cause write cycles to nonvolatile memory can eventually exceed the
maximum number of write cycles and cause the memory to fail.
*ESR?
This query reads the Standard Event Status Event register. Reading the register clears it. The bit
configuration is the same as the Standard Event Status Enable register (see *ESE).
*OPC
This command causes the instrument to set the OPC bit (bit 0) of the Standard Event Status register when
the has completed all pending operations. (See *ESE for the bit configuration of the Standard Event
Status register.) Pending operations are complete when:
u 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
dc source. The *OPC command provides notification that all overlapped commands have been
completed.
u all triggered actions are completed
65
4 - Language Dictionary
* OPC does not prevent processing of subsequent commands, but bit 0 will not be set until all pending
operations are completed.
*OPC? causes the instrument to place an ASCII "1" in the Output Queue when all pending operations are
completed. Unlike *OPC, *OPC? prevents processing of all subsequent commands. It 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 dc source Output Queue.
*PSC
This command controls the automatic clearing at power-on of the Service Request Enable and the
Standard Event Status Enable registers
*PSC ON | 1 causes these registers to be cleared at power-on. This prevents a PON event from
generating SRQ at power-on.
*PSC OFF | 0 causes the contents of the Standard Event Enable and Service Request Enable registers
to be saved in nonvolatile memory and recalled at power-on. This allows a PON event to
generate SRQ at power-on.
The query returns the current state of *PSC.
CAUTION: *PSC causes a write cycle to nonvolatile memory. Nonvolatile memory has a finite
maximum number of write cycles. Programs that repeatedly cause write cycles to
nonvolatile memory can eventually exceed the maximum number of write cycles and
cause the memory to fail.
*SRE
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.
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 dc source cannot generate an SRQ to the
controller.
66
Language Dictionary - 4
CAUTION: If *PSC is programmed to 0, the *SRE command causes a write cycle to nonvolatile
memory. Nonvolatile memory has a finite maximum number of write cycles. Programs
that repeatedly cause write cycles to nonvolatile memory can eventually exceed the
maximum number of write cycles and cause the memory to fail.
*STB?
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. The MAV bit is cleared at power-on, by *CLS’ or when there is no
more response data available.
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 has one or more reasons for requesting service.
*WAI
This command instructs the dc source 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 dc source an GPIB DCL (Device Clear) command.
67
4 - Language Dictionary
System Commands
System commands consist of system, display, and common commands.
System commands commands control system functions that are not directly related to output control or
measurement functions.
Common commands also perform system functions. The following common commands are discussed in
this section: *IDN? *OPT? *RCL *RST *SAV *TST?.
DISPlay
This command turns the front panel display on or off. When off, the front panel display is blank. The
display annunciators are not affected by this command.
DISPlay:MODE
Switches the display between its normal instrument functions and a mode in which it displays text sent by
the user. Text messages are defined with the DISPlay:TEXT command.
DISPlay:TEXT
This command sends character strings to the display when the display mode is set to TEXT. The
character string is case-sensitive and must be enclosed in either single () or double () quotes. The display
is capable of showing up to 14 characters. Strings exceeding 14 characters will be truncated.
68
Language Dictionary - 4
SYSTem:ERRor?
This query returns the next error number followed by its corresponding error message string from the
remote programming error queue. The queue is a FIFO (first-in, first-out) buffer that stores errors as they
occur. As it is read, each error is removed from the queue. When all errors have been read, the query
returns 0,NO ERROR. If more errors are accumulated than the queue can hold, the last error in the queue
will be -350,TOO MANY ERRORS (see Appendix C for other error codes).
You can use the front panel Error key to read errors from the queue. Errors generated at the front panel
are not put into the queue but appear immediately on the display.
SYSTem:LANGuage
This command switches the instrument between its SCPI command language and its compatibility
language. The compatibility language is provided for emulation of older dc source systems and is
described in Appendix B . Sending the command causes:
♦ The selected language to become active and to be stored in nonvolatile memory.
♦ The to reset to its power-on state.
If the dc source is shut off, it will resume operation in the last-selected language when power is restored.
Note that this command and query can be used regardless of the language that is presently selected.
SYSTem:VERSion?
This query returns the SCPI version number to which the complies. The returned value is of the form
YYYY.V, where YYYY represents the year and V is the revision number for that year.
69
4 - Language Dictionary
SYSTem:LOCal
This command places the dc source in local mode during RS-232 operation. The front panel keys are
functional.
SYSTem:REMote
This command places the dc source in remote mode during RS-232 operation. This disables all front
panel keys except the Local key. Pressing the Local key while in the remote state returns the front panel to
the local state.
SYSTem:RWLock
This command places the dc source in remote mode during RS-232 operation. All front panel keys
including the Local key are disabled. Use SYSTem:LOCal to return the front panel to the local state.
*IDN?
This query requests the dc source to identify itself. It returns a string composed of four fields separated by
commas.
70
Language Dictionary - 4
*OPT?
This query requests the dc source to identify any options that are installed. Options are identified by
number A 0 indicates no options are installed.
*RCL
WARNING: Recalling a previously stored state may place hazardous voltages at the dc source output.
This command restores the dc source to a state that was previously stored in memory with the *SAV
command to the specified location. All states are recalled with the following exceptions:
u the trigger system is set to the Idle state by an implied ABORt command (this cancels any
uncompleted trigger actions)
u the calibration function is disabled by setting CAL:STATe to OFF
NOTE: The device state stored in location 0 is automatically recalled at power turn-on when the
OUTPut:PON:STATe is set to RCL0.
*RST
This command resets the to a factory-defined state as defined in the following table. *RST also forces an
ABORt command.
71
4 - Language Dictionary
*SAV
This command stores the present state of the dc source to the specified location in non-volatile memory.
Up to 4 states can be stored. If a particular state is desired at power-on, it should be stored in location 0. It
will then be automatically recalled at power turn-on if OUTPut:PON:STATe is set to RCL0. *RCL retrieves
instrument states.
CAUTION: *SAV causes a write cycle to nonvolatile memory. Nonvolatile memory has a finite
maximum number of write cycles. Programs that repeatedly cause write cycles to
nonvolatile memory can eventually exceed the maximum number of write cycles and
cause the memory to fail.
*TST?
This query causes the to do a self-test and report any errors. 0 indicates that the dc source passed self-
test. 1 indicates that one or more tests failed. Selftest errors are written to the error queue (see Appendix
C).
72
Language Dictionary - 4
Trigger Commands
Trigger commands consist of trigger and initiate commands.
Trigger commands control the remote triggering of the dc source . Trigger commands (and Initate
commands) are referenced either by name or by number. The correspondence between names and
numbers is:
Sequence Number Sequence Name Description
1 (the default) TRANsient Output transient trigger sequence
2 ACQuire Measurement acquire trigger sequence
Initiate commands initialize the trigger system.
ABORt
This command cancels any trigger actions presently in process. Pending trigger levels are reset to their
corresponding immediate values. ABORt also resets the WTG bit in the Operation Condition Status
register (see chapter 3 under Programming the Status Registers). If INITiate:CONTinuous ON has been
programmed, the trigger subsystem initiates itself immediately after ABORt, thereby setting WTG. ABORt
is executed at power turn on and upon execution of *RCL or RST.
INITiate:SEQuence
INITiate:NAME
INITiate:CONTinuous:SEQuence1
INITiate:CONTinuous:NAME
These commands control the output transient trigger system.
1 or ON continuously initiates the output trigger system..
0 or OFF turns off continuous triggering. In this state, the output
trigger system must be initiated for each trigger using INITiate:SEQuence.
73
4 - Language Dictionary
TRIGger
When the transient trigger subsystem is initiated, this command generates a trigger signal. The trigger will
then:
1. Initiate a pending level change as specified by CURRent:TRIGger or VOLTage;TRIGger.
2. Clear the WTG bit in the Status Operation Condition register after both transient and acquire trigger
sequences have completed. (WTG is the logical-or of both transient and acquire sequences.)
3. If INITiate:CONTinuous ON has been programmed, the trigger subsystem is immediately re-enabled
for subsequent triggers. As soon as it is cleared, the WTG bit is again set to 1.
TRIGger:SOURce
This command is included for completeness. It selects the trigger source for transient triggers. Since BUS
is the only trigger source for transient triggers, this command does not need to be used.
BUS GPIB device, *TRG, or <GET> (Group Execute Trigger)
TRIGger:SEQuence2
TRIGger:ACQuire
When the trigger subsystem is initiated, these commands generate a measurement trigger signal. The
measurement trigger causes the dc source to measure the output voltage and current and store the
results in a buffer.
.
Command Syntax TRIGger:SEQuence2[:IMMediate]
TRIGger:ACQuire:[:IMMediate]
Parameters None
Examples TRIG:SEQ2 TRIG:ACQ
Related Commands TRIG:SOUR TRIG:SEQ2:DEF TRIG:SEQ2:COUN
TRIG:SEQ2:LEV:VOLT TRIG:SEQ2:SLOP:CURR
74
Language Dictionary - 4
TRIGger:SEQuence2:COUNt:CURRent
TRIGger:ACQuire:COUNt:CURRent
This command sets up a successive number of triggers for measuring current data. With this command,
the trigger system needs to be initialized only once at the start of the acquisition period. After each
completed measurement, the instrument waits for the next valid trigger condition to start another
measurement. This continues until the count has completed.
TRIGger:SEQuence2:COUNt:VOLTage
TRIGger:ACQuire:COUNt:VOLTage
This command sets up a successive number of triggers for measuring voltage data. With this command,
the trigger system needs to be initialized only once at the start of the acquisition period. After each
completed measurement, the instrument waits for the next valid trigger condition to start another
measurement. This continues until the count has completed.
75
4 - Language Dictionary
TRIGger:SEQuence2:HYSTeresis:CURRent
TRIGger:ACQuire:HYSTeresis:CURRent
This command defines a band around the trigger level through which the signal must pass before an
internal measurement can occur. The band limit above and below the trigger level is one half of the
hysteresis value added to or subtracted from the trigger level.
For a positive trigger to occur, the excursion of an output waveform in the positive direction must start
below the lower hysteresis band limit and pass through the upper hysteresis band limit. For a negative
trigger to occur, the excursion of an output waveform in the negative direction must start above the upper
hysteresis band limit and pass through the lower hysteresis band limit.
TRIGger:SEQuence2:HYSTeresis:VOLTage
TRIGger:ACQuire:HYSTeresis:VOLTage
This command defines a band around the trigger level through which the signal must pass before an
internal measurement can occur. The band limit above and below the trigger level is one half of the
hysteresis value added to or subtracted from the trigger level.
For a positive trigger to occur, the excursion of an output waveform in the positive direction must start
below the lower hysteresis band limit and pass through the upper hysteresis band limit. For a negative
trigger to occur, the excursion of an output waveform in the negative direction must start above the upper
hysteresis band limit and pass through the lower hysteresis band limit.
76
Language Dictionary - 4
TRIGger:SEQuence2:LEVel:CURRent
TRIGger:ACQuire:LEVel:CURRent
This command sets the trigger level for internally triggered current measurements. A positive current
trigger occurs when the current level changes from a value less than the lower hysteresis band limit to a
value greater than the upper hysteresis band limit. Similarly, a negative current trigger occurs when the
current level changes from a value greater than the upper hysteresis band limit to a value less than the
lower hysteresis band limit.
TRIGger:SEQuence2:LEVel:VOLTage
TRIGger:ACQuire:LEVel:VOLTage
This command sets the trigger level for internally triggered voltage measurements. A positive voltage
trigger occurs when the voltage level changes from a value less than the lower hysteresis band limit to a
value greater than the upper hysteresis band limit. Similarly, a negative voltage trigger occurs when the
voltage level changes from a value greater than the upper hysteresis band limit to a value less than the
lower hysteresis band limit.
77
4 - Language Dictionary
TRIGger:SEQuence2:SLOPe:CURRent
TRIGger:ACQuire:SLOPe:CURRent
TRIGger:SEQuence2:SLOPe:VOLTage
TRIGger:ACQuire:SLOPe:VOLTage
78
Language Dictionary - 4
TRIGger:SEQuence2:SOURce
TRIGger:ACQuire:SOURce
These commands select the trigger source for measurement triggers as follows:
BUS GPIB device, *TRG, or <GET> (Group Execute Trigger)
INTernal trigger is generated internally when the measured waveform crosses the trigger level
with the selected slope.
TRIGger:SEQuence1:DEFine
TRIGger:SEQuence2:DEFine
These commands define the names that are aliased to trigger sequences 1 and 2. The command accepts
only ACQuire for sequence 2 and TRANsient for sequence 1 as predefined names. The query allows the
user to query the instrument names aliased to sequences 1 and 2.
*TRG
This common command generates a trigger when the trigger subsystem has BUS selected as its source.
The command has the same affect as the Group Execute Trigger (<GET>) command.
In RS-232 mode, this command emmulates some of the functionality of the IEEE-488 Group Execute
Trigger command.
79
A
SCPI Conformance Information
SCPI Version
The Agilent Dynamic Measurement DC Source conforms to SCPI Version 1995.0.
Non-SCPI Commands
CAL:CURR[:SOUR][:DC][:POS] OUTP:DFI:SOUR
CAL:CURR[:SOUR][:DC]:NEG OUTP:PON:STAT
CAL:MEAS[:DC]:LOWR OUTP:REL[:STAT]
CAL:MEAS:AC OUTP:REL:POL
CAL:LEV OUTP:RI:MODE
CAL:PASS SENS:CURR:DET
CAL:SAVE [SOUR]:DIG:DATA[:VAL]
CAL:VOLT[:DC] [SOUR]:DIG:FUNC
CAL:VOLT:PROT TRIG:SEQ2 | ACQ:COUN:CURR | :VOLT
DISP[:WIND]:MODE TRIG:SEQ2 | ACQ:HYST:CURR | :VOLT
MEAS | FETC[:SCAL]:CURR:ACDC? TRIG:SEQ2 | ACQ:LEV:CURR | :VOLT
MEAS | FETC[:SCAL]:VOLT:ACDC? TRIG:SEQ2 | ACQ:SLOP:CURR | :VOLT
OUTP:DFI[:STAT]
81
B
Compatibility Language
Introduction
The Agilent power supplies covered by this manual are programmatically compatible with the HP/Agilent
6632A, 6633A, and 6634A dc power supplies. This means that by using COMPatibility language mode you
can program these newer dc sources over the GPIB using COMPatibility commands.
To switch from SCPI commands to COMPatibility commands (and vice versa), use the SYST:LANG
command, as documented in chapter 4. The language setting is saved in non-volatile memory.
Table B-2 summarizes the COMPatibility commands that program the supplies. You may need to refer to
the HP/Agilent Series 6632, 6633A, and 6634A Operating Guide (p/n 5957-6360) for complete information
on the COMPatibility commands.
The rest of this appendix discusses the COMPatibility language status system, and the COMPatibility
language error codes.
Note: For complete information on the Compatibility programming language, order the
HP/Agilent 6632A/6633A/6634A Operating manual, p/n 5957-6360.
83
B - Compatibility Language
84
Compatibility Language - B
85
B - Compatibility Language
86
Compatibility Language - B
STATUS
REGISTER
1
CV
2
+CC
UNR 4
OV 8
16
OT
not used 32
OC 64 FAULT
4 1024 16
4 UNR RDY
2048 ERR 32
8 OV 8
16 RQS 64
16 OT
128
32 not used 32 not used
OC 64
64
ERR 128
128
256
256 INH
512
512 -CC
1024
1024 FAST
NORM 2048
2048
Table B-4. Bit Assignment of Status, Astatus, Fault, & Mask Registers
Bit Position 11 10 9 8 7 6 5 4 3 2 1 0
Bit Name NORM FAST -CC INH ERR OC not OT OV UNR +CC CV
used
Bit Weight 2048 1024 512 256 128 64 32 16 8 4 2 1
CV = The unit is operating in constant voltage mode.
CC+ = The unit is operating in constant current mode.
UNR = The output of the unit is unregulated.
OV = The overvoltage protection circuit has tripped.
OT = The over-temperature protection circuit has tripped.
OC = The overcurrent protection circuit has tripped.
ERR = A programming error has occurred. Use ERR? to clear.
CC = The unit is operating in negative constant current mode.
INH = The external remote inhibit signal has turned the output off.
FAST = The output is in Fast operating mode. (Agilent 66332A, 6631B, 6632B, 6633B, 6634B only)
NORM = The output is in Normal operating mode. (Agilent 66332A, 6631B, 6632B, 6633B, 6634B only)
87
C
Error Messages
The following table lists the errors that are associated with SCPI syntax errors and interface problems. It
also lists the device dependent errors. Information inside the brackets is not part of the standard error
message, but is included for clarification.
When errors occur, the Standard Event Status register records them as follows:
Bit Set Error Code Error Type Bit Set Error Code Error Type
5 -100 thru -199 Command 3 -300 thru -399 or Device-dependent
1 thru 32767
4 200 thru -299 Execution 2 -400 thru -499 Query
89
C - Error Messages
90
Error Messages - C
91
D
Example Programs
Introduction
The example programs in this section are intended to show how some of the same dc source
functions can be programmed to each of the following GPIB interfaces:
1. HP Vectra PC controller with Agilent 82335A GPIB Interface Command Library
2. IBM PC controller with National Instuments GPIB-PCII Interface/Handler
3. Agilent controller with BASIC Language System
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).
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.
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).
93
D - Example Programs
Your application program will not include the dc source’s 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 dc source 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. Error detection should
be used after every call to a subroutine.
BASIC Controllers
The 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 dc source 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 Appendix C.
94
Example Programs - D
1085 ’
1090 ’Query dc source outputs CURRENT?" :GOSUB 2000 :GOSUB 3000
1100 VOUT = OUTPUTS(1)
1105 IOUT = OUTPUTS(2)
1110 PRINT "The output levels are "VOUT" Volts and "IOUT" Amps"
1115 ’
1120 ’Program triggered current level to value insufficient to maintain
1125 ’supply within its CV operating characteristic
1130 CODES$ = "CURR:TRIG MIN" :GOSUB 2000
1135 ’
1140 ’Set operation status mask to detect mode change from CV to CC
1145 CODES$ = "STAT:OPER:ENAB 1024;PTR 1024" :GOSUB 2000
1150 ’
1155 ’Enable Status Byte OPER summary bit
1160 CODES$ = "*SRE 128" :GOSUB 2000
1165 ’
1170 ’Arm trigger circuit and send trigger to dc source
1175 CODES$ = "INITIATE:SEQUENCE1;TRIGGER" :GOSUB 2000
1180 ’
1185 ’Wait for supply to respond to trigger
1190 FOR I= 1 to 100 :NEXT I
1195 ’
1200 ’Poll for interrupt caused by change to CC mode and print to
screen
1205 CALL IOSPOLL (PS,RESPONSE)
1210 IF (RESPONSE AND 128) <> 128 THEN GOTO 1240 ’No OPER event to
report
1215 CODES$ = "STATUS:OPER:EVEN?" :GOSUB 2000 ’Query status oper
register
1220 CALL IOENTER (PS,OEVENT) ’Read back event bit
1225 IF PCIB.ERR <> NOERR THEN ERROR PCIB.BASERR
1230 IF (OEVENT AND 1024) = 1024 THEN PRINT "Supply switched to CC
mode."
1240 ’Clear the status circuit
1245 CODES$ = "*CLS" :GOSUB 2000
1250 FOR I = 1 TO 100 :NEXT I ’Wait for supply to
clear
1255 ’
1260 ’Disable output and save present state in location 2
1265 CODES$ = "OUTPUT OFF;*SAV 2" :GOSUB 2000
1270 END
1275 ’
2000 ’Send command to dc source
2005 LENGTH = LEN(CODES$)
2010 CALL IOOUTPUTS (PS,CODES$,LENGTH) ’Send command to
interface
2015 IF PCIB.ERR <> NOERR THEN ERROR PCIB.BASERR ’SETUP.BAS error
trap
2020 RETURN
2025 ’
3000 ’Get data from dc source
3005 CALL IOENTERA (PS,OUTPUTS(1),MAX.ELEMENTS,ACTUAL.ELEMENTS)
3010 IF PCIB.ERR <> NOERR THEN ERROR PCIB.BASERR
3015 RETURN
95
D - Example Programs
96
Example Programs - D
1225 ’
1230 ’Clear status circuit
1235 CODES$="*CLS" :GOSUB 2000
1240 FOR I=1 TO 50 :NEXT I ’Wait for supply to clear
1245 ’
1250 ’Disable output and save present state to location 2
1255 CODES$ = "OUTPUT OFF;*SAV 2" :GOSUB 2000
1260 END
1265 ’
2000 ’Send command to dc source
2005 CALL IBWRT(PS%,CODES$)
2010 IF IBSTAT%
2015 RETURN
1250 ’Disable output and save present state to location 2
1255 CODES$ = "OUTPUT OFF;*SAV 2" :GOSUB 2000
1260 END
1265 ’
2000 ’Send command to dc source
2005 CALL IBWRT(PS%,CODES$)
2010 IF IBSTAT%
2015 RETURN
2020 ’
2100 ’Error detection routine
2105 PRINT "GPIB error. IBSTAT% = HEX$(IBSTAT%)
2110 PRINT " IBERR% = ";IBERR%" in line ";ERL
2115 STOP
2120 ’
3000 ’Get data from dc source
3005 CALL IBRD(PS%,OUTPUT$)
3010 IF IBSTA%
3015 I=1 ’Parse data string
3020 X=1
3025 C=INSTR(I,OUTPUT$,";")
3030 WHILE C <> 0
3035 D$=MID$(OUTPUT$,I,C-I)
3040 OUTPUT(X)=VAL(D$) ’Get values
3045 I=C+1
3050 C=INSTR(I,OUTPUT$,";")
3055 X=X+1
3060 WEND
3065 D$=RIGHT$(OUTPUT$,LEN(OUTPUT$)-(I-1))
3070 OUTPUT(X)=VAL(D$)
3075 OUTPUT$=SPACE$(40) ’Clear string
3080 RETURN
97
D - Example Programs
98
INDEX
maximum, 20
measurement range, 24
—A— measurements, 23
AARD, 16 current measurement detector, 28, 52
ABORT, 73 current measurement range, 52
ACDC, 52
—D—
—B— DC, 52
bus, 79 dc measurements, 23
determining cause of interrupt, 35
device clear, 17
—C— DFI, 36
calibration commands, 44 DFI programming example, 37
CAL CURR, 44 digital I/O port, 37
CAL CURR MEAS AC, 44 discrete fault indicator, 36
CAL CURR NEG, 44 display commands, 68
CAL DATA, 45 DISP, 68
CAL LEV, 45 DISP MODE, 68
CAL PASS, 45 DISP TEXT, 68
CAL SAVE, 45 DOS driver types, 93
CAL STAT, 46 DTR-DSR, 11
CAL VOLT, 46
CAL VOLT PROT, 46 —E—
calibration commands:CAL CURR MEAS LOWR ",
44 either, 78
character strings, 16 enabling the output, 19
combine commands error handling, 94
common commands, 14 error numbers, 89
from different subsystems, 14 example
root specifier, 14 controller using HP BASIC, 98
command completion, 17 DFI programming, 37
common command syntax, 43 HP Vectra with HP 82335 interface, 94
common commands, 61, 68 IBM controller using National interface, 96
*CLS, 64 programs, 93
*ESE, 65 pulse measurement, 11, 30
*ESR?, 65
*IDN?, 70 —F—
*OPC, 65
*OPT?, 71 fault indicator
*PSC, 66 discrete, 36
*RCL, 71 remote inhibit, 36
*RST, 71 fetch commands, 23, 47
*SAV, 72 FLT, 36
*SRE, 66
*STB?, 67
*TRG, 79
—G—
*TST, 72 general information, 7
*WAI, 67 generating measurement triggers, 26
compatibility generating triggers, 22
commands, 84 GP-IB
errors, 86 command library for MS DOS, 8
language, 83 controller programming, 8
power-on settings, 83 IEEE Std for standard codes, 8
status model, 87 IEEE Std for standard digital interface, 8
conventions used in this guide, 12 references, 8
CRD, 16
current, 20
99
Index
—H— newline, 15
message unit
hanning, 54 separator, 15
header, 15 minimum measurements, 24
long form, 15 monitoring both phases of status transition, 36
short form, 15 moving among subsystems, 14
history, 2 MSS bit, 35
HP 8235A driver, 93 multiple measurements, 29
HP BASIC controllers, 94
HP-IB
address, 10
—N—
capabilities of the dc source, 10 National Instruments GPIB driver, 93
triggers, 26 negative, 78
numerical data formats, 16
—I—
INH, 36
—O—
initialization, 19 OCP, 20
initiate commands, 73 operation status group, 33
INIT CONT NAME, 73 optional header
INIT CONT SEQ, 73 example, 14
INIT NAME, 73 output commands, 55
INIT SEQ, 73 OUTP, 55
initiating measurement trigger system, 25 OUTP DFI, 55
initiating output trigger system, 22 OUTP DFI SOUR, 55
internal, 79 OUTP PON STAT, 56
internal triggers, 26 OUTP PROT CLE, 56
internally triggered measurements, 25 OUTP PROT DEL, 56
OUTP REL, 57
—L— OUTP REL POL, 57
OUTP RI MODE, 57
language, 83 output queue, 35
language dictionary, 39 output trigger system model, 21
latching, 57 overcurrent protection, 20
live, 57
—P—
—M—
PON (power on) bit, 34
making measurements, 23 positive, 78
MAV bit, 35 post-event triggering, 30
maximum measurements, 24 power-on conditions, 32
measure commands, 23, 47 power-on initialization, 19
MEAS ARRay CURR?, 47 pre-event triggering, 30
MEAS ARRay VOLT?, 47 print date, 2
MEAS CURR ACDC?, 48 program examples, 93
MEAS CURR HIGH?, 48 programming parameters, 43
MEAS CURR LOW?, 49 programming status registers, 32
MEAS CURR MAX?, 49 programming the output, 19
MEAS CURR MIN?, 49 pulse measurement example, 11, 30
MEAS CURR?, 48 pulse measurement queries, 28
MEAS VOLT ACDC?, 50 pulse waveforms, 28
MEAS VOLT HIGH?, 50
MEAS VOLT LOW?, 51
MEAS VOLT MAX?, 51
—Q—
MEAS VOLT MIN?, 51 queries, 14
MEAS VOLT?, 50 query
measurement trigger system model, 25 indicator, 15
measuring output pulses, 28 questionable status group, 34
message terminator, 15
end or identify, 15
100
Index
101
Index
—V— —W—
varying voltage or current sampling, 29 waiting for measurement results, 27
voltage, 20
maximum, 20
measurements, 23
—X—
XON-XOFF, 11
102
Manual Updates
The following updates have been made to this manual since the printing date indicated on the
title page.
11/9/99
Information about installing VXIplug&play Power Products Instrument Drivers has been included
in the beginning of chapter 2.
1/4/00
1/30/03
5/15/09