Timer/Counter/ Analyzers
Pendulum Instruments AB Sweden
Table of Contents
Abort
Configure Function
Diagnostics Subsystem
Arming Subsystem
Memory Subsystem
Sense Command Subsystem
Common Commands
Output Subsystem
Index
Getting Started
Sections
Index
Mnemonic Conventions
Syntax Specification Form
Manual Conventions
Example Language
Setting Up Instrument
Setting the Gpib Address
Interface Functions
Power-on
Testing the Bus
What can I do with the Bus?
Remote/Local, RL1
Service Request, SR1
Listener Function, L4
Parallel Poll, PP0
Bus Commands for the Benchtop User
INPLEVlevel
Error Code
INPATT110
INP2ATT110
ACQHOFFTIMEtime
These commands are from the Sense subsystem
Systpres or *RST
FUNCfunctionchannel,channel
ACQAPERtime
Memory location can be any No. between 0
Calcavertypemaxminsdevmean Selects statistical function
SAVmemory location*RCLmemory location
All commands on this page are from the Sense subsystem
FUNCTOT1,2
This command is from the Sense subsystem
OUTPSCALscaling factor SYSTCOMMGPIBADDRAddress
Default settings after *RST
Default settings after *RST
Introduction to Scpi
Reason for Scpi
What is SCPI?
What is SCPI?
Compatibility
Management and Maintenance of Programs
Gpib
How does Scpi Work in the Instrument?
How does Scpi Work in the Instrument?
Message Exchange Control protocol
Protocol Requirements
Deferred Commands
Sequential and Overlapped Commands
Order of Execution
Remote Local Protocol
Definitions
Syntax of Program Messages
Program and Response Messages
Syntax and Style
Program and Response Messages
Page
Responses
Notation Habit in Command Syntax
Syntax of Response Messages
Example
Moving down the Command Tree
Command Tree
SEND→ Inputfilteron
Boolean Data
Parameters
Numeric Data
Keywords
SEND→ Systtouton or SYSTTOUT1
Expression Data
Summary Other Data Types
#218INPIMP50SENS10
Macro Names
Define Macro Command
Macros
Data Types within Macros
Enabling and Disabling Macros
How to Execute a Macro
Deleting Macros
LMC? Learn Macro Query
GMC? Get Macro Contents Query
Retrieve a Macro
Status Reporting System
Status Reporting System
Introduction
Read the Error/Event Queue
Error Reporting
Detecting Errors in the Queue
Standardized Error Numbers
Query Error
Execution Error
Device-specific Error
Bus Initialization
Initialization and Resetting
Reset Strategy
Message Exchange Initialization
*RST Command
*CLS Command
Programming Examples
Introduction
Introduction
Setting up the interface
GW-Basic for National Instruments PC-IIA
Limit Testing
Frequency Profiling
90 ‘ 100 ‘ 110 ‘ -- Enable arming, etc
180 ‘ Armdelay =
50 ‘
Call IBRDCNT%, MSG$
270 WRT$ = Armdel + STR$ARMDELAY Call IBWRTCNT%, WRT$
PRINT#1, STR$ARMDELAY, LEFT$MSG$, INSTRMSG$, CHR$10
Fast Sampling
Call Ibwait CNT%, Mask
510 MSG$ = SPACE$255
600 ‘ Close 620 END
260 ‘ -- Enter Command String and Send to Counter
130 ‘ -- SET Event Status Enable
180 ‘ -- SET Service Request Enable
Status Reporting
Lfpos
650 ‘ -- Read Error Messages
410 ‘ -- Check Message Available BIT While SPR%
520 ‘ -- Check Event Status BIT
330 WRT$ = Calcavertype MAX CALCIMM? Call Ibwrt CNT%, WRT$
Statistics
Print Waiting for Measurement to GET Ready
Call Ibrd CNT%, MSG$ Print Maximum = LEFT$MSG$, IBCNT%
Call Ibrd CNT%, MSG$ Print Mean = LEFT$MSG$, IBCNT%
Call Ibrd CNT%, MSG$ Print Minimum = LEFT$MSG$, IBCNT%
470 WRT$ = Calcavertype Mean CALCIMM? Call Ibwrt CNT%, WRT$
540 WRT$ = Calcavertype Sdev CALCIMM? Call Ibwrt CNT%, WRT$
‘C’ for National Instruments
‘C’ for National Instruments PC-IIA
14 ‘C’ for National Instruments PC-IIA, Limit Testing
Real Data Format
‘C’ for National Instruments PC-IIA, Real Data Format
Ofp
16 ‘C’ for National Instruments PC-IIA, Frequency Profiling
File
17 ‘C’ for National Instruments PC-IIA, Frequency Profiling
Capture Profile
18 ‘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
22 ‘C’ for National Instruments PC-IIA
This side is intentionally left blank
Instrument Model
Function Instrument Examples Type
SENSe
Measurement Function Block
INPut
CALCulate
Other Subsystems
Order of Execution
MEASure?
CONFigure READ?
MEASurement Function
MEASurement Function
READ?
CONFigure INITiateFETCh?
Versatility of Measurement Com- mands
Using the Subsystems
Introduction
Limit Monitoring
Mathematics
Statistics
Calculate Subsystem
Calibration Subsystem
PM6680B, PM6685
PM6681
Configure Function
Configure Function
Time Stamp Readout Format
Format Subsystem
PM6685
Input Subsystems
2Summary of PM6680B / PM6681 input amplifier settings
PM6680B/PM6681
SEND→ MEASureFREQ?
CONFigure READ?
MEASure?
SEND→ MEASureFREQ?20MHz,1
Versatility of measurement com Mands
CONFigureINITiateFETCh?
SEND→ READ?
Scaling Factor
Output Subsystem
Resolution
Same exponent, opposite sign
Prescaling
Switchbox
Sense Command Subsystem
Status Structure
Using the Registers
Status Reporting Model
Status Subsystem
7654 3210
Status of the Error Message Queue EAV
Clearing/Setting all bits
Using the Queues
Using the Status Byte
Ic e
Selecting Summary Message to Gen
Erate SRQ
Status Byte
Setting up the Counter to Report Status
Reading and Clearing Status
Status Event Registers
Status Condition Registers
Why Two Types of Registers?
Set up
Check & Action
A t u s B y t e
Standard Status Registers
G ic a
G i s t e r
Standard Event Status Register
Summary, Standard Event Status Reporting
SCPI-defined Status Registers
Reporting
Operation Status Group
Summary, Operation Status
Status Group
Questionable Data/Signal
Data/Signal Status Reporting
Summary Questionable
Error Queue
Device-defined Status Structure
Summary, Device-defined Status Reporting
Power-on Status Clear
Preset the Status Reporting Structure
Trigger/Arming Subsystem
ARM-TRIG Trigger Configuration
Instrument Action
Forward Traversing an Event-detection Layer
Structure of the Idle and Initiated States
Structure of an Event-detection Layer
Triggering
TRG Trigger Command
When to use *TRG and GET
Backward Traversing an Event-detection Layer
E n t d e t e c t i o n l a y e r
E n t d e t e c t i o n l oa ny e er a c h a r m
How to Measure Fast
Start
Controller Synchronization
Measurement Cycle Synchronization
Stop
Description
Rough Trigger
Subsystem
Some Basic Commands
Data Format
Command
MEASFREQ?
MEASMEM1? MEASMEM?1 RCL 1READ?
Basic Measurement Method
Individually Synchronized Measurements
Initcont and GET
ARMSTARTLAY2SOURceBUS
READARRay?
General Speed Improvements
Block Synchronized Measurements
Init + GET + FETCHARRay?
Gpib Data Format
Time Measurement Resolution
Display Control
Automatic Interpolator Calibration PM6680B/85
Block Measurements
Measure
Ments/second
Real Time Calculation
Optimal Method
Supervising a Process
Obvious Method
Supervising a Process
Dead Time Between Measurements Including
Speed Summary
Speed Summary
Transfer to Controller Ascii Data Format Real Data Format
E e d D i v i d u a l l y s y n c . m e a s
Dead Time Between Measurements
Block Synchronized Measurements
Speed Improvement Actions
PM6680B PM6681 PM6685
Calculating the Measurement
Speed
Timesaving Com Time Gain in ms Sacrifice Mands
Freq
Single Speed Switch Command for PM6680B/85
Single Speed Switch Command for PM6681
Error Messages
SEND→ SYSTemERRor? READ← -100, Command Error
Read the Error/Event Queue
Error Code 0 to
Command Errors
Error Code -105 to -120
Detect a more specific error
Error Code -121 to
More specific error
Ular error message is used when the counter cannot
Error Code -151 to -170
Error Code -171 to
Error Code -200 to -221
Error message is used when the counter cannot de
Error Code -222 to
Execution errors
Tect the more specific errors described for errors
Error Code -241 to -272
Macro label was already defined see
Error Code -273 to
Header syntax
Error Code -300 to -350
Error Code -400 to
Query errors
Unsupported auto Command
Error Code 1100 to -1139
Unsupported enu Merated command
Unsupported single Shot command
Output Read, but the waiting was broken by the operator
Error Code 1150 to
Reset during bus
Some PC controller cards has been known to do
Error Code 1214 to -1240
Parser error Generic error in the parser
This page is intentionally left blank
Command Reference
Command Reference
Abort
PM6680B/81/85
ABORt
Abort Measurement
Aborts all previous measurements if *WAI is not used
Arming Subsystem
«Numeric valueMINMAX» PM6680B/81/85
ARM COUNt
No. of Measurements on each Bus arm
Send ARMCOUN100
ARM ECOunt
ARM DELay
Delay after External Start Arming
External Events before Start Arming
Bus Arming Override
ARM LAYer2
ARM LAYer2 SOURce
Bus Arming On/Off
External Arming Start Slope
ARM SLOPe
ARM SOURce
External Arming Start Source
ARM Stop ECOunt
ARM Stop DELay
Delay after External Stop Arming
External Events before Stop Arming
External Stop Arming Slope
ARM Stop SLOPe
ARM Stop SOURce
External Stop Arming Source
This page is intentionally left blank
Calculate Subsystem
CALCulate AVERage STATe
Enable Statistics
CALCulate AVERage COUNt
Sample Size for Statistics
Fetch calculated data
CALCulate AVERage Type
Statistical Type
Send Calcmathstat Oncalcmath X 10.7E6INIT *OPC
CALCulate LIMit
Enable Monitoring of Parameter Limits
CALCulate IMMediate
Recalculate Data
Limit Fail
CALCulate LIMit FAIL?
CALCulate LIMit LOWer
Set Low Limit
CALCulate LIMit UPPer
Set Upper Limit
CALCulate LIMit LOWer STATe
Check Against Lower Limit
CALCulate LIMit UPPer STATe
Check Against Upper Limit
Expression
CALCulate Math
Select Mathematical Expression
Sendcalcmath X 10.7E6MATHSTATE ONREAD?
CALCulate Math STATe
Enable Mathematics
This example switches on mathematics
No calculation
CALCulate STATe
Enable Calculation
Switches on Post Processing
Send Calcstat
Calibration Subsystem
Calibration of Interpolator
‘How to Measure Fast’
CALibration INTerpolator Auto
Boolean Once
Configure Function
Set up Instrument for Measurement
Parameters,channels
CONFigure Measuring Function
Configure the counter for a single measurement
Send CONFFREQRAT@3,@1
Send Confarrper 7,5E-3,1E-6,@4
CONFigure ARRay Measuring Function
Configure the counter for an array of measurements
Send READARR?
This page is intentionally left blank
Diagnostics Subsystem
Send Diagcalinphyst Once
DIAGnosticCALibrationINPut12HYSTeresis
Input comparator hysteresis calibration
This string calibrates both input a and input B
Display Subsystem
See also , ‘How to Measure Fast’
DISPlay ENABle
Where Boolean = 1 / on 0 / OFF
Display State
Fetch Function
FETCh?
Fetch One Result
«fetch array sizeMAX»
FETCh ARRay?
Fetch an Array of Results
Returned format data,data
Format Subsystem
FORMat
Response Data Type
Response Data Format
FORMat FIXed
FORMat SREGister
Data Type for Status Messages
FORMat TINFormation
Timestamping On/Off TimestampingOn/Off
Initiate Subsystem
Initiate Measurement
INITiate
INITiate CONTinuous
Continuously Initiated
Input Subsystems
Input B Not PM6685
AC/DC Coupling
INPut«12» ATTenuation
INPut«12» COUPling
Low Pass Filter
INPut FILTer
INPut HYSTeresis
Sensitivity
«BooleanONCE»
INPut HYSTeresis Auto
Auto Sensitivity
Send Inphystauto OFF
Input Impedance
INPut«12» IMPedance
INPut«12» LEVel
Fixed Trigger Level
«Decimal dataMAXMIN» PM6685
INPut LEVel
Waveform compensation
Send Inplev 3.75LEVAUTO
Send Inplevauto OFF
INPut LEVel Auto
Autotrigger
Send INP2LEVAUTO on
Autotrigger INPutAUTO?
Trigger Slope
INPut«124» SLOPe
INPut2COMMon
This page is intentionally left blank
Set up the Instrument, Perform Measurement, and Read Data
Measurement Function
RISETIME?
Tion, @1@3@4@5@6
Parameters ,channels PM6680B/81/85
MEASure Measuring Function?
Make one measurement
Send MEASFREQ? @3 Read 1.78112526833E+009
Send MEASARRFREQ?
MEASure ARRay Measuring Function?
Make an array of measurements
Ten measuring results will be returned
MEASureMEMory?
Data Format Command
MEASureMEMoryN?
Memory Recall, Measure and Fetch Result
Send MEASPDUT?
MEASure«DCYCle/PDUTycycle»
Positive Duty Cycle
Read +5.097555E-001
Frequency
Expected value,resolution ,@«1234567» PM6680B/81/85
MEASure FREQuency?
This example measures the frequency at input C
Burst Carrier Frequency
Expected value,resolution ,@«1234567»
MEASure FREQuency BURSt?
Exp. val.,res.,@«1234567» PM6680B/81/85
MEASure FREQuency PRF?
Pulse Repetition Frequency
Frequency Ratio
MEASure FREQuency RATio?
Fall-time
Send MEASFREQRAT? @1,@3 Read 2.345625764333E+000
Positive Peak Voltage
MEASure Volt MAXimum?
MEASure Volt MINimum?
Negative Peak Voltage
Negative Pulse Width
MEASure NWIDth?
MEASure PWIDth?
Positive Pulse Width
Positive duty cycle Duty Factor
MEASure«PDUTycycle/ DCYCle»?
MEASure«NDUTycycle»?
Negative duty cycle Duty Factor
MEASure PERiod?
MEASure PHASe?
Phase
Period
Peak-to-Peak Voltage
MEASure Volt PTPeak?
MEASure Rise TIME?
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
@«1246»,@«1246»
PM6680B/81/85CONFigure TOTalize CONTinuous
Totalize Manually
Send CONFTOTINPSLOPe neg
Totalize X gated by Y
MEASure TOTalize GATed?
MEASure TOTalize SSTop?
Totalize X start/stop by Y
Time for gate open ,@«124»,@«124»
Totalize X-Y During a Preset Time
MEASure TOTalize TIMed?
Send MEASTOTTIM? 1,@1,@1
This page is intentionally left blank
Related Common Commands
Memory Subsystem
Delete one Macro
MEMory DELete MACRo
MEMory Free SENSe?
Memory Free for results
Bytes available, Bytes used
Memory Free for Macros
Memory States
Number of states available
This page is intentionally left blank
Output Subsystem
OUTPut SCALe
Enable Analog Out
OUTPut
Scaling Factor, Analog Output
Read Function
Perform Measurement and Read Data
Read one Result
Send Conffreqinpfilt ONREAD?
«array size for FETChMAX»
READARRay?
Read an array of results
Send Armcoun 10READARR?
This page is intentionally left blank
Sense Command Subsystem
Sense Subsystem command tree for PM6680B and PM6681
Sense Subsystem command tree for PM6685
«Decimal value MINMAX»
ACQuisition APERture
Set the Measurement Time
Decimal value 10 ms
Hold Off On/Off
ACQuisition Hoff
ACQuisition Hoff ECOunt
Hold Off, set event counter
ACQuisition Hoff Time
ACQuisition Hoff Mode
Hold Off Mode
Hold Off Time
ACQuisition RESolution
«Decimal dataMIN MAX»
AVERage COUNt
Average Samples
Average or Single?
AVERage STATe
FREQuency RANGe LOWer
High Speed Voltage Measurements
Functions and channels in PM6685
FUNCtion
Select Measuring Function
Input channels PM6685
Functions and channels in PM6680B and PM6681
Input channels PM6680B and PM6681
Number of Results
INTernal FORMat
Internal Format
Buffer
ROSCillator SOURce
SDELay
BURST/PRF Synchronization Delay
Select Reference Oscillator
Gate On/Off
TOTalize Gate
VOLTageGATedSTATe
Gated Voltage Measurement
This page is intentionally left blank
Related Common Commands
Status Subsystem
Bit No Weight Condition
STATus DREGister0 ENABle
Enable Device Status Reporting
STATus DREGister0?
STATus OPERation CONDition?
Read Operation Status Condition Register
Send Statoperenab
STATus OPERation ENABle
Enable Operation Status Reporting
288
Read Operation Status, Event
STATusPRESet values
STATusOPERation?
Read Questionable Data/Signal Condition Register
STATus QUEStionable CONDition?
Read Questionable Data/Signal Event Register
STATus QUEStionable ENABle
Enable Questionable Data/Signal Status Reporting
STATus QUEStionable?
This page is intentionally left blank
Related common command
System Subsystem
Set Gpib Address
SYSTem ERRor?
SYSTem COMMunicate Gpib ADDRess
Send Systcommgpibaddr
Signal Detection
SYSTem PRESet
Preset
See also Default settings on
SYSTem Time ELAPsed?
Read or Send Settings
SYSTem SET
Read On-time
SYSTem Tout
Timeout On/Off
Timeout, Set
SYSTem Tout Time
Unprotect
SYSTem UNPRotect
SYSTem VERSion?
System Version
Test Subsystem
Test SELect
Select Check signal
TESTCHECk
Select Self-tests
Trigger Subsystem
Send Trigcoun
TRIGgerCOUNt
No. of Triggerings on each Ext Arm start
Common Commands
Clear Status Command
Send *CLS
Read +3.46125461E-001+3.64852399E-001
Define Macro
Send AMPLITUDE?
Send Autofilt OFF
Decimal data PM6680B/81/85
Enable Macros
Enables macro expansion and execution
SEND*EMC
Operation Complete
Standard Event Status Enable
Event Status Enable Register 1 = enable
Macro label PM6680B/81/85
Event Status Register
Get Macro Definition
Send *GMC? ‘AMPLITUDE?’
Main
Identification query
Learn Macro
READAUTOFILT,AMPLITUDE?
Send INIT*OPC
Learn Device Setup
Operation Complete
Example 6 is Chapter
Operation Complete Query
Option Identification
Bus option,Prescaler option
Purge Macros
Power-on Status Clear
This example enables automatic power-on clearing
Removes all macro definitions
Protected User Data
Recall
Default settings on
Reset
This command removes an individual MACRo PM6680B/81/85
‘Macro name’ is the name of the macro you want to delete
Send *SAV
Save
Decimal data = a number between 1
Service Request Enable
Service Request Enable Register 1 = enable
Send ARMSTARTLAY2SOURCE BUS Send Initcont on
Status Byte Query
ARMSTARtLAYer2IMM *WAIFETCh?
Read +3.2770536E+004
Wait-to-continue
Integer = PM6680B Error PM6681, PM6685 Er Ror
Self Test
SENDMEASFREQ? *WAIMEASPDUT?
Index
Auto calibration on/off· · · · · · · · · · · 9-24Average
Address
Auto
Average or Single? · · · · · · · · · · · · ·
Bus
Command Error CME
Burst
Calculate
CONFigureTOTalizeACCumulated
ARMSEQuence1LAYer1ECOunt
STATusQUEStionableCONDition?
SENSeFREQuencyRANGeLOWer
STATusOPERationCONDition?
Device Status Register
Delay
Device dependent Error DDE
Display
External Events before Start Arming
Events
Execution
Fail Limit · · · · · · · · · · · · · · · · · · · · · · ·
Hysteresis · · · · · · · · · · · · · · · · · · · ·
Initiated state · · · · · · · · · · · · · · · · · 6-28Input
Lower Limit
Measuring
Monitor
Operation Status
Response
Pulse
QUE · · · · · · · · · · · · · · · · · 9-130 9-131Query
Result
Stop arming · · · · · · · · · · · · · · · · · 9-11Source
Settings
Set
Speed
Time out For measurement TIO · · · · · · · 6-24Timebase
Test
Time
See Also Command *TRG
Upper Limit