Agilent Technologies
Warn in G
WA R N I N G
Agilent Technologies Sales and Service Offices
Japan 0120 421 0120 421 678 FAX Mexico 5081
This manual is divided into 5 parts
Structure of this Manual
Conventions used in this Manual
Related Manuals
T E
Table of Contents
Signal Generation The SOURce Subsystem
Specific Command Summary
Root Layer Command
Signal Conditioning
Features of the Agilent 816x Instrument Driver
Installing the Agilent 816x Instrument Driver
Using Visual Programming Environments
Error Handling
Removed Command
Compatibility Issues
Preset Defaults
Obsolete Commands
Operational/Questionable Status System for
Agilent 8163A/B, 8164A/B & 8166A/B Mainframes, Sixth Edition
Agilent 8163A/B, 8164A/B & 8166A/B Mainframes, Sixth Edition
List of Tables
Agilent 8163A/B, 8164A/B & 8166A/B Mainframes, Sixth Edition
Introduction to Programming
Introduction to Programming
Gpib Interface
Camino del Rio South, Suite 340 San Diego, CA
Scpi Consortium Office Bode Enterprise
Mnemonic Function
Gpib Interface
If the instrument is in remote control, a screen resembling
Returning the Instrument to Local Control
Message Queues
Message Queues
How the Input Queue Works
Clearing the Input Queue
Output Queue
If more than 29 errors are put into the queue, the message
Error Queue
If no error has occurred, the error queue contains
Is placed as the last message in the queue
Crlf
Command message is ended by a line feed character LF or
Programming and Syntax Diagram Conventions
Is in long form Short form of this message is
Statusoperationenable
Short Form and Long Form
Statoperenab
Units
Command and Query Syntax
Unit Default Allowed Mnemonics
String Value Wsp
Data Types
Slot and Channel Numbers
Laser Selection Numbers
Input to your Return Loss module for the following commands
112,
Common Commands
Common Commands
Parameter Function
Common Command Summary
Gives a summary of the common commands
Common Status Information
ESE sets the Standard Event Status Enable Mask
All bits shown as are unused Event Status Enable Mask
T E
Status Model
Status Registers
Status Model
Slot Status Condition
Status System for 8163A/B & 8164A/B
Slot Status Event
Status System for 8166A/B
Standard Event Status Register
Annotations
Status Byte Register
Operation/Questionable Status Summary
Operation Slot Status Register
Operation/Questionable Status Summary Register
Operation/Questionable Slot Status
Questionable Slot Status Register
Status Model
Status Command Summary
Long
Other Commands
OPT? WAI IDN?
Introduction to Programming
Specific Commands
Command Description
Specific Command Summary
Specific Commands
WAVelengthREFerence/?
INITiatenCHANnelm
Command Description DISPlay
FETChnCHANnelmSCALar
INPUTnCHANnelm
READnCHANnelm
PATH/?
Terminals
ROUTen
SENSenCHANnelmPOWer
SENSenCHANnelmFUNCtion
SENSenCHANnelmRETurnlossCORRection
Command Description SENSenCHANnelmPOWerReference
SENSenCHANnelmRETurnlossCALibration
SLOTn
SOURcenCHANnelm
SOURcenCHANnelmPOWer
SOURcenCHANnelmPOWerATTenuationl
SOURcenCHANnelmAM
SOURcenCHANnelmWAVelengthCORRection
SOURcenCHANnelmWAVelengthREFerence
Command Description SOURcenCHANnelmWAVelengthSWEep
SOURcenCHANnelmWAVelengthSWEepSTEP
STATusOPERation
Command Description SPECial
STATusn
STATusnOPERation
SYSTem
Command Description STATusnQUEStionable
Slot n
SYSTemCOMMunicateGPIB
Specific Commands
Instrument Setup and Status
IEEE-Common Commands
Instrument Setup and Status
Standard event status register Sesr
Error queue
At power-on By sending a value of zero
Status byte register STB
ESE?
Bit Mnemonic Decimal Value
Parameters None Response Identification terminated by END
Complete, Command Idle State
Power-on
Agilent Technologies Manufacturer
Slot 1 for the Agilent 8163A/B and Agilent 8166A/B
Plete, Command Idle State
Lead to useful gains in program execution efficiency
Example OPT? → 81682A , , 81533B, 81532A, END
Error queue
Following are not changed
Bits Mnemonic
Selftest failed on Mainframe
WAI
Pending operations, are completed during the wait period
Bits Mnemonics
Status Reporting The STATus Subsystem
STATusOPERationEVENtLEVel0?
Agilent 8163A/B Agilent 8164A/B Agilent 8166A/B
Status Reporting The STATus Subsystem
STATusOPERationCONDitionLEVel0?
STATusOPERationEVENtLEVel1?
STATusOPERationENABleLEVel
STATusOPERationENABleLEVel0?
Bits Mnemonics Decimal Value Agilent 8166A/B
STATusOPERationENABleLEVel1?
STATusOPERationENABleLEVel1
Syntax STATusOPERationENABleLEVel1wspvalue Description
STATusOPERationCONDitionLEVel1?
STATus nOPERationEVENt?
Offset
Extrapolated values
STATus nOPERationCONDition?
STATusnOPERationENABle?
STATusnOPERationENABle
STATusnOPERationENABlewspvalue
STATusPRESet
Statques? → +0END
STATusQUEStionableEVENtLEVel0?
Agilent 8163A/B Agilent 8164A/B
STATusQUEStionableCONDitionLEVel0?
STATusQUEStionableEVENtLEVel1?
STATusQUEStionableENABleLEVel
STATusQUEStionableENABleLEVel0?
STATusQUEStionableCONDitionLEVel 1?
Syntax STATusQUEStionableENABleLEVel 1wspvalue Description
STATusQUEStionableENABleLEVel1?
Syntax STATusQUEStionableCONDitionLEVel 1? Description
11-15 Not Used
STATusnQUEStionableEVENt?
Syntax STATusnQUEStionableEVENt? Description
STATusnQUEStionableCONDition?
STATusnQUEStionableENABle?
STATusnQUEStionableENABle
STATusnQUEStionableENABlewspvalue
SYSTemDATE?
SYSTemERRor?
SYSTemDATE
Gpib interface state
Output and error queues
Standard Event Status Enable Mask SESEM,
Backlight and contrast of the display
SYSTemCOMMunicateGPIBSELFADDRess
SYSTemTIME?
SYSTemVERSion?
Systcommgpibaddr
Measurement Operations & Settings
LOCK?
Root Layer Command
Measurement Operations & Settings
Slot nEMPTy?
Agilent Technologies as the manufacturer
Manufacturer
Slot nIDN?
SLOTnHEADnIDN?
SLOTnTST?
SLOTnHEADnEMPTy?
SLOTnHEADmWAVelengthRESPonse?
SLOTnHEADmOPTions?
SLOTnHEADmTST?
Syntax SLOTnHEADmWAVelengthRESPonse? Description
SLOTnHEADmWAVelengthRESPonseSIZE?
SPECialREBoot
SLOTnHEADmWAVelengthRESPonseCSV?
Agilent 81635A and Agilent 81619A Master Slave Channels
Command
Measurement Functions SENSe Subsystem
Measurement Functions The SENSe Subsystem
SENSenCHANnelmPOWerUNIT/? SENSenCHANnelmPOWerWAVelength/?
FETChnCHANnelmSCAlarPOWerDC?
FETChnCHANnelmSCAlarRETurnloss?
INITiatenCHANnelmCONTinuous
FETChnCHANnelmSCAlarMONitor?
INITiatenCHANnelmIMMediate
Read nCHANnel mSCALarPOWerALL?
INITiate nCHANnel mCONTinuous?
Ber
Read nCHANnel mPOWerALLCONFig?
READnCHANnelmSCALarPOWerDC?
Member of the pair represents the channel number
READnCHANnelmSCALarMONitor?
READnCHANnelmSCALarRETurnloss?
SENSenCHANnelmCORRectionCOLLectZERO
SENSe nCHANnel mCORRectionLOSSINPutMAGNitude
SENSenCHANnelmCORRectionLOSSINPutMAGNitude?
SENSenCHANnelmCORRectionCOLLectZEROALL
SENSe nCHANnel mCORRectionCOLLectZERO?
Operation
SENSenCHANnelmFUNCtionPARameterLOGGing?
SENSenCHANnelmFUNCtionPARameterLOGGing
Averaging Time
Cont
SENSenCHANnelmFUNCtionPARameterMINMax
SENSenCHANnelmFUNCtionPARameterMINMax?
Wind
Averaging Time Period Time
SENSenCHANnelmFUNCtionPARameterSTABility
Period time
Response Example Affects Dual sensors
Sens1funcres? →
SENSenCHANnelmFUNCtionPARameterSTABility?
SENSenCHANnelmFUNCtionRESult?
Return Loss modules
SENSe nCHANnel mFUNCtionRESultBLOCk?
SENSe nCHANnel mFUNCtionRESultMAXBlocksize?
SENSenCHANnelmFUNCtionRESultMONitor?
SENSenCHANnelmFUNCtionSTATe?
100
SENSenCHANnelmFUNCtionSTATe
SENSenCHANnelmFUNCtionTHReshold
SENSenCHANnelmPOWerATIMe
101
SENSenCHANnelmFUNCtionTHReshold?
Range Upper Linear Power Limit
SENSenCHANnelmPOWerATIMe?
SENSenCHANnelmPOWerRANGeUPPer
102
103
SENSenCHANnelmPOWerRANGeUPPer?
SENSenCHANnelmPOWerRANGeMONitorUPPer
Range Upper Linear
Ment. Otherwise, it must be set by the sensnpowrang command
SENSenCHANnelmPOWerRANGeMONitorUPPer?
SENSenCHANnelmPOWerRANGeAUTO
SENSenCHANnelmPOWerRANGeAUTO?
You must append a unit type
Reference mode using the command
105
DB if you use TOMODule or
SENSenCHANnelmPOWerREFerenceSTATe?
SENSenCHANnelmPOWerREFerenceDISPlay
SENSenCHANnelmPOWerREFerenceSTATe
106
107
SENSe nCHANnel mPOWerREFerenceSTATeRATio
SENSenCHANnelmPOWerREFerenceSTATeRATio?
To the channel for the second value
SENSenCHANnelmPOWerWAVelength
SENSe nCHANnel mPOWerUNIT
SENSenCHANnelmPOWerUNIT?
108
SENSenCHANnelmRETurnlossCALibrationFACTory
SENSenCHANnelmPOWerWAVelength?
109
SENSenCHANnelmRETurnlossCALibrationFACTory
Defined termination reference measurement. See
110
SENSe nCHANnel mRETurnlossCALibrationCOLLectTERMination
SENSe nCHANnel mRETurnlossCALibrationTERMination?
SENSenCHANnelmRETurnlossCORRectionFPDeltal?
111
SENSenCHANnelmRETurnlossCORRectionFPDeltal
DB reference
112
SENSe nCHANnel mRETurnlossCORRectionREFLectance l
Lower wavelength source is denoted by
OUTPutnCHANnelmCONNection
Signal Generation The SOURce Subsystem
113
OUTPutnCHANnelmCONNection?
OUTPutnCHANnelmSTATe
114
OUTPutnCHANnelmPATH?
SOURcenCHANnelmAMINTernalFREQuencyl?
115
SOURcenCHANnelmAMINTernalFREQuencyl
Syntax SOURcenCHANnelmAMSOURcelwsp
116
SOURcenCHANnelmAMSOURcel
INTINT1INT2COHCAEXTEXTDEXTWVLLBACK012356
SOURcenCHANnelmAMSTATel?
117
SOURcenCHANnelmAMSTATel
Wavelength source is denoted by
SOURcenCHANnelmAMCOHCtrlCOHLevell?
118
SOURce nCHANnel mAMCOHCtrlCOHLevel l
SOURcenCHANnelmFMSOURcel
SOURcenCHANnelmFMSTATel
119
SOURce nCHANnel mFMSOURce l?
SOURcenCHANnelmFMSTATel?
Mhzkhzhzminmaxdef
120
SOURcenCHANnelmFMSBSCtrlFREQuencyl
SOURcenCHANnelmFMSBSCtrlFREQuencyl?
SOURcenCHANnelmMODout
121
SOURcenCHANnelmFMSBSCtrlLevell?
SOURcenCHANnelmMODout?
SOURcenCHANnelmPOWerATTenuationl?
122
SOURcenCHANnelmPOWerATTenuationlDARK
SOURcenCHANnelmPOWerATTenuationlAUTO
SOURcenCHANnelmPOWerATTenuationlAUTO?
This command is available in Attenuation Mode Only
124
SOURcenCHANnelmPOWerATTenuationlDARK?
SOURcenCHANnelmPOWerLEVelIMMediateAMPLitudel
Also allowed MIN minimum amplitude level
SOURcenCHANnelmPOWerLEVelIMMediateAMPLitudel?
125
126
SOURcenCHANnelmPOWerLEVelRISetimel
SOURcenCHANnelmPOWerLEVelRISetimel?
SOURcenCHANnelmPOWerUNIT
SOURce nCHANnel mPOWerSTATe
SOURcenCHANnelmPOWerSTATe?
SOURcenCHANnelmPOWerUNIT?
128
SOURcenCHANnelmPOWerWAVelength
SOURcenCHANnelmPOWerWAVelength?
Pmax
129
SOURce nCHANnel mREADoutDATA?
SOURce nCHANnel mREADoutDATABLOCk?
SOURcenCHANnelmREADoutPOINts?
130
SOURcenCHANnelmWAVelengthCWlFIXEDlwspvalue
SOURcenCHANnelmWAVelengthCWlFIXEDl
SOURcenCHANnelmWAVelengthCORRectionARA
131
SOURcenCHANnelmWAVelengthCWlFIXEDl?
SOURce nCHANnel mWAVelengthCORRectionAUTocalib
132
SOURce nCHANnel mWAVelengthCORRectionARAALL
81989A, 81949A
SOURcenCHANnelmWAVelengthCORRectionZEROALL
133
SOURce nCHANnel mWAVelengthCORRectionZERO
SOURcenCHANnelmWAVelengthFREQuencyl
134
SOURcenCHANnelmWAVelengthCORRectionZEROAUTO
Thzghzmhzkhzhz
SOURcenCHANnelmWAVelengthREFerencel?
135
SOURcenCHANnelmWAVelengthFREQuencyl?
SOURcenCHANnelmWAVelengthREFerenceDISPlay
Message
136
SOURcenCHANnelmWAVelengthSWEepCHECkparams?
SOURce nCHANnel mWAVelengthSWEepCYCLes
137
ValueMINMAXDEF0
SOURce nCHANnel mWAVelengthSWEepCYCLes?
SOURce nCHANnel mWAVelengthSWEepDWELl?
138
SOURce nCHANnel mWAVelengthSWEepDWELl
SOURcenCHANnelmWAVelengthSWEepEXPectedtriggers?
Sweep state
139
SOURcenCHANnelmWAVelengthSWEepFLAG?
Start Sweep waiting for trigger Trigger →
SOURcenCHANnelmWAVelengthSWEepLLOGging
Following settings are the prerequisites for Lambda Logging
140
SOURcenCHANnelmWAVelengthSWEepLLOGgingwspOFFON01
SOURcenCHANnelmWAVelengthSWEepMODE?
141
SOURcenCHANnelmWAVelengthSWEepMODE
SOURcenCHANnelmWAVelengthSWEepPMAX?
SOURcenCHANnelmWAVelengthSWEepREPeat?
142
SOURcenCHANnelmWAVelengthSWEepREPeat
SOURcenCHANnelmWAVelengthSWEepSPEed
143
SOURce nCHANnel mWAVelengthSWEepSOFTtrigger
SOURcenCHANnelmWAVelengthSWEepSPEed?
SOURcenCHANnelmWAVelengthSWEepSTARt?
144
SOURce nCHANnel mWAVelengthSWEepSTARt
SOURcenCHANnelmWAVelengthSWEepSTOP
SOURcenCHANnelmWAVelengthSWEepSTOP?
If you enable lambda logging see
145
SOURcenCHANnelmWAVelengthSWEepSTATe
SOURcenCHANnelmWAVelengthSWEepSTEPNEXT
146
SOURcenCHANnelmWAVelengthSWEepSTATe?
SOURcenCHANnelmWAVelengthSWEepSTEPPREVious
147
SOURce nCHANnel mWAVelengthSWEepSTEPWIDTh?
148
Signal Conditioning
INPut and OUTput commands
INPut nCHANnel mATTenuation
INPutnCHANnelmOFFSet?
149
INPutnCHANnelmOFFSet
INPutnCHANnelmOFFSetDISPlay
INPutnCHANnelmATTenuationSPEed
INPutnCHANnelmOFFSetPOWermeter
150
INPutnCHANnelmATTenuationSPEed?
MAX DEF
151
INPutnCHANnelmWAVelength
INPutnCHANnelmWAVelength?
152
OUTPutnCHANnelmPOWer
OUTPutnCHANnelmPOWer?
OUTPut nCHANnel mAPMode?
OUTPutnCHANnelmPOWerREFerencePOWermeter
OUTPutnCHANnelmPOWerREFerence
OUTPutnCHANnelmPOWerREFerence?
153
OUTPutnCHANnelmPOWerOFFSetPOWermeter
OUTPutnCHANnelmPOWerOFFSet
OUTPutnCHANnelmPOWerOFFSet?
154
OUTPutnCHANnelmPOWerUNit
OUTPut nCHANnel mPOWerCONTRol
OUTPutnCHANnelmPOWerCONTRol?
155
156
OUTPut nCHANnel mPOWerUNit?
OUTPutnCHANnelmSTATeAPOWeron
OUTPut nCHANnel mSTATe
OUTPutnCHANnelmATIMe
OUTPutnCHANnelmSTATeAPOWeron?
157
OUTPutnCHANnelmATIMe?
OUTPCORRCOLLZER0? → 0END
158
OUTPutnCHANnelmCORRectionCOLLectionZEROALL
Table of wavelength-dependent offsets
159
160
CONFigurenCHANnelmOFFSetWAVelengthSTATe
CONFigurenCHANnelmOFFSetWAVelengthSTATe?
CONF1OFFSWAVSTAT on
161
CONFigurenCHANnelmOFFSetWAVelengthVALue
CONFigurenCHANnelmOFFSetWAVelengthREFerence
CONF1OFFSWAVREF 4,2
CONFigurenCHANnelmOFFSetWAVelengthVALueOFFSet?
CONFigurenCHANnelmOFFSetWAVelengthREFerence?
CONFigurenCHANnelmOFFSetWAVelengthVALueWAVelength?
162
CONFigurenCHANnelmOFFSetWAVelengthVALueDELeteALL
CONFigurenCHANnelmOFFSetWAVelengthVALuePAIR?
CONFigurenCHANnelmOFFSetWAVelengthVALueDELete
163
164
CONFigurenCHANnelmOFFSetWAVelengthTABle?
CONFigurenCHANnelmOFFSetWAVelengthTABleSIZE?
CONF1OFFSWAVTABSIZE? →
Slot Numbers
When the attenuator is hosted in Slot
TIP Query the Scpi error queue using SYSTERR?
165
Command Semantic
166
167
Display and System Commands
Ieee Commands
168
Status Commands
User Calibration Data
169
Signal Routing
Switch modules
ROUTe nCHANnel m
ROUTenCHANnelmCONFigROUTe?
ROUTenCHANnelmCONFig?
Syntax ROUTenCHANnelmCONFig? Description
170
Hardware
Triggering The TRIGger Subsystem
171
Software Triggering Data Acquisition Functions Sensfuncstat
172
Generating Output Triggers from Power Measurements
DISabled An output trigger will never be generated AVGover
Software Triggering Data Acquisition Functions
173
TRIGgernCHANnelmINPutREARm
174
TRIGgernCHANnelmINPut?
TRIGgernCHANnelmOFFSet
175
TRIGger nCHANnel mINPutREARm?
TRIGgernCHANnelmOFFSet value
Return loss modules
176
TRIGger nCHANnel mOUTPut
Continuous mode, wavswestepwidt is used for triggering, see
177
Output triggers using power measurements
TRIGgerCONFiguration
TRIGger nCHANnel mOUTPutREARm
TRIGgerCONFigurationFPEDal?
TRIGgerCONFiguration?
TRIGgerCONFigurationFPEDal
178
TRIGger
Extended Trigger Configuration
179
Bit unsigned integer , see below
Extended Trigger Configuration
180
181
Node a Input Configuration
Node B Input Configuration
Output Matrix Configuration
Extended Trigger Configuration Example
Output Trigger Connector or Individual module slots
182
Sequence starts again at and continues until the sweep ends
183
Trigconfext #H2,#H0,#H0 is described by -1 and sets one bit
184
Mass Storage, Display, and Print Functions
185
186
Display Operations
DISPlay Subsystem
Display
187
DISPlayENABle
DISPlayENABle?
DISPlayBRIGhtness?
DISPlayLOCKout?
188
Mass Storage, Display, and Print Functions
Same program
Instrument using Visa library calls
189
CD-ROM 08164-90BC4
Visa Programming Examples
How to Use Visa Calls
190
How to Use Visa Calls
191
How to Set up a Fixed Laser Source
192
How to Set up a Fixed Laser Source
193
194
195
How to Measure Power using FETCh and Read
How to Measure Power using FETCh and Read
196
197
198
199
How to Co-ordinate Two Modules
How to Co-ordinate Two Modules
200
201
202
203
How Power Varies with Wavelength
How Power Varies with Wavelength
204
205
206
207
How to Log Results
How to Log Results
208
209
210
211
212
Agilent 816x VXIplug&play Instrument Driver
213
214
Agilent 816x VXIplug&play Instrument Driver
Installing the Agilent 816x Instrument Driver
215
216
217
Program Folder Item Options
Gpib Interfacing in Agilent VEE
Using Visual Programming Environments
Getting Started with Agilent VEE
218
Enter the following information Name enter hp816X
Using Visual Programming Environments
219
Select hp816X from the Plug&play Driver Name drop-down list
220
This folder contains a subfolder named instr.lib
Getting Started with LabView
221
222
FP Conversion Options Box
Instrument Driver with LabView
223
LabView is a trademark of National Instruments Corporation
Getting Started with LabWindows
224
225
Features of the Agilent Instrument Driver
Features of the Agilent 816x Instrument Driver
Directory Structure
226
Successful completion of this function returns Visuccess
Opening an Instrument Session
227
Opening an Instrument Session
Closing an Instrument Session
228
229
Visa Data Types and Selected Constant Definitions
230
Error Handling
Check for an error or event after each function
ViStatus errStatus
Error Handling
231
VISA-Specific Information
Introduction to Programming
Example Programs
Development Environments
LabWindows CVI/ R 4.0 or higher
Microsoft Visual Basic 4.0 or higher
Agilent VEE 5.01 or higher
233
Latest copy of this driver can be downloaded via
Online Information
234
Lambda Scan Applications
Lambda Scan Applications
235
Equally Spaced Datapoints
236
237
How to Perform a Lambda Scan Application
Prepare Lambda Scan Function
238
Get Lambda Scan Parameters Function
Execute Lambda Scan Function
Get Lambda Scan Parameters
Power 8163A or B
How to Perform a Multi-Frame Lambda Scan Application
8164A or B Power
239
Unregister Mainframe Function
Equally Spaced Datapoints Function
Register Mainframe Function
240
Prepare Multi Frame Lambda Scan Function
241
Get Lambda Scan Result Function
Get MF Lambda Scan Parameters Function
Execute Multi Frame Lambda Scan Function
242
243
Get Number of PWM Channels Function
Get Channel Location Function
Maximum number of channels that may be specified is
244
Error Codes
257
Gpib Error Strings
258
Suffix too long
259
Program mnemonic too long
260
Standard 200
261
New 185
New 201
Old 212
262
Old 211
Old 213
Standard 222
263
Old 221
264
265
266
267
To -499 Query Errors
268
Standard 430
269
Standard 420
Standard 440
270
Overview for Unsupported Strings
Gpib Command Compatibility List
245
Command Change Affects
Compatibility Issues
These commands are incompatible
Gpib Bus Compatibility
247
248
Preset Defaults
Preset defaults are different
Removed Command
249
250
Obsolete Commands
Old Command New Command Affects
SOURAMFREQ/?
Changed Parameter Syntax Semantics
251
Dispbrig
TST
Changed Query Result Values
252
SENSPOWUNIT?
Details the ways in which timing behavior is different
Timing Behavior
253
Change Affects
FLT/DBLMAX
254
Returned Value Affects
255
Command Order
Command Order
Instrument Status Settings
256
Index
271
272
Slot
Page
Agilent Technologies, Deutschland GmbH 08164-90B64