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