Fluke PM6681R, PM6685R manual Calculate Subsystem

Page 143

Calculate Subsystem

:CALCulate

 

 

 

 

:STATe

 

 

￿

ONOFF

:DATA?

 

 

 

 

:IMMediate

 

 

 

 

:MATH

 

 

 

 

[:EXPRession]

 

￿

<Numeric expression>

:STATe

 

 

￿

ONOFF

:AVERage

 

 

 

 

[:STATe]

￿

ONOFF

 

 

:TYPE

 

￿

MINMAXSDEViationMEAN

:COUNt

￿

<Numeric value>MINMAX

:LIMit

 

 

 

 

[:STATe] ￿ ONOFF

 

 

 

 

:UPPer

 

 

 

 

[:DATA]

￿

<Numeric value>MINMAX

:STATe

 

￿

ONOFF

 

:LOWer

 

 

 

 

[:DATA]

￿

<Numeric value>MINMAX

:STATe

 

￿

ONOFF

 

:FAIL?

Command Reference 9-13

Image 143
Contents Timer/Counter/ Analyzers Pendulum Instruments AB Sweden Table of Contents Arming Subsystem Configure FunctionDiagnostics Subsystem AbortOutput Subsystem Sense Command SubsystemCommon Commands Memory SubsystemIndex Getting Started Index SectionsMnemonic Conventions Syntax Specification FormManual Conventions Example Language Setting Up InstrumentSetting the Gpib Address What can I do with the Bus? Power-onTesting the Bus Interface FunctionsParallel Poll, PP0 Service Request, SR1Listener Function, L4 Remote/Local, RL1Bus Commands for the Benchtop User INP2ATT110 Error CodeINPATT110 INPLEVlevelACQHOFFTIMEtime 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 Compatibility What is SCPI?What is SCPI? Reason for ScpiGpib Management and Maintenance of ProgramsHow does Scpi Work in the Instrument? How does Scpi Work in the Instrument?Message Exchange Control protocol Order of Execution Deferred CommandsSequential and Overlapped Commands Protocol RequirementsDefinitions Remote Local ProtocolProgram and Response Messages Program and Response MessagesSyntax and Style Syntax of Program MessagesPage Responses Notation Habit in Command SyntaxSyntax of Response Messages SEND→ Inputfilteron Moving down the Command TreeCommand Tree ExampleKeywords ParametersNumeric Data Boolean Data#218INPIMP50SENS10 Expression DataSummary Other Data Types SEND→ Systtouton or SYSTTOUT1Data Types within Macros Define Macro CommandMacros Macro NamesEnabling 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 Standardized Error Numbers Error ReportingDetecting Errors in the Queue Read the Error/Event QueueQuery Error Execution ErrorDevice-specific Error Message Exchange Initialization Initialization and ResettingReset Strategy Bus Initialization*CLS Command *RST CommandProgramming Examples Introduction IntroductionGW-Basic for National Instruments PC-IIA Setting up the interfaceLimit Testing 50 ‘ 90 ‘ 100 ‘ 110 ‘ -- Enable arming, etc180 ‘ Armdelay = Frequency ProfilingCall 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$255Status Reporting 130 ‘ -- SET Event Status Enable180 ‘ -- SET Service Request Enable 260 ‘ -- Enter Command String and Send to Counter520 ‘ -- Check Event Status BIT 650 ‘ -- Read Error Messages410 ‘ -- Check Message Available BIT While SPR% LfposCall Ibrd CNT%, MSG$ Print Maximum = LEFT$MSG$, IBCNT% StatisticsPrint Waiting for Measurement to GET Ready 330 WRT$ = Calcavertype MAX CALCIMM? Call Ibwrt CNT%, WRT$540 WRT$ = Calcavertype Sdev CALCIMM? Call Ibwrt CNT%, WRT$ Call Ibrd CNT%, MSG$ Print Minimum = LEFT$MSG$, IBCNT%470 WRT$ = Calcavertype Mean CALCIMM? Call Ibwrt CNT%, WRT$ Call Ibrd CNT%, MSG$ Print Mean = LEFT$MSG$, IBCNT%‘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 CALCulate Measurement Function BlockINPut SENSeOrder of Execution Other SubsystemsMEASurement Function CONFigure READ?MEASurement Function MEASure?READ? CONFigure INITiateFETCh?Versatility of Measurement Com- mands Using the Subsystems Introduction Calculate Subsystem MathematicsStatistics Limit MonitoringCalibration Subsystem PM6680B, PM6685PM6681 Configure Function Configure FunctionFormat Subsystem Time Stamp Readout FormatInput Subsystems PM6685PM6680B/PM6681 2Summary of PM6680B / PM6681 input amplifier settingsSEND→ MEASureFREQ?20MHz,1 CONFigure READ?MEASure? SEND→ MEASureFREQ?Versatility of measurement com Mands CONFigureINITiateFETCh?SEND→ READ? Output Subsystem Scaling FactorSame exponent, opposite sign ResolutionPrescaling SwitchboxSense Command Subsystem Status Subsystem Using the RegistersStatus Reporting Model Status Structure7654 3210 Using the Status Byte Clearing/Setting all bitsUsing the Queues Status of the Error Message Queue EAVIc e Selecting Summary Message to GenErate SRQ Status Event Registers Setting up the Counter to Report StatusReading and Clearing Status Status ByteCheck & Action Why Two Types of Registers?Set up Status Condition RegistersG i s t e r Standard Status RegistersG ic a A t u s B y t eSummary, Standard Event Status Reporting Standard Event Status RegisterSCPI-defined Status Registers Reporting Operation Status GroupSummary, Operation Status Summary Questionable Questionable Data/SignalData/Signal Status Reporting Status GroupDevice-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 Backward Traversing an Event-detection Layer TRG Trigger CommandWhen to use *TRG and GET TriggeringE 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 Stop Controller SynchronizationMeasurement Cycle Synchronization StartDescription Rough TriggerSubsystem Some Basic Commands MEASMEM1? MEASMEM?1 RCL 1READ? CommandMEASFREQ? Data FormatARMSTARTLAY2SOURceBUS Individually Synchronized MeasurementsInitcont and GET Basic Measurement MethodInit + GET + FETCHARRay? General Speed ImprovementsBlock Synchronized Measurements READARRay?Automatic Interpolator Calibration PM6680B/85 Time Measurement ResolutionDisplay Control Gpib Data FormatReal Time Calculation MeasureMents/second Block MeasurementsSupervising a Process Supervising a ProcessObvious Method Optimal MethodTransfer to Controller Ascii Data Format Real Data Format Speed SummarySpeed Summary Dead Time Between Measurements IncludingE e d D i v i d u a l l y s y n c . m e a s PM6680B PM6681 PM6685 Block Synchronized MeasurementsSpeed Improvement Actions Dead Time Between MeasurementsSpeed Calculating the MeasurementFreq Timesaving Com Time Gain in ms Sacrifice MandsSingle Speed Switch Command for PM6681 Single Speed Switch Command for PM6680B/85Error Messages Command Errors Read the Error/Event QueueError Code 0 to SEND→ SYSTemERRor? READ← -100, Command ErrorError Code -105 to -120 Ular error message is used when the counter cannot Error Code -121 toMore specific error Detect a more specific errorError Code -151 to -170 Error Code -171 to Error Code -200 to -221 Tect the more specific errors described for errors Error Code -222 toExecution errors Error message is used when the counter cannot deError 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 single Shot command Error Code 1100 to -1139Unsupported enu Merated command Unsupported auto CommandSome PC controller cards has been known to do Error Code 1150 toReset during bus Output Read, but the waiting was broken by the operatorParser error Generic error in the parser Error Code 1214 to -1240This page is intentionally left blank Command Reference Command Reference Abort Aborts all previous measurements if *WAI is not used ABORtAbort Measurement PM6680B/81/85Arming Subsystem Send ARMCOUN100 ARM COUNtNo. of Measurements on each Bus arm «Numeric valueMINMAX» PM6680B/81/85External Events before Start Arming ARM DELayDelay after External Start Arming ARM ECOuntBus Arming On/Off ARM LAYer2ARM LAYer2 SOURce Bus Arming OverrideExternal Arming Start Source ARM SLOPeARM SOURce External Arming Start SlopeExternal Events before Stop Arming ARM Stop DELayDelay after External Stop Arming ARM Stop ECOuntExternal Stop Arming Source ARM Stop SLOPeARM Stop SOURce External Stop Arming SlopeThis page is intentionally left blank Calculate Subsystem Sample Size for Statistics Enable StatisticsCALCulate AVERage COUNt CALCulate AVERage STATeSend Calcmathstat Oncalcmath X 10.7E6INIT *OPC CALCulate AVERage TypeStatistical Type Fetch calculated dataRecalculate Data Enable Monitoring of Parameter LimitsCALCulate IMMediate CALCulate LIMitSet Low Limit CALCulate LIMit FAIL?CALCulate LIMit LOWer Limit FailCheck Against Lower Limit Set Upper LimitCALCulate LIMit LOWer STATe CALCulate LIMit UPPerCheck Against Upper Limit CALCulate LIMit UPPer STATeSendcalcmath X 10.7E6MATHSTATE ONREAD? CALCulate MathSelect Mathematical Expression ExpressionNo calculation Enable MathematicsThis example switches on mathematics CALCulate Math STATeSend Calcstat Enable CalculationSwitches on Post Processing CALCulate STATeCalibration Subsystem Boolean Once ‘How to Measure Fast’CALibration INTerpolator Auto Calibration of InterpolatorSet up Instrument for Measurement Configure FunctionSend CONFFREQRAT@3,@1 CONFigure Measuring FunctionConfigure the counter for a single measurement Parameters,channelsSend READARR? CONFigure ARRay Measuring FunctionConfigure the counter for an array of measurements Send Confarrper 7,5E-3,1E-6,@4This page is intentionally left blank Diagnostics Subsystem This string calibrates both input a and input B DIAGnosticCALibrationINPut12HYSTeresisInput comparator hysteresis calibration Send Diagcalinphyst OnceDisplay Subsystem Display State DISPlay ENABleWhere Boolean = 1 / on 0 / OFF See also , ‘How to Measure Fast’Fetch Function Fetch One Result FETCh?«fetch array sizeMAX» FETCh ARRay?Fetch an Array of Results Returned format data,data Format Subsystem Response Data Type FORMatData Type for Status Messages FORMat FIXedFORMat SREGister Response Data FormatTimestamping On/Off TimestampingOn/Off FORMat TINFormationInitiate Subsystem Continuously Initiated INITiateINITiate CONTinuous Initiate MeasurementInput B Not PM6685 Input SubsystemsAC/DC Coupling INPut«12» ATTenuationINPut«12» COUPling Sensitivity INPut FILTerINPut HYSTeresis Low Pass FilterSend Inphystauto OFF INPut HYSTeresis AutoAuto Sensitivity «BooleanONCE»Fixed Trigger Level INPut«12» IMPedanceINPut«12» LEVel Input ImpedanceSend Inplev 3.75LEVAUTO INPut LEVelWaveform compensation «Decimal dataMAXMIN» PM6685Send INP2LEVAUTO on INPut LEVel AutoAutotrigger Send Inplevauto OFFAutotrigger 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 Send MEASFREQ? @3 Read 1.78112526833E+009 MEASure Measuring Function?Make one measurement Parameters ,channels PM6680B/81/85Ten measuring results will be returned MEASure ARRay Measuring Function?Make an array of measurements Send MEASARRFREQ?Memory Recall, Measure and Fetch Result Data Format CommandMEASureMEMoryN? MEASureMEMory?Read +5.097555E-001 MEASure«DCYCle/PDUTycycle»Positive Duty Cycle Send MEASPDUT?This example measures the frequency at input C Expected value,resolution ,@«1234567» PM6680B/81/85MEASure FREQuency? FrequencyBurst Carrier Frequency Expected value,resolution ,@«1234567»MEASure FREQuency BURSt? Exp. val.,res.,@«1234567» PM6680B/81/85 MEASure FREQuency PRF?Pulse Repetition Frequency Send MEASFREQRAT? @1,@3 Read 2.345625764333E+000 MEASure FREQuency RATio?Fall-time Frequency RatioNegative Peak Voltage MEASure Volt MAXimum?MEASure Volt MINimum? Positive Peak VoltagePositive Pulse Width MEASure NWIDth?MEASure PWIDth? Negative Pulse WidthNegative duty cycle Duty Factor MEASure«PDUTycycle/ DCYCle»?MEASure«NDUTycycle»? Positive duty cycle Duty FactorPeriod MEASure PHASe?Phase MEASure PERiod?Rise-time MEASure Volt PTPeak?MEASure Rise TIME? Peak-to-Peak Voltage@«124»,@«124» MEASure TINTerval?Time-Interval Time for gate open,@«12456» ,@«12456» PM6680B PM6681 MEASure TOTalize ACCumulated?Totalize X gated by Y, accumulated Send CONFTOTINPSLOPe neg PM6680B/81/85CONFigure TOTalize CONTinuousTotalize Manually @«1246»,@«1246»Totalize X start/stop by Y MEASure TOTalize GATed?MEASure TOTalize SSTop? Totalize X gated by YSend MEASTOTTIM? 1,@1,@1 Totalize X-Y During a Preset TimeMEASure TOTalize TIMed? Time for gate open ,@«124»,@«124»This page is intentionally left blank Memory Subsystem Related Common CommandsMemory Free for results MEMory DELete MACRoMEMory Free SENSe? Delete one MacroNumber of states available Memory Free for MacrosMemory States Bytes available, Bytes usedThis page is intentionally left blank Output Subsystem Scaling Factor, Analog Output Enable Analog OutOUTPut OUTPut SCALePerform Measurement and Read Data Read FunctionSend Conffreqinpfilt ONREAD? Read one ResultSend Armcoun 10READARR? READARRay?Read an array of results «array size for FETChMAX»This page is intentionally left blank Sense Subsystem command tree for PM6680B and PM6681 Sense Command SubsystemSense Subsystem command tree for PM6685 Decimal value 10 ms ACQuisition APERtureSet the Measurement Time «Decimal value MINMAX»Hold Off, set event counter ACQuisition HoffACQuisition Hoff ECOunt Hold Off On/OffHold Off Time ACQuisition Hoff ModeHold Off Mode ACQuisition Hoff TimeACQuisition RESolution «Decimal dataMIN MAX» AVERage COUNtAverage Samples High Speed Voltage Measurements AVERage STATeFREQuency RANGe LOWer Average or Single?Input channels PM6685 FUNCtionSelect Measuring Function Functions and channels in PM6685Input channels PM6680B and PM6681 Functions and channels in PM6680B and PM6681Buffer INTernal FORMatInternal Format Number of ResultsSelect Reference Oscillator SDELayBURST/PRF Synchronization Delay ROSCillator SOURceGated Voltage Measurement TOTalize GateVOLTageGATedSTATe Gate On/OffThis page is intentionally left blank Status Subsystem Related Common CommandsSTATus DREGister0? STATus DREGister0 ENABleEnable Device Status Reporting Bit No Weight ConditionRead Operation Status Condition Register STATus OPERation CONDition?288 STATus OPERation ENABleEnable Operation Status Reporting Send StatoperenabRead Operation Status, Event STATusPRESet valuesSTATusOPERation? STATus QUEStionable CONDition? Read Questionable Data/Signal Condition RegisterSTATus QUEStionable? STATus QUEStionable ENABleEnable Questionable Data/Signal Status Reporting Read Questionable Data/Signal Event RegisterThis page is intentionally left blank System Subsystem Related common commandSend Systcommgpibaddr SYSTem ERRor?SYSTem COMMunicate Gpib ADDRess Set Gpib AddressSee also Default settings on SYSTem PRESetPreset Signal DetectionRead On-time Read or Send SettingsSYSTem SET SYSTem Time ELAPsed?SYSTem Tout Time Timeout On/OffTimeout, Set SYSTem ToutSystem Version SYSTem UNPRotectSYSTem VERSion? UnprotectTest Subsystem Select Self-tests Select Check signalTESTCHECk Test SELectTrigger Subsystem Send Trigcoun TRIGgerCOUNtNo. of Triggerings on each Ext Arm start Common Commands Send *CLS Clear Status CommandSend Autofilt OFF Define MacroSend AMPLITUDE? Read +3.46125461E-001+3.64852399E-001SEND*EMC Enable MacrosEnables macro expansion and execution Decimal data PM6680B/81/85Operation Complete Standard Event Status EnableEvent Status Enable Register 1 = enable Send *GMC? ‘AMPLITUDE?’ Event Status RegisterGet Macro Definition Macro label PM6680B/81/85READAUTOFILT,AMPLITUDE? Identification queryLearn Macro MainSend INIT*OPC Learn Device SetupOperation Complete Bus option,Prescaler option Operation Complete QueryOption Identification Example 6 is ChapterRemoves all macro definitions Power-on Status ClearThis example enables automatic power-on clearing Purge MacrosRecall Protected User Data‘Macro name’ is the name of the macro you want to delete ResetThis command removes an individual MACRo PM6680B/81/85 Default settings onSend *SAV SaveDecimal data = a number between 1 Service Request Enable Register 1 = enable Service Request EnableRead +3.2770536E+004 Status Byte QueryARMSTARtLAYer2IMM *WAIFETCh? Send ARMSTARTLAY2SOURCE BUS Send Initcont onSENDMEASFREQ? *WAIMEASPDUT? Integer = PM6680B Error PM6681, PM6685 Er RorSelf Test Wait-to-continueIndex Average or Single? · · · · · · · · · · · · · AddressAuto Auto calibration on/off· · · · · · · · · · · 9-24AverageCalculate Command Error CMEBurst BusARMSEQuence1LAYer1ECOunt CONFigureTOTalizeACCumulatedSTATusQUEStionableCONDition? SENSeFREQuencyRANGeLOWerSTATusOPERationCONDition? Display DelayDevice dependent Error DDE Device Status RegisterFail Limit · · · · · · · · · · · · · · · · · · · · · · · EventsExecution External Events before Start ArmingInitiated state · · · · · · · · · · · · · · · · · 6-28Input Hysteresis · · · · · · · · · · · · · · · · · · · ·Measuring Lower LimitOperation Status MonitorResult PulseQUE · · · · · · · · · · · · · · · · · 9-130 9-131Query ResponseSpeed SettingsSet Stop arming · · · · · · · · · · · · · · · · · 9-11SourceTime out For measurement TIO · · · · · · · 6-24Timebase TestTime Upper Limit See Also Command *TRG