Fluke PM6681R, PM6685R manual MEASure?, CONFigure READ?, SEND→ MEASureFREQ?20MHz,1

Page 77

Using the Subsystems

Measurement Function

The Measure function group has a differ- ent level of compatibility and flexibility than other commands. The parameters used with commands from the Measure group describe the signal you are going to measure. This means that the Measure functions give compatibility between in- struments, since you don’t need to know anything about the instrument you are us- ing.

MEASure?

This is the most simple query to use, but it does not offer much flexibility. The MEASure? query lets the instrument con- figure itself for an optimal measurement, starts the data acquisition, and returns the result.

￿Example:

SENDMEASure:FREQ?

This will execute a frequency measurement and the result will be sent to the controller. The instrument will select a setting for this purpose by itself, and will carry out the re- quired measurement as “well” as possible; moreover, it will automatically start the measurement and send the result to the controller.

You may add parameters to give more

details about the signal you are going to measure, for example:

SENDMEASure:FREQ?￿20￿MHz,1

Where: 20 MHz is the expected value, which can, of course, also be sent as 20E6, and 1 is the required resolution. (1 Hz)

Also the channel numbers can be speci- fied, for example:

SENDMEASure:FREQ?￿(@3)

SENDMEASure:FREQ?￿20E6,

1,(@1)

CONFigure; READ?

The CONFigure command causes the in- strument to choose an optimal setting for the specified measurement. CONFigure may cause any device setting to change. READ? starts the acquisition and returns the result.

This sequence operates in the same way as the MEASure command, but now it is possible to insert commands between CONFigure and READ? to fine tune the setting of a particular function. For exam- ple, you can change the input impedance from 1 MΩ to 50 Ω.

Measurement Function 6-9

Image 77
Contents Timer/Counter/ Analyzers Pendulum Instruments AB Sweden Table of Contents Diagnostics Subsystem Configure FunctionAbort Arming SubsystemCommon Commands Sense Command SubsystemMemory Subsystem Output SubsystemIndex Getting Started Index SectionsMnemonic Conventions Syntax Specification FormManual Conventions Example Language Setting Up InstrumentSetting the Gpib Address Testing the Bus Power-onInterface Functions What can I do with the Bus?Listener Function, L4 Service Request, SR1Remote/Local, RL1 Parallel Poll, PP0Bus Commands for the Benchtop User INPATT110 Error CodeINPLEVlevel INP2ATT110ACQHOFFTIMEtime These commands are from the Sense subsystemSystpres or *RST ACQAPERtime FUNCfunctionchannel,channelMemory location can be any No. between 0 Calcavertypemaxminsdevmean Selects statistical functionSAVmemory location*RCLmemory location FUNCTOT1,2 All commands on this page are from the Sense subsystemOUTPSCALscaling factor SYSTCOMMGPIBADDRAddress This command is from the Sense subsystemDefault settings after *RST Default settings after *RSTIntroduction to Scpi What is SCPI? What is SCPI?Reason for Scpi CompatibilityGpib Management and Maintenance of ProgramsHow does Scpi Work in the Instrument? How does Scpi Work in the Instrument?Message Exchange Control protocol Sequential and Overlapped Commands Deferred CommandsProtocol Requirements Order of ExecutionDefinitions Remote Local ProtocolSyntax and Style Program and Response MessagesSyntax of Program Messages Program and Response MessagesPage Responses Notation Habit in Command SyntaxSyntax of Response Messages Command Tree Moving down the Command TreeExample SEND→ InputfilteronNumeric Data ParametersBoolean Data KeywordsSummary Other Data Types Expression DataSEND→ Systtouton or SYSTTOUT1 #218INPIMP50SENS10Macros Define Macro CommandMacro Names Data Types within MacrosEnabling and Disabling Macros How to Execute a MacroDeleting Macros LMC? Learn Macro Query GMC? Get Macro Contents QueryRetrieve a Macro Status Reporting System Status Reporting SystemIntroduction Detecting Errors in the Queue Error ReportingRead the Error/Event Queue Standardized Error NumbersQuery Error Execution ErrorDevice-specific Error Reset Strategy Initialization and ResettingBus Initialization Message Exchange Initialization*CLS Command *RST CommandProgramming Examples Introduction IntroductionGW-Basic for National Instruments PC-IIA Setting up the interfaceLimit Testing 180 ‘ Armdelay = 90 ‘ 100 ‘ 110 ‘ -- Enable arming, etcFrequency Profiling 50 ‘Call IBRDCNT%, MSG$ 270 WRT$ = Armdel + STR$ARMDELAY Call IBWRTCNT%, WRT$PRINT#1, STR$ARMDELAY, LEFT$MSG$, INSTRMSG$, CHR$10 Call Ibwait CNT%, Mask Fast Sampling600 ‘ Close 620 END 510 MSG$ = SPACE$255180 ‘ -- SET Service Request Enable 130 ‘ -- SET Event Status Enable260 ‘ -- Enter Command String and Send to Counter Status Reporting410 ‘ -- Check Message Available BIT While SPR% 650 ‘ -- Read Error MessagesLfpos 520 ‘ -- Check Event Status BITPrint Waiting for Measurement to GET Ready Statistics330 WRT$ = Calcavertype MAX CALCIMM? Call Ibwrt CNT%, WRT$ Call Ibrd CNT%, MSG$ Print Maximum = LEFT$MSG$, IBCNT%470 WRT$ = Calcavertype Mean CALCIMM? Call Ibwrt CNT%, WRT$ Call Ibrd CNT%, MSG$ Print Minimum = LEFT$MSG$, IBCNT%Call Ibrd CNT%, MSG$ Print Mean = LEFT$MSG$, IBCNT% 540 WRT$ = Calcavertype Sdev CALCIMM? Call Ibwrt CNT%, WRT$‘C’ for National Instruments PC-IIA ‘C’ for National Instruments14 ‘C’ for National Instruments PC-IIA, Limit Testing ‘C’ for National Instruments PC-IIA, Real Data Format Real Data FormatOfp 16 ‘C’ for National Instruments PC-IIA, Frequency ProfilingFile Capture Profile 17 ‘C’ for National Instruments PC-IIA, Frequency Profiling18 ‘C’ for National Instruments PC-IIA, Fast Sampling ‘C’ for National Instruments PC-IIA, Fast Sampliing 20 ‘C’ for National Instruments PC-IIA, Statistics ‘C’ for National Instruments PC-IIA, Statistics This side is intentionally left blank 22 ‘C’ for National Instruments PC-IIAInstrument Model Function Instrument Examples Type INPut Measurement Function BlockSENSe CALCulateOrder of Execution Other SubsystemsMEASurement Function CONFigure READ?MEASure? MEASurement FunctionREAD? CONFigure INITiateFETCh?Versatility of Measurement Com- mands Using the Subsystems Introduction Statistics MathematicsLimit Monitoring Calculate SubsystemCalibration Subsystem PM6680B, PM6685PM6681 Configure Function Configure FunctionFormat Subsystem Time Stamp Readout FormatInput Subsystems PM6685PM6680B/PM6681 2Summary of PM6680B / PM6681 input amplifier settingsMEASure? CONFigure READ?SEND→ MEASureFREQ? SEND→ MEASureFREQ?20MHz,1Versatility of measurement com Mands CONFigureINITiateFETCh?SEND→ READ? Output Subsystem Scaling FactorSame exponent, opposite sign ResolutionPrescaling SwitchboxSense Command Subsystem Status Reporting Model Using the RegistersStatus Structure Status Subsystem7654 3210 Using the Queues Clearing/Setting all bitsStatus of the Error Message Queue EAV Using the Status ByteIc e Selecting Summary Message to GenErate SRQ Reading and Clearing Status Setting up the Counter to Report StatusStatus Byte Status Event RegistersSet up Why Two Types of Registers?Status Condition Registers Check & ActionG ic a Standard Status RegistersA t u s B y t e G i s t e rSummary, Standard Event Status Reporting Standard Event Status RegisterSCPI-defined Status Registers Reporting Operation Status GroupSummary, Operation Status Data/Signal Status Reporting Questionable Data/SignalStatus Group Summary QuestionableDevice-defined Status Structure Error QueueSummary, Device-defined Status Reporting Power-on Status ClearPreset the Status Reporting Structure Trigger/Arming Subsystem ARM-TRIG Trigger ConfigurationInstrument Action Forward Traversing an Event-detection Layer Structure of the Idle and Initiated StatesStructure of an Event-detection Layer When to use *TRG and GET TRG Trigger CommandTriggering Backward Traversing an Event-detection LayerE n t d e t e c t i o n l oa ny e er a c h a r m E n t d e t e c t i o n l a y e rHow to Measure Fast Measurement Cycle Synchronization Controller SynchronizationStart StopDescription Rough TriggerSubsystem Some Basic Commands MEASFREQ? CommandData Format MEASMEM1? MEASMEM?1 RCL 1READ?Initcont and GET Individually Synchronized MeasurementsBasic Measurement Method ARMSTARTLAY2SOURceBUSBlock Synchronized Measurements General Speed ImprovementsREADARRay? Init + GET + FETCHARRay?Display Control Time Measurement ResolutionGpib Data Format Automatic Interpolator Calibration PM6680B/85Ments/second MeasureBlock Measurements Real Time CalculationObvious Method Supervising a ProcessOptimal Method Supervising a ProcessSpeed Summary Speed SummaryDead Time Between Measurements Including Transfer to Controller Ascii Data Format Real Data FormatE e d D i v i d u a l l y s y n c . m e a s Speed Improvement Actions Block Synchronized MeasurementsDead Time Between Measurements PM6680B PM6681 PM6685Speed Calculating the MeasurementFreq Timesaving Com Time Gain in ms Sacrifice MandsSingle Speed Switch Command for PM6681 Single Speed Switch Command for PM6680B/85Error Messages Error Code 0 to Read the Error/Event QueueSEND→ SYSTemERRor? READ← -100, Command Error Command ErrorsError Code -105 to -120 More specific error Error Code -121 toDetect a more specific error Ular error message is used when the counter cannotError Code -151 to -170 Error Code -171 to Error Code -200 to -221 Execution errors Error Code -222 toError message is used when the counter cannot de Tect the more specific errors described for errorsError Code -241 to -272 Macro label was already defined see Error Code -273 toHeader syntax Error Code -300 to -350 Query errors Error Code -400 toUnsupported enu Merated command Error Code 1100 to -1139Unsupported auto Command Unsupported single Shot commandReset during bus Error Code 1150 toOutput Read, but the waiting was broken by the operator Some PC controller cards has been known to doParser error Generic error in the parser Error Code 1214 to -1240This page is intentionally left blank Command Reference Command Reference Abort Abort Measurement ABORtPM6680B/81/85 Aborts all previous measurements if *WAI is not usedArming Subsystem No. of Measurements on each Bus arm ARM COUNt«Numeric valueMINMAX» PM6680B/81/85 Send ARMCOUN100Delay after External Start Arming ARM DELayARM ECOunt External Events before Start ArmingARM LAYer2 SOURce ARM LAYer2Bus Arming Override Bus Arming On/OffARM SOURce ARM SLOPeExternal Arming Start Slope External Arming Start SourceDelay after External Stop Arming ARM Stop DELayARM Stop ECOunt External Events before Stop ArmingARM Stop SOURce ARM Stop SLOPeExternal Stop Arming Slope External Stop Arming SourceThis page is intentionally left blank Calculate Subsystem CALCulate AVERage COUNt Enable StatisticsCALCulate AVERage STATe Sample Size for StatisticsStatistical Type CALCulate AVERage TypeFetch calculated data Send Calcmathstat Oncalcmath X 10.7E6INIT *OPCCALCulate IMMediate Enable Monitoring of Parameter LimitsCALCulate LIMit Recalculate DataCALCulate LIMit LOWer CALCulate LIMit FAIL?Limit Fail Set Low LimitCALCulate LIMit LOWer STATe Set Upper LimitCALCulate LIMit UPPer Check Against Lower LimitCheck Against Upper Limit CALCulate LIMit UPPer STATeSelect Mathematical Expression CALCulate MathExpression Sendcalcmath X 10.7E6MATHSTATE ONREAD?This example switches on mathematics Enable MathematicsCALCulate Math STATe No calculationSwitches on Post Processing Enable CalculationCALCulate STATe Send CalcstatCalibration Subsystem CALibration INTerpolator Auto ‘How to Measure Fast’Calibration of Interpolator Boolean OnceSet up Instrument for Measurement Configure FunctionConfigure the counter for a single measurement CONFigure Measuring FunctionParameters,channels Send CONFFREQRAT@3,@1Configure the counter for an array of measurements CONFigure ARRay Measuring FunctionSend Confarrper 7,5E-3,1E-6,@4 Send READARR?This page is intentionally left blank Diagnostics Subsystem Input comparator hysteresis calibration DIAGnosticCALibrationINPut12HYSTeresisSend Diagcalinphyst Once This string calibrates both input a and input BDisplay Subsystem Where Boolean = 1 / on 0 / OFF DISPlay ENABleSee also , ‘How to Measure Fast’ Display StateFetch Function Fetch One Result FETCh?«fetch array sizeMAX» FETCh ARRay?Fetch an Array of Results Returned format data,data Format Subsystem Response Data Type FORMatFORMat SREGister FORMat FIXedResponse Data Format Data Type for Status MessagesTimestamping On/Off TimestampingOn/Off FORMat TINFormationInitiate Subsystem INITiate CONTinuous INITiateInitiate Measurement Continuously InitiatedInput B Not PM6685 Input SubsystemsAC/DC Coupling INPut«12» ATTenuationINPut«12» COUPling INPut HYSTeresis INPut FILTerLow Pass Filter SensitivityAuto Sensitivity INPut HYSTeresis Auto«BooleanONCE» Send Inphystauto OFFINPut«12» LEVel INPut«12» IMPedanceInput Impedance Fixed Trigger LevelWaveform compensation INPut LEVel«Decimal dataMAXMIN» PM6685 Send Inplev 3.75LEVAUTOAutotrigger INPut LEVel AutoSend Inplevauto OFF Send INP2LEVAUTO onAutotrigger INPutAUTO? Trigger Slope INPut«124» SLOPeINPut2COMMon This page is intentionally left blank Measurement Function Set up the Instrument, Perform Measurement, and Read DataRISETIME? Tion, @1@3@4@5@6 Make one measurement MEASure Measuring Function?Parameters ,channels PM6680B/81/85 Send MEASFREQ? @3 Read 1.78112526833E+009Make an array of measurements MEASure ARRay Measuring Function?Send MEASARRFREQ? Ten measuring results will be returnedMEASureMEMoryN? Data Format CommandMEASureMEMory? Memory Recall, Measure and Fetch ResultPositive Duty Cycle MEASure«DCYCle/PDUTycycle»Send MEASPDUT? Read +5.097555E-001MEASure FREQuency? Expected value,resolution ,@«1234567» PM6680B/81/85Frequency This example measures the frequency at input CBurst Carrier Frequency Expected value,resolution ,@«1234567»MEASure FREQuency BURSt? Exp. val.,res.,@«1234567» PM6680B/81/85 MEASure FREQuency PRF?Pulse Repetition Frequency Fall-time MEASure FREQuency RATio?Frequency Ratio Send MEASFREQRAT? @1,@3 Read 2.345625764333E+000MEASure Volt MINimum? MEASure Volt MAXimum?Positive Peak Voltage Negative Peak VoltageMEASure PWIDth? MEASure NWIDth?Negative Pulse Width Positive Pulse WidthMEASure«NDUTycycle»? MEASure«PDUTycycle/ DCYCle»?Positive duty cycle Duty Factor Negative duty cycle Duty FactorPhase MEASure PHASe?MEASure PERiod? PeriodMEASure Rise TIME? MEASure Volt PTPeak?Peak-to-Peak Voltage Rise-time@«124»,@«124» MEASure TINTerval?Time-Interval Time for gate open,@«12456» ,@«12456» PM6680B PM6681 MEASure TOTalize ACCumulated?Totalize X gated by Y, accumulated Totalize Manually PM6680B/81/85CONFigure TOTalize CONTinuous@«1246»,@«1246» Send CONFTOTINPSLOPe negMEASure TOTalize SSTop? MEASure TOTalize GATed?Totalize X gated by Y Totalize X start/stop by YMEASure TOTalize TIMed? Totalize X-Y During a Preset TimeTime for gate open ,@«124»,@«124» Send MEASTOTTIM? 1,@1,@1This page is intentionally left blank Memory Subsystem Related Common CommandsMEMory Free SENSe? MEMory DELete MACRoDelete one Macro Memory Free for resultsMemory States Memory Free for MacrosBytes available, Bytes used Number of states availableThis page is intentionally left blank Output Subsystem OUTPut Enable Analog OutOUTPut SCALe Scaling Factor, Analog OutputPerform Measurement and Read Data Read FunctionSend Conffreqinpfilt ONREAD? Read one ResultRead an array of results READARRay?«array size for FETChMAX» Send Armcoun 10READARR?This page is intentionally left blank Sense Subsystem command tree for PM6680B and PM6681 Sense Command SubsystemSense Subsystem command tree for PM6685 Set the Measurement Time ACQuisition APERture«Decimal value MINMAX» Decimal value 10 msACQuisition Hoff ECOunt ACQuisition HoffHold Off On/Off Hold Off, set event counterHold Off Mode ACQuisition Hoff ModeACQuisition Hoff Time Hold Off TimeACQuisition RESolution «Decimal dataMIN MAX» AVERage COUNtAverage Samples FREQuency RANGe LOWer AVERage STATeAverage or Single? High Speed Voltage MeasurementsSelect Measuring Function FUNCtionFunctions and channels in PM6685 Input channels PM6685Input channels PM6680B and PM6681 Functions and channels in PM6680B and PM6681Internal Format INTernal FORMatNumber of Results BufferBURST/PRF Synchronization Delay SDELayROSCillator SOURce Select Reference OscillatorVOLTageGATedSTATe TOTalize GateGate On/Off Gated Voltage MeasurementThis page is intentionally left blank Status Subsystem Related Common CommandsEnable Device Status Reporting STATus DREGister0 ENABleBit No Weight Condition STATus DREGister0?Read Operation Status Condition Register STATus OPERation CONDition?Enable Operation Status Reporting STATus OPERation ENABleSend Statoperenab 288Read Operation Status, Event STATusPRESet valuesSTATusOPERation? STATus QUEStionable CONDition? Read Questionable Data/Signal Condition RegisterEnable Questionable Data/Signal Status Reporting STATus QUEStionable ENABleRead Questionable Data/Signal Event Register STATus QUEStionable?This page is intentionally left blank System Subsystem Related common commandSYSTem COMMunicate Gpib ADDRess SYSTem ERRor?Set Gpib Address Send SystcommgpibaddrPreset SYSTem PRESetSignal Detection See also Default settings onSYSTem SET Read or Send SettingsSYSTem Time ELAPsed? Read On-timeTimeout, Set Timeout On/OffSYSTem Tout SYSTem Tout TimeSYSTem VERSion? SYSTem UNPRotectUnprotect System VersionTest Subsystem TESTCHECk Select Check signalTest SELect Select Self-testsTrigger Subsystem Send Trigcoun TRIGgerCOUNtNo. of Triggerings on each Ext Arm start Common Commands Send *CLS Clear Status CommandSend AMPLITUDE? Define MacroRead +3.46125461E-001+3.64852399E-001 Send Autofilt OFFEnables macro expansion and execution Enable MacrosDecimal data PM6680B/81/85 SEND*EMCOperation Complete Standard Event Status EnableEvent Status Enable Register 1 = enable Get Macro Definition Event Status RegisterMacro label PM6680B/81/85 Send *GMC? ‘AMPLITUDE?’Learn Macro Identification queryMain READAUTOFILT,AMPLITUDE?Send INIT*OPC Learn Device SetupOperation Complete Option Identification Operation Complete QueryExample 6 is Chapter Bus option,Prescaler optionThis example enables automatic power-on clearing Power-on Status ClearPurge Macros Removes all macro definitionsRecall Protected User DataThis command removes an individual MACRo PM6680B/81/85 ResetDefault settings on ‘Macro name’ is the name of the macro you want to deleteSend *SAV SaveDecimal data = a number between 1 Service Request Enable Register 1 = enable Service Request EnableARMSTARtLAYer2IMM *WAIFETCh? Status Byte QuerySend ARMSTARTLAY2SOURCE BUS Send Initcont on Read +3.2770536E+004Self Test Integer = PM6680B Error PM6681, PM6685 Er RorWait-to-continue SENDMEASFREQ? *WAIMEASPDUT?Index Auto AddressAuto calibration on/off· · · · · · · · · · · 9-24Average Average or Single? · · · · · · · · · · · · ·Burst Command Error CMEBus CalculateARMSEQuence1LAYer1ECOunt CONFigureTOTalizeACCumulatedSTATusQUEStionableCONDition? SENSeFREQuencyRANGeLOWerSTATusOPERationCONDition? Device dependent Error DDE DelayDevice Status Register DisplayExecution EventsExternal Events before Start Arming Fail Limit · · · · · · · · · · · · · · · · · · · · · · ·Initiated state · · · · · · · · · · · · · · · · · 6-28Input Hysteresis · · · · · · · · · · · · · · · · · · · ·Measuring Lower LimitOperation Status MonitorQUE · · · · · · · · · · · · · · · · · 9-130 9-131Query PulseResponse ResultSet SettingsStop arming · · · · · · · · · · · · · · · · · 9-11Source SpeedTime out For measurement TIO · · · · · · · 6-24Timebase TestTime Upper Limit See Also Command *TRG