PM6680B, PM6681, PM6681R, PM6685 & PM6685R
Timer/Counter/ Analyzers
Programming Manual
Pendulum Instruments AB - Sweden
2 Bus Commands for the Benchtop User
6 Using the Subsystems
7 How to Measure Fast
1 Getting Started
8 Error Messages 9 Command Reference
Configure Function
Diagnostics Subsystem
Abort
Sense Command Subsystem
Common Commands
Memory Subsystem
Output Subsystem
10 Index
Getting Started
Chapter
Sections
Finding Your Way Through This Manual
Index
Syntax Specification Form
Manual Conventions
Mnemonic Conventions
Printable Characters
Setting Up the Instrument
Setting the GPIB Address
1-4 Setting Up the Instrument
Examples
Power-on
Testing the Bus
Interface Functions
What can I do with the Bus?
Service Request, SR1
Listener Function, L4
Remote/Local, RL1
Parallel Poll, PP0
Bus Commands for the Benchtop User
Chapter
Bus Commands for the Benchtop User
2-2 Error Code
Error Code
DISPLENABONOFF ROSCSOURINTEXT SYSTPRES or *RST
TESTCHECONOFF TOTGATONOFF
ACQHOFFONOFF ACQHOFFTIMEtime
2-4 Error Code
Error Code
CALCMATHSTATONOFF
CALCAVERTYPEMAXMINSDEVMEAN Selects statistical function
CALCAVERSTATONOFF
2-6 Error Code
Error Code
PM6680B
OUTPONOFF OUTPSCALscaling factor SYSTCOMMGPIBADDRAddress
ROSCSOURINTEXT
Default settings after *RST
2-8 Default settings after *RST
SETTING
SETTING
Introduction to SCPI
Chapter
What is SCPI?
Reason for SCPI
Compatibility
3-2 What is SCPI?
Management and Maintenance of Programs
What is SCPI?
Message Exchange Control protocol
How does SCPI Work in the Instrument?
3-4 How does SCPI Work in the Instrument?
Protocol Requirements
Deferred Commands
Sequential and Overlapped Commands
Order of Execution
Remote Local Protocol
Definitions
Remote Operation
Local Operation
Program and Response Messages
Syntax and Style
Syntax of Program Messages
Program and Response Messages
Page
Notation Habit in Command Syntax
Syntax of Response Messages
Responses
Example
Command Tree
Moving down the Command Tree
3-10 Command Tree
Example
Parameters
Numeric Data
Boolean Data
Keywords
Expression Data
Summary
Other Data Types
Example
Define Macro Command
Macros
Macro Names
Data Types within Macros
How to Execute a Macro
Deleting Macros
Enabling and Disabling Macros
EMC Enable Macro Command
Retrieve a Macro
GMC? Get Macro Contents Query
Example using the above defined macro
LMC? Learn Macro Query
Introduction
Status Reporting System
3-16 Status Reporting System
Error Reporting
Detecting Errors in the Queue
Read the Error/Event Queue
Standardized Error Numbers
Execution Error
Device-specific Error
Query Error
3-18 Error Reporting
Initialization and Resetting
Reset Strategy
When to use a Device-clear Command
Initialization and Resetting
The *CLS Command
The *RST Command
3-20 Initialization and Resetting
Programming Examples
Chapter
Introduction
4-2 Introduction
GW-Basic for National Instruments PC-IIA
Setting up the interface
GW-Basic for National Instruments PC-IIA, Setting Up the Interface
1. Limit Testing
3. Frequency Profiling
GW-Basic for National Instruments PC-IIA, Setting Up the Interface
200 ‘ 210 ‘ ==== CAPTURE PROFILE ===== 220 ‘ 230 PRINT “Profiling”
4. Fast Sampling
GW-Basic for National Instruments PC-IIA, Setting Up the Interface
440 ‘ 450 PRINT “Fetching result” 460 ‘ 470 FOR I=0 TO
5. Status Reporting
GW-Basic for National Instruments PC-IIA, Setting Up the Interface
Programming Examples
GW-Basic for National Instruments PC-IIA, Setting Up the Interface
6. Statistics
Only for PM6680B and PM6681
430 CALL IBRD CNT%, MSG$ 440 PRINT “MINIMUM =” LEFT$MSG$, IBCNT%
‘C’ for National Instruments PC-IIA
‘C’ for National Instruments PC-IIA
1. Limit Testing
4-14 ‘C’ for National Instruments PC-IIA, Limit Testing
2. REAL Data Format
‘C’ for National Instruments PC-IIA, Real Data Format
3. Frequency Profiling
4-16 ‘C’ for National Instruments PC-IIA, Frequency Profiling
4-17 ‘C’ for National Instruments PC-IIA, Frequency Profiling
4. Fast Sampling
4-18 ‘C’ for National Instruments PC-IIA, Fast Sampling
Programming Examples
‘C’ for National Instruments PC-IIA, Fast Sampliing
6. Statistics
4-20 ‘C’ for National Instruments PC-IIA, Statistics
‘C’ for National Instruments PC-IIA, Statistics
4-22 ‘C’ for National Instruments PC-IIA
This side is intentionally left blank
Instrument Model
Chapter
Inputs
Channels
Introduction
5-2 Introduction
Measurement Function Block
GPIB
INPut
SENSe
Other Subsystems
Order of Execution
The different blocks have the following functions
CALibration
MEASurement Function
CONFigure READ?
MEASure?
MEASurement Function
CONFigure INITiateFETCh?
5-6 MEASurement Function
Using the Subsystems
Chapter
Introduction
Using the Subsystems
Calculate Subsystem
Mathematics
Statistics
Limit Monitoring
Calibration Subsystem
PM6680B, PM6685
PM6681
6-4 Calibration Subsystem
Configure Function
Configure Function
Time Stamp Readout Format
Format Subsystem
6-6 Format Subsystem
Input Subsystems
PM6685
Figure 6-1 Summary of PM6685 input amplifier settings
Reset points
Figure 6-2 Summary of PM6680B / PM6681 input amplifier settings
PM6680B/PM6681
6-8 Input Subsystems
CONFigure READ?
Measurement Function
MEASure?
Example
CONFigureINITiateFETCh?
Example
Example
6-10 Measurement Function
Output Subsystem
Scaling Factor
Scaling
factor
Resolution
6-12 Output Subsystem
Sense Command Subsystems
Switchbox
Sense Command Subsystem
Prescaling
Status Subsystem
Status Reporting Model
Using the Registers
Introduction
3210
7654
Status Subsystem
Clearing/Setting all bits
Using the Queues
Status of the Error Message Queue EAV
Using the Status Byte
S t a t u s B y t e
R e g i s t e r
S R Q
s ig n a
Setting up the Counter to Report Status
Reading and Clearing Status
Using the Serial Poll IEEE-488.1 de- fined
Using the Common Query *STB?
Why Two Types of Registers?
Set up
Status Condition Registers
Summary
Standard Status Registers
6-20 Status Subsystem
Bit 6 weight 64-User Request URQ
Bit 5 weight 32 - Command Error CME
Bit 4 weight 16 - Execution Error EXE
Bit 3 weight 8 - Device-dependent Error DDE
ESR?
SCPI-defined Status Registers
6-22 Status Subsystem
Bit 5 weight 32 - Waiting for Trigger
Bit 4 weight 14 - Measurement
Bit 8 weight 256 - Measurement Stopped MSP
Bit 6 weight 64 - Wait for Bus Arm- ing WFA
Questionable Data/Signal
Status Group
Bit 10 weight 1024 - Timeout for
Bit 8 weight 256 Overflow OFL
Status Subsystem
Device-defined Status Structure
Figure 6-13 Device-defined status data structures model
Power-on Status Clear
15 2
Device Status Register0
Bit 2 weight 4 - Monitor of Low Limit
The ARM-TRIG Trigger Configuration
Trigger/Arming Subsystem
Instrument Action
Trigger/Arming Subsystem
Structure of the IDLE and INITIATED States
Structure of an Event-detection Layer
Forward Traversing an Event-detection Layer
6-28 Trigger/Arming Subsystem
Triggering
TRG Trigger Command
When to use *TRG and GET
Backward Traversing an Event-detection Layer
E v e n t d e t e c t i o n l a y e r
E v e n t d e t e c t i o n l a y e r
E v e n t d e t e c t i o n l oa ny e er a c h a r m
6-30 Trigger/Arming Subsystem
How to Measure Fast
Chapter
Controller Synchronization
Measurement Cycle Synchronization
Timeout
Introduction
Rough Trigger
Subsystem
Description
MEASUREMENT State
Some Basic Commands
CONFigure
INITiate
INITiate CONTinuous
READ?
MEASMEM1?, MEASMEM?
Some Basic Commands
MEASure?
Basic Measurement Method
Individually Synchronized Measurements
READ?
INITCONT and GET
General Speed Improvements
Block Synchronized Measurements
READARRay?
INIT + GET + FETCHARRay?
Time Measurement Resolution
AUTO
Display Control
GPIB Data Format
40000 measure
ments/second
Block Measurements
Real Time Calculation
Supervising a Process
Obvious Method
Optimal Method
7-10 Supervising a Process
Speed Summary
Speed Summary
7-12 Speed Summary
S p e e d
I n d i v i d u a l l y s y n c . m e a s
S p e e d , I n d i v i d u a l l y s y n c . m e a s u r e m e n t s
Speed Summary
Block Synchronized Measurements
ARMSTARtLAYerCOUNt 1 and TRIGCOUNt N
Speed Improvement Actions
Calculating the Measurement
Speed
Where Meas.time is the measurement time you use
Deadtime is the deadtime between measurements after preset. see page
Speed Summary
Timesaving Com
Time Gain in ms
Sacrifice
Single “Speed Switch” Command for PM6681
Single “Speed Switch” Command for PM6680B/85
7-16 Speed Summary
Error Messages
Chapter
Read the Error/Event Queue
Error Messages
8-2 Error Code 0 to
Example
Error Code -105 to -120
Command Errors
Error
Error Description
8-4 Error Code -121 to
Command Errors
Error
Error Description
Error Code -151 to -170
Command Errors
Error
Error Description
8-6 Error Code -171 to
Command Errors
Error
Error Description
Error Code -200 to -221
Execution errors
Error
Error Description
8-8 Error Code -222 to
Execution errors
Error
Error Description
Error Code -241 to -272
Execution errors
Error
Error Description
8-10 Error Code -273 to
Execution errors
Error
Error Description
Error Code -300 to -350
Standardized Device specific errors
Error
Error Description
8-12 Error Code -400 to
Query errors
Error
Error Description
Error Code 1100 to -1139
CNT-8X Device specific errors leading 1 only for PM6681
Error
Error Description
8-14 Error Code 1150 to
CNT-8X Device specific errors leading 1 only for PM6681
Error
Error Description
Error Code 1214 to -1240
CNT-8X Device specific errors leading 1 only for PM6681
Error
Error Description
8-16 Error Code
This page is intentionally left blank
Command Reference
Chapter
9-2 Command Reference
This page is intentionally left blank
Abort
Command Reference
ABORt
9-4 Command Reference
Type of command
Abort Measurement
Command Reference
Arming Subsystem
EXTernal2 EXTernal4 IMMediate TIMerf
ARM COUNt
9-6 Command Reference
No. of Measurements on each Bus arm
MAX gives 65
ARM DELay
ARM ECOunt
Delay after External Start Arming
Command Reference
ARM LAYer2
ARM LAYer2 SOURce
9-8 Command Reference
Bus Arming Override
ARM SLOPe
ARM SOURce
Command Reference
External Arming Start Slope
ARM STOP DELay
ARM STOP ECOunt
Delay after External Stop Arming
9-10 Command Reference
ARM STOP SLOPe
ARM STOP SOURce
Command Reference
External Stop Arming Slope
9-12 Command Reference
This page is intentionally left blank
Command Reference
Calculate Subsystem
CALCulate
CALCulate AVERage COUNt
CALCulate AVERage STATe
Enable Statistics
9-14 Command Reference
CALCulate AVERage TYPE
CALCulate DATA?
Command Reference
Statistical Type
CALCulate IMMediate
CALCulate LIMit
Enable Monitoring of Parameter Limits
9-16 Command Reference
CALCulate LIMit FAIL?
CALCulate LIMit LOWer
Command Reference
Limit Fail
CALCulate LIMit LOWer STATe
CALCulate LIMit UPPer
Set Upper Limit
9-18 Command Reference
CALCulate LIMit UPPer STATe
Command Reference
Check Against Upper Limit
Returned format 1 RST condition
CALCulate MATH
9-20 Command Reference
Select Mathematical Expression
expression is X + K No deviations are allowed from this form
CALCulate MATH STATe
Enable Mathematics
Command Reference
CALCulate MATH
CALCulate STATe
Enable Calculation
9-22 Command Reference
Parameter
Command Reference
Calibration Subsystem
BooleanONCE
9-24 Command Reference
CALibration INTerpolator AUTO
Calibration of Interpolator
Configure Function
Command Reference
Set up Instrument for Measurement
Measuring Function, Parameters and Channels are explained on page
Configure the counter for a single measurement
CONFigure Measuring Function
9-26 Command Reference
CONFigure ARRay Measuring Function
Configure the counter for an array of measurements
Command Reference
Measuring Function, Parameters, and Channels are defined on page
9-28 Command Reference
This page is intentionally left blank
Command Reference
Diagnostics Subsystem
DIAGnostic
9-30 Command Reference
DIAGnosticCALibrationINPut12HYSTeresis
Input comparator hysteresis calibration
Command Reference
Display Subsystem
DISPlay
9-32 Command Reference
DISPlay ENABle
Display State
Fetch Function
Command Reference
ARRay? Array SizeMAX
FETCh
9-34 Command Reference
FETCh?
Fetch One Result
FETCh ARRay?
Command Reference
Phase, Duty Cycle,Volt
Low resolution Frequency and Period
9-36 Command Reference
Format Subsystem
Command Reference
ASCii BINary HEXadecimal OCTal
FORMat
FORMat
9-38 Command Reference
DISPlayENABled OFF is selected
FORMat
FORMat FIXed
FORMat SREGister
Command Reference
signmantissa valueEsignexponent value Where sign = +
9-40 Command Reference
FORMat TINFormation
Timestamping On/Off TimestampingOn/Off
Command Reference
Initiate Subsystem
INITiate
INITiate
INITiate CONTinuous
9-42 Command Reference
Initiate Measurement
Input Subsystems
Command Reference
INPUT A
INPUT B Not PM6685
INPut«12» ATTenuation
INPut«12» COUPling
9-44 Command Reference
AC/DC Coupling
INPut FILTer
INPut HYSTeresis
Command Reference
Low Pass Filter
9-46 Command Reference
INPut HYSTeresis AUTO
Auto Sensitivity
INPut«12» IMPedance
INPut«12» LEVel
Command Reference
Input Impedance
INPut LEVel
9-48 Command Reference
Waveform compensation
Trigger level Vpp * 0.5 Duty factor
INPut LEVel AUTO
Command Reference
Autotrigger
Boolean = 1/ON 0/OFF
9-50 Command Reference
Using ONCE instead of AUTO ON improves measuring speed
INPut LEVel AUTO
Autotrigger INPutAUTO?
INPut«124» SLOPe
INPut2COMMon
Command Reference
Trigger Slope
9-52 Command Reference
This page is intentionally left blank
Measurement Function
Command Reference
Set up the Instrument, Perform Measurement, and Read Data
This query gives the same answer as FUNC? in the SENSe subsystem
ACCumulated?
9-54 Command Reference
CONTinuous
Command Reference
CW? Size,expected value,resolution, @1@3@4@5@6
Size,expected value,resolution, @1@3@4
Size,exp. value,resol., @1@3@4,@1@3 @4
9-56 Command Reference
MEASure Measuring Function?
Make one measurement
MEASure ARRay Measuring Function?
Command Reference
Make an array of measurements
array size sets the number of measurements in the array
MEASureMEMoryN?
MEASureMEMory?
9-58 Command Reference
Command
EXPLANATIONS OF THE MEASURING FUNCTIONS
MEASure«DCYCle/PDUTycycle»
Command Reference
Positive Duty Cycle
MEASure FREQuency?
9-60 Command Reference
resolution is the required resolution
Frequency
MEASure FREQuency BURSt?
Command Reference
resolution is the required resolution, e.g., 1 gives 1Hz resolution
Burst Carrier Frequency
MEASure FREQuency PRF?
9-62 Command Reference
res. is the required resolution
Pulse Repetition Frequency
MEASure FREQuency RATio?
MEASure FALL TIME?
Command Reference
Fall-time
MEASure VOLT MAXimum?
MEASure VOLT MINimum?
9-64 Command Reference
Positive Peak Voltage
MEASure NWIDth?
MEASure PWIDth?
Command Reference
Negative Pulse Width
MEASure«PDUTycycle/ DCYCle»?
MEASure«NDUTycycle»?
9-66 Command Reference
Positive duty cycle Duty Factor
MEASure PHASe?
MEASure PERiod?
Phase
Command Reference
MEASure VOLT PTPeak?
MEASure RISE TIME?
9-68 Command Reference
Peak-to-Peak Voltage
MEASure TINTerval?
Command Reference
Time-Interval
@2 means input B @4 means input E Rear panel arming input
MEASure TOTalize ACCumulated?
9-70 Command Reference
Totalize X gated by Y, accumulated
The first @«12456» is the channel to measure on
PM6680B/81/85CONFigure TOTalize CONTinuous
Command Reference
Totalize Manually
Normal Program Sequence for Totalizing on A
MEASure TOTalize GATed?
MEASure TOTalize SSTop?
9-72 Command Reference
Totalize X gated by Y
MEASure TOTalize TIMed?
Totalize X-Y During a Preset Time
Command Reference
@1 means input A @2 means input B
9-74 Command Reference
This page is intentionally left blank
Command Reference
Memory Subsystem
Related Common Commands
MEMory DELete MACRo
MEMory FREE SENSe?
9-76 Command Reference
Delete one Macro
MEMory FREE MACRo?
MEMory NSTates?
Command Reference
Memory Free for Macros
9-78 Command Reference
This page is intentionally left blank
Command Reference
Output Subsystem
ON OFF
OUTPut
OUTPut SCALe
Enable Analog Out
9-80 Command Reference
Command Reference
Read Function
Perform Measurement and Read Data
9-82 Command Reference
READ?
Read one Result
READARRay?
Command Reference
Read an array of results
MAX means that all the results in the output buffer will be fetched
9-84 Command Reference
This page is intentionally left blank
Sense Subsystem command tree for PM6680B and PM6681
Sense Command Subsystem
Command Reference
Sense Subsystem command tree for PM6685
9-86 Command Reference
ACQuisition APERture
Command Reference
ACQuisition APERture
Set the Measurement Time
ACQuisition HOFF
ACQuisition HOFF ECOunt
9-88 Command Reference
Hold Off On/Off
ACQuisition HOFF MODE
ACQuisition HOFF TIME
Command Reference
Hold Off Mode
ACQuisition RESolution
ACQuisition RESolution
Resolution
Resolution
AVERage COUNt
Command Reference
Average Samples
Decimal data is a number between 1and
AVERage STATe
FREQuency RANGe LOWer
9-92 Command Reference
Min frequency limit Default
FUNCtion
Command Reference
Select Measuring Function
Functions and channels in PM6685
Functions and channels in PM6680B and PM6681
9-94 Command Reference
Input channels PM6680B and PM6681
INTernal FORMat
Command Reference
Internal Format
Number of Results in
SDELay
ROSCillator SOURce
BURST/PRF Synchronization Delay
9-96 Command Reference
TOTalize GATE
VOLTageGATedSTATe
Command Reference
Gate On/Off
9-98 Command Reference
This page is intentionally left blank
Status Subsystem
Related Common Commands
Command Reference
STATus
STATus DREGister0 ENABle
STATus DREGister0?
Enable Device Status Reporting
9-100 Command Reference
STATus OPERation CONDition?
Command Reference
Weight
Read Operation Status Condition Register
STATus OPERation ENABle
Enable Operation Status Reporting
9-102 Command Reference
Weight
STATus PRESet
STATusOPERation?
Enable Device Status Reporting
Command Reference
STATus QUEStionable CONDition?
Read Questionable Data/Signal Condition Register
9-104 Command Reference
Weight
STATus QUEStionable ENABle
STATus QUEStionable?
Enable Questionable Data/Signal Status Reporting
Read Questionable Data/Signal Event Register
9-106 Command Reference
This page is intentionally left blank
System Subsystem
Related common command
Command Reference
SYSTem
SYSTem ERRor?
SYSTem COMMunicate GPIB ADDRess
9-108 Command Reference
Where Error Description String = an error description as ASCii text
SYSTem PRESet
SYSTem SDETect
Preset
Signal Detection
SYSTem SET
SYSTem TIME ELAPsed?
Read or Send Settings
9-110 Command Reference
SYSTem TOUT
SYSTem TOUT TIME
Timeout On/Off
Timeout, Set
SYSTem UNPRotect
SYSTem VERSion?
9-112 Command Reference
Where # means that arbitrary block program data will follow
Test Subsystem
Related common command
Command Reference
TEST
TESTCHECk
TEST SELect
Select Check signal
9-114 Command Reference
Trigger Subsystem
Related common command
Command Reference
COUNt Numeric value MIN MAX
TRIGgerCOUNt
9-116 Command Reference
No. of Triggerings on each Ext Arm start
The actual number of measurements made on each INIT equals to
Common Commands
Command Reference
9-118 Command Reference
Clear Status Command
Example
Command Reference
Define Macro
Enable Macros
9-120 Command Reference
Standard Event Status Enable
Command Reference
Event Status Enable Register 1 = enable
Figure 9-3 Bits in the standard event status register
∗ESR?
GMC?
9-122 Command Reference
Event Status Register
LMC?
IDN?
Command Reference
Identification query
LRN?
Learn Device Setup
9-124 Command Reference
Operation Complete
OPC?
OPT?
Command Reference
Where Bus option = GPIB Prescaler option =
Power-on Status Clear
9-126 Command Reference
1 is enabled and 0 is disabled
Purge Macros
Command Reference
Protected User Data
Recall
# means that arbitrary block program data will follow
∗RMC
Reset
9-128 Command Reference
Delete one Macro
Command Reference
Save
Service Request Enable
9-130 Command Reference
Service Request Enable Register 1 = enable
Weight
STB?
Command Reference
Weight
Enabled operation status has occurred
TST?
9-132 Command Reference
Integer = a number indicating errors according to the table below
PM6680B Error
Index
Chapter
Index
Page
CONFigureFREQuency BURSt PRF
CONFigureTOTalizeACCumulated
ARMSEQuence1LAYer1ECOunt
· · · · · · · · · · · · · · · · · · · · · · · · · · ·
MEASureFREQuencyBURSt CARRier? · · · · · · · · · · · · · · · · · ·
Page
Page
VIII
Page
Page
Pulse
QUE · · · · · · · · · · · · · · · · · 9-130 - 9-131 Query
Real
Response
Page
XIII