Agilent Technologies N3280A manual Introduction to Scpi, Types of Scpi Commands

Page 32

4 - Introduction to Programming

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.

Conventions Used in This Guide

Angle brackets

<

>

Items within angle brackets are parameter abbreviations. For example, <NR1>

 

 

 

 

indicates a specific form of numerical data.

Vertical bar

 

 

Vertical bars separate alternative parameters. For example, VOLT CURR

 

 

 

 

indicates that either "VOLT" or "CURR" can be used as a parameter.

Square Brackets

[

]

Items within square brackets are optional. The representation [SOURce:].

 

 

 

 

VOLTage means that SOURce: may be omitted.

Braces {

}

 

 

Braces indicate parameters that may be repeated zero or more times. It is used

 

 

 

 

especially for showing arrays. The notation <A>{<,B>} shows that parameter "A"

 

 

 

 

must be entered, while parameter "B" may be omitted or may be entered one or

 

 

 

 

more times.

Parentheses

(

)

 

Items within parentheses are used in place of the usual parameter types to specify a

 

 

 

 

channel list. The notation (@1:3) specifies a channel list that includes channels 1,

 

 

 

 

2, and 3. The notation (@1,3) specifies a channel list that includes only channels 1

 

 

 

 

and 3.

Computer font

 

 

Computer font is used to show program lines in text.

 

 

 

 

TRIGger:ACQuire:SOURce BUS shows a program line.

Types of SCPI Commands

SCPI has two types of commands, common and subsystem.

Common commands generally are not related to specific operation but to controlling overall dc

source functions, such as reset, status, and synchronization. All common commands consist of a three-letter mnemonic preceded by an asterisk: *RST *IDN? *SRE 8

Subsystem commands perform specific dc source functions. They are organized into an inverted tree structure with the "root" at the top. The following figure shows a portion of a subsystem command tree, from which you access the commands located along the various paths. You can see the complete tree in Appendix. D.

ROOT

 

 

 

 

 

 

 

 

:OUTPut

 

 

[:STATe]

 

 

[:STATe]

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

:OSCProtect

 

 

 

 

 

 

 

 

 

 

 

 

 

 

:PROTection

 

 

:CLEar

 

 

 

 

 

 

 

 

 

:STATus

 

 

:OPERation

 

 

[:EVEN]?

 

 

 

 

 

 

 

 

 

 

 

 

 

:CONDition?

 

 

 

 

 

 

 

 

Figure 4-1. Partial Command Tree

32

Image 32
Contents USER’S Guide Agilent Technologies Model N3280A Component Test DC SourceWarranty Information CertificationSafety Summary GeneralSafety Symbols Declaration Acoustic Noise Information Printing HistoryTable of Contents Types of Scpi Commands Scpi Command Completion Using Device ClearExternal References Gpib Capabilities of the DC Source Introduction to ScpiScpi Programming Commands At a Glance Calibration Commands Measurement CommandsOutput Commands Status CommandsSystem Commands Trigger CommandsCommon Commands Voltage Priority TestsTransient Response Tests Error Number List 103Ripple and Noise Tests Page Safety Considerations Document OrientationOptions and Accessories DescriptionRemote Programming Option DescriptionOutput Characteristics Voltage Priority OperationOutput Characteristic Current Priority Current Priority OperationMeasurement Characteristics Start of a Measurement Cleaning InspectionDamage Packaging Material Additional ItemsLocation Bench OperationRack Mounting Do not block the fan exhaust at the rear of the unitPower Connections Connect the Power CordOutputs 1 Turn the unit off before connecting any wiresOutput Connections Current Ratings Voltage Drops and Lead ResistanceAmpacity and Resistance of Stranded Copper Conductors AWG No Maximum Ampacity Resistance at 20 deg. C Free airCoaxial Guard Connections Guard Connections for Test FixturesExternal Trigger Connections Computer ConnectionsMaintaining Stability OVP ConsiderationsSettings for Power Module Configuration Switch Switch SettingSwitch Setting Address Gpib AddressFront Panel Description Explanation Checkout ProcedureProcedure Selftest Error Messages Runtime Error MessagesPower-On Selftest Errors Case of TroublePage External References Gpib Capabilities of the DC SourceGpib References Scpi ReferencesConventions Used in This Guide Types of Scpi CommandsIntroduction to Scpi Multiple Commands in a Message Including Common CommandsUsing Queries Moving Among SubsystemsChannel List Parameter Types of Scpi MessagesMessage Unit Scpi Data Formats Scpi Command Completion Suffixes and MultipliersResponse Data Types Class Suffix Unit Unit with MultiplierUsing Device Clear Outputstate ExamplePage Power-on Initialization IntroductionProgramming the Output Enabling the OutputOutput Current Output ModeOvervoltage Protection Output Trigger Model Triggering Output ChangesOscillation Protection Selecting the Output Trigger Source Setting the Voltage and Current Trigger LevelsEnabling the Output Trigger System Average Measurements Making MeasurementsGenerating Output Triggers Power Line Cycles Measurement Samples and Time IntervalTriggered Measurements Current RangesWindow Functions Returning All Measurement Data From the Data BufferSelecting the Measurement Trigger Source Measurement Trigger ModelEnabling the Measurement Trigger System Generating Measurement Triggers Output Settling DelaySelecting the Sensing Function Pre-trigger and Post-trigger Data Acquisition Pre-trigger and Post-trigger AcquisitionProgramming the Status Registers DC Source Status ModelBit Configurations of Status Registers Operation Status GroupQuestionable Status Group Standard Event Status GroupStatus Byte Register MSS and RQS BitsDetermining the Cause of a Service Interrupt Servicing Operation Status and Questionable Status EventsProgramming Parameters Subsystem CommandsCommon Commands Save new cal constants in non-volatile memory Scpi Programming Commands At a GlanceSubsystem Commands Syntax Mode mode, @list DELay FUNCtion Mode mode, @list VOLTageSets the output voltage in voltage priority mode Sets the triggered output voltage in voltage priority modeCommon Commands Syntax ESE nSRE n Output Programming ParametersCalibration Commands CALibrateCURRentCALibrateCURRentLIMitPOSitive CALibrateCURRentLIMitNEGative CALibrateCURRentMEASureCALibratePASSword CALibrateDATACALibrateDATE CALibrateLEVelCALibrateVOLTage CALibrateSAVECALibrateSTATe Measurement Commands FETChARRayCURRent? FETChARRayVOLTage?FETChCURRent? FETChVOLTage? Query SyntaxMEASureARRayCURRent? MEASureARRayVOLTage? MEASureCURRent? MEASureVOLTage?SENSeCURRentRANGe Enter values greater than 0.015ASENSeFUNCtion SENSeSWEepNPLCyclesSENSeSWEepOFFSetPOINts Query Syntax SENSeFUNCtion? @channel listSENSeWINDow SENSeSWEepPOINtsSENSeSWEepTINTerval Output Commands OUTPutOUTPutOSCProtect OUTPutPROTectionCLEarDefault Suffix SOURceCURRentIMMediate SOURceCURRentTRIGgeredSOURceCURRentLIMitIMMediate SOURceCURRentLIMitTRIGgered SOURceCURRentLIMitBWIDthSOURceCURRentMODE SOURceCURRentLIMitMODE SOURceDELaySOURceDELayMODE SOURceFUNCtionMODE SOURceVOLTageALCBWIDthSOURceVOLTageIMMediate SOURceVOLTageTRIGgered Query Syntax SOURceFUNCMODE? @channel listSOURceVOLTageMODE SOURceVOLTagePROTectionSTATeQuery Syntax SOURceVOLTagePROTectionSTATe? @channel list NR10 orStatus Commands STATusOPERationENABleBit Configuration of Operation Status Registers STATusOPERationEVENt?STATusPRESet Parameters Preset ValueCommand Syntax STATusPRESet Parameters None Examples STATusOPERationNTR STATusOPERationPTRSTATusQUEStionableENABle Query Syntax STATusQUEStionableENABle? @channel listSTATusQUEStionableCONDition? STATusQUEStionableNTR STATusQUEStionablePTRSYSTemVERSion? System CommandsSYSTemERRor? Trigger Commands ABORtINITiateNAME TRIGgerACQuireTRIGgerACQuireSOURce TRIGgerTRANsientSOURceTRIGgerTRANsient RST ValueCommon Commands Command Syntax *CLS Parameters NoneParameters Power-On Value Examples Bit Configuration of Standard Event Status Enable RegisterQuery Syntax *OPT? Returned Parameters Aard Field InformationExample Power-on Value RST SettingsBit Configuration of Status Byte Register Query Syntax TST? Returned Parameters NR1Table A-1. Specifications Table A-2 Supplemental Characteristics Output Common Mode SafetyDimensions WeightFigure A-1. Output Impedance Graphs all outputs Equipment Required Performance & Verification Tests Measurement TechniquesProgramming Test SetupElectronic Load Program Commands Voltage Priority TestsVoltage Programming and Readback Accuracy Positive Current Limit +CLAction Program Commands Negative Current Limit -CLCurrent Priority Tests Current Programming and Readback AccuracyLoad Effect Tests Voltage Priority, Constant Voltage Load EffectVoltage Priority, +Current Limit Load Effect Voltage Priority, -Current Limit Load Effect TestVoltage Priority, Constant Voltage Source Effect Source Effect TestsCurrent Priority Constant Current Test Voltage Priority, +Current Limit Source Effect Voltage Priority, -Current Limit Source EffectCurrent Priority, Constant Current Source Effect Ripple and Noise Tests Voltage Priority Ripple and NoiseCurrent Priority Ripple and Noise Voltage Priority, Transient Recovery TimeTransient Response Tests Current Priority Transient Recovery Time Figure B-2. Transient Waveform Voltage PriorityPerformance Test Equipment Form Figure B-3. Transient Waveform Current PriorityPerformance Test Record Form Performing the Calibration Procedure Enable Calibration ModeNegative Current Limit Calibration Positive Current Limit Calibration5A Range Current Measurement Calibration 100101 15mA Range Current Measurement CalibrationSaving the Calibration Constants Changing the Calibration Password Calibration Error MessagesTable B-3. Gpib Calibration Error Messages Error Meaning103 Error Number ListTable C-1. Error Numbers Error Messages 104Error Messages C 105Page Line Voltage Selection 107Page Earlier Version Output Connectors Mating Connector Part NumbersRear Panel Pinout Assignments CHG-2010-J01010-KEPPage Index 111Index 112113 Scpi114 United States Latin America Canada Australia/New ZealandEurope Asia Pacific JapanManual Updates