Timer/Counter/ Analyzers
Pendulum Instruments AB Sweden
Table of Contents
Configure Function
Diagnostics Subsystem
Abort
Arming Subsystem
Sense Command Subsystem
Common Commands
Memory Subsystem
Output Subsystem
Index
Getting Started
Sections
Index
Mnemonic Conventions
Syntax Specification Form
Manual Conventions
Example Language
Setting Up Instrument
Setting the Gpib Address
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
Error Code
INPATT110
INPLEVlevel
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
What is SCPI?
What is SCPI?
Reason for 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
Deferred Commands
Sequential and Overlapped Commands
Protocol Requirements
Order of Execution
Remote Local Protocol
Definitions
Program and Response Messages
Syntax and Style
Syntax of Program Messages
Program and Response Messages
Page
Responses
Notation Habit in Command Syntax
Syntax of Response Messages
Moving down the Command Tree
Command Tree
Example
SEND→ Inputfilteron
Parameters
Numeric Data
Boolean Data
Keywords
Expression Data
Summary Other Data Types
SEND→ Systtouton or SYSTTOUT1
#218INPIMP50SENS10
Define Macro Command
Macros
Macro Names
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
Error Reporting
Detecting Errors in the Queue
Read the Error/Event Queue
Standardized Error Numbers
Query Error
Execution Error
Device-specific Error
Initialization and Resetting
Reset Strategy
Bus Initialization
Message Exchange Initialization
*RST Command
*CLS Command
Programming Examples
Introduction
Introduction
Setting up the interface
GW-Basic for National Instruments PC-IIA
Limit Testing
90 ‘ 100 ‘ 110 ‘ -- Enable arming, etc
180 ‘ Armdelay =
Frequency Profiling
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
130 ‘ -- SET Event Status Enable
180 ‘ -- SET Service Request Enable
260 ‘ -- Enter Command String and Send to Counter
Status Reporting
650 ‘ -- Read Error Messages
410 ‘ -- Check Message Available BIT While SPR%
Lfpos
520 ‘ -- Check Event Status BIT
Statistics
Print Waiting for Measurement to GET Ready
330 WRT$ = Calcavertype MAX CALCIMM? Call Ibwrt CNT%, WRT$
Call Ibrd CNT%, MSG$ Print Maximum = LEFT$MSG$, IBCNT%
Call Ibrd CNT%, MSG$ Print Minimum = LEFT$MSG$, IBCNT%
470 WRT$ = Calcavertype Mean CALCIMM? Call Ibwrt CNT%, WRT$
Call Ibrd CNT%, MSG$ Print Mean = LEFT$MSG$, IBCNT%
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
Measurement Function Block
INPut
SENSe
CALCulate
Other Subsystems
Order of Execution
CONFigure READ?
MEASurement Function
MEASure?
MEASurement Function
READ?
CONFigure INITiateFETCh?
Versatility of Measurement Com- mands
Using the Subsystems
Introduction
Mathematics
Statistics
Limit Monitoring
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
CONFigure READ?
MEASure?
SEND→ MEASureFREQ?
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
Using the Registers
Status Reporting Model
Status Structure
Status Subsystem
7654 3210
Clearing/Setting all bits
Using the Queues
Status of the Error Message Queue EAV
Using the Status Byte
Ic e
Selecting Summary Message to Gen
Erate SRQ
Setting up the Counter to Report Status
Reading and Clearing Status
Status Byte
Status Event Registers
Why Two Types of Registers?
Set up
Status Condition Registers
Check & Action
Standard Status Registers
G ic a
A t u s B y t e
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
Questionable Data/Signal
Data/Signal Status Reporting
Status Group
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
TRG Trigger Command
When to use *TRG and GET
Triggering
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
Controller Synchronization
Measurement Cycle Synchronization
Start
Stop
Description
Rough Trigger
Subsystem
Some Basic Commands
Command
MEASFREQ?
Data Format
MEASMEM1? MEASMEM?1 RCL 1READ?
Individually Synchronized Measurements
Initcont and GET
Basic Measurement Method
ARMSTARTLAY2SOURceBUS
General Speed Improvements
Block Synchronized Measurements
READARRay?
Init + GET + FETCHARRay?
Time Measurement Resolution
Display Control
Gpib Data Format
Automatic Interpolator Calibration PM6680B/85
Measure
Ments/second
Block Measurements
Real Time Calculation
Supervising a Process
Obvious Method
Optimal Method
Supervising a Process
Speed Summary
Speed Summary
Dead Time Between Measurements Including
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
Block Synchronized Measurements
Speed Improvement Actions
Dead Time Between Measurements
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
Read the Error/Event Queue
Error Code 0 to
SEND→ SYSTemERRor? READ← -100, Command Error
Command Errors
Error Code -105 to -120
Error Code -121 to
More specific error
Detect a 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 Code -222 to
Execution errors
Error message is used when the counter cannot de
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
Error Code 1100 to -1139
Unsupported enu Merated command
Unsupported auto Command
Unsupported single Shot command
Error Code 1150 to
Reset during bus
Output Read, but the waiting was broken by the operator
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
ABORt
Abort Measurement
PM6680B/81/85
Aborts all previous measurements if *WAI is not used
Arming Subsystem
ARM COUNt
No. of Measurements on each Bus arm
«Numeric valueMINMAX» PM6680B/81/85
Send ARMCOUN100
ARM DELay
Delay after External Start Arming
ARM ECOunt
External Events before Start Arming
ARM LAYer2
ARM LAYer2 SOURce
Bus Arming Override
Bus Arming On/Off
ARM SLOPe
ARM SOURce
External Arming Start Slope
External Arming Start Source
ARM Stop DELay
Delay after External Stop Arming
ARM Stop ECOunt
External Events before Stop Arming
ARM Stop SLOPe
ARM Stop SOURce
External Stop Arming Slope
External Stop Arming Source
This page is intentionally left blank
Calculate Subsystem
Enable Statistics
CALCulate AVERage COUNt
CALCulate AVERage STATe
Sample Size for Statistics
CALCulate AVERage Type
Statistical Type
Fetch calculated data
Send Calcmathstat Oncalcmath X 10.7E6INIT *OPC
Enable Monitoring of Parameter Limits
CALCulate IMMediate
CALCulate LIMit
Recalculate Data
CALCulate LIMit FAIL?
CALCulate LIMit LOWer
Limit Fail
Set Low Limit
Set Upper Limit
CALCulate LIMit LOWer STATe
CALCulate LIMit UPPer
Check Against Lower Limit
CALCulate LIMit UPPer STATe
Check Against Upper Limit
CALCulate Math
Select Mathematical Expression
Expression
Sendcalcmath X 10.7E6MATHSTATE ONREAD?
Enable Mathematics
This example switches on mathematics
CALCulate Math STATe
No calculation
Enable Calculation
Switches on Post Processing
CALCulate STATe
Send Calcstat
Calibration Subsystem
‘How to Measure Fast’
CALibration INTerpolator Auto
Calibration of Interpolator
Boolean Once
Configure Function
Set up Instrument for Measurement
CONFigure Measuring Function
Configure the counter for a single measurement
Parameters,channels
Send CONFFREQRAT@3,@1
CONFigure ARRay Measuring Function
Configure the counter for an array of measurements
Send Confarrper 7,5E-3,1E-6,@4
Send READARR?
This page is intentionally left blank
Diagnostics Subsystem
DIAGnosticCALibrationINPut12HYSTeresis
Input comparator hysteresis calibration
Send Diagcalinphyst Once
This string calibrates both input a and input B
Display Subsystem
DISPlay ENABle
Where Boolean = 1 / on 0 / OFF
See also , ‘How to Measure Fast’
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
FORMat FIXed
FORMat SREGister
Response Data Format
Data Type for Status Messages
FORMat TINFormation
Timestamping On/Off TimestampingOn/Off
Initiate Subsystem
INITiate
INITiate CONTinuous
Initiate Measurement
Continuously Initiated
Input Subsystems
Input B Not PM6685
AC/DC Coupling
INPut«12» ATTenuation
INPut«12» COUPling
INPut FILTer
INPut HYSTeresis
Low Pass Filter
Sensitivity
INPut HYSTeresis Auto
Auto Sensitivity
«BooleanONCE»
Send Inphystauto OFF
INPut«12» IMPedance
INPut«12» LEVel
Input Impedance
Fixed Trigger Level
INPut LEVel
Waveform compensation
«Decimal dataMAXMIN» PM6685
Send Inplev 3.75LEVAUTO
INPut LEVel Auto
Autotrigger
Send Inplevauto OFF
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
MEASure Measuring Function?
Make one measurement
Parameters ,channels PM6680B/81/85
Send MEASFREQ? @3 Read 1.78112526833E+009
MEASure ARRay Measuring Function?
Make an array of measurements
Send MEASARRFREQ?
Ten measuring results will be returned
Data Format Command
MEASureMEMoryN?
MEASureMEMory?
Memory Recall, Measure and Fetch Result
MEASure«DCYCle/PDUTycycle»
Positive Duty Cycle
Send MEASPDUT?
Read +5.097555E-001
Expected value,resolution ,@«1234567» PM6680B/81/85
MEASure FREQuency?
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
MEASure FREQuency RATio?
Fall-time
Frequency Ratio
Send MEASFREQRAT? @1,@3 Read 2.345625764333E+000
MEASure Volt MAXimum?
MEASure Volt MINimum?
Positive Peak Voltage
Negative Peak Voltage
MEASure NWIDth?
MEASure PWIDth?
Negative Pulse Width
Positive Pulse Width
MEASure«PDUTycycle/ DCYCle»?
MEASure«NDUTycycle»?
Positive duty cycle Duty Factor
Negative duty cycle Duty Factor
MEASure PHASe?
Phase
MEASure PERiod?
Period
MEASure Volt PTPeak?
MEASure Rise TIME?
Peak-to-Peak Voltage
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
PM6680B/81/85CONFigure TOTalize CONTinuous
Totalize Manually
@«1246»,@«1246»
Send CONFTOTINPSLOPe neg
MEASure TOTalize GATed?
MEASure TOTalize SSTop?
Totalize X gated by Y
Totalize X start/stop by Y
Totalize X-Y During a Preset Time
MEASure TOTalize TIMed?
Time for gate open ,@«124»,@«124»
Send MEASTOTTIM? 1,@1,@1
This page is intentionally left blank
Related Common Commands
Memory Subsystem
MEMory DELete MACRo
MEMory Free SENSe?
Delete one Macro
Memory Free for results
Memory Free for Macros
Memory States
Bytes available, Bytes used
Number of states available
This page is intentionally left blank
Output Subsystem
Enable Analog Out
OUTPut
OUTPut SCALe
Scaling Factor, Analog Output
Read Function
Perform Measurement and Read Data
Read one Result
Send Conffreqinpfilt ONREAD?
READARRay?
Read an array of results
«array size for FETChMAX»
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
ACQuisition APERture
Set the Measurement Time
«Decimal value MINMAX»
Decimal value 10 ms
ACQuisition Hoff
ACQuisition Hoff ECOunt
Hold Off On/Off
Hold Off, set event counter
ACQuisition Hoff Mode
Hold Off Mode
ACQuisition Hoff Time
Hold Off Time
ACQuisition RESolution
«Decimal dataMIN MAX»
AVERage COUNt
Average Samples
AVERage STATe
FREQuency RANGe LOWer
Average or Single?
High Speed Voltage Measurements
FUNCtion
Select Measuring Function
Functions and channels in PM6685
Input channels PM6685
Functions and channels in PM6680B and PM6681
Input channels PM6680B and PM6681
INTernal FORMat
Internal Format
Number of Results
Buffer
SDELay
BURST/PRF Synchronization Delay
ROSCillator SOURce
Select Reference Oscillator
TOTalize Gate
VOLTageGATedSTATe
Gate On/Off
Gated Voltage Measurement
This page is intentionally left blank
Related Common Commands
Status Subsystem
STATus DREGister0 ENABle
Enable Device Status Reporting
Bit No Weight Condition
STATus DREGister0?
STATus OPERation CONDition?
Read Operation Status Condition Register
STATus OPERation ENABle
Enable Operation Status Reporting
Send Statoperenab
288
Read Operation Status, Event
STATusPRESet values
STATusOPERation?
Read Questionable Data/Signal Condition Register
STATus QUEStionable CONDition?
STATus QUEStionable ENABle
Enable Questionable Data/Signal Status Reporting
Read Questionable Data/Signal Event Register
STATus QUEStionable?
This page is intentionally left blank
Related common command
System Subsystem
SYSTem ERRor?
SYSTem COMMunicate Gpib ADDRess
Set Gpib Address
Send Systcommgpibaddr
SYSTem PRESet
Preset
Signal Detection
See also Default settings on
Read or Send Settings
SYSTem SET
SYSTem Time ELAPsed?
Read On-time
Timeout On/Off
Timeout, Set
SYSTem Tout
SYSTem Tout Time
SYSTem UNPRotect
SYSTem VERSion?
Unprotect
System Version
Test Subsystem
Select Check signal
TESTCHECk
Test SELect
Select Self-tests
Trigger Subsystem
Send Trigcoun
TRIGgerCOUNt
No. of Triggerings on each Ext Arm start
Common Commands
Clear Status Command
Send *CLS
Define Macro
Send AMPLITUDE?
Read +3.46125461E-001+3.64852399E-001
Send Autofilt OFF
Enable Macros
Enables macro expansion and execution
Decimal data PM6680B/81/85
SEND*EMC
Operation Complete
Standard Event Status Enable
Event Status Enable Register 1 = enable
Event Status Register
Get Macro Definition
Macro label PM6680B/81/85
Send *GMC? ‘AMPLITUDE?’
Identification query
Learn Macro
Main
READAUTOFILT,AMPLITUDE?
Send INIT*OPC
Learn Device Setup
Operation Complete
Operation Complete Query
Option Identification
Example 6 is Chapter
Bus option,Prescaler option
Power-on Status Clear
This example enables automatic power-on clearing
Purge Macros
Removes all macro definitions
Protected User Data
Recall
Reset
This command removes an individual MACRo PM6680B/81/85
Default settings on
‘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
Status Byte Query
ARMSTARtLAYer2IMM *WAIFETCh?
Send ARMSTARTLAY2SOURCE BUS Send Initcont on
Read +3.2770536E+004
Integer = PM6680B Error PM6681, PM6685 Er Ror
Self Test
Wait-to-continue
SENDMEASFREQ? *WAIMEASPDUT?
Index
Address
Auto
Auto calibration on/off· · · · · · · · · · · 9-24Average
Average or Single? · · · · · · · · · · · · ·
Command Error CME
Burst
Bus
Calculate
CONFigureTOTalizeACCumulated
ARMSEQuence1LAYer1ECOunt
STATusQUEStionableCONDition?
SENSeFREQuencyRANGeLOWer
STATusOPERationCONDition?
Delay
Device dependent Error DDE
Device Status Register
Display
Events
Execution
External Events before Start Arming
Fail Limit · · · · · · · · · · · · · · · · · · · · · · ·
Hysteresis · · · · · · · · · · · · · · · · · · · ·
Initiated state · · · · · · · · · · · · · · · · · 6-28Input
Lower Limit
Measuring
Monitor
Operation Status
Pulse
QUE · · · · · · · · · · · · · · · · · 9-130 9-131Query
Response
Result
Settings
Set
Stop arming · · · · · · · · · · · · · · · · · 9-11Source
Speed
Time out For measurement TIO · · · · · · · 6-24Timebase
Test
Time
See Also Command *TRG
Upper Limit