Page 19
3
Programming the DC Source
Introduction
This chapter contains examples on how to program your dc source. Simple examples show you how to program:
υoutput functions such as voltage and current
υinternal and external triggers
υmeasurement functions
υ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.
Programming the Output
Power-on Initialization
When the dc source is first turned on, it wakes up with the output state set OFF. In this state the output voltage is set to 0. The following commands are given implicitly at power-on:
*RST
*CLS
STATus:PRESet *SRE 0
*ESE 0
*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.
Enabling the Output
To enable the output, use the command:
OUTPut ON
19
Contents
Programming Guide
Printing History
Safety Guidelines
Table of Contents
Internally Triggered Measurements
Language Dictionary
Output Commands
Example Programs
Error Messages
Scpi Conformance Information
Compatibility Language
Documentation Summary
About this Guide
Gpib References
External References
Scpi References
System Requirements
VXIplug&play Power Products Instrument Drivers
Downloading and Installing the Driver
Supported Applications
Gpib Address
Accessing Online Help
Gpib Capabilities of the DC Source
RS-232 Capabilities of the DC Source
RS-232 Programming Example
RS-232 Flow Control
Baud Rate
Boldface font
RS-232 Troubleshooting
Introduction to Scpi
Conventions Used in This Guide
Multiple Commands in a Message
Types of Scpi Commands
Moving Among Subsystems
Including Common Commands
Using Queries
Types of Scpi Messages
Message Unit Separator
Query Indicator
Message Unit
Headers
Response Data Types
Scpi Data Formats
Numerical Data Formats
Suffixes and Multipliers
Using Device Clear
Scpi Command Completion
Page
Enabling the Output
Power-on Initialization
Introduction
Programming the Output
Maximum Current
Output Voltage
Output Current
Maximum Voltage
Output Trigger System Model
Setting the Voltage or Current Trigger Levels
Triggering Output Changes
Scpi Triggering Nomenclature
Generating Triggers
Initiating the Output Trigger System
Voltage and Current Measurements
Making Measurements
DC Measurements
Current Ranges
RMS Measurements Agilent 66312A, 66332A Only
Measurement Trigger System Model
Internally Triggered Measurements
Sequence Form Alias SEQuence2 ACQuire
BUS
Generating Measurement Triggers Agilent 66312A, 66332A Only
Trigger Commands Used to Measure Output Pulses
Current Detector
Measuring Output Pulses Agilent 66312A, 66332A Only
Pulse Measurement Queries
Varying the Voltage or Current Sampling Rate
Controlling Measurement Samples
Multiple Measurements Agilent 66312A, 66332A Only
Pre-event and Post-event Triggering
Pulse Measurement Example Agilent 66312A, 66332A only
Option Base
Programming the Status Registers
Power-On Conditions
Operation Status Group
Standard Event Status Group
Questionable Status Group
Status Byte Register
RQS Bit
Determining the Cause of a Service Interrupt
Servicing Operation Status and Questionable Status Events
MSS Bit
Remote Inhibit RI
Inhibit/Fault Indicator
Monitoring Both Phases of a Status Transition
Discrete Fault Indicator DFI
Pin
Using the Inhibit/Fault Port as a Digital I/O
Bit Weight
DFI Programming Example
Page
Language Dictionary
Subsystem Commands
Subsystem Commands Syntax
ALC
DFI
Subsystem Commands Syntax
Output Programming Parameters
Common Commands
Common Commands Syntax
Programming Parameters
CALibrateCURRentMEASureLOWRange
Calibration Commands
CALibrateCURRent
CALibrateCURRentNEGative
CALibrateLEVel
CALibratePASSword
Command Syntax CALibrateSAVE Parameters None Examples
CALibrateDATA
Query Syntax CALibrateSTATe?
CALibrateSTATe
CALibrateVOLTage
CALibrateVOLTagePROTection
Query Syntax
Measurement Commands
MEASureARRayCURRent? FETChARRayCURRent?
MEASureARRayVOLTage? FETChARRayVOLTage?
FETChCURRent? applies to Agilent 66312A, 66332A Only
MEASureCURRent? FETChCURRent?
MEASureCURRentACDC? FETChCURRentACDC?
MEASureCURRentHIGH? FETChCURRentHIGH?
MEASureCURRentMAXimum? FETChCURRent MAXimum?
MEASureCURRentLOW? FETChCURRentLOW?
MEASureCURRentMINimum? FETChCURRentMINimum?
FETChVOLTage? applies to Agilent 66312A, 66332A Only
MEASureVOLTage? FETChVOLTage?
MEASureVOLTageACDC? FETChVOLTageACDC?
MEASureVOLTageHIGH? FETChVOLTageHIGH?
MEASureVOLTageMAXimum? FETChVOLTageMAXimum?
MEASureVOLTageLOW? FETChVOLTageLOW?
MEASureVOLTageMINimum? FETChVOLTageMINimum?
Returned Parameters NR3
SENSeCURRentRANGe
SENSeCURRentDETector
Unit a amperes *RST Value MAX high range
SENSeSWEepTINTerval
SENSeFUNCtion
SENSeSWEepOFFSetPOINts
SENSeSWEepPOINts
Returned Parameters CRD
SENSeWINDow
HANNing
RECTangular
OUTPutDFISOURce
Output Commands
OUTPut
OUTPutDFI
OUTPutPONSTATe
OUTPutPROTectionDELay
OUTPutPROTectionCLEar
Query Syntax OUTPputRELayPOLarity?
OUTPutRELay
OUTPutRELayPOLarity
OUTPutRIMODE
SOURceCURRentPROTectionSTATe
Default Suffix
SOURceCURRent
SOURceCURRentTRIGger
Query Syntax SOURceDIGitalDATA?
SOURceDIGitalDATA
SOURceDIGitalFUNCtion
SOURceVOLTage
Agilent 66332A, 6631B, 6632B, 6633B and 6634B Only
SOURceVOLTageALCBANDwidth? SOURceVOLTageALCBWIDth?
SOURceVOLTageTRIGger
SOURceVOLTagePROTection
STATusOPERationCONDition?
Status Commands
STATusPRESet
STATusOPERation?
STATusOPERationNTR STATusOPERationPTR
STATusOPERationENABle
Query Syntax STATusOPERationENABle?
Parameters Preset Value
STATusQUEStionable?
STATusQUEStionableENABle
STATusQUEStionableCONDition?
STATQUESNTR?STATQUESPTR?
Command Syntax *CLS Parameters None
STATusQUEStionableNTR STATusQUEStionablePTR
CLS
OPC
Bit Configuration of Standard Event Status Enable Register
ESE
ESR?
Example
PSC
SRE
PSC on
NR1 register binary value
Bit Configuration of Status Byte Register
STB?
WAI
DISPlayTEXT
System Commands
DISPlay
DISPlayMODE
Parameters none Returned Parameters NR2
SYSTemERRor?
SYSTemLANGuage
SYSTemVERSion?
IDN?
SYSTemLOCal
SYSTemREMote
SYSTemRWLock
RST
Command Syntax RCL NRf Parameters Example
OPT?
RCL
TST?
RST Settings
Command Syntax SAV NRf Parameters Example
SAV
INITiateCONTinuousSEQuence1 INITiateCONTinuousNAME
Trigger Commands
ABORt
INITiateSEQuence INITiateNAME
Abor Currtrig Init *TRG Volttrig
TRIGger
TRIGgerSOURce
TRIGgerSEQuence2 TRIGgerACQuire
TRIGSEQ2COUNCURR 5 Trigacqcouncurr
TRIGgerSEQuence2COUNtCURRent TRIGgerACQuireCOUNtCURRent
TRIGgerSEQuence2COUNtVOLTage TRIGgerACQuireCOUNtVOLTage
Parameters RST Value Examples
TRIGSEQ2HYSTCURR TRIGSEQ2LEVVOLT
TRIGSEQ2HYSTVOLT TRIGSEQ2LEVCURR
TRIGSEQ2LEVCURR TRIGSEQ2HYSTVOLT
TRIGgerSEQuence2LEVelCURRent TRIGgerACQuireLEVelCURRent
TRIGgerSEQuence2LEVelVOLTage TRIGgerACQuireLEVelVOLTage
TRIGSEQ2LEVVOLT TRIGSEQ2HYSTCURR
TRIGgerSEQuence2SLOPeVOLTage TRIGgerACQuireSLOPeVOLTage
TRIGgerSEQuence2SLOPeCURRent TRIGgerACQuireSLOPeCURRent
TRIGSEQ2SLOPVOLT
TRG
Parameters None Related Commands
TRIGgerSEQuence2SOURce TRIGgerACQuireSOURce
TRIGgerSEQuence1DEFine TRIGgerSEQuence2DEFine
Page
Non-SCPI Commands
Scpi Confirmed Commands
Scpi Version
Page
Command Setting
Table B-1. COMPatibility Power-on Settings Command
ASTS? CLR
Table B-2. COMPatibility Commands Compatibility
ERR? FAULT? ID? IOUT?
Similar Scpi Command
Table B-2. COMPatibility Commands Description Similar Scpi
Compatibility Command
Error
Table B-2. COMPatibility Commands
Compatibility Description Command
These commands determine the conditions that will set bits
RQS ERR RDY
Norm Fast INH ERR UNR +CC
FAU
Page
Bit Set Error Number Error Code Error Type
Error Number List
Table C-1. Error Numbers
Error Number
Page
National Instruments Gpib Driver
Assigning the Gpib Address in Programs
Types of DOS Drivers
Agilent 82335A Driver
Basic Controllers
Error Handling
Example Programs D
Call IBCLRPS%
Example 2. IBM Controller Using National Interface
CODES$=*CLS
Option Base
Example 3. Controller Using Basic
Index
100
Index
Scpi
101
102
Manual Updates