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