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