Agilent N8211A/N8212A Performance Upconverter Synthetic Instrument Modules, 250 kHz to 20 / 40 GHz SCPI Programming Guide Edition, January 15, 2008 N8212-90008 Agilent Technologies
Notices © Agilent Technologies, Inc. 2008 Manual Part Number No part of this manual may be reproduced in any form or by any means (including electronic storage and retrieval or translation into a foreign language) without prior agreement and written consent from Agilent Technologies, Inc. as governed by United States and international copyright laws. N8212-90008 Edition Edition, January 15, 2008 Printed in USA Windows® Agilent Technologies, Inc.
Introducing the N8211A/N8212A Performance Upconverter The Agilent Technologies N8211A performance analog upconverter is a synthetic instrument module that translates low-frequency input signals to an output range reaching 20 or 40 GHz. It provides signal bandwidth to support amplitude modulation (AM), frequency modulation (FM), and pulse modulation without contributing additional noise to the original signal source (typically an analog signal generator).
Agilent N8211A/N8212A Performance Upconverter Synthetic Instrument Module, 250 kHz to 20 / 40 GHz
Contents Introducing the N8211A/N8212A Performance Upconverter 3 1 Getting Started with Remote Operation Programming and Software/Hardware Layers LAN Interface 18 19 IO Libraries and Programming Languages 20 Agilent IO Libraries Suite 20 Windows NT™ and Agilent IO Libraries M (and Earlier) Selecting IO Libraries for LAN 22 Programming Languages 22 20 Error Messages 23 Error Message File 23 Error Message Types 23 2 Using the LAN Interface Using LAN 26 Connect LAN Cables and Turn On Power 27 Connect
If the Instrument Web Page is Not Visible 48 If the Software Driver Will Not Open the Connection 49 3 Programming Examples Using the Programming Interface Examples 52 Programming Examples Development Environment Running C++ Programs 52 Running C# Examples 53 Running Basic Examples 53 Running Java Examples 53 Running Perl Examples 54 52 LAN Programming Interface Examples 55 VXI-11 Programming 55 VXI-11 Programming Using SICL and C++ 55 VXI-11 Programming Using VISA and C++ 58 Sockets LAN Programming and
Data Questionable Modulation Status Group Data Questionable Calibration Status Group 124 126 5 Creating and Downloading User-Data Files Overview 132 Save and Recall Instrument State Files 133 Save and Recall SCPI Commands 133 Save and Recall Programming Example Using VISA and C# User Flatness Correction Downloads Using C++ and VISA 133 147 6 SCPI Basics How the SCPI Information is Organized 154 SCPI Listings 154 Subsystem Groupings by Chapter 154 Supported Models and Options per Command 154 SCPI Ba
:WBIQ:STARt :WBIQ:STOP 173 174 Diagnostic Subsystem (:DIAGnostic[:CPU]:INFOrmation) :BOARds 175 :CCOunt:ATTenuator 175 :CCOunt:PON 175 :DISPlay:OTIMe 175 :LICENse:AUXiliary 175 :OPTions 176 :OPTions:DETail 176 :OTIMe 176 :REVision 176 :SDATe 176 175 Display Subsystem (:DISPlay) 177 :ANNotation:AMPLitude:UNIT 177 IEEE 488.
:CATalog:UFLT 185 :CATalog[:ALL] 186 :COPY[:NAME] 186 :DATA:APPend 186 :DELete:ALL 187 :DELete:BINary 187 :DELete:LIST 188 :DELete:STATe 188 :DELete:UFLT 188 :DELete[:NAME] 188 :FREE[:ALL] 188 :LOAD:LIST 189 :MOVE 189 :STATe:COMMent 189 :STORe:LIST 190 Mass Memory Subsystem (:MMEMory) :CATalog 191 :COPY 191 :DELete[:NAME] 192 :HEADer:CLEar 192 :HEADer:DESCription 193 :LOAD:LIST 193 :MOVE 194 :STORe:LIST 194 191 Output Subsystem (:OUTPut) 195 :BLANking:AUTO 195 :BLANking:[STATe] 195 :MODulation[:STATe] 196
:QUEStionable:CALibration[:EVENt] 201 :QUEStionable:CONDition 201 :QUEStionable:ENABle 202 :QUEStionable:FREQuency:CONDition 202 :QUEStionable:FREQuency:ENABle 202 :QUEStionable:FREQuency:NTRansition 203 :QUEStionable:FREQuency:PTRansition 203 :QUEStionable:FREQuency[:EVENt] 204 :QUEStionable:MODulation:CONDition 204 :QUEStionable:MODulation:ENABle 205 :QUEStionable:MODulation:NTRansition 205 :QUEStionable:MODulation:PTRansition 206 :QUEStionable:MODulation[:EVENt] 206 :QUEStionable:NTRansition 207 :QUEStio
:SECurity:LEVel 217 :SECurity:LEVel:STATe 218 :SECurity:OVERwrite 219 :SECurity:SANitize 219 :VERSion 220 Trigger Subsystem 221 :ABORt 221 :INITiate:CONTinuous[:ALL] 221 :INITiate[:IMMediate][:ALL] 221 :TRIGger:OUTPut:POLarity 222 :TRIGger[:SEQuence]:SLOPe 222 :TRIGger[:SEQuence]:SOURce 222 :TRIGger[:SEQuence][:IMMediate] 223 Unit Subsystem (:UNIT) :POWer 224 224 8 Basic Function Commands Correction Subsystem ([:SOURce]:CORRection) :FLATness:LOAD 226 :FLATness:PAIR 226 :FLATness:POINts 227 :FLATness:PRESe
:FREQuency:STOP 238 :FREQuency[:CW] 239 :FREQuency[:CW]:STEP[:INCRement] 239 :PHASe:REFerence 240 :PHASe[:ADJust] 240 :ROSCillator:BANDwidth:DEFaults 240 :ROSCillator:BANDwidth:EXTernal 241 :ROSCillator:BANDwidth:INTernal 241 :ROSCillator:SOURce 241 :ROSCillator:SOURce:AUTO 241 List/Sweep Subsystem ([:SOURce]) 243 :LIST:DIRection 243 :LIST:DWELl 244 :LIST:DWELl:POINts 244 :LIST:DWELl:TYPE 245 :LIST:FREQuency 245 :LIST:FREQuency:POINts 246 :LIST:MANual 246 :LIST:MODE 247 :LIST:POWer 247 :LIST:POWer:POINts 24
:MARKer:REFerence 257 :MARKer[0,1,2,3,4,5,6,7,8,9][:STATe] 257 Power Subsystem ([:SOURce]:POWer) 259 :ALC:BANDwidth|BWIDth 259 :ALC:BANDwidth|BWIDth:AUTO 259 :ALC:LEVel 260 :ALC:SEARch 260 :ALC:SEARch:REFerence 261 :ALC:SEARch:SPAN:START 261 :ALC:SEARch:SPAN:STOP 261 :ALC:SEARch:SPAN:TYPE FULL|USER 262 :ALC:SEARch:SPAN[:STATe] ON|OFF|1|0 262 :ALC:SOURce 262 :ALC:SOURce:EXTernal:COUPling 263 :ALC[:STATe] 263 :ATTenuation 264 :ATTenuation:AUTO 264 :MODE 265 :PROTection:STATe 266 :REFerence 266 :REFerence:ST
:AM[1]|2:INTernal[1]|2:FUNCtion:NOISe 277 :AM[1]|2:INTernal[1]|2:FUNCtion:SHAPe 277 :AM[1]|2:INTernal[1]:SWEep:RATE 277 :AM[1]|2:INTernal[1]:SWEep:TRIGger 278 :AM[1]|2:SOURce 278 :AM[1]|2:STATe 279 :AM[1]|2:TYPE 279 :AM[1]|2[:DEPTh]:EXPonential 280 :AM[1]|2[:DEPTh][:LINear] 280 :AM[1]|2[:DEPTh][:LINear]:TRACk 281 :AM[:DEPTh]:STEP[:INCRement] 281 Frequency Modulation Subsystem ([:SOURce]) 283 :FM[1]|2 283 :FM:INTernal:FREQuency:STEP[:INCRement] 283 :FM[1]|2:EXTernal[1]|2:COUPLing 284 :FM[1]|2:EXTernal[1]|2:I
:LFOutput:STATe 295 Phase Modulation Subsystem ([:SOURce]) 297 :PM[1]|2 297 :PM:INTernal:FREQuency:STEP[:INCRement] 297 :PM[1]|2:BANDwidth|BWIDth 298 :PM[1]|2:EXTernal[1]|2:COUPling 298 :PM[1]|2:EXTernal[1]|2:IMPedance 299 :PM[1]|2:INTernal[1]:FREQuency 299 PM[1]|2:INTernal[1]:FREQuency:ALTernate 299 :PM[1]|2:INTernal[1]|2:FUNCtion:NOISe 300 :PM[1]|2:INTernal[1]|2:FUNCtion:RAMP 300 :PM[1]|2:INTernal[1]:FREQuency:ALTernate:AMPLitude:PERCent :PM[1]|2:INTernal[1]:FUNCtion:SHAPe 301 PM[1]|2:INTernal2:FUNCtion
:EXTernal:POLarity 315 :EXTernal:SOURce 315 :IQADjustment:DELay 316 :IQADjustment:EXTernal:COFFset 317 :IQADjustment:EXTernal:DIOFfset 317 :IQADjustment:EXTernal:DQOFfset 318 :IQADjustment:EXTernal:GAIN 318 :IQADjustment:EXTernal:IOFFset 319 :IQADjustment:EXTernal:IQATten 319 :IQADjustment:EXTernal:QOFFset 320 :IQADjustment:GAIN 320 :IQADjustment:IOFFset 321 :IQADjustment:QOFFset 321 :IQADjustment:QSKew 322 :IQADjustment:SKEW 322 :IQADjustment:SKEW:Path 323 :IQADjustment[:STATe] 324 :MODulation:ATTen 324 :M
SCPI Programming Guide 1 Getting Started with Remote Operation “Programming and Software/Hardware Layers" on page 18 “LAN Interface" on page 19 “IO Libraries and Programming Languages" on page 20 “Error Messages" on page 23 Agilent Technologies 17
1 Getting Started with Remote Operation Programming and Software/Hardware Layers The Agilent Technologies N8211A performance analog upconverter or Agilent Technologies N8212A performance vector upconverter support LAN serial connection. Use the LAN interface, in combination with IO libraries and programming languages, to remotely control an N8211A/N8212A. Figure 1 uses LAN as an example of the relationships between the interface, IO libraries, programming language, and N8211A/N8212A.
Getting Started with Remote Operation 1 LAN Interface Data transfer using the LAN is as fast as the LAN handles packets of data. The single cable distance between a computer and the N8211A/N8212A is limited to 100 meters (100Base-T and 10Base-T). The N8211A/N8212A is designed to connect with a 10Base-T LAN. Where auto-negotiation is present, the N8211A/N8212A can connect to a 100Base-T LAN, but communicate at 10Base-T speeds. For more information on LAN communication refer to http://www.ieee.org.
1 Getting Started with Remote Operation IO Libraries and Programming Languages The IO libraries is a collection of functions used by a programming language to send instrument commands and receive instrument data. Before you can communicate and control the N8211A/N8212A, you must have an IO library installed on your computer. The Agilent IO libraries are included on an Automation-Ready CD with your N8211A/N8212A, or they can be downloaded from the Agilent website: http://www.agilent.com.
1 Getting Started with Remote Operation Using IO Config for Computer-to-Instrument Communication with VISA (Automatic or Manually) After installing the Agilent IO Libraries version M or earlier, you can configure the interfaces available on your computer by using the IO Config program. This program can setup the interfaces that you want to use to control the N8211A/N8212A. The following steps set up the interfaces. 1 Run the IO Config program. The program automatically identifies available interfaces.
1 Getting Started with Remote Operation 7 Click the Add device button. 8 Enter the GPIB address of the N8211A/N8212A. 9 Click the OK button in this form and all other forms to exit the IO Config program. Selecting IO Libraries for LAN The TELNET and FTP protocols do not require IO libraries to be installed on your computer. However, to write programs to control your N8211A/N8212A, an IO library must be installed on your computer and the computer configured for instrument control using the LAN interface.
1 Getting Started with Remote Operation Error Messages If an error condition occurs in the N8211A/N8212A, it is reported to the SCPI (remote interface) error queue. For additional general information on troubleshooting problems with your connections, refer to the Help in the Agilent IO Libraries and documentation.
1 Getting Started with Remote Operation data in the output queue has been lost. Device Specific Errors (–399 to –300, 201 to 703, and 800 to 810) indicate that a device operation did not properly complete, possibly due to an abnormal hardware or firmware condition. These codes are also used for self-test response errors. Errors in this class set the device-specific error bit (bit 3) in the event status register (IEEE 488.2, section 11.5.1).
SCPI Programming Guide 2 Using the LAN Interface “Using LAN" on page 26 “Connect LAN Cables and Turn On Power" on page 27 “Verify Connection with Synthetic Instrument Finder" on page 30 “Verifying LAN Functionality" on page 31 “Verifying LAN Functionality" on page 31 “Using VXI-11" on page 33 “Using Sockets LAN" on page 33 “Using Telnet LAN" on page 34 “Using FTP" on page 36 “Troubleshooting" on page 37 Agilent Technologies 25
2 Using the LAN Interface Using LAN The N8211A/N8212A is designed to connect with a 10Base-T LAN. Where auto-negotiation is present, the N8211A/N8212A can connect to a 100Base-T LAN, but communicate at 10Base-T speeds. For more information refer to http://www.ieee.org. The N8211A/N8212A can be remotely programmed via a 100Base-T LAN interface or 10Base-T LAN interface and LAN-connected computer using one of several LAN interface protocols.
2 Using the LAN Interface Connect LAN Cables and Turn On Power Before connecting to a LAN, verify your local policy by contacting the system administrator in your Information Technology (IT) department and inquire about connecting instruments to the LAN. • If the network uses DHCP (Dynamic Host Configuration Protocol), an address is assigned to the device automatically. If you need to know what the IP address is, it can be determined using the Synthetic Instrument Finder.
2 Using the LAN Interface 3 Turn on power to the N8211A/N8212A and wait until the LAN LED turns solid green; this can take up to four minutes depending on whether the instrument is using DHCP or Auto IP. Connect to a LAN with a Cross-Over LAN Cable You can connect the N8211A/N8212A directly to a PC using a crossover cable. To do this, you should either choose to set IP addresses of the PC and N8211A/N8212A to differ only in the last digit (example: PC’s IP: 1.1.1.1 and N8211A/N8212A’s IP: 1.1.1.
Using the LAN Interface 2 If you wish to communicate directly between the N8211A/N8212A and your PC without the use of a LAN hub, you can connect directly to your PC. 1 Connect a cross-over LAN cable from the LAN connector on your PC to the LAN connector on the rear panel of the N8211A/N8212A. 2 Turn on power to the PC. 3 Turn on power to the N8211A/N8212A and wait until the LAN LED turns solid green; this can take up to four minutes depending on whether the instrument is using DHCP or Auto IP.
2 Using the LAN Interface Verify Connection with Synthetic Instrument Finder Agilent supplies a program named the Synthetic Instrument Finder that enables connection between a PC and instruments that are connected on a LAN (Local Area Network). 1 From the Windows Desktop, click Start > Programs > Agilent SI Tools > Synthetic Instrument Finder. The Synthetic Instrument Finder will open and look similar to the following.
2 Using the LAN Interface If this Web page does not open or you experience an error, refer to “Troubleshooting" on page 37. Verifying LAN Functionality Verify the communications link between the computer and the N8211A/N8212A remote file server using the ping utility. Compare your ping response to those described in Table 1 on page 32.
2 Using the LAN Interface Table 1 Ping Responses Normal Response for UNIX A total of 9 or 10 packets received with a minimal average round-trip time. The minimal average will be different from network to network. LAN traffic will cause the round-trip to vary widely. Normal Response for DOS or Windows A total of 9 or 10 packets received if 10 echo requests were specified. If you have problems, refer to “Troubleshooting" on page 37.
2 Using the LAN Interface Using VXI-11 The N8211A/N8212A supports the LAN interface protocol described in the VXI-11 standard. VXI-11 is an instrument control protocol based on Open Network Computing/Remote Procedure Call (ONC/RPC) interfaces running over TCP/IP. It is intended to provide GPIB capabilities such as SRQ (Service Request), status byte reading, and DCAS (Device Clear State) over a LAN interface.
2 Using the LAN Interface Before you can use sockets LAN, you must select the N8211A/N8212A’s sockets port number to use: • Standard mode. Available on port 5025. Use this port for simple programming. • TELNET mode. The telnet SCPI service is available on port 5023. An example using sockets LAN is given in “LAN Programming Interface Examples" on page 55 of this programming guide. Using Telnet LAN Telnet provides a means of communicating with the N8211A/N8212A over the LAN.
2 Using the LAN Interface The Standard UNIX Telnet Command Synopsis telnet [host [port]] Description This command is used to communicate with another host using the Telnet protocol. When the command telnet is invoked with host or port arguments, a connection is opened to the host, and input is sent from the user to the host. Options and Parameters The command telnet operates in character-at-a-time or line-by-line mode. In line-by-line mode, typed text is echoed to the screen.
2 Using the LAN Interface Using FTP FTP allows users to transfer files between the N8211A/N8212A and any computer connected to the LAN. For example, you can use FTP to download instrument screen images to a computer. When logged onto the N8211A/N8212A with the FTP command, the N8211A/N8212A’s file structure can be accessed. Figure 2 shows the FTP interface and lists the directories in the N8211A/N8212A’s user level directory. File access is limited to the N8211A/N8212A’s /user directory.
2 Using the LAN Interface Troubleshooting Alternative Ways to Verify Connectivity to the PC In addition to using “Verify Connection with Synthetic Instrument Finder" on page 30, connectivity can be verified between the N8211A/N8212A and the PC with the following: • Verify that the LAN LED on the N8211A/N8212A’s front panel is green or blinking green. This indicates a good connection. If the LED is Red, there is a problem with your LAN connection. This takes approximately 60 seconds.
2 Using the LAN Interface Right-Pane Functions Send Settings Sends the current instrument settings to the N8211A/N8212A. Use this function if you modified the settings in Instrument Finder. 5 Second Identify Flashes the LAN LED for five seconds. Turn On Ident LED When On, the LAN LED continuously flashes on and off. Once the Turn On Ident LED button is pressed, the button name changes to Turn Off Ident LED. Refresh List Updates the device list.
2 Using the LAN Interface Tip: There are two other ways to access the device’s Web page: • By double-clicking on the Device listing in the Synthetic Instrument Finder. • By typing in the device’s hostname or IP address in your Internet browser. Open using Synthetic GUI Opens the Synthetic Instrument GUI. Copy VISA Address to Clipboard (IP Address) clipboard for use in other applications.
2 Using the LAN Interface • DHCP is set to on • Auto IP is set to on NOTE If DHCP and Auto IP are set to off, the IP address will be set to 192.168.EE.FF, where EE and FF are the last two parts of the MAC address (AA.BB.CC.DD.EE.FF). This is designed to prevent multiple instruments from using the same default IP address (refer to the instrument label). If you had manually configured LAN settings before, you may have to reconfigure your instrument to reset DHCP and Auto IP to OFF.
2 Using the LAN Interface How to Set a Static IP Address The DHCP server automates the process of setting up the IP addresses on your network by default. When the N8211A/N8212A is turned on, it searches for a DHCP server on the network and selects a “dynamic IP address”. Each time the N8211A/N8212A is rebooted, the N8211A/N8212A may get a different IP address.
2 Using the LAN Interface Figure 4 Connecting the PC LAN cable to the instrument LAN (cross-over cable) 3 Turn on power to the PC. 4 Turn on power to the N8211A/N8212A and wait until the LAN LED turns solid green; this takes about 60 seconds. 5 From the Windows Desktop, click Start > All Programs > Agilent SI Tools > Synthetic Instrument Finder. The following Synthetic Instrument Finder dialog box should appear.
Using the LAN Interface 2 7 Click View & Modify LAN Config in the left-pane of the Web page. The following dialog box should appear. 8 Click Modify Configuration to access the Password dialog.
2 Using the LAN Interface 9 Click Submit (accept the default password) and the following dialog box should appear. The default password is set to “agilent”. Tip: You can change the password from the View & Modify LAN Connections. (Scroll down the Parameter column until you locate the Change Password parameter.) 10 Change the DHCP and Auto IP radio-buttons to Off. Change the IP address, Subnet Mask, and Default Gateway values to meet your network requirements. 11 Click Save to save the new settings.
2 Using the LAN Interface How to Troubleshoot Connectivity Problems on the Network The Synthetic Instrument Finder program is used to find instruments on a network when the N8211A/N8212A is connected through a company LAN router or cross-over cable.
2 Using the LAN Interface • Lease Obtained • Lease Expired • Primary WINS Servers • Secondary WINS Servers If the Instrument was Unable to Join the LAN or If the LAN LED is Red Symptom Possible Causes Possible Solutions The instrument is not connected to a LAN. If connecting the instrument to a switch or hub, verify that the instrument is connected with a standard LAN cable. An incorrect LAN cable is being used.
2 Using the LAN Interface Possible Causes Possible Solutions A firewall is preventing communication between your Make sure that your firewall settings allow PC and your instrument. communication between your PC and other devices. The instrument is using Auto-IP (That is, the instrument assigned itself a 169.254.x.x IP address) and your PC is not using Auto IP (That is, PC does not have a 169.254.x.x IP address.) • Disable Auto-IP on the instrument. • Configure your PC to use Auto-IP.
2 Using the LAN Interface If the Instrument is Not Found by the Synthetic Instrument Finder Possible Causes Possible Solutions The instrument was unable to join the LAN. See “If the Instrument was Unable to Join the LAN" on page 46. The instrument and PC are on different switches/hubs and different subnets. • Put the instrument on the same switch or hub as your PC. • If the instrument is using DHCP, make sure that the instrument and the PC are put on the same subnet.
Using the LAN Interface 2 If the Software Driver Will Not Open the Connection Possible Causes Possible Solutions Your PC cannot communicate with the device over your LAN. See “If the Instrument’s IP Address or Hostname Cannot be Found with Ping" on page 46. Someone else is currently connected to the instrument. Make sure that no one else is connected to the instrument.
2 50 Using the LAN Interface Agilent N8211A/N8212A Performance Upconverter Synthetic Instrument Module, 250 kHz to 20 / 40 GHz
SCPI Programming Guide 3 Programming Examples “Using the Programming Interface Examples" on page 52 “LAN Programming Interface Examples" on page 55 Agilent Technologies 51
3 Programming Examples Using the Programming Interface Examples The programming examples for remote control of the N8211A/N8212A use the GPIB, LAN, and RS-232 interfaces and demonstrate instrument control using different IO libraries and programming languages. Many of the example programs in this chapter are interactive; the user will be prompted to perform certain actions or verify N8211A/N8212A operation or functionality.
3 Programming Examples C/C++ Examples • “VXI-11 Programming Using SICL and C++" on page 55 • “VXI-11 Programming Using VISA and C++" on page 58 • “Sockets LAN Programming Using Java" on page 91 Running C# Examples To run the example program State_Files.cs in “Save and Recall Programming Example Using VISA and C#" on page 133, you must have the .NET framework installed on your computer. You must also have the Agilent IO Libraries installed on your computer. The .
3 Programming Examples Running Perl Examples The Perl example “Sockets LAN Programming Using PERL" on page 94, uses PERL script to control the N8211A/N8212A over the sockets LAN interface.
3 Programming Examples LAN Programming Interface Examples The LAN programming examples in this section demonstrate the use of VXI-11 and Sockets LAN to control the N8211A/N8212A. To use these programming examples you must change references to the IP address and hostname to match the IP address and hostname of your N8211A/N8212A.
3 Programming Examples // // PROGRAM DESCRIPTION:Sample test program using SICL and the VXI-11 protocol // // NOTE: You must have the Agilent IO Libraries installed to run this program. // // This example uses the VXI-11 protocol to set the N8211A/N8212A for a 1 gHz CW // frequency. The N8211A/N8212A is queried for operation complete and then queried // for its ID string. The frequency and ID string are then printed to the display.
Programming Examples 3 // Open SICL instrument handle using VXI-11 protocol sprintf(instNameBuf, "lan[%s]:inst0", instrumentName); id = iopen(instNameBuf);// Open instrument session itimeout(id, 1000);// Set 1 second timeout for operations printf("Setting frequency to 1 Ghz...\n"); iprintf(id, "freq 1 GHz\n");// Set frequency to 1 GHz printf("Waiting for source to settle...
3 Programming Examples VXI-11 Programming Using VISA and C++ The following program uses the VXI-11 protocol and the VISA library to control the N8211A/N8212A. The N8211A/N8212A is set to a –5 dBm power level and queried for its ID string. Before running this code, you must set up the interface using the Agilent IO Libraries IO Config utility. vxivisa.
Programming Examples 3 #define MAX_COUNT 200 int main (void) { ViStatus status;// Declares a type ViStatus variable ViSession defaultRM, instr;// Declares a type ViSession variable ViUInt32 retCount;// Return count for string I/O ViChar buffer[MAX_COUNT];// Buffer for string I/O status = viOpenDefaultRM(&defaultRM); // Initialize the system // Open communication with Serial // Port 2 status = viOpen(defaultRM, "TPCIP0::19::INSTR", VI_NULL, VI_NULL, &instr); if(status){ // If problems then prompt use
3 Programming Examples printf(buffer); // Print the ID string printf("\n"); // Print carriage return // Flush the read buffer // Set sig gen power to -5dbm status = viWrite(instr, (ViBuf)"POW:AMPL -5dbm\n", 15, &retCount); // Query the power level status = viWrite(instr, (ViBuf)"POW?\n",5,&retCount); // Read the power level status = viRead(instr, (ViBuf)buffer, MAX_COUNT, &retCount); buffer[retCount]= '\0'; // Indicate the end of the string printf("Power level = "); // Print header to the screen p
3 Programming Examples Sockets on UNIX In UNIX, LAN communication via sockets is very similar to reading or writing a file. The only difference is the openSocket() routine, which uses a few network library routines to create the TCP/IP network connection. Once this connection is created, the standard fread() and fwrite() routines are used for network communication. The following steps outline the process: 1 Copy the lanio.c and getopt.c files to your home UNIX directory. For example, /users/mydir/.
3 Programming Examples Sockets on Windows In Windows, the routines send() and recv() must be used, since fread() and fwrite() may not work on sockets. The following steps outline the process for running the interactive program in the Microsoft Visual C++ 6.0 environment: 1 Rename the lanio.c to lanio.cpp and getopt.c to getopt.cpp and add them to the Source folder of the Visual C++ project. The int main() function in the lanio.
Programming Examples Figure 5 3 Program Output Screen Queries for Lan Using Sockets lanio.c and getopt.c perform the following functions: • establishes TCP/IP connection to port 5025 • resultant file descriptor is used to “talk” to the instrument using regular socket I/O mechanisms • maps the desired hostname to an internal form • error checks • queries N8211A/N8212A for ID • sets frequency on N8211A/N8212A to 2.
3 Programming Examples * via TCP/IP. Uses command-line arguments. * * A TCP/IP connection to port 5025 is established and * the resultant file descriptor is used to "talk" to the * instrument using regular socket I/O mechanisms. $ * * * * Examples: * * Query the N8211A/N8212A frequency: * lanio xx.xxx.xx.x 'FREQ?' * * Query the N8211A/N8212A power level: * lanio xx.xxx.xx.x 'POW?' * * Check for errors (gets one error): * lanio xx.xxx.xx.
Programming Examples * 3 - Windows NT 3.51, using Microsoft Visual C++ 4.0 * + Be sure to add WSOCK32.LIB to your list of libraries! * + Compile both lanio.c and getopt.c * + Consider re-naming the files to lanio.cpp and getopt.cpp * * Considerations: * - On UNIX systems, file I/O can be used on network sockets. * This makes programming very convenient, since routines like * getc(), fgets(), fscanf() and fprintf() can be used.
3 Programming Examples #include /* for malloc(), atol() */ #include /* for strerror */ #ifdef WINSOCK #include # ifndef _WINSOCKAPI_ # include // BSD-style socket functions # endif #else /* UNIX with BSD sockets */ # include /* for connect and socket*/ # include /* for sockaddr_in */ # include
Programming Examples # include
3 Programming Examples int err; wVersionRequested = MAKEWORD(1, 1); wVersionRequested = MAKEWORD(2, 0); err = WSAStartup(wVersionRequested, &wsaData); if (err != 0) { /* Tell the user that we couldn't find a usable */ /* winsock.dll. */ fprintf(stderr, "Cannot initialize Winsock 1.1.
Programming Examples 3 * $Parameters: $ * (const char *) hostname . . . . Network name of instrument. * This can be in dotted decimal notation. * (int) portNumber . . . . . . . The TCP/IP port to talk to. * Use 5025 for the SCPI port. * * $Return: (int) . . . . . . . . A file descriptor similar to open(1).
3 Programming Examples /*******************/ /* create a socket */ /*******************/ s = socket(AF_INET, SOCK_STREAM, 0); if (s == INVALID_SOCKET) { fprintf(stderr,"unable to create socket to '%s': %s\n", hostname, strerror(errno)); return INVALID_SOCKET; } memcpy(&peeraddr_in.sin_addr.s_addr, hostPtr->h_addr, hostPtr->h_length); peeraddr_in.sin_family = AF_INET; peeraddr_in.
Programming Examples 3 > $Function: commandInstrument$ * * $Description: send a SCPI command to the instrument.$ * * $Parameters: $ * (FILE *) . . . . . . . . . file pointer associated with TCP/IP socket. * (const char *command) . . SCPI command string. * $Return: (char *) . . . . . . a pointer to the result string.
3 Programming Examples /************************************************************************** * recv_line(): similar to fgets(), but uses recv() **************************************************************************/ char * recv_line(SOCKET sock, char * result, int maxLength) { #ifdef WINSOCK int cur_length = 0; int count; char * ptr = result; int err = 1; while (cur_length < maxLength) { /* Get a byte into ptr */ count = recv(sock, ptr, 1, 0); /* If no chars to read, stop.
Programming Examples 3 } *ptr = '\0'; if (err) { return NULL; } else { return result; } #else /*********************************************************************** * Simpler UNIX version, using file I/O. recv() version works too. * This demonstrates how to use file I/O on sockets, in UNIX.
3 Programming Examples > $Function: queryInstrument$ * * $Description: send a SCPI command to the instrument, return a response.$ * * $Parameters: $ * (FILE *) . . . . . . . . . file pointer associated with TCP/IP socket. * (const char *command) . . SCPI command string. * (char *result) . . . . . . where to put the result. * (size_t) maxLength . . . . maximum size of result array in bytes. * * $Return: (long) . . . . . . . The number of bytes in result buffer.
Programming Examples 3 /********************************************************* * Read response from N8211A/N8212A ********************************************************/ count = recv(sock, tmp_buf, 1, 0); /* read 1 char */ ch = tmp_buf[0]; if ((count < 1) || (ch == EOF) || (ch == '\n')) { *result = '\0'; /* null terminate result for ascii */ return 0; } /* use a do-while so we can break out */ do { if (ch == '#') { /* binary data encountered - figure out what it is */ long numDigits; long numBytes
3 Programming Examples if (numDigits) { /* read numDigits bytes into result string. */ count = recv(sock, result, (int)numDigits, 0); result[count] = 0; /* null terminate */ numBytes = atol(result); } if (numBytes) { resultBytes = 0; /* Loop until we get all the bytes we requested. */ /* Each call seems to return up to 1457 bytes, on HP-UX 9.
Programming Examples 3 } else { /* indefinite block ... dump until we can an extra line feed */ do { if (recv_line(sock, result, maxLength) == NULL) break; if (strlen(result)==1 && *result == '\n') break; resultBytes += strlen(result); result += strlen(result); } while (1); } } else { /* ASCII response (not a binary block) */ *result = (char)ch; if (recv_line(sock, result+1, maxLength-1) == NULL) return 0; /* REMOVE trailing newline, if present. And terminate string.
3 Programming Examples /************************************************************************* * > $Function: showErrors$ * * $Description: Query the SCPI error queue, until empty. Print results.
Programming Examples 3 } while (1); } /*************************************************************************** * > $Function: isQuery$ * * $Description: Test current SCPI command to see if it a query. $ * * $Return: (unsigned char) . . . non-zero if command is a query. 0 if not.
3 Programming Examples * This kind of command is not a query from our point of view. * The N8211A/N8212A does the query internally, and uses the result. */ query++ ; /* bump past '?' */ while (*query) { if (*query == ' ') /* attempt to ignore white spc */ query++ ; else break ; } if ( *query != ')' ) { q=1; } } return q ; } /*************************************************************************** * > $Function: main$ * * $Description: Read command line arguments, and talk to N8211A/N8212A.
Programming Examples 3 int main(int argc, char *argv[]) { SOCKET instSock; char *charBuf = (char *) malloc(INPUT_BUF_SIZE); char *basename; int chr; char command[1024]; char *destination; unsigned char quiet = 0; unsigned char show_errs = 0; int number = 0; basename = strrchr(argv[0], '/'); if (basename != NULL) basename++ ; else basename = argv[0]; while ( ( chr = getopt(argc,argv,"qune")) != EOF ) switch (chr) { case 'q': quiet = 1; break; case 'n': number = 1; break ; case 'e': show_errs = 1; break
3 Programming Examples if (optind < argc) { destination = argv[optind++] ; strcpy(command, ""); if (optind < argc) { while (optind < argc) { /* provided; only one command string */ strcat(command, argv[optind++]); if (optind < argc) { strcat(command, " "); } else { strcat(command, "\n"); } } } else { /*Only provided; input on */ strcpy(command, ""); if (optind > argc) { usage(basename); exit(1); } } } else { 82 Agilent N8211A/N8212A Performance Upconverter Synthe
Programming Examples 3 /* no hostname! */ usage(basename); exit(1); } /****************************************************** /* open a socket connection to the instrument /******************************************************/ #ifdef WINSOCK if (init_winsock() != 0) { exit(1); } #endif /* WINSOCK */ instSock = openSocket(destination, SCPI_PORT); if (instSock == INVALID_SOCKET) { fprintf(stderr, "Unable to open socket.\n"); return 1; } /* fprintf(stderr, "Socket opened.
3 Programming Examples long bufBytes; bufBytes = queryInstrument(instSock, command, charBuf, INPUT_BUF_SIZE); if (!quiet) { fwrite(charBuf, bufBytes, 1, stdout); fwrite("\n", 1, 1, stdout) ; fflush(stdout); } } else { commandInstrument(instSock, command); } } else { /* read a line from */ while ( gets(charBuf) != NULL ) { if ( !strlen(charBuf) ) continue ; if ( *charBuf == '#' || *charBuf == '!' ) continue ; strcat(charBuf, "\n"); if (!quiet) { 84 Agilent N8211A/N8212A Performance Upconverter
Programming Examples 3 if (number) { char num[10]; sprintf(num,"%d: ",number); fwrite(num, strlen(num), 1, stdout); } fwrite(charBuf, strlen(charBuf), 1, stdout) ; fflush(stdout); } if ( isQuery(charBuf) ) { long bufBytes; /* Put the query response into the same buffer as the*/ /* command string appended after the null terminator.
3 Programming Examples commandInstrument(instSock, charBuf); } if (number) number++; } } if (show_errs) { showErrors(instSock); } #ifdef WINSOCK closesocket(instSock); close_winsock(); #else close(instSock); #endif /* WINSOCK */ return 0; } /* End of lanio.cpp * /**************************************************************************/ /* $Function: main1$ */ /* $Description: Output a series of SCPI commands to the N8211A/N8212A */ /* /* Send query results to stdout.
Programming Examples /* 3 */ /**************************************************************************/ /* Rename this int main1() function to int main().
3 Programming Examples bufBytes = queryInstrument(instSock, "*IDN?\n", charBuf, INPUT_BUF_SIZE); printf("ID: %s\n",charBuf); commandInstrument(instSock, "FREQ 2.
Programming Examples 3 int getopt(int argc, char * const argv[], const char *optstring); extern char *optarg; extern int optind, opterr, optopt; PRORGAM DESCRIPTION: getopt returns the next option letter in argv (starting from argv[1]) that matches a letter in optstring. optstring is a string of recognized option letters; if a letter is followed by a colon, the option is expected to have an argument that may or may not be separated from it by white space.
3 Programming Examples int getopt( int argc, char * const argv[], const char* optstring) { char c; char *posn; optarg = NULL; if (scan == NULL || *scan == '\0') { if (optind == 0) optind++; if (optind >= argc || argv[optind][0] != '-' || argv[optind][1] == '\0') return(EOF); if (strcmp(argv[optind], "--")==0) { optind++; return(EOF); } scan = argv[optind]+1; optind++; } c = *scan++; posn = strchr(optstring, c); /* DDP */ if (posn == NULL || c == ':') { fprintf(stderr, "%s: unknown option -%c\n", ar
3 Programming Examples posn++; if (*posn == ':') { if (*scan != '\0') { optarg = scan; scan = NULL; } else { optarg = argv[optind]; optind++; } } return(c); } Sockets LAN Programming Using Java In this example the Java program connects to the N8211A/N8212A via sockets LAN. This program requires Java version 1.1 or later be installed on your PC. To run the program perform the following steps: 1 In the code example below, type in the hostname or IP address of your N8211A/N8212A.
3 Programming Examples Generating a CW Signal Using Java The following program example is available on the N8211A/N8212A Documentation CD-ROM as javaex.txt. //************************************************************************** // PROGRAM NAME: javaex.txt to talk to the N8211A/N8212A via SCPI-over-sockets // Sample java program // This program requires Java version 1.1 or later. // Save this code as ScpiSockTest.java // Compile by typing: javac ScpiSockTest.
Programming Examples out.write("freq 1GHz\n"); 3 // Sets frequency out.flush(); System.out.println("Waiting for source to settle..."); out.write("*opc?\n"); // Waits for completion out.flush(); String opcResponse = in.readLine(); if (!opcResponse.equals("1")) { System.err.println("Invalid response to '*OPC?'!"); System.exit(1); } System.out.println("Retrieving instrument ID..."); out.write("*idn?\n"); // Quires the id string out.flush(); String idnResponse = in.
3 Programming Examples Sockets LAN Programming Using PERL This example uses PERL to control the N8211A/N8212A over the sockets LAN interface. The N8211A/N8212A frequency is set to 1 GHz, queried for operation complete and then queried for it’s identify string. This example was developed using PERL version 5.6.0 and requires a PERL version with the IO::Socket library. 1 In the code below, enter your N8211A/N8212A’s hostname in place of the xxxxx in the code line: my $instrumentName= “xxxxx”; .
Programming Examples 3 print "Waiting for source to settle...
3 Programming Examples 96 Agilent N8211A/N8212A Performance Upconverter Synthetic Instrument Module, 250 kHz to 20 / 40 GHz
SCPI Programming Guide 4 Programming the Status Register System This chapter provides the following major sections: • “Overview" on page 98 • “Status Register Bit Values" on page 101 • “Accessing Status Register Information" on page 102 • “Status Byte Group" on page 107 • “Status Groups" on page 110 Agilent Technologies 97
4 Programming the Status Register System Overview • Standard Operation Condition Register bits (Table 6 on page 113) • Data Questionable Condition Register bits (see Table 7 on page 116) • Data Questionable Power Condition Register bits (see Table 8 on page 120) • Data Questionable Frequency Condition Register bits (see Table 9 on page 122) • Data Questionable Modulation Condition Register bits (see Table 10 on page 125) • Data Questionable Calibration Condition Register bit (see Table 11 on page 127) Dur
Programming the Status Register System 4 Overall Status Byte Register Systems Figure 6 N8211A/N8212A: Overall Status Byte Register System (1 of 2) Agilent N8211A/N8212A Performance Upconverter Synthetic Instrument Module, 250 kHz to 20 / 40 GHz 99
4 Programming the Status Register System Figure 7 100 N8211A/N8212A: Overall Status Byte Register System (2 of 2) Agilent N8211A/N8212A Performance Upconverter Synthetic Instrument Module, 250 kHz to 20 / 40 GHz
4 Programming the Status Register System Status Register Bit Values Each bit in a register is represented by a decimal value based on its location in the register (see Table 2). • To enable a particular bit in a register, send its value with the SCPI command. Refer to the N8211A/N8212A’s SCPI command listing at the end of this book for more information. • To enable more than one bit, send the sum of all the bits that you want to enable. • To verify the bits set in a register, query the register.
4 Programming the Status Register System Accessing Status Register Information 1 Determine which register contains the bit that reports the condition. Refer to Figure 6 on page 99 and Figure 7 on page 100 for register location and names. 2 Send the unique SCPI query that reads that register. 3 Examine the bit to see if the condition has changed.
4 Programming the Status Register System The polling method In the polling method, the N8211A/N8212A has a passive role. It tells the controller that conditions have changed only when the controller asks the right question. This is accomplished by a program loop that continually sends a query. The polling method works well if you do not need to know about changes the moment they occur.
4 Programming the Status Register System When a condition changes and that condition has been enabled, the request service summary (RQS) bit in the status byte register is set. In order for the controller to respond to the change, the Service Request Enable Register needs to be enabled for the bit(s) that will trigger the SRQ. Generating a Service Request The Service Request Enable Register lets you choose the bits in the Status Byte Register that will trigger a service request.
4 Programming the Status Register System If the status register is configured to SRQ on end-of-sweep or measurement and the mode set to continuous, restarting the measurement (INIT command) can cause the measuring bit to pulse low. This causes an SRQ when you have not actually reached the “end-of-sweep” or measurement condition. To avoid this, do the following: 1 Send the command INITiate:CONTinuous OFF. 2 Set/enable the status registers. 3 Restart the measurement (send INIT).
4 Programming the Status Register System Table 3 106 Effects of :STATus:PRESet Register Value after :STATus:PRESet :STATus:QUEStionable:CALibration:ENABle 32767 :STATus:QUEStionable:CALibration:NTRansition 32767 :STATus:QUEStionable:CALibration:PTRansition 32767 :STATus:QUEStionable:ENABle 0 :STATus:QUEStionable:NTRansition 0 :STATus:QUEStionable:PTRansition 32767 :STATus:QUEStionable:FREQuency:ENABle 32767 :STATus:QUEStionable:FREQuency:NTRansition 32767 :STATus:QUEStionable:FREQuency
4 Programming the Status Register System Status Byte Group The Status Byte Group includes the Status Byte Register and the Service Request Enable Register.
4 Programming the Status Register System Status Byte Register Table 4 Status Byte Register Bits Bit Description 0,1 Unused. These bits are always set to 0. 2 Error/Event Queue Summary Bit. A 1 in this bit position indicates that the SCPI error queue is not empty. The SCPI error queue contains at least one error message. 3 Data Questionable Status Summary Bit. A 1 in this bit position indicates that the Data Questionable summary bit has been set.
Programming the Status Register System Response: 4 The decimal value of the sum of the bits previously enabled with the *SRE command.
4 Programming the Status Register System Status Groups The Standard Operation Status Group and the Data Questionable Status Group consist of the registers listed below. The Standard Event Status Group is similar but does not have negative or positive transition filters or a condition register. Condition Register Continuously monitors the hardware and firmware status of the N8211A/N8212A. There is no latching or buffering for a condition register; it is updated in real time.
4 Programming the Status Register System Standard Event Status Register Table 5 Standard Event Status Register Bits Bit Description 0 Operation Complete. A 1 in this bit position indicates that all pending N8211A/N8212A operations were completed following execution of the *OPC command. 1 Request Control. This bit is always set to 0. (The N8211A/N8212A does not request control.) 2 Query Error. A 1 in this bit position indicates that a query error has occurred.
4 Programming the Status Register System Table 5 Standard Event Status Register Bits Bit Description 6 Always set to 0. 7 Power On. A 1 in this bit position indicates that the N8211A/N8212A has been turned off and then on. Query: *ESR? Response: The decimal sum of the bits set to 1 Example: The decimal value 136 is returned. The decimal sum = 128 (bit 7) + 8 (bit 3).
Programming the Status Register System 4 Standard Operation Condition Register The Standard Operation Condition Register continuously monitors the hardware and firmware status of the N8211A/N8212A. Condition registers are read only. Table 6 Standard Operation Condition Register Bits Bit Description 0 I/Q Calibrating. Always 0. 1 Settling. A 1 in this bit position indicates that the N8211A/N8212A is settling. 2 Unused. This bit position is always set to 0.
4 Programming the Status Register System Table 6 Standard Operation Condition Register Bits Bit Description 3 Sweeping. A 1 in this bit position indicates that a sweep is in progress. 4 Measuring. Always 0. 5 Waiting for Trigger. A 1 in this bit position indicates that the source is in a “wait for trigger” state. 6,7,8 Unused. These bits are always set to 0. 9 Always 0. 10 Always 0. 11 Sweep Calculating.
4 Programming the Status Register System Query: STATus:OPERation[:EVENt]? Standard Operation Event Enable Register The Standard Operation Event Enable Register lets you choose which bits in the Standard Operation Event Register set the summary bit (bit 7 of the Status Byte Register) to 1. Command: STATus:OPERation:ENABle , where is the sum of the decimal values of the bits you want to enable.
4 Programming the Status Register System Data Questionable Condition Register The Data Questionable Condition Register continuously monitors the hardware and firmware status of the N8211A/N8212A. Condition registers are read only. Table 7 116 Data Questionable Condition Register Bits Bit Description 0, 1, 2 Unused. These bits are always set to 0.
4 Programming the Status Register System Table 7 Data Questionable Condition Register Bits Bit Description 3 Power (summary). This is a summary bit taken from the QUEStionable:POWer register. A 1 in this bit position indicates that one of the following may have happened: The ALC (Automatic Leveling Control) is unable to maintain a leveled RF output power (i.e., ALC is UNLEVELED), the reverse power protection circuit has been tripped.
4 Programming the Status Register System Data Questionable Transition Filters (negative and positive) The Data Questionable Transition Filters specify which type of bit state changes in the condition register set corresponding bits in the event register. Changes can be positive (0 to 1) or negative (1 to 0).
Programming the Status Register System 4 The Data Questionable Power Status Group is used to determine the specific event that set bit 3 in the Data Questionable Condition Register. This group consists of the Data Questionable Power Condition Register, the Data Questionable Power Transition Filters (negative and positive), the Data Questionable Power Event Register, and the Data Questionable Power Event Enable Register.
4 Programming the Status Register System Table 8 Data Questionable Power Condition Register Bits Bit Description 0 Reverse Power Protection Tripped. A 1 in this bit position indicates that the reverse power protection (RPP) circuit has been tripped. There is no output in this state. Any conditions that may have caused the problem should be corrected. Reset the RPP circuit by sending the remote SCPI command: OUTput:PROTection:CLEar. Resetting the RPP circuit bit, resets this bit to 0. 1 Unleveled.
4 Programming the Status Register System Data Questionable Power Event Enable Register The Data Questionable Power Event Enable Register lets you choose which bits in the Data Questionable Power Event Register set the summary bit (bit 3 of the Data Questionable Condition Register) to 1.
4 Programming the Status Register System Data Questionable Frequency Condition Register The Data Questionable Frequency Condition Register continuously monitors the hardware and firmware status of the N8211A/N8212A. Condition registers are read-only. Table 9 122 Data Questionable Frequency Condition Register Bits Bit Description 0 Synth. Unlocked. A 1 in this bit position indicates that the synthesizer is unlocked. 1 10 MHz Ref Unlocked.
4 Programming the Status Register System Bit Description 7−14 Unused. These bits are always set to 0. 15 Always 0. Query: STATus:QUEStionable:FREQuency:CONDition? Response: The decimal sum of the bits set to 1. Data Questionable Frequency Transition Filters (negative and positive) Specifies which types of bit state changes in the condition register set corresponding bits in the event register. Changes can be positive (0 to 1) or negative (1 to 0).
4 Programming the Status Register System Response: Decimal value of the sum of the bits previously enabled with the STATus:QUEStionable:FREQuency:ENABle command. Data Questionable Modulation Status Group The Data Questionable Modulation Status Group is used to determine the specific event that set bit 7 in the Data Questionable Condition Register.
4 Programming the Status Register System Data Questionable Modulation Condition Register The Data Questionable Modulation Condition Register continuously monitors the hardware and firmware status of the N8211A/N8212A. Condition registers are read-only. Table 10 Data Questionable Modulation Condition Register Bits Bit Description 0 Modulation 1 Undermod. A 1 in this bit position indicates that the External 1 input with ac coupling on, is less than 0.97 volts. 1 Modulation 1 Overmod.
4 Programming the Status Register System Query: STATus:QUEStionable:MODulation[:EVENt]? Data Questionable Modulation Event Enable Register The Data Questionable Modulation Event Enable Register lets you choose which bits in the Data Questionable Modulation Event Register set the summary bit (bit 7 of the Data Questionable Condition Register) to 1. Command: STATus:QUEStionable:MODulation:ENABle where is the sum of the decimal values of the bits you want to enable.
4 Programming the Status Register System Data Questionable Calibration Condition Register The Data Questionable Calibration Condition Register continuously monitors the calibration status of the N8211A/N8212A. Condition registers are read only. Table 11 Data Questionable Calibration Condition Register Bits Bit Description 0 Always 0. 1 DCFM/DCΦM Zero Failure. A 1 in this bit position indicates that the DCFM/DCΦM zero calibration routine has failed. This is a critical error.
4 Programming the Status Register System Table 11 Data Questionable Calibration Condition Register Bits Bit Description 2−14 Unused. These bits are always set to 0. 15 Always 0. Table 12 Data Questionable Calibration Condition Register Bits Bit Description 0 DCFM/DCΦM Zero Failure. A 1 in this bit position indicates that the DCFM/DCΦM zero calibration routine has failed. This is a critical error. The output of the source has no validity until the condition of this bit is 0. 1−14 Unused.
4 Programming the Status Register System Data Questionable Calibration Event Enable Register The Data Questionable Calibration Event Enable Register lets you choose which bits in the Data Questionable Calibration Event Register set the summary bit (bit 8 of the Data Questionable Condition register) to 1. Command: STATus:QUEStionable:CALibration:ENABle , where is the sum of the decimal values of the bits you want to enable.
4 130 Programming the Status Register System Agilent N8211A/N8212A Performance Upconverter Synthetic Instrument Module, 250 kHz to 20 / 40 GHz
SCPI Programming Guide 5 Creating and Downloading User-Data Files The following sections and procedures contain remote SCPI commands.
5 Creating and Downloading User-Data Files Overview User data is a generic term for various data types created by the user and stored in the signal generator. This includes the following data (file) types: Bit This file type lets the user download payload data for use in streaming or framed signals. It lets the user determine how many bits in the file the signal generator uses. Binary This file type provides payload data for use in streaming or framed signals.
5 Creating and Downloading User-Data Files Save and Recall Instrument State Files The signal generator can save instrument state settings to memory. An instrument state setting includes any instrument state that does not survive a signal generator preset or power cycle such as frequency, amplitude, attenuation, and other user–defined parameters. The instrument state settings are saved in memory and organized into sequences and registers.
5 Creating and Downloading User-Data Files The Backup State Files choice reads the signal generator’s state files and stores it on your computer in the same directory where the State_Files.exe program is located. The Restore State Files selection downloads instrument state files, stored on your computer, to the signal generator’s State directory. The Quit selection exists the program. The figure below shows the console interface and the results obtained after selecting the Restore State Files operation.
5 Creating and Downloading User-Data Files 5 Type csc.exe State_Files.cs at the command prompt and then press the Enter key on the keyboard to run the program. The following figure shows the command prompt interface. The State_Files.cs program is listed below. You can copy this program from the examples directory on the signal generator’s CD–ROM. The State_Files.cs example uses the ESG in the programming code but can be used with the PSG or Agilent MXG.
5 Creating and Downloading User-Data Files using System.Collections; using System.Text.RegularExpressions; namespace State_Files { class MainApp { // Replace the visaOpenString variable with your instrument's address. static public string visaOpenString = "TCPIP0::IP ADDRESS::INST0::INSTR"; public const uint DEFAULT_TIMEOUT = 30 * 1000;// Instrument timeout 30 seconds. public const int MAX_READ_DEVICE_STRING = 1024; // Buffer for string data reads.
Creating and Downloading User-Data Files 5 // if no errors proceed. { bool quit = false; while (!quit)// Get user input { Console.Write("1) Backup state files\n" + "2) Restore state files\n" + "3) Quit\nEnter 1,2,or 3. Your choice: "); string choice = Console.
5 Creating and Downloading User-Data Files VisaInterop.Close(device);// Close the device } else { Console.WriteLine("Unable to open " + visaOpenString); } VisaInterop.Close(defaultRM); // Close the default resource manager } else { Console.WriteLine("Unable to open the VISA resource manager"); } } /* This method restores all the sequence/register state files located in the local directory (identified by a ".STA" file name extension) to the signal generator.
Creating and Downloading User-Data Files 5 ", register #" + register); /* Save the target instrument's current state to the specified sequence/ register pair. This ensures the index file has an entry for the specified sequence/register pair. This workaround will not be necessary in future revisions of firmware.*/ WriteDevice(device,"*SAV " + register + ", " + sequence + "\n", true); // << on SAME line! // Overwrite the newly created state file with the state // file that is being restored.
5 Creating and Downloading User-Data Files Match m = Regex.Match(catalog, "\"(\\d_\\d\\d),"); while (m.Success) { // Grab the matched filename from the regular expression string nextFile = m.Groups[1].ToString(); // Retrieve the file and store with a .STA extension // in the current directory Console.WriteLine("Retrieving state file: " + nextFile); WriteDevice(device, "MEM:DATA? \"/USER/STATE/" + nextFile + "\"\n", true); ReadFileBlock(device, nextFile + ".
Creating and Downloading User-Data Files 5 if (!sendEnd) // Set the bool sendEnd true. { VisaInterop.SetAttribute(device, VisaAttribute.SendEndEnable, 1); } } // This method reads an ASCII string from the specified device static public string ReadDevice(uint device) { string retValue = ""; byte[] buf = new byte[MAX_READ_DEVICE_STRING]; // 1024 bytes maximum read uint retCount; if (VisaInterop.Read(device, buf, (uint)buf.Length -1, out retCount) == 0) { retValue = Encoding.ASCII.
5 Creating and Downloading User-Data Files VisaInterop.Read(device, buf, 2, out retCount); VisaInterop.Read(device, buf, (uint)(buf[1]-'0'), out retCount); uint fileSize = UInt32.Parse(Encoding.ASCII.GetString(buf, 0, (int)retCount)); // Read the file block from the signal generator byte[] readBuf = new byte[TRANSFER_BLOCK_SIZE]; uint bytesRemaining = fileSize; while (bytesRemaining != 0) { uint bytesToRead = (bytesRemaining < TRANSFER_BLOCK_SIZE) ? bytesRemaining : TRANSFER_BLOCK_SIZE; VisaInterop.
Creating and Downloading User-Data Files 5 // Send the definite block header: #{lengthDataLength}{dataLength} string fileSize = fs.Length.ToString(); string fileSizeLength = fileSize.Length.ToString(); WriteDevice(device, "#" + fileSizeLength + fileSize, false); // Don't set END at the end of writes VisaInterop.SetAttribute(device, VisaAttribute.
5 Creating and Downloading User-Data Files NoLock = 0, ExclusiveLock = 1, SharedLock = 2, LoadConfig = 4 } // Declaration of VISA attribute constants public enum VisaAttribute { SendEndEnable = 0x3FFF0016, TimeoutValue = 0x3FFF001A } // This class provides a way to call the unmanaged Agilent IO Library VISA C // functions from the C# application public class VisaInterop { [DllImport("agvisa32.dll", EntryPoint="viClear")] public static extern int Clear(uint session); [DllImport("agvisa32.
Creating and Downloading User-Data Files 5 string expr, out uint findList, out uint retCnt, byte[] desc); [DllImport("agvisa32.dll", EntryPoint="viGetAttribute")] public static extern int GetAttribute(uint vi, VisaAttribute attribute, out uint attrState); [DllImport("agvisa32.dll", EntryPoint="viOpen")] public static extern int Open( uint session, string rsrcName, VisaAccessMode accessMode, uint timeout, out uint vi); [DllImport("agvisa32.
5 Creating and Downloading User-Data Files public static extern int StatusDesc(uint vi, int status, byte[] desc); [DllImport("agvisa32.
5 Creating and Downloading User-Data Files User Flatness Correction Downloads Using C++ and VISA This sample program uses C++ and the VISA libraries to download user–flatness correction values to the signal generator. The program uses the LAN interface but can be adapted to use the GPIB interface by changing the address string in the program. You must include header files and resource files for library functions needed to run this program. Refer to “Running C++ Programs” on page 59 for more information.
5 Creating and Downloading User-Data Files // pairs and then download them to the signal generator. // // NOTE: You must have the Agilent IO Libraries installed to run this program. // // This example uses the LAN/TCPIP interface to download frequency and amplitude // correction pairs to the signal generator. The program asks the operator to enter // the number of pairs and allocates a pointer array listPairs[] sized to the number // of pairs.
Creating and Downloading User-Data Files 5 { ViSession defaultRM, vi; ViStatus status = 0; status = viOpenDefaultRM(&defaultRM);//open the default resource manager //TO DO: Error handling here status = viOpen(defaultRM, instOpenString, VI_NULL, VI_NULL, &vi); if (status)//if any errors then display the error and exit the program { fprintf(stderr, "viOpen failed (%s)\n", instOpenString); return -1; } printf("Example Program to Download User Flatness Corrections\n\n"); printf("Enter number of frequency
5 Creating and Downloading User-Data Files //pairsList[n]=0; for (int i=0; i < num; i++) { char* nextFreq = new char[MAX_STRING_LENGTH+1]; //frequency array char* nextPower = new char[MAX_STRING_LENGTH+1];//amplitude array //enter frequency and amplitude pairs i.e 10ghz .
Creating and Downloading User-Data Files 5 viWrite(vi,str,strlen((char*)str),0);//write the command to the PSG printf("\nFlatness Data saved to file : %s\n\n", fileName); //load corrections sprintf((char*)str,":corr:flat:load \"%s\"\n", fileName); //write to buffer viWrite(vi,str,strlen((char*)str),0); //write command to the PSG //turn on corrections sprintf((char*)str, ":corr on\n"); viWrite(vi,str,strlen((char*)str),0"); printf("\nFlatness Corrections Enabled\n\n"); for (int k=0; k< lenArray; k++) { de
5 152 Creating and Downloading User-Data Files Agilent N8211A/N8212A Performance Upconverter Synthetic Instrument Module, 250 kHz to 20 / 40 GHz
SCPI Programming Guide 6 SCPI Basics In the following sections, this chapter describes how SCPI information is organized and presented in this guide.
6 SCPI Basics How the SCPI Information is Organized SCPI Listings The table of contents lists the Standard Commands for Programmable Instruments (SCPI) without the parameters. The SCPI subsystem name will generally have the first part of the command in parenthesis that is repeated in all commands within the subsystem. The title(s) beneath the subsystem name is the remaining command syntax.
6 SCPI Basics SCPI Basics This section describes the general use of the SCPI language for the N8211A/N8212A. It is not intended to teach you everything about the SCPI language; the SCPI Consortium or IEEE can provide that level of detailed information. For a list of the specific commands available for the N8211A/N8212A, refer to the table of contents. For additional information, refer to the following publications: • IEEE Standard 488.
6 SCPI Basics In the example above, the [:LEVel] portion of the command immediately follows the :POWer portion with no separating space. The portion following the [:LEVel], MINimum|MAXimum, are the parameters (argument for the command statement). There is a separating space (white space) between the command and its parameter. Additional conventions in syntax statements are shown in Table 13 and Table 14.
6 SCPI Basics Table 14 Command Syntax Characters, Keywords, and Syntax Example If a command requires more than one parameter, you must separate adjacent parameters using a comma. Parameters are not part of the command path, so commas do not affect the path level. [:SOURce]:LIST: DWELl {,} A semicolon separates two commands in the same program message without changing the current path. :FREQ 2.
6 SCPI Basics Command Tree Most programming tasks involve subsystem commands. SCPI uses a structure for subsystem commands similar to the file systems on most computers. In SCPI, this command structure is called a command tree and is shown in Figure 10. Figure 10 Simplified Command Tree The command closest to the top is the root command, or simply “the root.” Notice that you must follow a particular path to reach lower level commands.
6 SCPI Basics For example, with the :FREQuency:REFerence:STATe ON|OFF|1|0 command, the N8211A/N8212A accepts :FREQuency:REFerence:STATe ON, :FREQuency:REFerence:STATe 1, :FREQ:REF:STAT ON, :FREQ:REF:STAT 1 to turn on the frequency reference mode. Each parameter type has one or more corresponding response data types. A setting that you program using a numeric parameter returns either real or integer response data when queried.
6 SCPI Basics .5 digits left of decimal point optional Extended Numeric Parameters Most subsystems use extended numeric parameters to specify physical quantities. Extended numeric parameters accept all numeric parameter values and other special values as well. The following are examples of extended numeric parameters: Extended Numeric Parameters Special Parameters 100 any simple numeric value DEFault resets parameter to its default value 1.
6 SCPI Basics The following are examples of discrete parameters in commands: TRIGger:SOURce BUS TRIGger:SOURce IMMediate TRIGger:SOURce EXTernal Boolean Parameters Boolean parameters represent a single binary condition that is either true or false. The two-state boolean parameter has four arguments.
6 SCPI Basics The following are examples of real response data: +4.000000E+010, −9.990000E+002 −9.990000E+002 +4.0000000000000E+010 +1 0 Integer Response Data Integer response data are decimal representations of integer values including optional signs. Most status register related queries return integer response data.
6 SCPI Basics The following are examples of string response data: "This is a string" "one double quote inside brackets: [""]" "Hello!" Program Messages The following commands will be used to demonstrate the creation of program messages: [:SOURce]:FREQuency:STARt [:SOURce]:FREQuency:STOP [:SOURce]:FREQuency[:CW] [:SOURce]:POWer[:LEVel]:OFFSet Example 1 :FREQuency:STARt 500MHZ;STOP 1000MHZ This program message is correct and will not cause errors; STARt and STOP are at the same path level.
6 SCPI Basics The POWer 10DBM command is missing the leading colon and when sent, it causes confusion because the N8211A/N8212A cannot find POWer at the POWer:OFFSet level. By adding the leading colon, the current path is reset to the root. The following shows the correct program message: :POWer:OFFSet 5DB;:POWer 10DBM Example 4 FREQ 500MHZ;POW 4DBM In this example, the keyword short form is used. The program message is correct because it utilizes the default nodes of :FREQ[:CW] and :POW[:LEVel].
6 SCPI Basics This command has :LIST in the command syntax. This denotes that "SWEEP_1" will be saved in the :List file type location as a list type file. The following examples demonstrate a command where Format 2 applies: Command Syntax with the file name variable :MMEMory:COPY "","" Command Syntax with the file name :MMEMory:COPY "FLATCAL@USERFLAT","FLAT_2CAL@USERFLAT" This command cannot distinguish which file type "FLATCAL" belongs to without the file type extension (@USERFLAT).
6 SCPI Basics The following examples illustrate the usage of the variable "" when it is the only command parameter: Command Syntax with the msus variable :MMEMory:CATalog? "" Command Syntax with the file system :MMEMory:CATalog? "LIST:" The variable "" is replaced with "LIST:". When the command is executed, the output displays only the files from the List file system.
6 SCPI Basics However, when a string is the parameter for a SCPI command, additional quotes or other delimiters may be required to identify the string. Your programming language may use two sets of double quotes, one set of single quotes, or back slashes with quotes to signify the string parameter.
6 168 SCPI Basics Agilent N8211A/N8212A Performance Upconverter Synthetic Instrument Module, 250 kHz to 20 / 40 GHz
SCPI Programming Guide 7 System Commands In the following sections, this chapter provides SCPI descriptions for subsystems dedicated to peripheral N8211A/N8212A operations. • “Calibration Subsystem (:CALibration)" on page 170 • “Diagnostic Subsystem (:DIAGnostic[:CPU]:INFOrmation)" on page 175 • “Display Subsystem (:DISPlay)" on page 177 • “IEEE 488.
7 System Commands Calibration Subsystem (:CALibration) :DCFM Supported All with Option UNT :CALibration:DCFM Initiates a DCFM or DCΦM calibration depending on the currently active modulation. This calibration eliminates any dc or modulation offset of the carrier signal. Use this calibration for externally applied signals. While the calibration can also be performed for internally generated signals, dc offset is not a normal characteristic for them.
7 System Commands • Path settings (Internal I/Q Mux Path 1 or Path 2) • I/Q calibration (the I/Q DC calibration will be invalidated if any other I/Q calibration is execute) • Temperature (±5 degrees) The following instrument states will not invalidate the I/Q DC calibration: • Power level changes • I/Q Impairments *RST N/A :IQ:DEFault Supported N8212A :CALibration:IQ:DEFault Restores the original factory calibration data for the internal I/Q modulator.
7 System Commands :IQ:STOP Supported All :CALibration:IQ:STOP :CALibration:IQ:STOP? Sets the stop frequency and automatically sets the calibration type to User for an I/Q calibration. The setting enabled by this command is not affected by a power-on, preset, or *RST command. Example :CAL:IQ:STOP 2GHZ The example sets the stop frequency for an IQ calibration to 2 GHz. :WBIQ Supported N8212A :CALibration:WBIQ Initiates a wideband I/Q calibration for a range of frequencies.
7 System Commands • I/Q calibration (the I/Q DC calibration will be invalidated if any other I/Q calibration is executed) • Temperature (±5 degrees) The following instrument states will not invalidate the I/Q DC calibration: • Power level changes • I/Q Impairments *RST N/A :WBIQ:DEFault Supported N8212A :CALibration:WBIQ:DEFault Restores the original factory calibration data for the internal I/Q modulator.
7 System Commands :WBIQ:STOP Supported N8212A :CALibration:WBIQ:STOP :CALibration:WBIQ:STOP? Sets the stop frequency and automatically sets the calibration type to User for a wideband I/Q calibration. The setting enabled by this command is not affected by a power-on, preset, or *RST command. Example :CAL:WBIQ:STOP 2GHZ The example sets the stop frequency to 2 GHz for a wideband IQ calibration.
7 System Commands Diagnostic Subsystem (:DIAGnostic[:CPU]:INFOrmation) :BOARds Supported All :DIAGnostic[:CPU]:INFOrmation:BOARds? Returns a list of the boards installed in the N8211A/N8212A. The information is returned in the following format: "" This information format will repeat for each of the N8211A/N8212A’s detected boards.
7 System Commands :OPTions Supported All :DIAGnostic[:CPU]:INFOrmation:OPTions? Returns a list of options installed in the N8211A/N8212A. :OPTions:DETail Supported All :DIAGnostic[:CPU]:INFOrmation:OPTions:DETail? Returns the options installed, option revision, and digital signal processing (DSP) version if applicable. :OTIMe Supported All :DIAGnostic[:CPU]:INFOrmation:OTIMe? Returns the cumulative number of hours that the N8211A/N8212A has been on.
System Commands 7 Display Subsystem (:DISPlay) :ANNotation:AMPLitude:UNIT Supported All :DISPlay:ANNotation:AMPLitude:UNIT DBM|DBUV|DBUVEMF|V|VEMF|DB :DISPlay:ANNotation:AMPLitude:UNIT? Sets the amplitude units. If the amplitude reference state is set to on, the query returns units expressed in dB. Setting any other unit will cause a setting conflict error stating that the amplitude reference state must be set to off. Refer to “:REFerence:STATe" on page 267 for more information.
7 System Commands IEEE 488.2 Common Commands *CLS Supported All *CLS Clears the Status Byte register, the Data Questionable Event register, the Standard Event Status register, and the Standard Operation Status register. Refer to Chapter 4, “Programming the Status Register System for more information on programming the status registers. *ESE Supported All *ESE Enables bits in the Standard Event Enable register.
System Commands 7 Refer to Chapter 4, “Programming the Status Register System for more information on programming the status registers. *ESR Supported All This is a destructive read. The data in the register is latched until it is queried. Once queried, the data is cleared. Refer to Chapter 4, “Programming the Status Register System for more information on programming the status registers. *ESR? Returns the decimal sum of the bits set in the Standard Event register.
7 System Commands Returns the ASCII character 1 in the Standard Event register indicating completion of all pending operations. Refer to Chapter 4, “Programming the Status Register System for more information on programming the status registers. *PSC Supported All *PSC ON|OFF|1|0 Controls the automatic power-on clearing of the Service Request Enable register, the Standard Event Status Enable register, and the device-specific event enable registers.
7 System Commands *RST Supported All *RST Resets most N8211A/N8212A functions to a factory-defined state. Each command description in this reference shows the *RST value if the N8211A/N8212A’s setting is affected. *SAV Supported All *SAV , Saves the state of the N8211A/N8212A to the specified memory register of the specified sequence . Settings such as frequency, attenuation, power, and settings that do not survive a power cycle or an instrument reset can be saved.
7 System Commands *SRE? Returns the decimal sum of bits enabled in the Service Request Enable register. Bit 6 (decimal 64) is not available in this register. Refer to Chapter 4, “Programming the Status Register System for more information on programming the status registers. Range 0–63, 128–191 *STB? Supported All *STB? Reads the decimal sum of the bits set in the Status Byte register.
7 System Commands *WAI Supported All *WAI Instructs the N8211A/N8212A to wait until all pending commands are completed, before executing any other commands.
7 System Commands Low-Band Filter Subsystem [:SOURce]:LBFilter Supported Option 1EH [:SOURce]:LBFilter ON|OFF|1|0 [:SOURce]:LBFilter? Enables or disables the low-band filter located in the RF path. Use this filter to reduce harmonics below 2 GHz.
System Commands 7 Memory Subsystem (:MEMory) :CATalog:BINary Supported All :MEMory:CATalog:BINary? Outputs a list of binary files. The return data will be in the following form: ,{,""} The N8211A/N8212A will return the two memory usage parameters and as many file listings as there are files in the directory.
7 System Commands "" Refer to “File Name Variables" on page 164 for information on the file name syntax. :CATalog[:ALL] Supported All :MEMory:CATalog[:ALL]? Outputs a list of all files in the memory subsystem. The return data is in the following form: ,{,""} The N8211A/N8212A returns the two memory usage parameters and as many file listings as there are files in the memory subsystem.
7 System Commands Appends data to an existing file stored in N8211A/N8212A memory. "" Names the destination file and directory path. Refer to “File Name Variables" on page 164 for information on the file name syntax. Represents the data and file length parameters. The data in the file is represented by the variable. The file length parameters are used by the N8211A/N8212A for allocating memory.
7 System Commands :DELete:LIST Supported All :MEMory:DELete:LIST Deletes all List files. :DELete:STATe Supported All :MEMory:DELete:STATe Deletes all state files. :DELete:UFLT Supported All :MEMory:DELete:UFLT Deletes all user-flatness correction files. :DELete[:NAME] Supported All :MEMory:DELete[:NAME] "" Clears the user file system of "". Refer to “File Name Variables" on page 164 for information on the file name syntax.
7 System Commands :LOAD:LIST Supported All :MEMory:LOAD:LIST "" Loads a List Sweep file. Example :MEM:LOAD:LIST "List_Data" The example loads the file "List_Data" into volatile waveform memory. :MOVE Supported All :MEMory:MOVE "","" Renames the src_file to dest_file in the N8211A/N8212A’s memory catalog. Refer to “File Name Variables" on page 164 for information on the file name syntax.
7 System Commands :STORe:LIST Supported All :MEMory:STORe:LIST "" Stores the current list sweep data to a file. Refer to “File Name Variables" on page 164 for information on the file name syntax. Example :MEM:STOR:LIST "Test_Data" The example writes list sweep data to a file named Test_Data and stores the file in the N8211A/N8212A’s non–volatile memory, List directory.
System Commands 7 Mass Memory Subsystem (:MMEMory) :CATalog Supported All :MMEMory:CATalog? "" Outputs a list of the files from the specified file system. The variable "" (mass storage unit specifier) represents a file system. The file systems and types are shown in Table 16.
7 System Commands :MMEMory:COPY[:NAME] "","" Copies the data from one file into another file. The file can use the same name if the specified directory is different. "" Names a file residing in memory that will be copied. For information on the file name syntax, see “File Name Variables" on page 164. "" Names the file that is a copy of the "" file.
7 System Commands Deletes header file information for the waveform file "". This command does not require a personality modulation to be on. The header file contains N8211A/N8212A settings and marker routings associated with the waveform file. Refer to “File Name Variables" on page 164 for information on the file name syntax. Example :MMEM:HEAD "/USER/WAVEFORM/Test_Data" The example deletes header file information for the Test_Data waveform file.
7 System Commands :MOVE Supported All :MMEMory:MOVE "","" Renames the src_file to src_file_1 in the N8211A/N8212A’s memory catalog. Refer to “File Name Variables" on page 164 for information on the file name syntax and using quotes for different programming languages. Example :MMEM:MOV "LIST:Test_Data","LIST:New_Data" The example renames the file Test_Data to New_Data located in non–volatile List memory.
7 System Commands Output Subsystem (:OUTPut) :BLANking:AUTO Supported All [:SOURce]:OUTPut:BLANking:AUTO ON|OFF|1|0 [:SOURce]:OUTPut:BLANking:AUTO? Sets the state for automatic RF Output blanking. Blanking occurs when the RF output is momentarily turned off as the sweep transitions from one frequency segment (band) to another, allowing the signal to settle. Blanking also occurs during the retrace, so the signal can settle before the next sweep.
7 System Commands Example :OUTP:BLAN:ON The example enables RF output blanking. :MODulation[:STATe] Supported Option UNT :OUTPut:MODulation[:STATe] ON|OFF|1|0 :OUTPut:MODulation[:STATe]? Enables or disables the modulation of the RF output with the currently active modulation type(s). Most modulation types can be simultaneously enabled except FM with ΦM. Example :OUTP:MOD 0 The example disables RF modulation.
7 System Commands Status Subsystem (:STATus) :OPERation:CONDition Supported All :STATus:OPERation:CONDition? Returns the decimal sum of the bits in the Standard Operation Condition register. This register monitors N8211A/N8212A functions such as I/Q calibrating, sweeping, and measuring. For example, if a sweep is in progress (bit 3), a decimal 8 is returned with this query. The data in this register is continuously updated and reflects current conditions.
7 System Commands :OPERation:NTRansition Supported All :STATus:OPERation:NTRansition :STATus:OPERation:NTRansition? Enables bits in the Standard Operation Negative Transition Filter register. A negative transition (1 to 0) of corresponding bits in the Standard Operation Condition register will pass through and be read by the Standard Operation Event register. The variable is the sum of the decimal values of the bits that you want to enable.
7 System Commands :OPERation[:EVENt] Supported All This is a destructive read. The data in the register is latched until it is queried. Once queried, the data is cleared. :STATus:OPERation[:EVENt]? This query returns the decimal sum of the bits in the Standard Operation Event register. Refer to the Chapter 4, “Programming the Status Register System for more information on programming the status registers.
7 System Commands Enables bits in the Data Questionable Calibration Event Enable register. Bits enabled and set in this register will set the Calibration Summary bit (bit 8) in the Data Questionable Condition register. The variable is the sum of the decimal values of the bits that you want to enable. Refer to the Chapter 4, “Programming the Status Register System for more information on programming the status registers.
7 System Commands :STATus:QUEStionable:CALibration:PTRansition? Enables bits in the Data Questionable Calibration Positive Transition Filter register. A positive transition (0 to 1) of corresponding bits in the Data Questionable Calibration Condition register will pass through and be read by the Data Questionable Calibration Event register. The variable is the sum of the decimal values of the bits that you want to enable.
7 System Commands Range 0–32767 :QUEStionable:ENABle Supported All :STATus:QUEStionable:ENABle :STATus:QUEStionable:ENABle? Enables bits in the Data Questionable Event Enable register. Bits enabled and set in this register will set the Data Questionable Summary bit (bit 3) in the Status Byte register. When bit 3 in the Status Byte register is set, you can read the Data Questionable Event register to determine the cause.
7 System Commands :STATus:QUEStionable:FREQuency:ENABle? Enables bits in the Data Questionable Frequency Event Enable register. Bits enabled and set in this register will set the Data Questionable Condition register bit 5. The variable is the sum of the decimal values of the bits that you want to enable. Refer to the Chapter 4, “Programming the Status Register System for more information on programming the status registers.
7 System Commands :STATus:QUEStionable:FREQuency:PTRansition :STATus:QUEStionable:FREQuency:PTRansition? Enables bits in the Data Questionable Frequency Positive Transition Filter register. A positive transition (0 to 1) of corresponding bits in the Data Questionable Frequency Condition register will pass through and be read by the Data Questionable Frequency Event register. The variable is the sum of the decimal values of the bits that you want to enable.
7 System Commands Refer to the Chapter 4, “Programming the Status Register System for more information on programming the status registers. Range 0–32767 :QUEStionable:MODulation:ENABle Supported All :STATus:QUEStionable:MODulation:ENABle :STATus:QUEStionable:MODulation:ENABle? Enables bits in the Data Questionable Modulation Event Enable register. Bits enabled and set in this register will set bit 7 in the Data Questionable Condition register.
7 System Commands This example enables bit 0 (decimal 1, Modulation 1 Undermod) and bit 1 (decimal 2, Modulation 1 Overmod) in the Data Questionable Modulation Negative Transition Filter register. Range 0–32767 :QUEStionable:MODulation:PTRansition Supported All :STATus:QUEStionable:MODulation:PTRansition :STATus:QUEStionable:MODulation:PTRansition? Enables bits in the Data Questionable Modulation Positive Transition Filter register.
7 System Commands :QUEStionable:NTRansition Supported All :STATus:QUEStionable:NTRansition :STATus:QUEStionable:NTRansition? Enables bits in the Data Questionable Negative Transition Filter register. A negative transition (1 to 0) of corresponding bits in the Data Questionable Condition register will pass through and be read by the Data Questionable Event register. The variable is the sum of the decimal values of the bits that you want to enable.
7 System Commands Enables bits in the Data Questionable Power Event Enable register. Bits enabled and set in this register will set bit 3 in the Data Questionable Condition register. The variable is the sum of the decimal values of the bits that you want to enable. Refer to the Chapter 4, “Programming the Status Register System for more information on programming the status registers.
7 System Commands Enables bits in the Data Questionable Power Positive Transition Filter register. A positive transition (0 to 1) of corresponding bits in the Data Questionable Power Condition register will pass through and be read by the Data Questionable Power Event register. The variable is the sum of the decimal values of the bits that you want to enable. Refer to the Chapter 4, “Programming the Status Register System for more information on programming the status registers.
7 System Commands Example :STAT:QUES:PTR 8 This example enables bit 3 (decimal 8, Power Summary) in the Data Questionable Positive Transition Filter register. Range 0–32767 :QUEStionable[:EVENt] Supported All This is a destructive read. The data in the register is latched until it is queried. Once queried, the data is cleared. :STATus:QUEStionable[:EVENt]? This query returns the decimal sum of the bits in the Standard Operation Event register.
7 System Commands System Subsystem (:SYSTem) :ALTernate Supported Option 007 :SYSTem:ALTernate :SYSTem:ALTernate? [MAXimum|MINimum] Sets up the N8211A/N8212A to use a sweep state stored in a state register to alternate with the current sweep. The alternate sweep state must be stored in state registers 1 through 9 in sequence 0. Alternate sweep must be selected and both sweeps must be ramp sweeps.
7 System Commands This is a list of the SCPI-defined basic functionality of the N8211A/N8212A and the additional capabilities it has in parallel (a&b) and singularly (a|b). :ERRor[:NEXT] Supported All :SYSTem:ERRor[:NEXT]? Returns the most recent error message from the N8211A/N8212A error queue. If there are no error messages, the query returns the following output: +0,"No error" When there is more than one error message, the query will need to be sent for each message.
System Commands 7 :OEMHead:FREQuency:STARt Supported All :SYSTem:OEMHead:FREQuency:STARt :SYSTem:OEMHead:FREQuency:STARt? Sets the start frequency or minimum band frequency for an external source module. The pre-defined start or minimum band frequency for the selected WR (waveguide rectangular) is overwritten with this command. For more information on pre-defined frequency bands, refer to “:OEMHead:FREQuency:BAND WR15|WR12|WR10|WR8|WR6|WR5|WR3" on page 214.
7 System Commands :SYSTem:OEMHead:SELect? Selects an external millimeter-wave source module. The ON, REAR, and FRONT parameters select the OEM source module while the OFF and NONE parameters deselect the OEM source module. Example :SYST:OEMH:SEL ON The example turns on the OEM source module. *RST Off :OEMHead:FREQuency:BAND WR15|WR12|WR10|WR8|WR6|WR5|WR3 Supported All :SYSTem:OEMHead:FREQuency:BAND WR3 :SYSTem:OEMHead:FREQuency:BAND? Selects a pre-defined waveguide rectangular (WR) frequency band.
7 System Commands :OEMHead:FREQuency:MULTiplier Supported All :SYSTem:OEMHead:FREQuency:MULTiplier :SYSTem:OEMHead:FREQuency:MULTiplier? Selects a multiplier for an external millimeter-wave source module. The multiplier factor allows the N8211A/N8212A’s frequency display to show the source module’s frequency. The selection is valid only when the OEM source module is selected. The N8211A/N8212A’s actual RF frequency is not changed by the multiplier.
7 System Commands The example sets the preset state for the N8211A/N8212A to factory settings. :PRESet Supported All SYSTem:PRESet Returns the N8211A/N8212A to a set of defined conditions. The defined conditions are either factory– or user–defined. Refer to “:PRESet:TYPE" on page 217 for selecting the type of defined conditions.
7 System Commands The example selects a maximum length PN9 sequence. *RST NORM :PRESet:TYPE Supported All :SYSTem:PRESet:TYPE NORMal|USER :SYSTem:PRESet:TYPE? Selects the preset state for either factory or user-defined conditions. Refer to :PRESet[:USER]:SAVE below for saving the USER choice preset settings. The setting enabled by this command is not affected by a signal generator power-on, preset, or *RST command.
7 System Commands :SYSTem:SECurity:LEVel NONE|ERASe|OVERwrite|SANitize :SYSTem:SECurity:LEVel? Selects the security level operation for the signal generator. NONE Causes the N8211A/N8212A to reset to factory default settings. ERASe Removes all user files, table editor files, and flatness correction files. OVERwrite This selection removes all user files, table editor files, and flatness correction files. The memory is then overwritten with random data.
7 System Commands NOTE Ensure that you select the security level prior to executing this command with the ON (1) selection. Once you enable the state, you cannot reduce the security level. :SYSTem:SECurity:LEVel:STATe ON|OFF|1|0 :SYSTem:SECurity:LEVel:STATe? Arms and executes the current security level parameter. On (1) Arms and prevents any changes to the current security level. Refer to “:SECurity:LEVel" on page 217 for setting the security level.
7 System Commands HARD DISK All addressable locations will be overwritten with a single character and then a random character. FLASH MEMORY The flash blocks will be erased. :VERSion Supported All :SYSTem:VERSion? Returns the SCPI version number for the N8211A/N8212A.
7 System Commands Trigger Subsystem :ABORt Supported All :ABORt Aborts the in progress List or Step sweep. If INIT:CONT[:ALL] is set to ON, the sweep will immediately re-initiate. The pending operation flag affecting *OPC, *OPC?, and *WAI will undergo a transition once the sweep has been reset. :INITiate:CONTinuous[:ALL] Supported All :INITiate:CONTinuous[:ALL] ON|OFF|1|0 :INITiate:CONTinuous[:ALL]? Selects either a continuous or single List or Step sweep.
7 System Commands This command is ignored if a sweep is in progress. See “:INITiate:CONTinuous[:ALL]" on page 221 for setting continuous or single sweep. See “:TRIGger[:SEQuence]:SOURce" on page 222 to select the trigger source. In some atypical cases, the :INIT command could be ignored if it immediately follows an *OPC? command. If the :INIT command is ignored, then use a 10 ms sleep function before sending the command.
7 System Commands BUS Enables LAN triggering using the *TRG command. IMMediate Enables immediate triggering of the sweep event. EXTernal Enables the triggering of a sweep event by an externally applied signal at the TRIGGER IN connector. The wait for the BUS or EXTernal can be bypassed by sending the :TRIGger[:SEQuence][:IMMediate] command. Example :TRIG:SOUR BUS The example sets the sweep trigger source to BUS.
7 System Commands Unit Subsystem (:UNIT) :POWer Supported All :UNIT:POWer DBM|DBUV|DBUVEMF|V|VEMF|DB :UNIT:POWer? Terminates an amplitude value in the selected unit of measure. If the amplitude reference state is set to on, the query returns units expressed in dB. Setting any other unit will cause a setting conflict error stating that the amplitude reference state must be set to off. Refer to,“:REFerence:STATe" on page 267 for more information.
SCPI Programming Guide 8 Basic Function Commands In the following sections, this chapter provides SCPI descriptions for subsystems dedicated to N8211A/N8212A operations common to both models: • “Correction Subsystem ([:SOURce]:CORRection)" on page 226 • “Frequency Subsystem ([:SOURce])" on page 229 • “Power Subsystem ([:SOURce]:POWer)" on page 259 • “:ALC:LEVel" on page 260 • “Trigger Sweep Subsystem ([:SOURce])" on page 270 Agilent Technologies 225
8 Basic Function Commands Correction Subsystem ([:SOURce]:CORRection) :FLATness:LOAD Supported All [:SOURce]:CORRection:FLATness:LOAD "" Loads a user-flatness correction file designated by the file name "" variable. The file will be loaded from the N8211A/N8212A’s USERFLAT directory. The directory path does not need to be specified in the command. For information on file name syntax, refer to “File Name Variables" on page 164.
8 Basic Function Commands :FLATness:POINts Supported All [:SOURce]:CORRection:FLATness:POINts? Returns the number of points in the user-flatness correction file. :FLATness:PRESet Supported All Presets the user-flatness correction to a factory-defined setting that consists of one frequency point and one amplitude point with no corrections. Once this command is executed, correction data is overwritten; If needed, save the current correction data (see “:FLATness:STORe" on page 227).
8 Basic Function Commands Example :CORR OFF The example turns off correction data.
8 Basic Function Commands Frequency Subsystem ([:SOURce]) :FREQuency:CENTer Supported Option 007 [:SOURce]:FREQuency:CENTer []|UP|DOWN [:SOURce]:FREQuency:CENTer? [MAXimum|MINimum] Sets the center frequency for a ramp sweep. The center frequency symmetrically divides the selected frequency span and is coupled to the start and stop frequency settings. The frequency range and reset values are dependent on the signal generator model and option number.
8 Basic Function Commands NBASe NMOBile BPGSm MPGSm BEGSm MEGSm BRGSm 230 Standard Base as the frequency band for NADC. Standard Mobile as the frequency band for NADC. P-Gsm 900 Base as the frequency band for GSM. P-Gsm 900 Mobile as the frequency band for GSM. E-Gsm 900 Base as the frequency band for GSM. E-Gsm 900 Mobile as the frequency band for GSM. R-Gsm 900 Base as the frequency band for GSM. MRGSm R-Gsm 900 Mobile as the frequency band for GSM.
8 Basic Function Commands PHS Standard PHS as the frequency band. DECT Standard DECT as the frequency band. Example :FREQ:CHAN:BAND DECT The example sets the frequency band to standard DECT. *RST BPGS :FREQuency:CHANnels:NUMBer Supported All [:SOURce]:FREQuency:CHANnels:NUMBer [:SOURce]:FREQuency:CHANnels:NUMBer? Sets the frequency of the N8211A/N8212A by specifying a channel number of a given frequency band. The channel band and channel state must be enabled for this command to work.
8 Basic Function Commands Key Entry 800MHZ Base/Mobile: 0–640 1500MHZ Base/Mobile: 0–960 TETRA 380/390 Mobile: 3600–4000 TETRA 390/4000 Base: 3600–4000 TETRA 410/420 Mobile: 800–1200 TETRA 420/430 Base: 800–1200 TETRA 460/470: 2400 through 2800 2400–2800 TETRA 870/876 Mobile: 600–640 TETRA 915/921 Base: 600–940 PHS Standard: 1–255 DECT Standard: 0–9 Channel Number :FREQuency:CHANnels[:STATe] Supported All [:SOURce]:FREQuency:CHANnels[:STATe] ON|OFF|1|0 [:SOURce]:FREQuency:CHANnel
8 Basic Function Commands Sets the N8211A/N8212A output frequency, or increments or decrements the current RF frequency setting. A frequency value. UP Increases the current frequency setting by the value set with the “:FREQuency[:CW]:STEP[:INCRement]" on page 239. DOWN Decreases the current frequency setting by the value set with the “:FREQuency[:CW]:STEP[:INCRement]" on page 239. To set the frequency mode, see “:FREQuency:MODE" on page 234.
8 Basic Function Commands The preceding example sets the signal generator manual ramp sweep frequency to 10 GHz. *RST Option 520: +2.0000000000000E+10 Option 540*: +4.0000000000000E+10 Range Option 520: 250kHZ–20GHZ Option 540*: 250kHZ–40GHZ * N8211A only :FREQuency:MODE Supported All [:SOURce]:FREQuency:MODE FIXed|CW|SWEep|LIST [:SOURce]:FREQuency:MODE? Sets the frequency mode of the N8211A/N8212A. FIXed and CW These choices are synonymous.
Basic Function Commands *RST 8 CW :FREQuency:MULTiplier Supported All [:SOURce]:FREQuency:MULTiplier [:SOURce]:FREQuency:MULTiplier? Sets the multiplier for the N8211A/N8212A carrier frequency. For any multiplier other than one, the MULT indicator is shown in the frequency area of the display. The multiplier value is used to multiply the N8211A/N8212A’s displayed frequency. The true frequency remains constant.
8 Basic Function Commands :FREQuency:OFFSet:STATe Supported All [:SOURce]:FREQuency:OFFSet:STATe ON|OFF|1|0 [:SOURce]:FREQuency:OFFSet:STATe? Enables or disables the offset frequency. Entering OFF (0) will set the frequency offset to 0 Hz. Example :FREQ:OFFS:STAT 0 The example disables the frequency offset and sets the offset to 0 hertz.
Basic Function Commands 8 [:SOURce]:FREQuency:REFerence:Set Sets the current CW output frequency, along with any offset, as a 0 Hz reference value. *RST +0.0000000000000E+00 :FREQuency:REFerence:STATe Supported All [:SOURce]:FREQuency:REFerence:STATe ON|OFF|1|0 [:SOURce]:FREQuency:REFerence:STATe? Enables or disables the frequency reference mode. When the frequency reference mode is on, changes in the N8211A/N8212A’s CW frequency are displayed relative to the 0 Hz frequency reference.
8 Basic Function Commands :FREQuency:STARt Supported All [:SOURce]:FREQuency:STARt [:SOURce]:FREQuency:STARt? Sets the frequency start point for a step sweep or ramp sweep (Option 007). In a ramp sweep setup, the selected value must be less than or equal to the value selected for the frequency stop point. In ramp sweep, this setting is coupled with the span and center frequency settings. Example :FREQ:STAR 1GHZ The example sets the start frequency for a sweep to 1 GHz.
8 Basic Function Commands *RST Option 520: +2.0000000000000E+10 Option 540*: +4.0000000000000E+10 Range Option 520: 250kHZ–20GHZ Option 540*: 250kHZ–40GHZ * N8211A only :FREQuency[:CW] Supported All [:SOURce]:FREQuency[:CW] |UP|DOWN [:SOURce]:FREQuency[:CW]? Sets the N8211A/N8212A output frequency for the CW frequency mode, or increments or decrements the current RF frequency setting. A frequency value.
8 Basic Function Commands [:SOURce]:FREQuency[:CW]:STEP[:INCRement] [:SOURce]:FREQuency[:CW]:STEP[:INCRement]? Sets the incremental step value for the frequency parameter. The value set with this command is not affected by *RST or a power cycle. Range .01 Hz–99 GHz :PHASe:REFerence Supported All [:SOURce]:PHASe:REFerence Sets the output phase reference to zero. Subsequent phase adjustments are set relative to the new reference.
Basic Function Commands 8 :ROSCillator:BANDwidth:EXTernal Supported Option UNR/UNX [:SOURce]:ROSCillator:BANDwidth:EXTernal 25HZ|55HZ|125HZ|300HZ|650HZ [:SOURce]:ROSCillator:BANDwidth:EXTernal? Sets the bandwidth of the external reference oscillator. Example :ROSC:BAND:EXT 300HZ The example sets the bandwidth of the external oscillator to 300 Hz.
8 Basic Function Commands ON (1) Enables the N8211A/N8212A to detect when a valid reference signal is present at the 10 MHz IN connector and automatically switches from internal to external frequency reference. OFF (0) Selects the internal reference oscillator and disables the switching capability between the internal and an external frequency reference. Example :ROSC:SOUR:AUTO 0 The example turns off the automatic selection of internal or external reference oscillators.
8 Basic Function Commands List/Sweep Subsystem ([:SOURce]) A complete sweep setup requires commands from other subsystems. Table 18 shows the function and location of these commands.
8 Basic Function Commands Example :LIST:DIR UP The example selects an ascending sweep direction. *RST UP :LIST:DWELl Supported All [:SOURce]:LIST:DWELl {,} [:SOURce]:LIST:DWELl? Sets the dwell time for points in the current list sweep. The variable is expressed in units of seconds with a 0.001 resolution. If only one point is specified, that value is used for all points in the list. Otherwise, there must be a dwell point for each frequency and amplitude point in the list.
Basic Function Commands 8 :LIST:DWELl:TYPE Supported All [:SOURce]:LIST:DWELl:TYPE LIST|STEP [:SOURce]:LIST:DWELl:TYPE? Toggles the dwell time for the list sweep points between the values defined in the list sweep and the value for the step sweep. LIST Selects the dwell times from the list sweep. Refer to “:LIST:DWELl" on page 244 for setting the list dwell points. STEP Selects the dwell time from the step sweep. Refer to “:SWEep:DWELl" on page 251 for setting the step dwell.
8 Basic Function Commands The example sets the frequency value for a four point sweep. *RST Option 520: +2.0000000000000E+10 Option 540*: +4.0000000000000E+10 Range Option 520: 250kHZ–20GHZ Option 540*: 250kHZ–40GHZ * N8211A only :LIST:FREQuency:POINts Supported All [:SOURce]:LIST:FREQuency:POINts? Queries the current list sweep file for the number of frequency points.
Basic Function Commands 8 :LIST:MODE Supported All [:SOURce]:LIST:MODE AUTO|MANual [:SOURce]:LIST:MODE? Sets the operating mode for the current list or step sweep. AUTO Enables the selected sweep type to perform a sweep of all points. MANual Enables you to select an individual sweep point to control the RF output parameters. For more about selecting a sweep point, see“:LIST:MANual" on page 246. Example :LIST:MODE AUTO The example sets the mode to automatic.
8 Basic Function Commands :LIST:POWer:POINts Supported All [:SOURce]:LIST:POWer:POINts? Queries the number of power points in the current list sweep file. :LIST:RETRace Supported All [:SOURce]:LIST:RETRace ON|OFF|1|0 [:SOURce]:LIST:RETRace? Upon completion of a single sweep operation, this command either resets the sweep to the first sweep point, or leaves it at the last sweep point. The command is valid for the list, step, or ramp (Option 007) single-sweep modes.
8 Basic Function Commands EXTernal This choice enables the triggering of a sweep event by an externally applied signal at the TRIGGER IN connector. Example :LIST:TRIG:SOUR BUS The example sets the trigger source to the instrument BUS. *RST IMM :LIST:TYPE Supported All [:SOURce]:LIST:TYPE LIST|STEP [:SOURce]:LIST:TYPE? Selects the sweep type. LIST This type of sweep has arbitrary frequencies and amplitudes. STEP This type of sweep has equally spaced frequencies and amplitudes.
8 Basic Function Commands :LIST:TYPE:LIST:INITialize:PRESet Supported All [:SOURce]:LIST:TYPE:LIST:INITialize:PRESet Replaces the current list sweep data with a factory-defined file consisting of one point at a frequency, amplitude, and dwell time. NOTE When you execute this command, the current list sweep data is overwritten. If needed, save the current data. For information on storing list sweep files, see “:STORe:LIST" on page 190.
8 Basic Function Commands MASTer Enables the N8211A/N8212A to provide the triggering. SLAVe Causes the N8211A/N8212A to submit to the triggering parameters provided by the master N8211A/N8212A. You must set the slave N8211A/N8212A triggering to continuous. Refer to“:INITiate:CONTinuous[:ALL]" on page 221. Example :SWE:CONT:TYPE MAST Sets the N8211A/N8212A as the master sweep control instrument.
8 Basic Function Commands Sets the sweep type to analog or stepped. ANALog Selects a ramp sweep. STEPped Selects a step sweep. Example :SWE:GEN STEP The example selects a step sweep. *RST STEP :SWEep:MODE Supported Option 007 [:SOURce]:SWEep:MODE AUTO|MANual [:SOURce]:SWEep:MODE? Sets the current ramp sweep operating mode. AUTO Enables the N8211A/N8212A to automatically sweep through the selected frequency range.
Basic Function Commands 8 Example :SWE:POIN 2001 The example sets the number of step sweep points to 2001. : *RST 2 Range 2–65535 SWEep:TIME Supported Option 007 [:SOURce]:SWEep:TIME [:SOURce]:SWEep:TIME? Sets the sweep time for a ramp sweep in seconds. If this command is executed while the signal generator is in automatic sweep time mode, the manual sweep time mode is activated and the new sweep time value is applied.
8 Basic Function Commands ON (1) Automatically calculates and sets the fastest allowable sweep time. OFF (0) Selects the sweep time. The sweep time cannot be set to a value faster than what the automatic mode provides. Example :SWE:TIME:AUTO 0 The example sets the ramp sweep time to manual allowing you to select a sweep time.
8 Basic Function Commands Marker Subsystem–Option 007 ([:SOURce]) :MARKer:AMPLitude[:STATe] Supported Option 007 [:SOURce]:MARKer:AMPLitude[:STATe] ON|OFF|1|0 [:SOURce]:MARKer:AMPLitude[:STATe]? Sets the amplitude marker state for the currently activated markers. When the state is switched on, the RF output signal exhibits a spike with a magnitude relative to the power level at each marker’s set frequency. (To set the magnitude of the spike, refer to “:MARKer:AMPLitude:VALue" on page 255.
8 Basic Function Commands [:SOURce]:MARKer:AOFF Turns off all active markers. :MARKer:DELTa? Supported Option 007 [:SOURce]:MARKer:DELTa? , Returns the frequency difference between two amplitude markers. The variables are used to designate the marker numbers. Example :MARK:DELT? 1,2 The example returns the frequency difference between amplitude markers 1 and 2.
Basic Function Commands 8 :MARKer:MODe Supported Option 007 [:SOURce]:MARKer:MODE FREQuency|DELTa [:SOURce]:MARKer:MODE? Sets the frequency mode for all markers. FREQuency The frequency values for the markers are absolute. DELTa The frequency values for the markers are relative to the designated reference marker. The reference marker must be designated before this mode is selected. (See “:MARKer:REFerence" on page 257 to select a reference marker.
8 Basic Function Commands [:SOURce]:MARKer[0,1,2,3,4,5,6,7,8,9][:STATe]? Turns a marker on or off. Marker 0 is the default if the marker designator [n] is not specified. Example :MARK6 ON The example turns marker 6 on.
Basic Function Commands 8 Power Subsystem ([:SOURce]:POWer) :ALC:BANDwidth|BWIDth Supported All [:SOURce]:POWer:ALC:BANDwidth|BWIDth [] [:SOURce]:POWer:ALC:BANDwidth|BWIDth? Sets the bandwidth of the automatic leveling control (ALC) loop. You can select bandwidths of 100 Hz, 1 kHz, 10 kHz, or 100 kHz. If you do not specify one of these exact bandwidths, your entry rounds to the nearest acceptable value.
8 Basic Function Commands :ALC:LEVel Supported Option 1E1 [:SOURce]:POWer:ALC:LEVel DB [:SOURce]:POWer:ALC:LEVel? Sets the automatic leveling control (ALC) level when the attenuator hold is active. Use this command when the automatic attenuation mode is set to OFF (0). Refer to “:ATTenuation:AUTO" on page 264 for choosing the attenuator mode. Example :POW:ALC:LEV 10DB The example sets the ALC to 10 dB. *RST +1.
8 Basic Function Commands The example starts a single power search of the RF output signal. *RST 0 :ALC:SEARch:REFerence Supported All [:SOURce]:POWer:ALC:SEARch:REFerence FIXed|MODulated [:SOURce]:POWer:ALC:SEARch:REFerence? Sets either fixed or modulated modes for power search. FIXed Uses a 0.5 volt reference. MODulated Uses the RMS value of the current I/Q modulation as measured during the power search.
8 Basic Function Commands Sets the stop frequency for a power search over a user-defined range. The stop frequency has no default value. The stop frequency value will be saved before powering off the instrument. Example :POW:ALC:SEAR:SPAN:STOP 20GHZ The example selects 20 GHz as the stop frequency for a power search. :ALC:SEARch:SPAN:TYPE FULL|USER Supported All [:SOURce]:POWer:ALC:SEARch:SPAN:TYPE FULL|USER [:SOURce]:POWer:ALC:SEARch:SPAN:TYPE? Selects the frequency range for a power search.
8 Basic Function Commands [:SOURce]:POWer:ALC:SOURce? Selects an automatic level control (ALC) source. You can select the internal ALC source, an external detector source, or a millimeter-wave source module. Example :POW:ALC:SOUR MMH The example selects an Agilent 8355x series external millimeter head as the source (the unit must be connected to the N8211A/N8212A).
8 Basic Function Commands The example sets the ALC on. *RST 1 :ATTenuation Supported Option 1E1 [:SOURce]:POWer:ATTenuation [:SOURce]:POWer:ATTenuation? This command sets the attenuation level when the attenuator hold is active. For theN8211A/N8212A, the attenuation is set in increments of 5 dB. For the N8211A/N8212A with Option 1E1, the progression is 0, 5, 15, 25 and continues in 5 dB increments. The output power is the ALC level minus the attenuator setting.
8 Basic Function Commands OFF (0) eliminates the power discontinuity normally associated with the attenuator switching during power adjustments. During an amplitude sweep operation, N8211A/N8212As with Option 1E1 protect the step attenuator by automatically switching to attenuator hold mode (ON). The attenuator is locked at its current setting and the amplitude sweep range is limited to 40 dB. Example :POW:ATT:AUTO OFF The example turns off the attenuator hold function.
8 Basic Function Commands :PROTection:STATe Supported Option 1E1 [:SOURce]:POWer:PROTection[:STATe] ON|OFF|1|0 [:SOURce]:POWer:PROTection[:STATe]? Enables or disables the power search protection function. The power search protection function sets the attenuator to its maximum level whenever a power search is initiated. This can be used to protect devices that are sensitive to high average power or high power changes.
8 Basic Function Commands :REFerence:STATe Supported All [:SOURce]:POWer:REFerence:STATe ON|OFF|1|0 [:SOURce]:POWer:REFerence:STATe? This command enables or disables the RF output reference. ON (1) Sets the power reference state ON. OFF (0) Sets the power reference state OFF. Once the reference state is ON, all subsequent output power settings are set relative to the reference value. Amplitude offsets can be used with the amplitude reference mode.
8 Basic Function Commands :STOP Supported All [:SOURce]:POWer:STOP [:SOURce]:POWer:STOP? Sets the amplitude of the last point in a step or ramp sweep (Option 007). During an amplitude sweep, N8211A/N8212As with Option 1E1 protect the step attenuator by switching to attenuator hold (ON) mode. The attenuator is locked at its current setting and the amplitude sweep range is limited to 40 dB. Example :POW:STOP -10DBM The example sets the amplitude of the last point in the sweep to –10 dBm.
Basic Function Commands 8 [:LEVel][:IMMediate][:AMPLitude] Supported All [:SOURce]:POWer[:LEVel][:IMMediate][:AMPLitude] [:SOURce]:POWer[:LEVel][:IMMediate][:AMPLitude]? Sets the RF output power. The ranges for this command are specified values from the data sheet. Example :POW 0DBM The example sets the N8211A/N8212A output power level to 0 dBm.
8 Basic Function Commands Trigger Sweep Subsystem ([:SOURce]) :TSWeep Supported All [:SOURce]:TSWeep Aborts the current sweep, then either arms, or arms and starts a single list or step sweep, depending on the trigger type. The command performs the following: • Arms a single sweep when BUS or EXTernal is the trigger source selection. • Arms and starts a single sweep when IMMediate is the trigger source selection.
SCPI Programming Guide 9 Analog Commands The following is a list of the subsystems contained in this chapter: • “Amplitude Subsystem ([:SOURce])" on page 272 • “Frequency Modulation Subsystem ([:SOURce])" on page 283 • “Low Frequency Output Subsystem ([:SOURce]:LFOutput)" on page 291 • “Phase Modulation Subsystem ([:SOURce])" on page 297 • “Pulse Modulation Subsystem ([:SOURce])" on page 307 Agilent Technologies 271
9 Analog Commands Amplitude Subsystem ([:SOURce]) :AM[1]|2 Supported All [:SOURce]:AM[1]|2 This prefix enables the selection of the AM path and is part of most SCPI commands associated with this subsystem. AM1 AM Path 1 2 with 1 selected AM2 AM Path 1 2 with 2 selected When just AM is shown in a command, the command defaults to path 1. Each path is set up separately. When a SCPI command uses AM1, only path one is affected. Consequently, when AM2 is selected, only path two is set up.
9 Analog Commands :AM:MODE Supported Option UNT [:SOURce]:AM:MODE DEEP|NORMal [:SOURce]:AM:MODE? Sets the mode for amplitude modulation. DEEP Enables amplitude modulation depth with a greater dynamic range than normal mode which utilizes the ALC. DEEP has no specified parameters and emulates the amplitude modulation NORMal mode with the ALC disabled. DEEP is limited to repetitive AM and will not work with a dc modulation signal.
9 Analog Commands :AM:WIDeband:STATe Supported Option UNT [:SOURce]:AM:WIDeband:STATe ON|OFF|1|0 [:SOURce]:AM:WIDeband:STATe? Enables or disables wideband amplitude modulation. The RF carrier is modulated when the modulation state is ON, see “:MODulation[:STATe]" on page 196 for more information. The N8212A’s I input is used to drive wideband AM modulation. Example :AM:WID:STAT 0 The example turns off wideband amplitude modulation.
9 Analog Commands [:SOURce]:AM[1]|2:EXTernal[1]|2:IMPedance? Sets the impedance for the external input. Example :AM1:EXT1:IMP 600 The example sets the AM path 1, external 1 source impedance to 600 ohms. *RST +5.00000000E+001 :AM[1]|2:INTernal[1]|2:FREQuency Supported Option UNT [:SOURce]:AM[1]|2:INTernal[1]|2:FREQuency |UP|DOWN [:SOURce]:AM[1]|2:INTernal[1]|2:FREQuency? Sets the internal AM rate using the variable .
9 Analog Commands :AM[1]|2:INTernal[1]:FREQuency:ALTernate Supported Option UNT [:SOURce]:AM[1]|2:INTernal[1]:FREQuency:ALTernate [:SOURce]:AM[1]|2:INTernal[1]:FREQuency:ALTernate? Sets the frequency for the alternate signal. The alternate signal frequency is the second tone of a dual–sine or the stop frequency of a swept–sine waveform. Refer to“:AM[1]|2:INTernal[1]|2:FUNCtion:SHAPe" on page 277 for the waveform selection.
Analog Commands Range 9 0–100% :AM[1]|2:INTernal[1]|2:FUNCtion:NOISe Supported Option UNT [:SOURce]:AM[1]|2:INTernal[1]|2:FUNCtion:NOISe GAUSsian|UNIForm [:SOURce]:AM[1]|2:INTernal[1]|2:FUNCtion:NOISe? Selects a gaussian or uniform noise modulation for the selected waveform. Refer to “:AM[1]|2:INTernal[1]|2:FUNCtion:SHAPe" on page 277 for the waveform selection. Example :AM2:INT1:FUNC:NOIS GAUS The example selects the gaussian noise waveform for AM modulation on AM path 2, internal source 1.
9 Analog Commands [:SOURce]:AM[1]|2:INTernal[1]:SWEep:RATE? Sets the sweep rate for the AM swept–sine waveform. Refer to“:AM[1]|2:INTernal[1]|2:FUNCtion:SHAPe" on page 277 for the waveform selection. The sweep rate function is only available for internal source 1. Example :AM2:INT1:SWE:RATE 1KHZ The example sets the sweep rate for AM path 1, internal source 1 to 1 kHz. *RST Range +4.00000000E+002 0.
Analog Commands 9 [:SOURce]:AM[1]|2:SOURce? Selects the source for amplitude modulation. INT Selects internal source 1 or 2 to provide an ac–coupled signal. EXT Selects the EXT 1 INPUT or the EXT 2 INPUT connector to provide an externally applied signal that can be ac- or dc-coupled. The externally applied, ac-coupled input signal is tested for a voltage level and an annunciator, on the N8211A/N8212A’s front-panel display, will indicate a high or low condition if that voltage is > ±3% of 1 Vp.
9 Analog Commands Sets the AM type to linear or exponential AM. LINear Selects linear AM type with depth values in units of percent/volt. EXPonential Selects exponential AM type with depth values in units of dB/volt. Example :AM2:TYPE EXP The example selects exponential type depth values for AM path 2. *RST LIN :AM[1]|2[:DEPTh]:EXPonential Supported Option UNT [:SOURce]:AM[1]|2[:DEPTh]:EXPonential [:SOURce]:AM[1]|2[:DEPTh]:EXPonential? Sets the AM depth in dB/volt units.
Analog Commands 9 LINear must be the current AM type for this command to have any affect. Refer to “:AM[1]|2:TYPE" on page 279 for setting the AM measurement type. When the depth values are coupled, a change made to one path is applied to both. For AM depth value coupling, refer to the command “:AM[1]|2[:DEPTh][:LINear]:TRACk" on page 281. Example :AM2 20 The example sets the AM path 2 linear depth to 20%. *RST +1.00000000E-001 Range 0.
9 Analog Commands Sets the linear depth step value in percent/volt units. The step value set by this command is used with the UP and DOWN choices for the “:AM[1]|2[:DEPTh][:LINear]" on page 280. The setting enabled by this command is not affected by a N8211A/N8212A power-on, preset, or *RST command. Example :AM:STEP 10 The example sets the step value for AM depth to 10%. Range 282 0.
9 Analog Commands Frequency Modulation Subsystem ([:SOURce]) :FM[1]|2 Supported All [:SOURce]:FM[1]|2 Enables the selection of the FM path and is associated with all SCPI commands in this subsystem. FM1 FM Path 1 2 with 1 selected FM2 FM Path 1 2 with 2 selected When just FM is shown in a command, this means the command applies to path one only. Each path is set up separately. When a SCPI command uses FM1, only path one is affected. Consequently, when FM2 is selected, only path two is set up.
9 Analog Commands The example sets the step value to 100 kHz. Range 0.5–1E6 :FM[1]|2:EXTernal[1]|2:COUPLing Supported Option UNT [:SOURce]:FM[1]|2:EXTernal[1]|2:COUPling AC|DC [:SOURce]:FM[1]|2:EXTernal[1]|2:COUPling? Sets the coupling type for the selected external input. The command does not change the active source or switch modulation on or off. The modulating signal may be the sum of several signals, from either internal or external sources. AC Passes only ac signal components.
9 Analog Commands [:SOURce]:FM[1]|2:INTernal[1]:FREQuency:ALTernate [:SOURce]:FM[1]|2:INTernal[1]:FREQuency:ALTernate? Sets the internal FM rate of the alternate signal. The alternate signal frequency is the second tone of a dual–sine or the stop frequency of a swept–sine waveform. Refer to “:FM[1]|2:INTernal[1]|2:FUNCtion:SHAPe" on page 288 for the waveform selection. Example :FM1:INT:FREQ:ALT 20KHZ The example sets the FM tone 2 rate for FM path 1, FM source 1, to 20 kHz. *RST Range +4.
9 Analog Commands [:SOURce]:FM[1]|2:INTernal[1]:SWEep:RATE? Sets the sweep rate for the swept–sine waveform. The minimum resolution is 0.5 hertz. Refer to “:FM[1]|2:INTernal[1]|2:FUNCtion:SHAPe" on page 288 for the waveform selection. Example :FM1:INT:SWE:RATE 20KHZ The example sets the sweep rate for the swept–sine waveform to 20 kHz. *RST Range +4.00000000E+002 0.
9 Analog Commands Sets the internal FM rate using the variable, or changes the FM rate by a user-defined up/down step value. Refer to the “:FM:INTernal:FREQuency:STEP[:INCRement]" on page 283 for setting the value associated with the UP and DOWN choices.
9 Analog Commands [:SOURce]:FM[1]|2:INTernal[1]|2:FUNCtion:RAMP? Selects a positive or negative ramp as the internal modulating waveform. Refer to “:FM[1]|2:INTernal[1]|2:FUNCtion:SHAPe" on page 288 for the waveform selection. Example :FM2:INT2:FUNC:RAMP POS The example selects a positive sloped ramp as the internal modulating waveform.
9 Analog Commands Example :FM2:SOUR INT2 The example selects internal source 2 as the FM source for FM path 2. *RST INT :FM[1]|2:STATe Supported Option UNT [:SOURce]:FM[1]|2:STATe ON|OFF|1|0 [:SOURce]:FM[1]|2:STATe? Enables or disables the selected FM path. The RF carrier is modulated when you set the modulation state to ON, see “:MODulation[:STATe]" on page 196 for more information. The two paths for frequency modulation can be simultaneously enabled.
9 Analog Commands *RST +1.00000000E+003 Range Frequency Deviation 250 kHz−250ΜHZ 0–2 MHz > 250−500 MHz 0–1 MHz > 0.5−1 GHz 0–2 MHz > 1−2 GHz 0–4 MHz > 2−3.2 GHz 0–8 MHz > 3.2−10 GHz 0–16 MHz > 10−20 GHz 0–32 MHz > 20−28.5 GHz* 0–48MHZ > 20−40 GHz∗ 0–64 MHz * N8211A Option 540 only :FM[1]|2[:DEViation]:TRACk Supported Option UNT [:SOURce]:FM[1]|2[:DEViation]:TRACk ON|OFF|1|0 [:SOURce]:FM[1]|2[:DEViation]:TRACk? Enables or disables deviation coupling between FM paths 1 and 2.
9 Analog Commands Low Frequency Output Subsystem ([:SOURce]:LFOutput) :LFOutput:AMPLitude Supported Option UNT [:SOURce]:LFOutput:AMPLitude [:SOURce]:LFOutput:AMPLitude? Sets the amplitude of the signal at the LF OUTPUT connector. Example :LFO:AMPL 2.1VP The example sets the peak amplitude to 2.1 volts. *RST Range 0.00 0.000 Vp–3.
9 Analog Commands :LFOutput:FUNCtion[1]:FREQuency:ALTernate Supported Option UNT [:SOURce]:LFOutput:FUNCtion[1]:FREQuency:ALTernate [:SOURce]:LFOutput:FUNCtion[1]:FREQuency:ALTernate? Sets the frequency for the alternate LF output signal. The alternate frequency is the second tone of a dual–sine or the stop frequency of a swept–sine waveform. Refer to “:LFOutput:FUNCtion[1]|2:SHAPe" on page 293 for more information on selecting the waveform type.
9 Analog Commands :LFOutput:FUNCtion[1]|2:SHAPe Supported Option UNT [:SOURce]:LFOutput:FUNCtion[1]|2:SHAPe SINE|DUALsine|SWEPtsine|TRIangle| SQUare|RAMP|PULSe|NOISe|DC [:SOURce]:LFOutput:FUNCtion[1]|2:SHAPe? This command selects the waveform type. Function Generator 1 must be the source for the dual–sine or the swept–sine waveform. Refer to “:LFOutput:SOURce" on page 295. Example :LFO:FUNC2:SHAP TRI The preceding example selects a triangle wave for the Function Generator 2 LF output.
9 Analog Commands Selects a positive or negative slope for the ramp modulation on the LF output. Refer to “:LFOutput:FUNCtion[1]|2:SHAPe" on page 293 for selecting the waveform type. Example :LFO:FUNC1:SHAP:RAMP POS The example selects a positive ramp slope modulation for the Function Generator 1 LF output.
Analog Commands 9 Example :LFO:FUNC1:SWE:TRIG EXT The example sets an external trigger as the trigger for the swept–sine signal. *RST Free Run :LFOutput:SOURce Supported Option UNT [:SOURce]:LFOutput:SOURce INT[1]|INT2|FUNCtion[1]|FUNCtion2 [:SOURce]:LFOutput:SOURce? Selects the source for the LF output. INT Outputs a signal where the frequency and shape of the signal is set by internal source 1 or 2.
9 Analog Commands Key Entry 296 LF Out Off On Agilent N8211A/N8212A Performance Upconverter Synthetic Instrument Module, 250 kHz to 20 / 40 GHz
9 Analog Commands Phase Modulation Subsystem ([:SOURce]) :PM[1]|2 Supported All [:SOURce]:PM[1]|2 Enables the selection of the ΦM path and associated with all SCPI commands in this subsystem. PM1 ΦM Path 1 2 with 1 selected PM2 ΦM Path 1 2 with 2 selected When just PM is shown in a command, this means the command applies to path 1 only. Each path is set up separately. When a SCPI command uses PM1, only path one is affected. Consequently, when PM2 is selected, only path two is set up.
9 Analog Commands The example sets the step value to 100 kHz. Range 0.5–1E6 :PM[1]|2:BANDwidth|BWIDth Supported Option UNT [:SOURce]:PM[1]|2:BANDwidth|BWIDth NORMal|HIGH [:SOURce]:PM[1]|2:BANDwidth|BWIDth? Selects normal phase modulation or high bandwidth phase modulation. The command can use either the BANDwidth or BWIDth paths. Example :PM1:BAND NORM The example selects normal phase modulation for ΦM path 1.
9 Analog Commands :PM[1]|2:EXTernal[1]|2:IMPedance Supported Option UNT [:SOURce]:PM[1]|2:EXTernal[1]|2:IMPedance <50|600> [:SOURce]:PM[1]|2:EXTernal[1]|2:IMPedance? Selects 50 ohms or 600 ohms as the input impedance for the external input signal. Example :PM1:EXT2:IMP 600 The example sets the ΦM path 1, external 2 source impedance to 600 ohms. *RST +5.
9 Analog Commands [:SOURce]:PM[1]|2:INTernal[1]:FREQuency:ALTernate? Sets the frequency rate for the alternate signal. The alternate frequency is the second tone of a dual–sine or the stop frequency of a swept–sine waveform. Refer to “:PM[1]|2:INTernal[1]:FUNCtion:SHAPe" on page 301 for the waveform selection. Example :PM1:INT1:FREQ:ALT 50KHZ The example sets the alternate frequency rate for the ΦM tone 2, ΦM path 1, source 1 to 50 kHz. *RST Range +4.00000000E+002 Dual_sine 0.
Analog Commands 9 The example selects a positive ramp slope for modulating the signal on ΦM path 1, internal source 2. *RST POS :PM[1]|2:INTernal[1]:FREQuency:ALTernate:AMPLitude:PERCent Supported Option UNT [:SOURce]:PM[1]|2:INTernal[1]:FREQuency:ALTernate:AMPLitude:PERCent [:SOURce]:PM[1]|2:INTernal[1]:FREQuency:ALTernate:AMPLitude:PERCent? Sets the amplitude of the second tone for the dual–sine waveform as a percentage of the total amplitude.
9 Analog Commands PM[1]|2:INTernal2:FUNCtion:SHAPe Supported Option UNT [:SOURce]:PM[1]|2:INTernal2:FUNCtion:SHAPe SINE|TRIangle|SQUare|RAMP|NOISe [:SOURce]:PM[1]|2:INTernal2:FUNCtion:SHAPe? Sets the phase modulation waveform type for internal source 2. Example :PM1:INT2:FUNC:SHAP RAMP The example selects a ramp modulation for ΦM path 1, source 2.
9 Analog Commands IMMediate Enables immediate triggering of the sweep event. EXTernal Enables the triggering of a sweep event by an externally applied signal at the TRIGGER IN connector. Refer to “:PM[1]|2:INTernal[1]:FUNCtion:SHAPe" on page 301 for the waveform selection. Example :PM2:INT:SWE:TRIG BUS The example selects a BUS trigger as the triggering for the internal source 1 swept–sine waveform on ΦM path 2.
9 Analog Commands Enables or disables the phase modulation for the selected path. The RF carrier is modulated when you set the N8211A/N8212A’s modulation state to ON, see “:MODulation[:STATe]" on page 196 for more information. Example :PM2:STAT 1 The example turns on ΦM path 2 phase modulation. *RST 0 :PM[1]|2[:DEViation] Supported Option UNT [:SOURce]:PM[1]|2[:DEViation] |UP|DOWN [:SOURce]:PM[1]|2[:DEViation]? Sets the deviation of the phase modulation.
Analog Commands 9 The example sets the phase modulation to 135 degrees. +0.00000000E+000 *RST Range Frequency Normal Bandwidth 250KHZ−250MHZ High Bandwidth 0–20rad 0–2rad > 250−500MHZ 0–10rad 0–1rad > 0.5−1GHZ 0–20rad 0–2rad > 1−2GHZ 0–40rad 0–4rad > 2−3.2GHZ 0–80rad 0–8rad > 3.2−10GHZ 0–160rad 0–16rad > 10.0−20GHZ 0–320rad 0–32rad > 20.0−28.5GHZ* 0–480rad 0–48rad * 0–640rad 0–64rad > 20.0−40.0GHZ * N8211A Option 540 only.
9 Analog Commands :PM[:DEViation]:STEP[:INCRement] Supported Option UNT [:SOURce]:PM[:DEViation]:STEP[:INCRement]|MAXimum|MINimum|D EFault [:SOURce]:PM[:DEViation]:STEP[:INCRement]? Sets the phase modulation deviation step value. The value set by this command is used with the UP and DOWN choices for the FM deviation command. Refer to “:PM[1]|2[:DEViation]" on page 304 for more information. The setting is not affected by a power-on, preset, or *RST command.
9 Analog Commands Pulse Modulation Subsystem ([:SOURce]) :PULM:EXTernal:POLarity NORMal:INVerted Supported Option UNU or UNW [:SOURce]:PULM:EXTernal:POLarity NORMal|INVerted [:SOURce]:PULM:EXTernal:POLarity? Selects the polarity of the TTL input signal at the Pulse In front panel connector. The N8211A/N8212A can respond to either a normal (a TTL high) or an inverted (TTL low) signal. Example :PULM:EXT:POL NORM The example selects normal (TTL high) polarity.
9 Analog Commands Internal Triggered & Doublet: 70nS to (42 S - 20 nS - pulse width) :PULM:INTernal[1]:DELay:STEP Supported Option UNU or UNW [:SOURce]:PULM:INTernal[1]:DELay:STEP [:SOURce]:PULM:INTernal[1]:DELay:STEP? Sets the step increment for the pulse delay. The step value, set by this command, is used with the UP and DOWN choices in the “:PULM:INTernal[1]:DELay" on page 307 command.
Analog Commands Range 9 0.1 Hz–10 MHz :PULM:INTernal[1]:FREQuency:STEP Supported Option UNU or UNW [:SOURce]:PULM:INTernal[1]:FREQuency:STEP[:INCRement] [:SOURce]:PULM:INTernal[1]:FREQuency:STEP[INCRement]? Sets the step value for the internally-generated square wave pulse rate. This command is used when SQUare is the pulse modulation type. Refer to “:PULM:SOURce" on page 312 for the pulse modulation type selection.
9 Analog Commands *RST Range +2.00000000E−006 70 nS – 42 S :PULM:INTernal[1]:PERiod:STEP[:INCRement] Supported Option UNU or UNW [:SOURce]:PULM:INTernal[1]:PERiod:STEP[:INCRement]|MAXimum|MI Nimum|DEFault [:SOURce]:PULM:INTernal[1]:PERiod:STEP[:INCRement]? Sets the step value for the internal pulse period using the variable . The step value, set with this command, is used with the UP and DOWN choices available in the “:PULM:INTernal[1]:PERiod" on page 309 command.
9 Analog Commands A power search is recommended for signals with pulse widths less than one microsecond. Refer to “:ALC:SEARch" on page 260. Example :PULM:INT:PWIDth 100MS The example sets the pulse width to 100 mS. *RST Range +1.
9 Analog Commands Example :PULM:SOUR:INT SQU The example selects the internally–generated square wave pulse modulation format. *RST FRUN (Int Free–Run) :PULM:SOURce Supported Option UNU or UNW [:SOURce]:PULM:SOURce INTernal|EXTernal|SCALar [:SOURce]:PULM:SOURce? Sets the source for pulse modulation. The INTernal selection accesses one of the five internally generated modulation inputs while EXTernal selects an external pulse (Ext Pulse) and SCALar selects input from a scalar network analyzer.
SCPI Programming Guide 10 Digital Modulation Commands In the following sections, this chapter provides SCPI descriptions for subsystems dedicated to the N8212A performance vector upconverter only: “Digital Modulation Subsystem ([:SOURce]:DM)" on page 314 “Wideband Digital Modulation Subsystem ([:SOURce]:WDM)" on page 331 Agilent Technologies 313
10 Digital Modulation Commands Digital Modulation Subsystem ([:SOURce]:DM) :EXTernal:Filter Supported N8212A [:SOURce]:DM:EXTernal:FILTer 40e6|THRough [:SOURce]:DM:EXTernal:FILTer? Selects the filter or through path for I/Q signals routed to the I and Q outputs. 40e6 Applies a 40 MHz baseband filter. THRough Bypasses filtering. Example :DM:EXT:FILT 40E6 The example selects the 40 MHz baseband filter.
Digital Modulation Commands 10 :EXTernal:HCRest Supported N8212A [:SOURce]:DM:EXTernal:HCRest[STATe] ON|OFF|1|0 [:SOURce]:DM:EXTernal:HCRest [STATe]? Changes the operating condition to accommodate I/Q inputs with a high crest factor. ON (1) Turns high crest mode on for externally applied signals with high crest factors. High crest mode allows the N8211A/N8212A to process these signals with less distortion.
10 Digital Modulation Commands [:SOURce]:DM:EXTernal:SOURce? Selects the I/Q signal source that is routed to the rear-panel I and Q output connectors. EXTernal Routes a portion of the externally applied signals at the 50 ohm I and Q input connectors to the rear-panel I and Q output connectors. INTernal Backwards compatibility and performs the same function as the BBG1 selection.
10 Digital Modulation Commands *RST +0.00000000E+000 :IQADjustment:EXTernal:COFFset Supported N8212A [:SOURce]:DM:IQADjustment:EXTernal:COFFset [:SOURce]:DM:IQADjustment:EXTernal:COFFset? Sets the common mode offset voltage for both the in-phase (I) and quadrature-phase (Q) signals going to the rear-panel I and Q output connectors. The variable is expressed in volts (mV–V). his command is effective only if the state of the I/Q adjustment function is set to ON.
10 Digital Modulation Commands Range −3 to 3 :IQADjustment:EXTernal:DQOFfset Supported N8212A [:SOURce]:DM:IQADjustment:EXTernal:DQOFfset [:SOURce]:DM:IQADjustment:EXTernal:DQOFfset? Sets the differential offset voltage for a quadrature-phase (Q) signal routed to the Q output connectors. The variable is a numeric expression. The variable is expressed in volts (mV–V). This command is effective only if the state of the I/Q adjustment function is set to ON.
Digital Modulation Commands *RST Range 10 +0.00000000E+000 −4 to 4 :IQADjustment:EXTernal:IOFFset Supported N8212A [:SOURce]:DM:IQADjustment:EXTernal:IOFFset [:SOURce]:DM:IQADjustment:EXTernal:IOFFset? Sets the offset voltage for a signal applied to the 600 ohm I input connector. The variable is a numeric expression. The variable is expressed in volts (mV–V). This command is effective only if the state of the I/Q adjustment function is set to ON.
10 Digital Modulation Commands *RST Range +6.00000000E+000 0–40 :IQADjustment:EXTernal:QOFFset Supported N8212A [:SOURce]:DM:IQADjustment:EXTernal:QOFFset [:SOURce]:DM:IQADjustment:EXTernal:QOFFset? Sets the offset voltage for a signal applied to the 600 ohm Q input connector. The variable is a numeric expression. The variable is expressed in volts (mV–V). This command is effective only if the state of the I/Q adjustment function is set to ON.
Digital Modulation Commands 10 :IQADjustment:IOFFset Supported N8212A [:SOURce]:DM:IQADjustment:IOFFset [:SOURce]:DM:IQADjustment:IOFFset? Adjusts the I channel offset value. The variable is expressed as a percent with 100% equivalent to 500 mV DC at the input connector. The minimum resolution is 0.025%.
10 Digital Modulation Commands This command is effective only if the state of the I/Q adjustment function is set to ON. Refer to “:IQADjustment[:STATe]" on page 332. Example :DM:IQAD:QOFF -30 The example sets the Q channel offset to –30%. *RST Range +0.00000000E+000 −5E1 to +5E1 :IQADjustment:QSKew Supported N8212A [:SOURce]:DM:IQADjustment:QSKew [:SOURce]:DM:IQADjustment:QSKew? Adjusts the phase angle (quadrature skew) between the I and Q vectors by increasing or decreasing the Q phase angle.
Digital Modulation Commands 10 [:SOURce]:DM:IQADjustment:SKEW? Changes the input skew which is a time delay difference between the I and Q signals. Equal and opposite skew is applied to both I and Q and affects the RF Output and I/Q output paths simultaneously. A positive value delays the I signal relative to the Q signal, and a negative value delays the Q signal relative to the I signal.
10 Digital Modulation Commands Example :DM:IQAD:SKEW:PATH RF The example selects the RF path as the path to which skew timing adjustments will be made. *RST +0.00000000E+000 :IQADjustment[:STATe] Supported N8212A [:SOURce]:DM:IQADjustment[:STATe] ON|OFF|1|0 [:SOURce]:DM:IQADjustment[:STATe]? Enables or disables the I/Q adjustments. Example :DM:IQAD 1 The example enables I/Q adjustments.
Digital Modulation Commands 10 :MODulation:ATTen:AUTO Supported N8212A [:SOURce]:DM:MODulation:ATTen:AUTO ON|OFF|1|0 [:SOURce]:DM:MODulation:ATTen:AUTO? Enables or disables the modulator attenuator auto mode. The auto mode will be switched to manual if the N8211A/N8212A receives a AUTO OFF or AUTO 0 command. ON (1) Sets the modulator attenuator to auto mode which optimizes the attenuation setting for the current N8211A/N8212A settings.
10 Digital Modulation Commands *RST DEFault :MODulation:ATTenn:EXTernal:LEVel Supported N8212A [:SOURce]:DM:MODulation:ATTen:EXTernal:LEVel [:SOURce]:DM:MODulation:ATTen:EXTernal:LEVel? Sets the I/Q signal voltage level at the external I/Q inputs. The voltage level set with this command is used as the input level setting for automatic attenuation. Example :DM:MOD:ATT:EXT:LEV 100MV The example sets the voltage level for the I and Q inputs to 100 mV. *RST Range +4.00000000E−001 .
10 Digital Modulation Commands *RST +1.00000000E+006 Range 1E3–100E6 :MODulation:FILTer Supported N8212A [:SOURce]:DM:MODulation:FILTer 40e6|THRough [:SOURce]:DM:MODulation:FILTer? Selects a filter or through path for I/Q signals modulated onto the RF carrier. Selecting a filter with this command automatically sets “:MODulation:FILTer:AUTO to OFF (0). 40E6 Applies a 40 MHz baseband filter to the I/Q signals. THRough Uses through path filtering.
10 Digital Modulation Commands *RST 1 :POLarity[:ALL] Supported N8212A [:SOURce]:DM:POLarity[:ALL] NORMal|INVert|INVerted [:SOURce]:DM:POLarity? Selects normal or inverted I/Q signal routing. In inverted mode, the Q input is routed to the I modulator and the I input is routed to the Q modulator, inverting the phase polarity. NORMal Selects normal routing for the I and Q signals.
10 Digital Modulation Commands Example :DM:SKEW:PATH BB The example selects the baseband path for I/Q skew and calibration. *RST RF :SKEW[:STATe] Supported N8212A [:SOURce]:DM:SKEW[:STATe] ON|OFF|1|0 [:SOURce]:DM:SKEW[:STATe]? Enables or disables the I/Q skew correction function. Example :DM:SKEW:STAT 0 The preceding example disables I/Q skew corrections.
10 Digital Modulation Commands :SRATio Supported N8212A [:SOURce]:DM:SRATio [:SOURce]:DM:SRATio? Sets the power level difference (ratio) between the source one and the source two signals when the two signals are summed together. A positive ratio value reduces the amplitude for source two while a negative ratio value reduces the amplitude for source one. The range for the summing ratio is dependent on the modulator attenuator setting for the N8211A/N8212A that is summing the signals together.
10 Digital Modulation Commands Wideband Digital Modulation Subsystem ([:SOURce]:WDM) :IQADjustment:IOFFset Supported N8212A [:SOURce]:WDM:IQADjustment:IOFFset [:SOURce]:WDM:IQADjustment:IOFFset? Sets the I channel offset value, as a percent of the full scale. 100% offset is equivalent to 500 mV DC at the input connector. Example :WDM:IQAD:IOFF 100MV The example sets an offset of 100 mV DC for the I signal. *RST Range +0.
10 Digital Modulation Commands :IQADjustment[:STATe] Supported N8212A [:SOURce]:WDM:IQADjustment[:STATe] ON|OFF|1|0 [:SOURce]:WDM:IQADjustment[:STATe]? 332 Agilent N8211A/N8212A Performance Upconverter Synthetic Instrument Module, 250 kHz to 20 / 40 GHz