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