Agilent Technologies N3280A manual Multiple Commands in a Message, Moving Among Subsystems

Page 33

Introduction to Programming - 4

Multiple Commands in a Message

Multiple SCPI commands can be combined and sent as a single message with one message terminator. There are two important considerations when sending several commands within a single message:

Use a semicolon to separate commands within a message.

There is an implied header path that affects how commands are interpreted by the dc source.

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 separator. An example of a message with two commands is:

OUTPut:STATe ON,(@1);PROTection:CLEar (@1)

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 "OUTPut" was omitted because after the "OUTPut:STATe ON" command, the header path was became defined as "OUTPut" and thus the instrument interpreted the second command as:

OUTPut:PROTection:CLEar (@1)

In fact, it would have been syntactically incorrect to include the "OUTP" explicitly in the second command, since the result after combining it with the header path would be:

OUTPut:OUTPut:PROTection:CLEar (@1)

which is incorrect.

Moving Among Subsystems

In order to combine commands from different subsystems, you need to be able to reset the header path to a null string within a message. You do this by beginning the command with a colon (:), which discards any previous header path. For example, you could clear the output protection and check the status of the Operation Condition register in one message by using a root specifier as follows:

OUTPut:PROTection:CLEar(@1);:STATus:OPERation:CONDition?(@1)

The following message shows how to combine commands from different subsystems as well as within the same subsystem:

VOLTage:LEVel 7.5,(@1);PROTection ON,(@1);:CURRent:LIMit 0.25,(@1)

Note the use of the optional header LEVel to maintain the correct path within the subsystems, and the use of the root specifier to move between subsystems.

Including Common Commands

You can combine common commands with system commands in the same message. Treat the common command as a message unit by separating it with a semicolon (the message unit separator). Common commands do not affect the header path; you may insert them anywhere in the message.

VOLTage:TRIGgered 10,(@1);:INITiate:NAME TRAN;*TRG

OUTPut OFF,(@1);*RCL 2;OUTPut ON,(@1)

Using Queries

Observe the following precautions with queries:

Add a blank space between the query indicator (?) and any subsequent parameter such as a channel.

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.

33

Image 33
Contents Agilent Technologies Model N3280A Component Test DC Source USER’S GuideCertification Warranty InformationGeneral Safety SummarySafety Symbols Declaration Printing History Acoustic Noise InformationTable of Contents Scpi Command Completion Using Device Clear Types of Scpi CommandsExternal References Gpib Capabilities of the DC Source Introduction to ScpiMeasurement Commands Scpi Programming Commands At a Glance Calibration CommandsOutput Commands Status CommandsTrigger Commands System CommandsCommon Commands Voltage Priority TestsError Number List 103 Ripple and Noise TestsTransient Response Tests Page Document Orientation Safety ConsiderationsDescription Options and AccessoriesRemote Programming Option DescriptionVoltage Priority Operation Output CharacteristicsCurrent Priority Operation Output Characteristic Current PriorityMeasurement Characteristics Start of a Measurement Inspection CleaningDamage Packaging Material Additional ItemsBench Operation LocationRack Mounting Do not block the fan exhaust at the rear of the unitConnect the Power Cord Power ConnectionsTurn the unit off before connecting any wires Output ConnectionsOutputs 1 Voltage Drops and Lead Resistance Current RatingsAmpacity and Resistance of Stranded Copper Conductors AWG No Maximum Ampacity Resistance at 20 deg. C Free airGuard Connections for Test Fixtures Coaxial Guard ConnectionsComputer Connections External Trigger ConnectionsMaintaining Stability OVP ConsiderationsSwitch Setting Settings for Power Module Configuration SwitchSwitch Setting Address Gpib AddressFront Panel Description Checkout Procedure ProcedureExplanation Runtime Error Messages Selftest Error MessagesPower-On Selftest Errors Case of TroublePage Gpib Capabilities of the DC Source External ReferencesGpib References Scpi ReferencesTypes of Scpi Commands Introduction to ScpiConventions Used in This Guide Including Common Commands Multiple Commands in a MessageUsing Queries Moving Among SubsystemsTypes of Scpi Messages Message UnitChannel List Parameter Scpi Data Formats Suffixes and Multipliers Scpi Command CompletionResponse Data Types Class Suffix Unit Unit with MultiplierOutputstate Example Using Device ClearPage Introduction Power-on InitializationProgramming the Output Enabling the OutputOutput Mode Overvoltage ProtectionOutput Current Triggering Output Changes Oscillation ProtectionOutput Trigger Model Setting the Voltage and Current Trigger Levels Enabling the Output Trigger SystemSelecting the Output Trigger Source Making Measurements Generating Output TriggersAverage Measurements Measurement Samples and Time Interval Power Line CyclesCurrent Ranges Triggered MeasurementsWindow Functions Returning All Measurement Data From the Data BufferMeasurement Trigger Model Enabling the Measurement Trigger SystemSelecting the Measurement Trigger Source Output Settling Delay Selecting the Sensing FunctionGenerating Measurement Triggers Pre-trigger and Post-trigger Acquisition Pre-trigger and Post-trigger Data AcquisitionDC Source Status Model Programming the Status RegistersOperation Status Group Bit Configurations of Status RegistersStandard Event Status Group Questionable Status GroupStatus Byte Register MSS and RQS BitsServicing Operation Status and Questionable Status Events Determining the Cause of a Service InterruptSubsystem Commands Common CommandsProgramming Parameters Scpi Programming Commands At a Glance Subsystem Commands SyntaxSave new cal constants in non-volatile memory FUNCtion Mode mode, @list VOLTage Mode mode, @list DELaySets the output voltage in voltage priority mode Sets the triggered output voltage in voltage priority modeESE n Common Commands SyntaxSRE n Output Programming ParametersCALibrateCURRent Calibration CommandsCALibrateCURRentLIMitPOSitive CALibrateCURRentLIMitNEGative CALibrateCURRentMEASureCALibrateDATA CALibratePASSwordCALibrateDATE CALibrateLEVelCALibrateSAVE CALibrateSTATeCALibrateVOLTage FETChARRayCURRent? FETChARRayVOLTage? Measurement CommandsFETChCURRent? FETChVOLTage? Query SyntaxMEASureCURRent? MEASureVOLTage? MEASureARRayCURRent? MEASureARRayVOLTage?SENSeCURRentRANGe Enter values greater than 0.015ASENSeSWEepNPLCycles SENSeFUNCtionSENSeSWEepOFFSetPOINts Query Syntax SENSeFUNCtion? @channel listSENSeSWEepPOINts SENSeSWEepTINTervalSENSeWINDow OUTPut Output CommandsOUTPutOSCProtect OUTPutPROTectionCLEarSOURceCURRentIMMediate SOURceCURRentTRIGgered Default SuffixSOURceCURRentLIMitIMMediate SOURceCURRentLIMitTRIGgered SOURceCURRentLIMitBWIDthSOURceDELay SOURceDELayMODESOURceCURRentMODE SOURceCURRentLIMitMODE SOURceVOLTageALCBWIDth SOURceFUNCtionMODESOURceVOLTageIMMediate SOURceVOLTageTRIGgered Query Syntax SOURceFUNCMODE? @channel listSOURceVOLTagePROTectionSTATe SOURceVOLTageMODEQuery Syntax SOURceVOLTagePROTectionSTATe? @channel list NR10 orSTATusOPERationENABle Status CommandsBit Configuration of Operation Status Registers STATusOPERationEVENt?Parameters Preset Value STATusPRESetCommand Syntax STATusPRESet Parameters None Examples STATusOPERationNTR STATusOPERationPTRQuery Syntax STATusQUEStionableENABle? @channel list STATusQUEStionableENABleSTATusQUEStionableCONDition? STATusQUEStionableNTR STATusQUEStionablePTRSystem Commands SYSTemERRor?SYSTemVERSion? ABORt Trigger CommandsINITiateNAME TRIGgerACQuireTRIGgerTRANsientSOURce TRIGgerACQuireSOURceTRIGgerTRANsient RST ValueCommand Syntax *CLS Parameters None Common CommandsParameters Power-On Value Examples Bit Configuration of Standard Event Status Enable RegisterField Information ExampleQuery Syntax *OPT? Returned Parameters Aard RST Settings Power-on ValueQuery Syntax TST? Returned Parameters NR1 Bit Configuration of Status Byte RegisterTable A-1. Specifications Table A-2 Supplemental Characteristics Safety Output Common ModeDimensions WeightFigure A-1. Output Impedance Graphs all outputs Equipment Required Measurement Techniques Performance & Verification TestsTest Setup Electronic LoadProgramming Voltage Priority Tests Program CommandsVoltage Programming and Readback Accuracy Positive Current Limit +CLNegative Current Limit -CL Action Program CommandsCurrent Programming and Readback Accuracy Current Priority TestsVoltage Priority, Constant Voltage Load Effect Load Effect TestsVoltage Priority, -Current Limit Load Effect Test Voltage Priority, +Current Limit Load EffectSource Effect Tests Current Priority Constant Current TestVoltage Priority, Constant Voltage Source Effect Voltage Priority, -Current Limit Source Effect Voltage Priority, +Current Limit Source EffectCurrent Priority, Constant Current Source Effect Voltage Priority Ripple and Noise Ripple and Noise TestsVoltage Priority, Transient Recovery Time Transient Response TestsCurrent Priority Ripple and Noise Figure B-2. Transient Waveform Voltage Priority Current Priority Transient Recovery TimeFigure B-3. Transient Waveform Current Priority Performance Test Equipment FormPerformance Test Record Form Enable Calibration Mode Performing the Calibration ProcedurePositive Current Limit Calibration Negative Current Limit Calibration5A Range Current Measurement Calibration 10015mA Range Current Measurement Calibration Saving the Calibration Constants101 Calibration Error Messages Changing the Calibration PasswordTable B-3. Gpib Calibration Error Messages Error MeaningError Number List Table C-1. Error Numbers103 104 Error Messages105 Error Messages CPage 107 Line Voltage SelectionPage Mating Connector Part Numbers Earlier Version Output ConnectorsRear Panel Pinout Assignments CHG-2010-J01010-KEPPage 111 Index112 IndexScpi 113114 Canada Australia/New Zealand United States Latin AmericaEurope Asia Pacific JapanManual Updates