Agilent 75000 Series C Agilent E1445A Arbitrary Function Generator Module User’s Manual and SCPI Programming Guide Where to Find it - Online and Printed Information: System installation (hardware/software)............. VXIbus Configuration Guide* Agilent VIC (VXI installation software)* Module configuration and wiring........................ This Manual SCPI programming.............................................. This Manual SCPI example programs......................................
Contents Agilent E1445A User’s Manual Warranty . . . . . . . . . . WARNINGS . . . . . . . . Safety Symbols . . . . . . Declaration of Conformity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 14 14 15 Chapter 1. Getting Started . . . . . . . . . . . . . . . . . .
Chapter 2. Generating Standard Waveforms (continued) Selecting the Output Loads . . . . . . . . . . . . . . . BASIC Program Example (OUTPLOAD) . . . . . . Selecting the Amplitude Levels and Output Units . . . BASIC Program Example (OUTPUNIT) . . . . . . Using Phase Modulation . . . . . . . . . . . . . . . . . BASIC Program Example (PHS_MOD) . . . . . . . Standard Waveform Program Comments . . . . . . . . Sinusoid Function Requirements . . . . . . . . . . . Reference Oscillator Sources . . . . . . . . . . .
Chapter 3. Generating Arbitrary Waveforms (continued) Returning the Waveform Segment Names . . Determining the Waveform Segment Size . . Returning the Segment Sequence List Names Returning the Repetition Count List Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 116 116 116 Chapter 4. Sweeping and Frequency-Shift Keying . . . . . . . . . . . . . . . . .
Chapter 5. Arming and Triggering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 Chapter Contents . . . . . . . . . . . . . . . . . . . The ARM-TRIG Configuration . . . . . . . . . . . The ARM-TRIG States . . . . . . . . . . . . . . Initiating Waveforms . . . . . . . . . . . . . . . . Arming the AFG . . . . . . . . . . . . . . . . . . . Arming Commands . . . . . . . . . . . . . . . . Setting Arming Sources . . . . . . . . . . . . . BASIC Program Example (EXT_ARM) . . . . .
Chapter 6. Marker Outputs/Multiple AFG Operations . . . . . . . . . . . . . . . . . . . 203 Chapter Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Marker Pulse Enable Flowchart . . . . . . . . . . . . . . . . . . . . . Available Marker Sources . . . . . . . . . . . . . . . . . . . . . . . . Arbitrary Generated Marker Pulses . . . . . . . . . . . . . . . . . . . Generating Marker Pulses for Arbitrary Waveforms . . . . . . . . Generating Multiple Marker Pulses in Multiple Segment Lists . .
Chapter 7. High Speed Operation (continued) Using the Front Panel’s “ Digital Port In” Connector . . . . . . . . BASIC Program Example (WAVSELFP) . . . . . . . . . . . . “ Digital Port In” Connector Pinout . . . . . . . . . . . . . . . Using the “ Digital Port In” Connector to Select a Sequence . . Using the “ Digital Port In” Connector to Download Data . . . High Speed Operation Program Comments . . . . . . . . . . . . . Amplitude Effects on DAC Codes . . . . . . . . . . . . . . . .
Chapter 8. Command Reference (continued) INITiate . . . . . . . . . . . . . . . [:IMMediate] . . . . . . . . . . . OUTPut[1] . . . . . . . . . . . . . . :FILTer[:LPASs]:FREQuency . . :FILTer[:LPASs][:STATe] . . . . :IMPedance . . . . . . . . . . . . :LOAD . . . . . . . . . . . . . . :LOAD:AUTO . . . . . . . . . . [:STATe] . . . . . . . . . . . . . [SOURce:] . . . . . . . . . . . . . . [SOURce:]ARBitrary . . . . . . . . :DAC:FORMat . . . . . . . . . . :DAC:SOURce . . . . . . . . . . :DOWNload . . . . . . . .
Chapter 8. Command Reference (continued) :SSEQuence:DEFine . . . . . . . . . . . . . . . . . . . :SSEQuence:DELete:ALL . . . . . . . . . . . . . . . . :SSEQuence:DELete[:SELected] . . . . . . . . . . . . :SSEQuence:DWELl:COUNt . . . . . . . . . . . . . . :SSEQuence:DWELl:COUNt:POINts? . . . . . . . . . :SSEQuence:FREE? . . . . . . . . . . . . . . . . . . . :SSEQuence:MARKer . . . . . . . . . . . . . . . . . . :SSEQuence:MARKer:POINts? . . . . . . . . . . . . . :SSEQuence:MARKer:SPOint . . . . . . . . . . .
Chapter 8. Command Reference (continued) :QUEStionable:CONDition? . . . . . . . . . . . . :QUEStionable:ENABle . . . . . . . . . . . . . . :QUEStionable[:EVENt]? . . . . . . . . . . . . . :QUEStionable:NTRansition . . . . . . . . . . . . :QUEStionable:PTRansition . . . . . . . . . . . . SYSTem . . . . . . . . . . . . . . . . . . . . . . . . :ERRor? . . . . . . . . . . . . . . . . . . . . . . . :VERSion? . . . . . . . . . . . . . . . . . . . . . TRIGger . . . . . . . . . . . . . . . . . . . . . . . .
Chapter 8. Command Reference (continued) *SAV . . . . . . . . . . . . . . . . *SRE and *SRE? . . . . . . . . . . *STB? . . . . . . . . . . . . . . . *TRG . . . . . . . . . . . . . . . . *TST? . . . . . . . . . . . . . . . . *WAI . . . . . . . . . . . . . . . . Common Commands Quick Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Appendix B. Useful Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 Example Program Listing . . . . Command Coupling Groups . . . Frequency Limits . . . . . . . . Amplitude Limits . . . . . . . . Power-On/Reset Configuration . Error Messages . . . . . . . . . . Settings Conflict Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Notes 12 Agilent E1445A User’s Manual Contents
Certification Agilent Technologies certifies that this product met its published specifications at the time of shipment from the factory. Agilent Technologies further certifies that its calibration measurements are traceable to the United States National Institute of Standards and Technology (formerly National Bureau of Standards), to the extent allowed by that organization’s calibration facility, and to the calibration facilities of other International Standards Organization members.
Printing History The Printing History shown below lists all Editions and Updates of this manual and the printing date(s). The first printing of the manual is Edition 1. The Edition number increments by 1 whenever the manual is revised. Updates, which are issued between Editions, contain replacement pages to correct the current Edition of the manual. Updates are numbered sequentially starting with Update 1. When a new Edition is created, it contains all the Update information for the previous Edition.
Declaration of Conformity Declarations of Conformity for this product and for other Agilent products may be downloaded from the Internet. There are two methods to obtain the Declaration of Conformity: • Go to http://regulations.corporate.agilent.com/DoC/search.htm. You can then search by product number to find the latest Declaration of Conformity. • Alternately, you can go to the product web page (www.agilent.
Notes 16 Agilent E1445A Arbitrary Function Generator User’s Manual
Notes Agilent E1445A Arbitrary Function Generator User’s Manual 17
Notes 18 Agilent E1445A Arbitrary Function Generator User’s Manual
Chapter 1 Getting Started Chapter Contents This chapter shows you how to configure, install, and begin using the Agilent E1445A Arbitrary Function Generator (AFG). The main sections of this chapter include: • Preparation for Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - VXIbus Factory Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . - The AFG Logical Address . . . . . . . . . . . . . . . . . . . . . . . . . - Addressing the AFG . . . . . . . . . . . . . . . . . . . .
VXIbus Factory Settings The Agilent E1445A AFG (shown in Figure 1-1) is configured at the factory as shown in Table 1-1. Figure 1-1. The E1445A Arbitrary Function Generator Table 1-1.
Note The AFG Logical Address Appendix A has the complete list of Agilent E1445A VXIbus system specifications. The Agilent E1445A AFG logical address is used: – to place the AFG in the servant area of a commander (Agilent E1406A Command Module or an embedded controller, for example); – with the AFG servant area switch to set the AFG servant area; – and to address the AFG (see “Addressing the AFG” on page 22 and “Using an Embedded Controller” on page 23.
Figure 1-2. E1445A Logical Address and Servant Area Switch Location Addressing the AFG (External Controller and PC) Devices in the C-size mainframe and in the servant area of the Agilent E1406A Command Module are located by an GPIB address. The GPIB address is a combination of the controller’s interface select code, the command module’s primary GPIB address, and the device’s secondary GPIB address.
Using an Embedded Controller As a message-based device, the Agilent E1445A can easily be programmed across the VXIbus backplane from an embedded controller. The select code of the VXI interface board in embedded controllers is typically 16. Since no secondary GPIB address is required when programming over the backplane, the logical address of the Agilent E1445A is combined with the VXI interface select code.
The AFG Bus Request Level Bus Request Level Guidelines The bus request level is a priority at which the Agilent E1445A can request the use of the Data Transfer Bus. • There are four bus request lines (BG0–BG3) from which one is selected (Figure 1-3). Bus request line 3 has the highest priority, bus request line 0 has the lowest priority. • It is not necessary to change the bus request level setting (BG3) on the AFG.
AFG Installation in a Mainframe The Agilent E1445A may be installed in any slot (except slot 0) in a C-size VXIbus mainframe. If an Agilent E1446A Summing Amplifier/DAC is part of your system, the amplifier should be installed in a slot next to the E1445A. To install in a mainframe: 1. Set the extraction levers out. Slide the module into any slot (except slot 0) until the backplane connectors touch. 2. Seat the module by moving the levers toward each other. 3.
Note The extraction levers will not seat and unseat the backplane connectors on older Agilent VXIbus mainframes and non-Agilent mainframes. You must manually seat the connectors by pushing the module into the mainframe until the front panel is flush with the front of the mainframe. The extraction levers may be used to guide or remove the module. Instrument Language (SCPI) The Agilent E1445A AFG uses the Standard Commands for Programmable Instruments (called SCPI) as the instrument control language.
are third-level keywords, and so on. A colon (:) always separates a command keyword from a lower-level keyword as shown below. ARM:LAY2:SOUR EXT A semicolon (;) is used to separate two commands within the same subsystem, and can also save typing.
Executing Coupled Commands Command coupling determines the AFG programming sequence. The high-level sequence, based on the coupling groups, is shown in Figure 1-5. Figure 1-5. High-Level E1445A Programming Sequence Coupled commands must be contiguous and executed in the same program statement. This is done by placing the commands in the same program line, or by suppressing the end-of-line terminator until the last (coupled) command has been sent.
Program Languages The program language shown in this manual is BASIC. This language was selected since it easily shows how to program the AFG. However, the same programs (except where noted) are also supplied in Visual C/C++ and Visual BASIC using the Agilent Standard Instrument Control Library (SICL). The programs using SICL are Windows® programs. All programs are supplied on the CD that came with this manual (see next section).
Typical BASIC Example Program The structure of an example program in BASIC is shown below. This program enables output leveling by sweeping. 1 !RE-STORE"SWP_LEVL" 2 !This program enables output leveling over the 0 Hz to 10 MHz sweep. 3 ! 10 !Assign I/O path between the computer and E1445A.
450 460 470 480 490 500 510 520 530 540 550 560 570 DIM Message$[256] !Read AFG status byte register and clear service request bit B=SPOLL(@Afg) !End of statement if error occurs among coupled commands OUTPUT @Afg;"" OUTPUT @Afg;"ABORT" !abort output waveform REPEAT OUTPUT @Afg;"SYST:ERR?" !read AFG error queue ENTER @Afg;Code,Message$ PRINT Code,Message$ UNTIL Code=0 STOP SUBEND Turning Off (Suppressing) the End-Of-Line Terminator As mentioned earlier, coupled commands must be contiguous and executed in
Visual BASIC Language Programs Using Agilent SICL System Configuration These example programs are written in the Visual BASIC language for the Agilent 82340/82341 GPIB Interface Cards using the Agilent Standard Instrument Control Library (SICL). The following identifies the system on which the programs are written, shows how to compile the programs, and gives a typical example program.
Typical Visual BASIC Example Program Using Agilent SICL The following is an example program written in Visual BASIC using the Agilent Standard Instrument Control Library. The program: – sends commands to the AFG to generate an arbitrary waveform; – receives data from the AFG; – shows how to send coupled commands; – and performs error checking of the AFG. Only program codes are given here. Refer to the actual program on the CD to see the data that generates the form, buttons, etc. ’ ARBWAVE.
Action.Text = "The program generated the following error(s):" ’ Show error message ShowErr.AddItem Work ’ Loop until error message is 0 Do ’ Read error message Call iwrite(Addr, ByVal "SYSTem:ERRor?" + Chr$(10), 14, 1, Actual) Call iread(Addr, ByVal RdErr, 256, 0, Actual) ’ Store message only into Work string Work = Mid$(RdErr, 1, Actual - 1) ’ Get error number ErrNum = Val(Work) ’ If error, show error message If ErrNum <> 0 Then Work = Work + " - in Sub " + SubName ShowErr.
Cnt = 1 While Len(Cmd(Cnt)) ’ Send SCPI command Call iwrite(Addr, ByVal Cmd(Cnt) + Chr$(10), Len(Cmd(Cnt)) + 1, 1, Actual) Cnt = Cnt + 1 Wend End Sub Sub ExitProg_Click () ’ End program End End Sub Sub Form_Load () ’ Disable showing exit program button and lists ExitProg.Visible = False ShowQuery.Visible = False ’ Show Action Action.Enabled = False Action.Visible = True ’ Enable form Arbwave.
Dim Actual As Long ’ Use the "SetCommands" array to setup the AFG SetCommands(1) = "SOUR:LIST1:SSEQ:DEL:ALL" ’ Clear sequence memory SetCommands(2) = "SOUR:LIST1:SEGM:DEL:ALL" ’ Clear segment memory SetCommands(3) = "SOUR:ROSC:SOUR INT1;" ’ Select the Ref.
’ Call sub to check for AFG errors Call CheckError("GenSeg (OutCommands)") End Sub Sub Main () ’ Main sub Dim Actual As Long ’ Set error routine On Error GoTo AfgErr ChkName = "Main" ’ Open communication path Addr = iopen(ShowAddr) ’ Set timeout for 10 Sec Call itimeout(Addr, 10000) ’Reset and clear the module Action.Text = "Resetting the AFG; please wait" ChkName = "RstClr" Call RstClr ’ Generate segment list and output sequence Action.
Call TimeOut End Sub Sub RstClr () Dim RdMsg As String * 10 Dim Actual As Long Dim Length As Integer Length = 10 ’ Executes the commands that resets the module and clears its error register Call iwrite(Addr, ByVal "*RST;*OPC?" + Chr$(10), 11, 1, Actual) Call iread(Addr, ByVal RdMsg, Length, 0, Actual) Length = 10 Call iwrite(Addr, ByVal "*CLS;*OPC?" + Chr$(10), 11, 1, Actual) Call iread(Addr, ByVal RdMsg, Length, 0, Actual) End Sub Sub RunQuery () Dim GetMem As String Dim RdMsg As String * 100 Dim Actual As
Dim ShowTimeMsg As String Dim ErrMsg As String ’ Set error routine On Error Resume Next ’ Get error message ErrMsg = igeterrstr(igeterrno()) ShowTimeMsg = "The program generated error message " + Chr$(34) + ErrMsg + Chr$(34) + Chr$(10) ShowTimeMsg = ShowTimeMsg + "in Sub/Function: " + ChkName + Chr$(10) + Chr$(10) ShowTimeMsg = ShowTimeMsg + "Press " + Chr$(34) + "OK" + Chr$(34) + " to exit" MsgBox ShowTimeMsg, 64, "Verif: TimeOut" ’ Close communication with instrument Call iclose(Addr) ’ Clean up sicl Call
Visual C/C++ Language Programs Using Agilent SICL System Configuration What’s Needed to Compile the Programs These example programs are written in the Visual C/C++ language for the Agilent 82340/82341 GPIB Interface Cards using the Agilent Standard Instrument Control Library (SICL). The following identifies the system on which the programs are written, shows how to compile the programs, and gives a typical example program.
• For Borland compilers, type: MAKE >.MAK and press Enter • For Microsoft® compilers used in Windows, type: NMAKE .MAK and press Enter From the Windows Interface Select the C/C++ Windows environment and make sure the program to be compiled and the appropriate libraries are in a project file.
INST addr; // GPIB Address identifier //********************************************************************** void main(void) // Run the program { #if defined(__BORLANDC__) && !defined(__WIN_32) _InitEasyWin(); // Required for Borland EasyWin program #endif // Enable communication path to the module addr=iopen(DEV_ADDR); if (!addr) { printf("\n\tUnable to communicate with the module"); printf("\n\nClose the window or press Alt-F4 to exit"); exit(1); } // Set GPIB Timeout to 10 seconds if(itimeout(addr, 1
":SOUR:VOLT:LEV:IMM:AMPL 5.
// Call routine to check for AFG errors check_error("gen_seg (out_commands)"); // Free the allocated memory free (Wave_seg); } //********************************************************************** void cmd_exe(char *commands[], int length, char *func_tion) { int loop; for (loop = 0; loop < length; loop++) if(!iprintf(addr, "%s\n", commands[loop])) time_out(func_tion); } //********************************************************************** void run_query(void) { char mem_size[21]; // Query segment memo
ipromptf(addr, "SYSTem:ERRor?\n", "%t", into); // Query error register if (atoi(into)) { // Determine if error is present // If errors present, print and exit printf("\n\nThe program detected the following error(s):\n\n"); while (atoi(into)) { printf("%s \t- in function %s\n", into, func_tion); ipromptf(addr, "SYSTem:ERRor?\n", "%t", into); // Query error register } // Close communication iclose(addr); // Release SICL resource allocation; not needed for Windows NT _siclcleanup(); printf("\n\nClose the win
Introductory Programs The introductory programs in this section include: – AFG Self-Test – Resetting the AFG and clearing its status registers – Querying the AFG power-on/reset settings – Checking for Errors – Generating a sine wave with a single command AFG Self-Test The AFG self-test is executed with the command: *TST? The AFG parameters tested include: – internal interrupt lines – waveform select RAM – segment sequence RAM – waveform segment RAM – DDS/NCO operation – sine wave generation – arbitrary w
BASIC Program Example (SLFTST) 1 10 20 30 40 50 60 70 80 90 100 110 120 130 !RE-STORE “SLFTST” !Send the self-test command, enter and display the result. DIM Message$[256] OUTPUT 70910;"*TST?" ENTER 70910;Rslt IF Rslt <>0 THEN REPEAT OUTPUT 70910;"SYST:ERR?" ENTER 70910;Code,Message$ PRINT Code,Message$ UNTIL Code=0 END IF PRINT Rslt END Visual BASIC and Visual C/C++ Program Versions Resetting and Clearing the AFG The Visual BASIC example program, SLFTST.
Querying the Power-On/Reset Configuration After resetting the Agilent E1445A or cycling power, the AFG parameters are set to their power-on values. These values are listed in Table B-5 in Appendix B. The command which queries each AFG parameter setting is: *LRN? BASIC Program Example (LRN) 1 !RE-STORE “LRN” 10 !Assign an I/O path between the computer and AFG.
Checking for Errors The following BASIC program shows the lines and subprogram which are added to the BASIC programs to check for errors. Line 140 clears the AFG Standard Event Status Register. Lines 150 and 160 unmask the appropriate bits in the AFGs Status Byte Register and Standard Event Status Register. When an error occurs, the subprogram "Errmsg" reads the AFG error queue and displays the code and message.
230 ! 240 SUB Errmsg 250 Errmsg: !Subprogram which displays E1445 programming errors 260 COM @Afg 270 DIM Message$[256] 280 !Read AFG status byte register and clear service request bit 290 B=SPOLL(@Afg) 300 !End of statement if error occurs among coupled commands 310 OUTPUT @Afg;"" 320 OUTPUT @Afg;"ABORT" !abort output waveform 330 REPEAT 340 OUTPUT @Afg;"SYST:ERR?" !read AFG error queue 350 ENTER @Afg;Code,Message$ 360 PRINT Code,Message$ 370 UNTIL Code=0 380 STOP 390 SUBEND 50 Getting Started Chapter 1
Generating Sine Waves From the power-on/reset configuration you can output a 0.16187 Vp, 10 kHz sine wave by setting the AFG to the wait-for-arm state with the INITiate:IMMediate command. This is done with the RSTSINE program. BASIC Program Example (RSTSINE) 1 !RE-STORE"RSTSINE" 2 !This program outputs a sine wave based on the reset conditions 3 !of the AFG. 4 ! 10 !Assign an I/O path between the computer and AFG.
Notes 52 Getting Started Chapter 1
Chapter 2 Generating Standard Waveforms Chapter Contents This chapter shows how to generate standard waveforms (sinusoid, square, triangle, and ramps) using the Agilent E1445A 13-Bit Arbitrary Function Generator (called the "AFG"). The following sections show how to generate standard waveforms, how to setup the AFG for different output loads, how to select the output amplitude units (for example, V, Vpeak, etc.), and how to set the waveform amplitude and offset.
Standard Waveforms Flowchart The flowchart in Figure 2-1 shows the sequence used to generate standard waveforms. The reset (power-on) values of each command are also noted on the flowchart. The programs in this chapter begins with a reset (the IEEE 488.2 *RST command) which places the AFG into its power-on state. Thus, the programs do not execute all of the commands on the flowchart. Remove the flowchart from the binder for easy accessibility.
Figure 2-1.
Generating DC Voltages The DCVOLTS program outputs a +5 Vdc voltage. The commands are: 1. Reset the AFG *RST This command aborts any waveform output and selects the sinusoid function, output impedance, and output load to 50 Ω. 2. Select the Function [SOURce:]FUNCtion[:SHAPe] DC This command selects the DC function. 3. Set the Amplitude [SOURce:]VOLTage[:LEVel][:IMMediate][:AMPLitude] This command specifies the amplitude.
250 SUBEND 260 ! 270 SUB Rst 280 Rst: !Subprogram which resets the E1445.
Generating Sine Waves The SINEWAVE program outputs a Sine Wave at 1 kHz and 5 V output level. The commands are: 1. Reset the AFG *RST This command aborts any waveform output and selects the sinusoid function, output impedance, and output load to 50 Ω. 2. Set the Waveform Frequency [SOURce:]FREQuency[1][:FIXed] This command specifies the waveform frequency. You must use the direct synthesis frequency generator for the sinusoid function.
BASIC Program Example (SINEWAVE) 1 !RE-STORE"SINEWAVE" 2 !The following program generates a 1 kHz, 5 Vp sine wave. 3 ! 10 !Assign I/O path between the computer and E1445A. 20 ASSIGN @Afg TO 70910 30 COM @Afg 40 ! 50 !Set up error checking 60 ON INTR 7 CALL Errmsg 70 ENABLE INTR 7;2 80 OUTPUT @Afg;"*CLS" 90 OUTPUT @Afg;"*SRE 32" 100 OUTPUT @Afg;"*ESE 60" 110 ! 120 !Call the subprograms 130 CALL Rst 140 CALL Sine_wave 150 ! 160 WAIT .
460 470 480 490 500 510 OUTPUT @Afg;"SYST:ERR?" ENTER @Afg;Code,Message$ PRINT Code,Message$ UNTIL Code=0 STOP SUBEND Visual BASIC and Visual C/C++ Program Versions 60 !read AFG error queue The Visual BASIC example program, SINEWAVE.FRM, is in directory “VBPROG” and the Visual C example program, SINEWAVE.C, is in directory “VCPROG” on the CD that came with your Agilent E1445A.
Generating Square Waves The SQUWAVE program outputs a square wave at 1 Mhz, 4 V output level, and +1 V offset. The commands are: 1. Reset the AFG *RST This command aborts any waveform output and selects the 42.9 MHz reference oscillator source, DDS sample source (that is, trigger start source), sinusoid function, arm start immediate, 0 V offset, and a 50 Ω output impedance and output load. 2.
5. Set the Frequency [SOURce:]FREQuency[1][:FIXed] This command specifies the frequency. Refer to Table B-3 in Appendix B for the frequency limits. 6. Select the Function [SOURce:]FUNCtion[:SHAPe] SQUare This command selects the square wave function. 7. Select the Square Wave Polarity [SOURce:]RAMP:POLarity INVerted This command selects the square wave polarity. For NORMal, the initial voltage goes positive. For INVerted, the initial voltage goes negative. 8.
BASIC Program Example (SQUWAVE) 1 !RE-STORE“SQUWAVE” 2 !This program outputs a 1 MHz, 4V square wave with a 1V DC offset. 3 ! 10 !Assign I/O path between the computer and E1445A. 20 ASSIGN @Afg TO 70910 30 COM @Afg 40 ! 50 !Set up error checking 60 ON INTR 7 CALL Errmsg 70 ENABLE INTR 7;2 80 OUTPUT @Afg;“*CLS” 90 OUTPUT @Afg;“*SRE 32” 100 OUTPUT @Afg;“*ESE 60” 110 ! 120 !Call the subprograms 130 CALL Rst 140 CALL Squ_wave 150 ! 160 WAIT .
460 470 480 490 500 510 520 530 540 550 560 B=SPOLL(@Afg) !End of statement if error occurs among coupled commands OUTPUT @Afg;"" OUTPUT @Afg;"ABORT" !abort output waveform REPEAT OUTPUT @Afg;"SYST:ERR?" !read AFG error queue ENTER @Afg;Code,Message$ PRINT Code,Message$ UNTIL Code=0 STOP SUBEND Visual BASIC and Visual C/C++ Program Versions 64 The Visual BASIC example program, SQUWAVE.FRM, is in directory “VBPROG” and the Visual C example program, SQUWAVE.
Generating Triangle/Ramp Waves The TRIWAVE program outputs a triangle wave at 10 kHz, 4 V output level, and +1 V offset. The commands are: 1. Reset the AFG *RST This command aborts any waveform output and selects the 42.9 MHz reference oscillator source, DDS sample source (that is, trigger start source), sinusoid function, arm start immediate, 0 V offset, and a 50 Ω output impedance and output load. 2.
5. Set the Frequency [SOURce:]FREQuency[1][:FIXed] This command specifies the frequency. Refer to Table B-3 in Appendix B for the frequency limits. 6. Select the Function [SOURce:]FUNCtion[:SHAPe] TRIangle This command selects the TRIangle function. For the RAMP function, use the RAMP parameter instead of the TRIangle parameter. 7. Set the Number of Ramp Points [SOURce:]RAMP:POINts This command specifies the number of ramp points.
BASIC Program Example (TRIWAVE) 1 !RE-STORE“TRIWAVE” 2 !This program outputs a 200 point, 10 kHz, 4V triangle wave 3 !with a 1V DC offset. 4 ! 10 !Assign I/O path between the computer and E1445A. 20 ASSIGN @Afg TO 70910 30 COM @Afg 40 ! 50 !Set up error checking 60 ON INTR 7 CALL Errmsg 70 ENABLE INTR 7;2 80 OUTPUT @Afg;“*CLS” 90 OUTPUT @Afg;“*SRE 32” 100 OUTPUT @Afg;“*ESE 60” 110 ! 120 !Call the subprograms 130 CALL Rst 140 CALL Tri_wave 150 ! 160 WAIT .
450 460 470 480 490 500 510 520 530 540 550 560 !Read AFG status byte register and clear service request bit B=SPOLL(@Afg) !End of statement if error occurs among coupled commands OUTPUT @Afg;"" OUTPUT @Afg;"ABORT" !abort output waveform REPEAT OUTPUT @Afg;"SYST:ERR?" !read AFG error queue ENTER @Afg;Code,Message$ PRINT Code,Message$ UNTIL Code=0 STOP SUBEND Visual BASIC and Visual C/C++ Program Versions 68 The Visual BASIC example program, TRIWAVE.
Selecting the Output Loads The OUTPLOAD program sets the AFG’s output impedance to the output load value of 75 Ω. The commands are: 1. Setup the AFG *RST Use the *RST command to setup the AFG. You can also use the commands listed in the previous sections of this chapter (“Generating Sine Waves” on page 58) to setup the AFG. 2. Set the Amplitude [SOURce:]VOLTage[:LEVel][:IMMediate][:AMPLitude] This command specifies the amplitude.
5. Select the Output Load Value OUTPut[1]:LOAD This command selects the load value expected at the "Output 50/75 Ω" terminals. The values are: 50 – for 50 Ω loads; must be same as output impedance. 75 – for 75 Ω loads; must be same as output impedance. 9.9E+37 or INFinity – for open circuit; output value is twice the normal matched load output value. 6. Initiate the Waveform INITiate[:IMMediate] This command generates an immediate output with the arm source set to IMMediate.
300 SUB Rst 310 Rst: !Subprogram which resets the E1445.
Selecting the Amplitude Levels and Output Units The OUTPUNIT program shows how to set the output amplitude using the VPP (volts peak-to-peak) output unit. The commands are: 1. Reset the AFG *RST This command aborts any waveform output and selects the 42.9 MHz reference oscillator source, DDS sample source (that is, trigger start source), sinusoid function, arm start immediate, 0 V offset, and a 50 Ω output impedance and output load. 2.
BASIC Program Example (OUTPUNIT) 1 !RE-STORE“OUTPUNIT” 2 !This programs sets the output amplitude units to volts peak-to-peak 3 ! 10 !Assign I/O path between the computer and E1445A. 20 ASSIGN @Afg TO 70910 30 COM @Afg 40 ! 50 !Set up error checking 60 ON INTR 7 CALL Errmsg 70 ENABLE INTR 7;2 80 OUTPUT @Afg;“*CLS” 90 OUTPUT @Afg;“*SRE 32” 100 OUTPUT @Afg;“*ESE 60” 110 ! 120 !Call the subprograms 130 CALL Rst 140 CALL Out_unit 150 ! 160 WAIT .
460 470 480 490 500 510 OUTPUT @Afg;"SYST:ERR?" ENTER @Afg;Code,Message$ PRINT Code,Message$ UNTIL Code=0 STOP SUBEND Visual BASIC and Visual C/C++ Program Versions 74 !read AFG error queue The Visual BASIC example program, OUTPUNIT.FRM, is in directory “VBPROG” and the Visual C example program, OUTPUNIT.C, is in directory “VCPROG” on the CD that came with your Agilent E1445A.
Using Phase Modulation Phase modulation allows you to change the output deviation or phase of a sinusoid wave while it is output. This only works in the sinusoid function. The PHS_MOD program shows how change the deviation from 0° to 180°. The commands are: 1. Reset the AFG *RST This command aborts any waveform output and selects the 42.
5. Select the Function [SOURce:]FUNCtion[:SHAPe] SINusoid This command selects the sinusoid function. (Although *RST automatically selects this function, it is selected here for good programming practice.) 6. Set the Amplitude [SOURce:]VOLTage[:LEVel][IMMediate][:AMPLitude] This command specifies the amplitude. Refer to the section called “Setting the Amplitude Levels and Output Units” on page 72 for more information. 7.
190 ! 200 SUB Phase_mod 210 Phase_mode: !Subprogram which outputs a sine wave 220 COM @Afg 230 OUTPUT @Afg;“SOUR:FREQ1:FIX 60;”; !frequency 240 OUTPUT @Afg;“:SOUR:PM:SOUR INT;”; !phase modulation source 250 OUTPUT @Afg;“:SOUR:PM:STAT ON;”; !enable phase modulation 260 OUTPUT @Afg;“:SOUR:FUNC:SHAP SIN;”; !function 270 OUTPUT @Afg;“:SOUR:VOLT:LEV:IMM:AMPL 5V” !amplitude 280 OUTPUT @Afg;“SOUR:PM:DEV 0DEG” !phase modulation 290 OUTPUT @Afg;“INIT:IMM” !wait-for-arm state 300 DISP “Press ’Continue’ to shift phase
Standard Waveform Program Comments The following comments give additional details on the program examples in this chapter. Sinusoid Function Requirements Reference Oscillator Sources The sinusoid requires that the sample source (see “Sample Sources” below) is set to INTernal[1] (that is, TRIGger:STARt:SOURce INTernal[1]). This selects the DDS frequency generator. No other sample source can generate a sinewave.
ECLTrg0 or 1 (the VXIbus ECL trigger lines) HOLD (suspends sample generation) TTLTrg0 through 7 (the VXIbus TTL trigger lines) DDS Frequency Generator Ranges The [SOURce:]FREQuency[1]:RANGe command selects frequency doubling of the DDS frequency generator for the SQUare, TRIangle, and RAMP functions. This command is only used with DDS (frequency1) frequency generator.
Output Units Comments • The selected unit type can be overridden by sending a unit suffix with the amplitude command. For example, if the selected unit is VPP, sending: [SOURce:]VOLTage[:LEVel][:IMMediate][:AMPLitude] 5V changes the unit type to volts (that is, V) for that command. However, the default unit type remains in effect for subsequent amplitude commands that are sent without the unit suffix.
Using MINimum and MAXimum Parameters You can execute many commands (like [SOURce:]FREQuency[1][:CW|:FIXed]) using the MINimum or MAXimum parameters instead of a number value. However, when using the parameters, the commands are immediately executed when received. This happens even if the commands are coupled to other commands in a coupling group. This is different than sending the commands with number values, where the commands are executed after a new coupling group is sent.
Notes 82 Generating Standard Waveforms Chapter 2
Chapter 3 Generating Arbitrary Waveforms Chapter Contents This chapter shows how to generate arbitrary waveforms using the Agilent E1445A 13-Bit Arbitrary Function Generator (called the “AFG”). The following sections show how to generate arbitrary waveforms. Also included are example programs that generate various arbitrary waveforms. The sections are as follows: • • • • • • Arbitrary Waveforms Flowchart . . . . . . . . . . . . . . . . . . . . . . How the AFG Generates Arbitrary Waveforms . . . . . . . .
Arbitrary Waveforms Flowchart The flowchart in Figure 3-1 shows the commands and the command execution order to generate arbitrary waveforms. The reset (power-on) values of each command are also noted on the flowchart. Note that the IEEE 488.2 *RST command places the AFG into its power-on state. Thus, it may be unnecessary to execute all of the commands on the flowchart. Remove the flowchart from the binder for easy accessibility. Refer to the flowchart while doing the examples in this chapter, if desired.
Figure 3-1.
How the AFG Generates Arbitrary Waveforms Refer to Figure 3-2. An arbitrary waveform consists of two parts, a waveform segment (or all points on a waveform) and a segment sequence. The segments are the actual voltage points of the waveform. The segment sequence determines the order in which one or more waveform segments are output. Figure 3-2. Generating Arbitrary Waveforms To output a waveform, the waveform segment must be stored into the AFG’s segment memory.
The segment sequence determines the order in which the waveform segments in memory are to be output, which order is assigned by the user (use [SOURce:]LIST[1]:SSEQuence:SEQuence ). Each segment sequence must be stored into the AFG’s sequence memory. To do this, you must assign a unique name (use [SOURce:]LIST[1]:SSEQuence:SELect ) for each segment sequence to be stored into memory. This allows you to select one of many segment sequences, which may exist in memory, to be output.
Generating a Simple Arbitrary Waveform The ARBWAVE program shows how to generate an arbitrary waveform with a single waveform segment. The example generates a 100 point ramp. The AFG stores the waveform segment into segment memory as voltage data points. The commands are: 1. Reset the AFG *RST The *RST command aborts any waveform output and sets the AFG to a defined state. 2.
5. Set the Segment Sample Rate [SOURce:]FREQuency[1][:CW | :FIXed] This command sets the rate at which the points in a waveform segment are output by the AFG. The waveform frequency is determined by: (sample frequency) / (number of points) Refer to Table B-3 in Appendix B for the frequency limits. 6. Select the Arbitrary Waveform Function [SOURce:]FUNCtion[:SHAPe] USER This command selects the arbitrary waveform function. Couple the command to the previous frequency command. 7.
11. Name the Segment Sequence [SOURce:]LIST[1]:SSEQuence:SELect This command names the segment sequence. Each sequence stored into memory must have a unique name. Legal names must start with an alphabetic character, but can contain alphabetic, numeric, and underscore (“_”) characters. The names can have a maximum length of 12 characters. The names MUST be different from any waveform segment names stored in memory. 12.
BASIC Program Example (ARBWAVE) 1 !RE-STORE"ARBWAVE" 2 !This program demonstrates the procedure for developing and 3 !outputting an arbitrary waveform. 4 ! 10 !Assign I/O path between the computer and E1445A.
450 OUTPUT @Afg;" SOUR:LIST1:SEGM:FREE?" 460 ENTER @Afg;Seg_mem$ 470 ! 480 OUTPUT @Afg;"SOUR:LIST1:SSEQ:SEL RAMP_OUT" !sequence name 490 OUTPUT @Afg;" SOUR:LIST1:SSEQ:DEF 1" !sequence size 500 OUTPUT @Afg;" SOUR:LIST1:SSEQ:SEQ RAMP" !segment order 510 OUTPUT @Afg;" SOUR:LIST1:SSEQ:FREE?" 520 ENTER @Afg;Seq_mem$ 530 SUBEND 540 ! 550 SUB Rst 560 Rst: !Subprogram which resets the E1445.
Executing Several Waveform Segments The MULSEG program shows how to generate an arbitrary waveform using two different waveform segments. One waveform segment generates a 1 kHz, 5 V sine wave repeated twice. The other one generates a 1 kHz, 5 Vpeak triangle repeated once. The commands are: 1. Reset the AFG *RST The *RST command aborts waveform output and sets the AFG to a defined state. 2.
5. Select the Arbitrary Waveform Function [SOURce:]FUNCtion[:SHAPe] USER This command selects the arbitrary waveform function. Couple the command to the previous frequency command. 6. Set the Maximum Output Amplitude [SOURce:]VOLTage[:LEVel][:IMMediate][:AMPLitude] This command specifies the maximum output amplitude. The amplitude must be equal or greater than the maximum voltage value of the waveform segment. Refer to Table B-4 in Appendix B for the amplitude limits. 7.
15. Define the Segment Sequence Order [SOURce:]LIST[1]:SSEQuence:SEQuence This command determines the order in which the waveform segments are to be executed. The names of each waveform segment to be output must be separated by a comma (for example, A,B,C). See “Sending Segment Sequences” on page 114 for more information. 16.
BASIC Program Example (MULSEG) 1 !RE-STORE"MULSEG" 2 !This program outputs an arbitrary waveform that is comprised of 3 !two waveform segments. 4 ! 10 !Assign I/O path between the computer and E1445A. 20 ASSIGN @Afg TO 70910 30 COM @Afg 40 ! 50 !Set up error checking 60 ON INTR 7 CALL Errmsg 70 ENABLE INTR 7;2 80 OUTPUT @Afg;"*CLS" 90 OUTPUT @Afg;"*SRE 32" 100 OUTPUT @Afg;"*ESE 60" 110 ! 120 !Call the subprograms which reset the AFG and clear segment 130 !and sequence memory.
450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 610 620 630 640 650 660 670 680 690 700 710 720 730 740 750 760 770 780 790 800 810 820 830 840 850 860 870 880 890 900 910 920 930 940 Chapter 3 ! OUTPUT @Afg;"SOUR:LIST1:SEGM:SEL TRI" !segment name OUTPUT @Afg;" SOUR:LIST1:SEGM:DEF 2048" !segment size OUTPUT @Afg;" SOUR:LIST1:SEGM:VOLT";Waveform(*) !waveform points SUBEND ! SUB Sine_wave Sine_wave: !Subprogram which computes a sine wave and stores !it in a segment COM @Afg DIM Waveform(1:20
950 960 970 980 990 1000 1010 1020 1030 1040 !End of statement if error occurs among coupled commands OUTPUT @Afg;"" OUTPUT @Afg;"ABORT" !abort output waveform REPEAT OUTPUT @Afg;"SYST:ERR?" !read AFG error queue ENTER @Afg;Code,Message$ PRINT Code,Message$ UNTIL Code=0 STOP SUBEND Visual BASIC and Visual C/C++ Program Versions 98 The Visual BASIC example program, MULSEG.FRM, is in directory “VBPROG” and the Visual C example program, MULSEG.
Using Different Frequency Generators The AFG can use either the DDS (Frequency1) Frequency Generator or the Divide-by-N (Frequency2) Frequency Generator to generate arbitrary waveforms. The DDS generator gives lower frequency response with better resolution. The Divide-by-N generator gives higher frequency response with less resolution. For best operating practice, use the 42.
4. Select the Reference Oscillator [SOURce:]ROSCillator:SOURce INTernal[1] This command selects the 42.9 MHz (Internal1) reference oscillator source to be used with the DDS frequency generator (see “Reference Oscillator Sources” on page 115). (Although *RST selects the 42.9 MHz reference oscillator, it is selected here for good programming practice.) If you wish to use the Divide-by-N frequency generator, use: [SOURce:]ROSCillator:SOURce INTernal2 5.
10. Name the Waveform Segment [SOURce:]LIST[1][:SEGMent]:SELect This command names the waveform segment. 11. Set the Waveform Segment Size [SOURce:]LIST[1][:SEGMent]:DEFine This command defines the size of the selected waveform segment. 12. Store the Waveform Segment as Volts [SOURce:]LIST[1][:SEGMent]:VOLTage This command stores the segments into the AFG’s segment memory. 13.
BASIC Program Example (AFGGEN1) 1 !RE-STORE"AFGGEN1" 2 !This program outputs a ramp arbitrary waveform using the 3 !AFG’s frequency1 generator. 4 ! 10 !Assign I/O path between the computer and E1445A. 20 ASSIGN @Afg TO 70910 30 COM @Afg 40 ! 50 !Set up error checking 60 ON INTR 7 CALL Errmsg 70 ENABLE INTR 7;2 80 OUTPUT @Afg;"*CLS" 90 OUTPUT @Afg;"*SRE 32" 100 OUTPUT @Afg;"*ESE 60" 110 ! 120 !Call the subprograms which reset the AFG and which clear 130 !segment and sequence memory.
450 OUTPUT @Afg;"SOUR:LIST1:SSEQ:SEL RAMP_OUT" 460 OUTPUT @Afg;" SOUR:LIST1:SSEQ:DEF 1" 470 OUTPUT @Afg;" SOUR:LIST1:SSEQ:SEQ RAMP" 480 SUBEND 490 ! 500 SUB Rst 510 Rst: !Subprogram which resets the E1445. 520 COM @Afg 530 OUTPUT @Afg;"*RST;*OPC?" !reset the AFG 540 ENTER @Afg;Complete 550 SUBEND 560 ! 570 SUB Wf_del 580 Wf_del: !Subprogram which deletes all sequences and segments.
BASIC Program Example (AFGGEN2) This program is similar to the AFGGEN1 program on page 102 except it selects different reference oscillator and sample sources. The differences are as follows: 1 2 3 160 170 180 190 200 !RE-STORE"AFGGEN2" !This program outputs a ramp arbitrary waveform using the !AFG’s frequency2 generator.
Generating a Sin(X)/X Waveform The SIN_X program generates a Sin(X)/X waveform using 4096 segments or points. BASIC Program Example (SIN_X) 1 2 3 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 Chapter 3 !RE-STORE “SIN_X” !This program generates the arbitrary waveform Sin(x)/x. ! !Assign I/O path between the computer and E1445A.
280 SUB Sinx_def 290 Sinx_def: !Define Sin(x)/x waveform and output sequence. 300 COM @Afg 310 DIM Waveform(1:4096) 320 FOR I=-2047 TO 2048 330 IF I=0 THEN I=1.E-38 340 Waveform(I+2048)=((SIN(2*PI*.53125*I/256))/(.53125*I/256)*.
Generating a Damped Sine Wave The SIN_D program generates a Damped sine wave using 4096 segments or points. BASIC Program Example (SIN_D) This program is similar to the “SIN_X” BASIC program on page 105, with the following differences: 1 2 180 190 200 210 220 230 !RE-STORE “SIN_D” !This program outputs a damped sine wave arbitrary waveform. !Call the subprogram which defines a damped sine wave and !the output sequence. CALL Sind_def !Select the output sequence and start the waveform.
Visual BASIC and Visual C/C++ Program Versions Generating an Exponential Charge/Discharge Waveform The Visual BASIC example program, SIN_D.FRM, is in directory “VBPROG” and the Visual C example program, SIN_D.C, is in directory “VCPROG” on the CD that came with your Agilent E1445A. The CHARGE program generates an Exponential Charge/Discharge waveform with 4096 segments or points.
380 390 400 410 420 430 440 450 460 470 480 490 IF T>=2047 THEN Waveform(T)=1*(1-EXP(-2048/Rc))-1*(1-EXP(-(T-2047)/Rc)) END IF NEXT T OUTPUT @Afg;"SOUR:LIST1:SEGM:SEL CHARGE" !select segment to be defined OUTPUT @Afg;"SOUR:LIST1:SEGM:DEF 4096" !reserve memory for segment OUTPUT @Afg;"SOUR:LIST1:SEGM:VOLT";Waveform(*) !load waveform points ! OUTPUT @Afg;"SOUR:LIST1:SSEQ:SEL CHARGE_OUT" !Define sequence name OUTPUT @Afg;"SOUR:LIST1:SSEQ:DEF 1" !Define sequence size OUTPUT @Afg;"SOUR:LIST1:SSEQ:SEQ CHARGE" !S
300 Spike_def: !Compute waveform (sine wave with spike) and define segment. 310 COM @Afg 320 DIM Waveform(1:4096) 330 FOR I=1 TO 4096 340 Waveform(I)=SIN(2*PI*(I/4096)) 350 NEXT I 360 Width=50 370 FOR J=1 TO Width/2 380 Waveform(J+1024)=Waveform(J+1024)+J*.04 390 NEXT J 400 FOR J=1 TO Width/2 410 Waveform(J+1024+Width/2)=Waveform(J+1024+Width/2)+1-(J*.
Generating a 1⁄2 Rectified Sine Wave The SIN_R program generates a Rectified sine wave using 4096 segments or points. BASIC Program Example (SIN_R) This program is similar to the “SIN_X” BASIC program on page 105, with the following differences: 1 2 180 190 200 210 220 230 !RE-STORE “SIN_R” !This program outputs a rectified sine wave as an arbitrary waveform. !Call the subprogram which defines a rectified sine wave and !the output sequence.
Visual BASIC and Visual C/C++ Program Versions Generating Noise The Visual BASIC example program, SIN_R.FRM, is in directory “VBPROG” and the Visual C example program, SIN_R.C, is in directory “VCPROG” on the CD that came with your Agilent E1445A. The NOISE program generates pseudo-noise.
Arbitrary Waveform Program Comments The following comments give additional details on the program examples in this chapter. Determining the Amount of Segment and Sequence Memory • To determine the amount of segment sequence data remaining in the AFG and the amount of data used, execute the [SOURce:]LIST[1]:SSEQuence:FREE? command. The command returns two number values. The first number shows, in points, the amount of segment sequence memory available.
Using DAC Codes to Send Segment Data Sending Segment Sequences Besides sending the points in a waveform segment as voltage data, they can also be sent as signed or unsigned DAC codes data. Since the AFG always stores DAC codes into memory, setting the amplitude levels is not necessary if sending segment data as DAC codes instead of voltages. See Chapter 7 on how to store DAC codes.
Reference Oscillator Sources • The USER function can use any of the reference oscillator sources selected by the [SOURce:]ROSCillator:SOURce command. The reference oscillator sources are: INTernal[1] – 42.
Frequency1 Generator Range • The [SOURce:]FREQuency[1]:RANGe command allows for higher sample frequency operations of the USER function. This command is only used with frequency1 generator. If set to 0 (MINimum), the normal setting, the maximum sample frequency is the Reference Oscillator frequency / 4 • If set to MAXimum, the maximum sample frequency is the Reference Oscillator frequency / 2 The MAXimum setting worsens the frequency resolution by a factor of two and introduces some sample rate jitter.
Chapter 4 Sweeping and Frequency-Shift Keying Chapter Contents This chapter covers the sweeping, frequency list, and frequency-shift keying (FSK) features of the Agilent E1445A 13-Bit Arbitrary Function Generator (called the “AFG”). The chapter is organized as follows: • FSK Programming Flowchart . . . . . . . . . . . . . . . . . . . . . . . . Page 118 - FSK Command Reference. . . . . . . . . . . . . . . . . . . . . . . . . . Page 120 • Sweeping and Frequency Lists . . . . . . . . . . . . . . . . . . . .
FSK Programming Flowchart The flowchart in Figure 4-1 shows the commands used to program the AFG for frequency sweeps, frequency lists, and for frequency-shift keying. Shown with each command is its power-on/reset setting. Since each example program begins by resetting the AFG, many of the default settings are used. Thus, the examples, which follow the sequence, do not execute every command shown on the flowchart. Remove the flowchart from the binder for easy accessibility.
Figure 4-1.
FSK Command Reference Detailed information on the commands introduced in this chapter can be found in Chapter 8, “Command Reference”. The commands in this chapter are shown in their entirety (optional headers included) to help you locate them in the reference. Sweeping and Frequency Lists The AFG offers linear frequency sweeping of standard waveforms (that is, sine, square, triangle, ramp) and arbitrary waveforms from 0.0 Hz to 10.
Sweeping Using Start and Stop Frequencies The SMPLSWP1 program specifies a start frequency and a stop frequency and continuously sweeps between 0 and 1 MHz. The program also queries the start frequency, stop frequency, center frequency, and frequency span to show the relationship between them. Using the flowchart in Figure 4-1 as a guide, the steps of this program are: 1. Select the 42.9 MHz reference oscillator [SOURce:]ROSCillator:SOURce 2.
BASIC Program Example (SMPLSWP1) 1 !RE-STORE"SMPLSWP1" 2 !This program specifies start and stop frequencies to sweep 3 !a sine wave from 0 to 1 MHz. 4 ! 10 !Assign I/O path between the computer and E1445A. 20 ASSIGN @Afg TO 70910 30 COM @Afg 40 ! 50 !Set up error checking 60 ON INTR 7 CALL Errmsg 70 ENABLE INTR 7;2 80 OUTPUT @Afg;"*CLS" 90 OUTPUT @Afg;"*SRE 32" 100 OUTPUT @Afg;"*ESE 60" 110 ! 120 !Call the subprograms 130 CALL Rst 140 CALL Sweep1 150 CALL Query 160 ! 170 WAIT .
450 OUTPUT @Afg;"SOUR:FREQ1:CENT?" 460 ENTER @Afg;Center$ 470 OUTPUT @Afg;"SOUR:FREQ1:SPAN?" 480 ENTER @Afg;Span$ 490 OUTPUT @Afg;"SOUR:FREQ1:STAR?" 500 ENTER @Afg;Start$ 510 OUTPUT @Afg;"SOUR:FREQ1:STOP?" 520 ENTER @Afg;Stop$ 530 DISP "START = ";Start$,"STOP = ";Stop$, "CENTER = ";Center$,"SPAN = ";Span$ 540 SUBEND 550 ! 560 SUB Errmsg 570 Errmsg: !Subprogram which displays E1445 programming errors 580 COM @Afg 590 DIM Message$[256] 600 !Read AFG status byte register and clear service request bit 610 B=SPO
Specifying a Frequency List The LIST1 program shows the basic steps involved in setting up and “hopping” through a frequency list. The program also shows how to query the number of frequencies in the list. Using the flowchart in Figure 4-1 as a guide, the steps of this program are: 1. Select the 42.9 MHz reference oscillator [SOURce:]ROSCillator:SOURce 2. Select the frequency generator which allows frequency lists (hopping) TRIGger[:STARt]:SOURce 3.
BASIC Program Example (LIST1) 1 !RE-STORE “LIST1” 2 !The following program outputs the frequencies 1 kHz, 10 kHz, 3 !100 kHz, and 1 MHz in a (default) period of 1 second. 4 ! 10 !Assign I/O path between the computer and E1445A. 20 ASSIGN @Afg TO 70910 30 COM @Afg 40 ! 50 !Set up error checking 60 ON INTR 7 CALL Errmsg 70 ENABLE INTR 7;2 80 OUTPUT @Afg;"*CLS" 90 OUTPUT @Afg;"*SRE 32" 100 OUTPUT @Afg;"*ESE 60" 110 ! 120 !Call the subprograms 130 CALL Rst 140 CALL List1 150 CALL List_length 160 ! 170 WAIT .
440 ENTER @Afg;Points$ 450 DISP “Number of frequencies in list: ”;Points$ 460 SUBEND 470 ! 480 SUB Errmsg 490 Errmsg: !Subprogram which displays E1445 programming errors 500 COM @Afg 510 DIM Message$[256] 520 !Read AFG status byte register and clear service request bit 530 B=SPOLL(@Afg) 540 !End of statement if error occurs among coupled commands 550 OUTPUT @Afg;"" 560 OUTPUT @Afg;"ABORT" !abort output waveform 570 REPEAT 580 OUTPUT @Afg;"SYST:ERR?" !read AFG error queue 590 ENTER @Afg;Code,Message$ 600 PRI
Sweeping Using Start and Span Frequencies The SMPLSWP2 program specifies a start frequency and a frequency span to continuously sweep from 1 kHz to 21 kHz. The program also queries the start frequency, stop frequency, center frequency, and frequency span to show the relationship between them. Using the flowchart in Figure 4-1 as a guide, the steps of this program are: 1. Set the frequency sweep mode [SOURce:]FREQuency[1]:MODE 2. Set the start frequency [SOURce:]FREQuency[1]:STARt 3.
BASIC Program Example (SMPLSWP2) 1 !RE-STORE"SMPLSWP2" 2 !This program continuously sweeps from 1 kHz to 21 kHz and specifies 3 !a start frequency and a frequency span. 4 ! 10 !Assign I/O path between the computer and E1445A. 20 ASSIGN @Afg TO 70910 30 COM @Afg 40 ! 50 !Set up error checking 60 ON INTR 7 CALL Errmsg 70 ENABLE INTR 7;2 80 OUTPUT @Afg;"*CLS" 90 OUTPUT @Afg;"*SRE 32" 100 OUTPUT @Afg;"*ESE 60" 110 ! 120 !Call the subprograms 130 CALL Rst 140 CALL Sweep2 150 CALL Query 160 ! 170 WAIT .
450 ENTER @Afg;Center$ 460 OUTPUT @Afg;"SOUR:FREQ1:SPAN?" 470 ENTER @Afg;Span$ 480 OUTPUT @Afg;"SOUR:FREQ1:STAR?" 490 ENTER @Afg;Start$ 500 OUTPUT @Afg;"SOUR:FREQ1:STOP?" 510 ENTER @Afg;Stop$ 520 DISP “START = ”;Start$,"STOP = ";Stop$,“CENTER = ”;Center$,"SPAN = ";Span$ 530 SUBEND 540 ! 550 SUB Errmsg 560 Errmsg: !Subprogram which displays E1445 programming errors 570 COM @Afg 580 DIM Message$[256] 590 !Read AFG status byte register and clear service request bit 600 B=SPOLL(@Afg) 610 !End of statement if er
Frequency Lists Using Definite and Indefinite Length Arbitrary Blocks When specifying a large frequency list (up to 256 frequencies), the ease in which the list is specified and the speed at which data is loaded into the AFG is enhanced by using definite or indefinite length arbitrary blocks. The data in an arbitrary block is in IEEE-754 64-bit floating point format. The LISTDEF program sends a definite length arbitrary block of 100 frequencies to the AFG.
BASIC Program Example (LISTDEF) 1 !RE-STORE"LISTDEF" 2 !This program sends a definite length arbitrary block of frequencies 3 !to the AFG. Once the AFG receives the frequencies, it steps through 4 !the list at a rate of one frequency per second. 5 ! 10 !Assign I/O paths between the computer and E1445A. One path sends 20 !data in ASCII format to the AFG, the other path sends frequency 30 !list data to the AFG in binary format.
440 SUB Rst 450 Rst: !Subprogram which resets the E1445.
Logarithmic Sweeping The LOG_SWP program shows you how to select logarithmic spacing between the frequencies in a frequency sweep. The program sets up a seven point logarithmic frequency sweep from 1 Hz to 1 MHz. Thus, the swept frequencies are: 1 Hz, 10 Hz, 100 Hz, 1 kHz, 10 kHz, 100 kHz, 1 MHz. Using the flowchart in Figure 4-1 as a guide, the steps of this program are: 1. Set the frequency sweep mode [SOURce:]FREQuency[1]:MODE 2.
110 ! 120 !Call the subprograms 130 CALL Rst 140 CALL Swp_pvss 150 ! 160 WAIT .
Sweep Points Versus Time To demonstrate the relationship between the number of points (frequencies) in a frequency sweep and the time of the sweep, the SWP_PVST program uses 100 frequency points to continuously sweep from 5 kHz to 15 kHz in 0.125 seconds. The program also shows you how to control the direction of a sweep. Using the flowchart in Figure 4-1 as a guide, the steps of this program are: 1. Select the frequency sweep mode [SOURce:]FREQuency[1]:MODE 2.
BASIC Program Example (SWP_PVST) 1 !RE-STORE"SWP_PVST" 2 !This program sweeps from 5 kHz to 15 kHz in 0.1 seconds to 3 !demonstrate how to set the sweep time. The program also sets 4 !the direction of the sweep. 5 ! 10 !Assign I/O path between the computer and E1445A.
440 Errmsg: !Subprogram which displays E1445 programming errors 450 COM @Afg 460 DIM Message$[256] 470 !Read AFG status byte register and clear service request bit 480 B=SPOLL(@Afg) 490 !End of statement if error occurs among coupled commands 500 OUTPUT @Afg;"" 510 OUTPUT @Afg;"ABORT" !abort output waveform 520 REPEAT 530 OUTPUT @Afg;"SYST:ERR?" !read AFG error queue 540 ENTER @Afg;Code,Message$ 550 PRINT Code,Message$ 560 UNTIL Code=0 570 STOP 560 SUBEND Visual BASIC and Visual C/C++ Program Versions Cha
Frequency Lists Versus Time To demonstrates the relationship between the number of frequencies in a frequency list and the time to hop through the list, program LIST_TME makes continuous passes through a frequency list where the frequencies are spaced 1 second apart. Using the flowchart in Figure 4-1 as a guide, the steps of this program are: 1. Select the frequency list mode [SOURce:]FREQuency[1]:MODE 2. Specify the frequency list [SOURce:]LIST2:FREQuency 3.
BASIC Program Example (LIST_TME) 1 !RE-STORE"LIST_TME" 2 !The following program steps through a frequency list at a rate 3 !such that a new frequency is output every 1 second. 4 ! 10 !Assign I/O path between the computer and E1445A. 20 ASSIGN @Afg TO 70910 30 COM @Afg 40 ! 50 !Set up error checking 60 ON INTR 7 CALL Errmsg 70 ENABLE INTR 7;2 80 OUTPUT @Afg;"*CLS" 90 OUTPUT @Afg;"*SRE 32" 100 OUTPUT @Afg;"*ESE 60" 110 ! 120 !Call the subprograms 130 CALL Rst 140 CALL List_time 150 ! 160 WAIT .
450 460 470 480 490 500 510 520 530 540 550 560 570 DIM Message$[256] !Read AFG status byte register and clear service request bit B=SPOLL(@Afg) !End of statement if error occurs among coupled commands OUTPUT @Afg;"" OUTPUT @Afg;"ABORT" !abort output waveform REPEAT OUTPUT @Afg;"SYST:ERR?" !read AFG error queue ENTER @Afg;Code,Message$ PRINT Code,Message$ UNTIL Code=0 STOP SUBEND Visual BASIC and Visual C/C++ Program Versions 140 The Visual BASIC example program, LIST_TME.
Sweeping Arbitrary Waveforms When sweeping arbitrary waveforms, the start and stop frequencies specified are start and stop sample rates. The corresponding output frequency is the sample rate divided by the number of points in the waveform. The following programs demonstrate how to sweep arbitrary waveforms by specifying starting and stopping sample rates.
210 ! 220 WAIT .1 !allow interrupt to be serviced 230 OFF INTR 7 240 END 250 ! 260 SUB Wvfm_manage 270 Wvfm_manage: !Subprogram which calls the subprograms which delete 280 !all existing waveforms and define Sin(x)/x and 290 !pseudo random noise.
710 OUTPUT @Afg;"SOUR:FREQ1:MODE SWE;"; !sweep mode 720 OUTPUT @Afg;" :SOUR:FREQ1:STAR 40.96E3;"; !start sample rate 730 OUTPUT @Afg;" :SOUR:FREQ1:STOP 81.92E3;"; !stop sample rate 740 OUTPUT @Afg;":SOUR:SWE:COUN INF;"; !sweep count 750 OUTPUT @Afg;":SOUR:FUNC:SHAP USER;"; !function (arbitrary) 760 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 1.1V" !scale arb values 770 ! 780 DIM Waveform(1:4096) 790 FOR I=1 TO 4096 800 Waveform(I)=2*RND-1.
Program Modifications Visual BASIC and Visual C/C++ Program Versions AC Output Leveling To select another waveform, comment out (!) line 180 or 190 depending on the waveform sequence (S1 or N1) you DO NOT want to output. You must also comment out line 330 if line 180 is commented, or line 340 if line 190 is commented. The Visual BASIC example program, SWP_ARB.FRM, is in directory “VBPROG” and the Visual C example program, SWP_ARB.C, is in directory “VCPROG” on the CD that came with your Agilent E1445A.
BASIC Program Example (SWP_LEVL) 1 !RE-STORE"SWP_LEVL" 2 !This program enables output leveling over the 0 Hz to 10 MHz 3 !sweep. 4 ! 10 !Assign I/O path between the computer and E1445A. 20 ASSIGN @Afg TO 70910 30 COM @Afg 40 ! 50 !Set up error checking 60 ON INTR 7 CALL Errmsg 70 ENABLE INTR 7;2 80 OUTPUT @Afg;"*CLS" 90 OUTPUT @Afg;"*SRE 32" 100 OUTPUT @Afg;"*ESE 60" 110 ! 120 !Call the subprograms 130 CALL Rst 140 CALL Swp_levl 150 ! 160 WAIT .
450 460 470 480 490 500 510 520 530 540 550 560 570 DIM Message$[256] !Read AFG status byte register and clear service request bit B=SPOLL(@Afg) !End of statement if error occurs among coupled commands OUTPUT @Afg;"" OUTPUT @Afg;"ABORT" !abort output waveform REPEAT OUTPUT @Afg;"SYST:ERR?" !read AFG error queue ENTER @Afg;Code,Message$ PRINT Code,Message$ UNTIL Code=0 STOP SUBEND Visual BASIC and Visual C/C++ Program Versions 146 The Visual BASIC example program, SWP_LEVL.
Frequency-Shift Keying Frequency-shift keying (FSK) changes the frequency of the output waveform or sample rate based on the signal level of the frequency-shift keying control source. FSK frequencies can range from 0.0 Hz to 10 MHz.
7. Set the signal amplitude [SOURce:]VOLTage[:LEVel][:IMMediate][:AMPLitude] 8. Place the AFG in the wait-for-arm state INITiate[:IMMediate] BASIC Program Example (FSK1) 1 !RE-STORE "FSK1" 2 !This program shifts between 5 MHz and 10 MHz based on a 1 MHz 3 !control signal applied to the “FSK” control source. The 4 !program also queries the FSK frequencies and the FSK control 5 !source. 6 ! 10 !Assign I/O path between the computer and E1445A.
370 SUB Rst 380 Rst: !Subprogram which resets the E1445.
FSK Using the TTLTrg Control Source The FSK2 program sets up frequency-shift keying using a TTLTrg trigger line as the control source. The TTLTrg trigger line is driven by the Agilent E1406A Command Module. Using the flowchart in Figure 4-1 as a guide, the steps of this program are: 1. Select the frequency-shift keying mode [SOURce:]FREQuency[1]:MODE 2. Select the FSK frequencies [SOURce:]FREQuency[1]:FSKey , 3.
200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 410 420 430 440 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 610 620 630 640 650 660 670 680 690 Chapter 4 END ! SUB Fsk_ttl Fsk_ttl: !Subprogram which sets up frequency-shift keying and trigger !line TTLTRG 5 as the control source.
700 710 720 730 740 750 760 REPEAT OUTPUT @Afg;"SYST:ERR?" ENTER @Afg;Code,Message$ PRINT Code,Message$ UNTIL Code=0 STOP SUBEND !read AFG error queue Visual BASIC and Visual C/C++ Program Versions The Visual BASIC example program, FSK2.FRM, is in directory “VBPROG” and the Visual C example program, FSK2.C, is in directory “VCPROG” on the CD that came with your Agilent E1445A.
270 280 290 300 310 320 330 340 350 360 370 380 390 400 410 420 430 440 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 610 620 630 640 650 660 670 680 690 700 710 720 730 740 750 760 Chapter 4 OUTPUT @Afg;"SOUR:FUNC:USER SIN_X_OUT" OUTPUT @Afg;"INIT:IMM" ! WAIT .1 !allow interrupt to be serviced OFF INTR 7 END SUB Sinx_def Sinx_def: !Define Sin(x)/x waveform and output sequence. COM @Afg DIM Waveform(1:4096) FOR I=-2047 TO 2048 IF I=0 THEN I=1.E-38 Waveform(I+2048)=((SIN(2*PI*.
770 780 790 800 810 ENTER @Afg;Code,Message$ PRINT Code,Message$ UNTIL Code=0 STOP SUBEND Visual BASIC and Visual C/C++ Program Versions The Visual BASIC example program, FSK_ARB.FRM, is in directory “VBPROG” and the Visual C example program, FSK_ARB.C, is in directory “VCPROG” on the CD that came with your Agilent E1445A. Sweeping and FSK Program Comments The following information is associated with sweeping, frequency lists, and frequency-shift keying.
• TTLTrg0 through 7 – The VXIbus TTL trigger lines. INTernal[1] is the source selected at power-on or following a reset, but is specified in the programs to emphasize that sweeping, frequency lists, and frequency-shift keying are only allowed when INTernal[1] is the source. AFG Frequency Modes There are four frequency “modes” available using the INTernal1 sample source (DDS timebase).
• Triangle and Ramp Waves: The maximum undoubled frequency is the current reference oscillator frequency divided by 4, further divided by the [SOURce:]RAMP:POINts value. Sweep Count and Frequency List Repetition Count The sweep count specifies the number of sweeps to occur, or the number of passes through the frequency list before the AFG returns to the idle state from the wait-for-arm state (see Chapter 5).
In an indefinite length arbitrary block: • “#” indicates the data to be sent is in an arbitrary block. • “0” indicates that an indefinite length block of data is to be sent. • “8-bit data bytes” is the data (i.e. frequencies) sent to the AFG. There are eight bytes per frequency list frequency. • NL ^END means a line feed (LF) is sent with END (EOI) asserted. It indicates to the AFG that the end of the data block has been reached.
Sweep Time The number of frequencies (points) in a sweep and the number of frequencies in a frequency list change the duration of the sweep or pass through the list.
Sweep timespecified = Sweep repetition time desired* ((points - 1)/points) Sweep Points Versus Time In SWP_PVST (Sweep Points Versus Time) on page 136, the program continually sweeps 100 frequency points in 0.125 seconds. To maintain this rate continuously, the time between the last frequency point and the first point is accounted for as follows: Sweep timespecified = 0.125 * (99/100) = 0.125 * 0.99 = 0.12375 Thus, the actual sweep time specified is 0.12375 seconds.
Output Frequency and Sample Rate The output frequency of an arbitrary waveform is defined as: FO = sample rate/waveform_points For frequency sweeps the sample rate(s) are the start and stop frequencies. For example, with an arbitrary waveform with 4096 amplitude points, a start frequency of 4.096E6 and a stop frequency of 8.192E6 produces a sweep from 1 kHz to 2 kHz. For frequency-shift keying the sample rates are frequency1 and frequency2 specified by the [SOURce:]FREQuency[1]:FSKey command.
Table 4-1. Amplitude Errors Versus Settling Times Amplitude = 5 Vpk, 10 MHz filter, frequency change =10 %, Freq1 = 10.7 MHz, Freq2 = 0.9 * Freq1 Error in Volts Settling Time (ms) % Error dB Error 0.532 0.5 0.25 0.1 0.05 0.01 0.48 1.16 2.04 2.62 10.6 10.0 5.0 2.0 1.0 0.878 0.828 0.424 0.172 0.086 Amplitude = 5 Vpk, 10 MHz filter, frequency change =1%, Freq1 = 10.7 MHz, Freq2 = 0.99 * Freq1 Error in Volts Settling Time (ms) % Error dB Error 0.056 0.05 0.025 0.01 0.48 1.10 1.12 1.0 0.5 0.097 0.
Both the “FSK” BNC connector and the TTLTrg trigger lines use TTL compatible signal levels. A “high” level on the BNC or trigger line selects frequency1, a “low” level selects frequency2. Frequency-Shift Delay Driving the TTLTrg Trigger Lines 162 Once the control signal to shift the frequency is received, there is a delay of 20 reference oscillator clock cycles before the frequency is active. This delay occurs with all reference oscillator sources.
Chapter 5 Arming and Triggering Chapter Contents This chapter shows you how to arm and trigger the Agilent E1445A AFG in order to start and advance standard and arbitrary waveforms. The sections of this chapter include: • The ARM-TRIG Configuration . . . . . . . . . . . . . . . . . . . . . . . Page 164 - The ARM-TRIG States . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 164 • Initiating Waveforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . • Arming the AFG . . . . . . . . .
The ARM-TRIG Configuration Each standard and arbitrary waveform is a series of discrete amplitude points (digital-to-analog (DAC) codes). The Agilent E1445A AFG uses an ARM-TRIG triggering configuration to output these points. When initiated, an arm signal enables the AFG to output one amplitude point each time a trigger signal is received. The “arm-trigger” model is shown in Figure 5-1. Figure 5-1.
Initiating Waveforms After the AFG has been configured to output the desired waveform, the AFG is set to the Wait-for-Arm state with the command: INITiate[:IMMediate] INITiate is an uncoupled command and is generally the last command executed before a waveform is output: SUB Sine_wave Sine_wave: !Subprogram which outputs a sine wave COM @Afg OUTPUT @Afg;"SOUR:FREQ1:FIX 1E3;"; OUTPUT @Afg;":SOUR:FUNC:SHAP SIN;"; OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 5 V" OUTPUT @Afg;"INIT:IMM" SUBEND !frequency !function !a
The arming commands for continuous waveforms are uncoupled commands. They are executed relative to other AFG commands in the sequence of Figure 5-2. Figure 5-2. AFG Arming Command Sequence Note Setting Arming Sources Detailed information on the commands introduced in this chapter can be found in Chapter 8, “Command Reference”. The commands in this chapter are shown in their entirety (optional headers included) to help you locate them in the reference.
5. Set the arm source ARM[:STARt]:LAYer2:SOURce 6. Set the trigger edge of the external trigger signal ARM[:STARt]:LAYer2:SLOPe 7. Place the AFG in the wait-for-arm state INITiate[:IMMediate] BASIC Program Example (EXT_ARM) 1 !RE-STORE"EXT_ARM" 2 !This program arms the AFG with an external signal applied to the 3 !AFG Start Arm In port. When armed, a 10 kHz, 1 VPP square wave is 4 !output 5 ! 10 !Assign I/O path between the computer and E1445A.
340 Rst: !Subprogram which resets the E1445.
Setting the Arm and Waveform Cycle Count The BURST program shows you how to set the number of arms the AFG is to receive before returning to the Idle state, and how to set the number of waveform cycles (repetitions) per arm. The program sets a five cycle burst that occurs each time an external arm is received. The steps of this program are: 1. Set the output (burst) frequency [SOURce:]FREQuency[1][:CW | :FIXed] 2. Set the output function [SOURce:]FUNCtion[:SHAPe] 3.
BASIC Program Example (BURST) 1 !RE-STORE"BURST" 2 !This program sets the arm count to infinity, and the cycle count 3 !count to 5. The arm source is set to external and a 1 kHz square 4 !wave is applied to the AFG’s “Start Arm In” BNC connector. The 5 !AFG outputs a 5 cycle burst on each positive edge of the external 6 !arm signal. 7 ! 10 !Assign I/O path between the computer and E1445A.
420 Errmsg: !Subprogram which displays E1445 programming errors 430 COM @Afg 440 DIM Message$[256] 450 !Read AFG status byte register and clear service request bit 460 B=SPOLL(@Afg) 470 !End of statement if error occurs among coupled commands 480 OUTPUT @Afg;"" 490 OUTPUT @Afg;"ABORT" !abort output waveform 500 REPEAT 510 OUTPUT @Afg;"SYST:ERR?" !read AFG error queue 520 ENTER @Afg;Code,Message$ 530 PRINT Code,Message$ 540 UNTIL Code=0 550 STOP 560 SUBEND Visual BASIC and Visual C/C++ Program Versions Cha
Triggering the AFG Arming the AFG places the device in the Wait-for-Trigger state (Figure 5-1). When a trigger occurs, the AFG digital-to-analog converter (DAC) outputs one waveform amplitude point. The information in this section covers the commands and programming sequence used to trigger the AFG when outputting fixed frequency waveforms.
The commands in the TRIGger subsystem are frequency coupled. They are executed relative to other AFG commands in the sequence shown in Figure 5-3. Figure 5-3.
Using the Divide-by-N Frequency Generator The DIV_N program shows how to set the AFG trigger source. The program selects the AFG’s divide-by-N frequency generator ([SOURce:]FREQuency2 subsystem). This generator is recommended for use with the AFG’s 40 MHz reference oscillator (also selected in the program) to produce exact frequencies such as 10 MHz, 20 MHz, etc,. The steps of this program are: 1. Select the 40 MHz reference oscillator [SOURce:]ROSCillator:SOURce 2.
160 WAIT .1 !allow interrupt to be serviced 170 OFF INTR 7 180 END 190 ! 200 SUB Squ_wave 210 Squ_wave: !Subprogram which selects reference oscillator source 220 !INTernal2, trigger source INTernal2, and the output 230 !frequency, function, and amplitude.
Lock-Stepping Multiple AFGs The LOCKSTEP program configures two AFGs such that they share the same trigger source. A “master” AFG is programmed to output its triggers on ECLTrg trigger line 0. The trigger source of a “servant” AFG is set to ECLTrg 0. Thus, both AFGs output waveforms (sin(x)/x) at the same frequency, and changing the frequency of the master changes the frequency of the servant simultaneously. The programming sequence for lock-stepping multiple AFGs is given below: 1.
7. Feed the master AFG trigger to the trigger source of the slave AFG [SOURce:]MARKer:ECLTrg:FEED 8. Enable the routing of the trigger signal [SOURce:]MARKer:ECLTrg[:STATe] 9. Place the AFG in the wait-for-arm state INITiate[:IMMediate] BASIC Program Example (LOCKSTEP) 1 2 3 4 5 6 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 Chapter 5 !RE-STORE"LOCKSTEP" !This program “lock-steps” two AFGs.
340 END 350 ! 360 SUB Sinx_def 370 Sinx_def: !Subprogram which computes the sin(x)/x waveform amplitudes 380 !used by both AFGs. 390 COM @Afg_m,@Afg_s,Waveform(*) 400 FOR I=-2047 TO 2048 410 IF I=0 THEN I=1.E-38 420 Waveform(I+2048)=((SIN(2*PI*.53125*I/256))/(.53125*I/256)*.159154943092) 430 NEXT I 440 SUBEND 450 ! 460 SUB Sinx_m 470 COM @Afg_m,@Afg_s,Waveform(*) 480 Sinx_m: !Set the reference oscillator source, trigger source, 490 !frequency mode/frequency, and amplitude for the master 500 !AFG waveform.
840 OUTPUT @Afg_s;"SOUR:LIST1:SEGM:SEL SIN_X" 850 OUTPUT @Afg_s;"SOUR:LIST1:SEGM:DEF 4096" 860 OUTPUT @Afg_s;"SOUR:LIST1:SEGM:VOLT";Waveform(*) 870 ! 880 OUTPUT @Afg_s;"SOUR:LIST1:SSEQ:SEL SINX_S" 890 OUTPUT @Afg_s;"SOUR:LIST1:SSEQ:DEF 1" 900 OUTPUT @Afg_s;"SOUR:LIST1:SSEQ:SEQ SIN_X" 910 OUTPUT @Afg_s;"SOUR:FUNC:USER SINX_S" 920 ! 930 OUTPUT @Afg_s;"INIT:IMM" 940 SUBEND 950 ! 960 SUB Rst 970 Rst: !Subprogram which resets the master and slave AFGs.
1340 1350 1360 1370 1380 1390 1400 1410 1420 1430 1440 B=SPOLL(@Afg_s) !End of statement if error occurs among coupled commands OUTPUT @Afg_s;"" OUTPUT @Afg_s;"ABORT" !abort output waveform REPEAT OUTPUT @Afg_s;"SYST:ERR?" !read servant AFG error queue ENTER @Afg_s;Code,Message$ PRINT Code,Message$ UNTIL Code=0 STOP SUBEND Visual BASIC and Visual C/C++ Program Versions Using Stop Triggers The Visual BASIC example program, LOCKSTEP.FRM, is in directory “VBPROG” and the Visual C example program, LOCKSTEP.
10. Set the number of waveform cycles ARM[:STARt][:LAYer[1]]:COUNt 11. Place the AFG in the wait-for-arm state INITiate[:IMMediate] BASIC Program Example (STOPTRIG) 1 !RE-STORE"STOPTRIG" 2 !This program sets the arm count to 5 and the repetition count to 3 !5,000. A stop trigger applied to the “Stop Trig” BNC connector 4 !aborts the remaining cycles of the current burst. An arm signal 5 !applied to the “Start Arm In” BNC re-arms the AFG which then 6 !outputs the next burst.
330 OUTPUT @Afg;" ARM:STAR:LAY2:SLOP POS" !arm slope 340 OUTPUT @Afg;" ARM:STAR:LAY2:COUN 5" !arm count 350 OUTPUT @Afg;" ARM:STAR:LAY1:COUN 5E3" !repetition count 360 OUTPUT @Afg;"INIT:IMM" !wait-for-arm state 370 SUBEND 380 ! 390 SUB Rst 400 Rst: !Subprogram which resets the E1445.
Gating Trigger Signals Gating is the process of suspending the output waveform. When the gate is active, AFG triggering is suspended. The output remains at the last amplitude point triggered. When the gate is inactive, the output resumes with the next amplitude point. The gating commands are frequency coupled and are executed relative to other AFG commands as shown in Figure 5-3. The GATE example shows how to use the AFG’s “Gate In” BNC to suspend AFG triggering and thus, generation of the output signal.
BASIC Program Example (GATE) 1 !RE-STORE"GATE" 2 !The following program gates the output of a 40 point triangle 3 !wave whose frequency is 1 MHz. When the signal on the “Gate In” BNC 4 !is high, the gate is active and the output is suspended at the last 5 !amplitude point triggered. When the signal is low, the gate is inactive 6 !and the waveform resumes. 7 ! 10 !Assign I/O path between the computer and E1445A.
420 SUB Errmsg 430 Errmsg: !Subprogram which displays E1445 programming errors 440 COM @Afg 450 DIM Message$[256] 460 !Read AFG status byte register and clear service request bit 470 B=SPOLL(@Afg) 480 !End of statement if error occurs among coupled commands 490 OUTPUT @Afg;"" 500 OUTPUT @Afg;"ABORT" !abort output waveform 510 REPEAT 520 OUTPUT @Afg;"SYST:ERR?" !read AFG error queue 530 ENTER @Afg;Code,Message$ 540 PRINT Code,Message$ 550 UNTIL Code=0 560 STOP 570 SUBEND Visual BASIC and Visual C/C++ Progra
Arming and Triggering Frequency Sweeps and Lists Frequency sweeps and lists are started and advanced using the arm and trigger signals described in this section. The commands used to set up the arming and triggering of sweeps and lists are: ARM :SWEep|SEQuence3 :COUNt [:IMMediate] :LINK :SOURce TRIGger :SWEep|SEQuence3 [:IMMediate] :LINK :SOURce :TIMer The frequency sweep and frequency list arming and triggering commands are frequency coupled.
The steps of this program are: 1. Set the sweep mode [SOURce:]FREQuency[1]:MODE SWEep 2. Set the start frequency [SOURce:]FREQuency[1]:STARt 3. Set the stop frequency [SOURce:]FREQuency[1]:STOP 4. Set the number of sweeps [SOURce:]SWEep:COUNt INFinity 5. Set the number of points in a sweep [SOURce:]SWEep:POINts 6. Set the sweep time [SOURce:]SWEep:TIME 7. Select the source to start a sweep ARM:SWEep:SOURce LINK 8.
BASIC Program Example (SWP_TRIG) 1 !RE-STORE"SWP_TRIG" 2 !This program triggers a sweep using the Group Execute 3 !Trigger command. The sweep is from 1 kHz to 1 MHz. 4 ! 10 !Assign I/O path between the computer and E1445A. 20 ASSIGN @Afg TO 80910. 30 COM @Afg 40 ! 50 !Set up error checking 60 ON INTR 8 CALL Errmsg 70 ENABLE INTR 8;2 80 OUTPUT @Afg;"*CLS" 90 OUTPUT @Afg;"*SRE 32" 100 OUTPUT @Afg;"*ESE 60" 110 ! 120 !Call the subprograms 130 CALL Rst 140 CALL Swp_trig 150 ! 160 WAIT .
450 FOR I=1 TO 10 460 DISP “Wait until sweep completes, then press ’Continue’ to start a new sweep” 470 PAUSE 480 TRIGGER @Afg !trigger AFG 490 NEXT I 500 DISP “” 510 SUBEND 520 ! 530 SUB Rst 540 Rst: !Subprogram which resets the E1445.
Arming and Triggering a Frequency Sweep The SWP_STEP program show you how to control the start and advancing of a frequency sweep. The program sets the sweep arm and sweep trigger sources to HOLD. The AFG is armed, and advances to the next frequency in the sweep using the ARM:SWEep[:IMMediate] and TRIGger:SWEep[:IMMediate] commands respectively. Using the flowchart in Figure 4-1 on page 118 as a guide, the steps of the program are: 1.
BASIC Program Example (SWP_STEP) 1 !RE-STORE"SWP_STEP" 2 !This program sets the AFG arm source and trigger source to 3 !HOLD. The AFG is armed and advanced through the sweep points 4 !using “arm immediate” and “trigger immediate” commands. 5 ! 10 !Assign I/O path between the computer and E1445A.
440 ENTER @Afg;Pts 450 FOR I=1 TO (Pts-1) 460 DISP “Press ’Continue’ to advance to next frequency” 470 PAUSE 480 OUTPUT @Afg;"TRIG:SWE:IMM" !step to next frequency 490 NEXT I 500 DISP “” 510 SUBEND 520 ! 530 SUB Rst 540 Rst: !Subprogram which resets the E1445.
Arming and Triggering a Frequency List Frequency lists are started and advanced using the same arming and triggering commands used for sweeps. The LIST_STP program sets the arm and list advance sources to BUS. Thus, the AFG is armed and advanced through the frequency list using the GPIB group execute trigger command TRIGGER 7. Using the flowchart in Figure 4-1 on page 118 as a guide, the steps of this program are: 1.
BASIC Program Example (LIST_STP) 1 !RE-STORE"LIST_STP" 2 !The following program configures the AFG to step through a 3 !frequency list when an GPIB group execute trigger is received. 4 ! 10 !Assign I/O path between the computer and E1445A. 20 ASSIGN @Afg TO 70910 30 COM @Afg,Pts 40 ! 50 !Set up error checking 60 ON INTR 7 CALL Errmsg 70 ENABLE INTR 7;2 80 OUTPUT @Afg;"*CLS" 90 OUTPUT @Afg;"*SRE 32" 100 OUTPUT @Afg;"*ESE 60" 110 ! 120 !Call the subprograms 130 CALL Rst 140 CALL List_stp 150 ! 160 WAIT .
450 TRIGGER 7 !advance to next frequency 460 NEXT I 470 DISP “” 480 SUBEND 490 ! 500 SUB Rst 510 Rst: !Subprogram which resets the E1445.
Aborting Waveforms Aborting a waveform places the AFG in the Idle state (Figure 5-4). The waveform is halted and the output remains at the last amplitude point triggered when the abort was executed. The command which aborts a waveform is: ABORt Using ABORt, Stop Triggers, or Gating Figure 5-4 compares the effects of aborting a waveform, or using stop triggers or gating to stop or suspend the output. Figure 5-4.
Arming and Triggering Program Comments The following information is associated with arming and triggering the AFG. Included are details on the operation of the AFG’s arming and triggering functions, and on the various modes, ranges, etc., used in the programs in this chapter. Reference Oscillator Sources There are five reference oscillator sources for the AFG which are selected by the [SOURce:]ROSCillator:SOURce command: • • • • • CLK10 – The VXIbus CLK10 (10 MHz) line.
Note Divide-by-N Frequency Synthesis AFG Frequency Modes Direct frequency control (that is, the [SOURce:]FREQuency commands) is only available with the INTernal1 and INTernal2 time base sources. For all other sources, the output frequency depends upon the frequency of the time base source. [SOURce:]FREQuency commands will be accepted with other time base sources, but become effective when the source is changed to INTernal1 or INTernal2.
AFG Arming Sources The arming sources set by the ARM[:STARt]:LAYer2:SOURce command are: • BUS – The GPIB Group Execute Trigger (GET) command or the IEEE-488.2 *TRG common command. • ECLTrg0 and ECLTrg1 – The VXIbus ECL trigger lines. • EXTernal – The Agilent E1445A’s front panel “Start Arm In” BNC connector (TTL levels). • HOLD – Suspend arming. Use the ARM:STARt:LAYer2:IMMediate command to start the waveform. • IMMediate – Immediate arming.
External Stop Trigger Slope An external stop trigger signal is applied to the AFG’s “Stop Trig/FSK/Gate In” BNC connector. The edge of the signal on which the AFG is triggered is set with the TRIGger:STOP:SLOPe command. The edges are: • POSitive – Selects the rising edge of the signal. • NEGative – Selects the falling edge of the signal. AFG Gating Sources The source which gates the triggers is specified with the TRIGger[:STARt]:GATE:SOURce command.
Frequency Sweep/ List Arming The source which arms the frequency sweep or list is set with the ARM:SWEep:SOURce command. The available sources are: • BUS – The GPIB Group Execute Trigger (GET) command or the IEEE-488.2 *TRG common command. • HOLD – Suspend sweep or frequency list arming. Arm using ARM:SWEep[:IMMediate]. • IMMediate – Immediate sweep or frequency list arming.
Notes 202 Arming and Triggering Chapter 5
Chapter 6 Marker Outputs/Multiple AFG Operations Chapter Contents This chapter shows how to generate the different signals at the front panel’s “Marker Out” BNC and how to select the ECL trigger lines. Use these signals and trigger lines to synchronize multiple AFGs, generate trigger pulses, etc. The sections are as follows: • Marker Pulse Enable Flowchart. . . . . . . . . . . . . . . . . . . . . . . Page 204 • Available Marker Sources . . . . . . . . . . . . . . . . . . . . . . . . . . .
Marker Pulse Enable Flowchart The flowchart in Figure 6-1 shows how to select and output the different marker pulses at the front panel “Marker Out” BNC and the ECL trigger lines. Remove the flowchart from the binder for easy accessibility. Refer to the flowchart while doing the examples in this chapter, if desired. Figure 6-1.
Available Marker Sources There are six marker sources available for output at the AFG’s front panel “Marker Out” BNC and the ECL Trigger Lines. Use the [SOURce:]MARKer:FEED command to select the “Marker Out” BNC; use [SOURce:]MARKer:ECLTrg:FEED command to select the ECL trigger lines. The sources for the “Marker Out” BNC, not the ECL trigger lines, can output the marker pulses as either active high (NORMal) or active low (INVerted).
[SOURce:]ROSCillator The source outputs the reference oscillator selected by [SOURce:]ROSCillator:SOURce. TRIGger[:STARt|:SEQuence[1]] The source outputs a nominal 12 nS marker pulse for each point of a waveform segment. Arbitrary Generated Marker Pulses To generate marker pulses for arbitrary waveforms, do the following: • Select the “[SOURce:]LIST[1]” source for the front panel “Marker Out” BNC connector using [SOURce:]MARKer:FEED “[SOURce:]LIST[1]”.
Generating Multiple Marker Pulses in Multiple Segment Lists The MARKSEG1 program shows how to generate marker pulses using [SOURce:]LIST[1][:SEGMent]:MARKer and [SOURce:]LIST[1]:SSEQuence:MARKer. The program generates a sine wave and triangle wave. It generates a 10 points wide active low marker pulses starting at the center of the triangle waveform. The program generates a 512 point, 5 V sine wave and 5 V triangle wave. The commands are: 1. Reset the AFG *RST 2.
6. Enable Marker Outputs [SOURce:]MARKer[:STATe] ON This commands enables the AFG to output marker pulses. However, before the marker pulses can be output, they must be selected in the waveform segment and the waveform segment must be selected for marker output in the segment sequence. (Although *RST automatically enables the AFG for marker outputs, it is given here for good programming practice.) 7.
BASIC Program Example (MARKSEG1) 1 !RE-STORE“MARKSEG1” 2 !This program computes a sine wave and a triangle wave as arbitrary 3 !waveforms. A corresponding marker list is defined for the triangle 4 !wave. The program sets the output sequence to consist of both 5 !waveforms, and enables marker pulses to be output with selected 6 !triangle waveform amplitude points. 7! 10 !Assign I/O path between the computer and E1445A.
420 NEXT I 430 ! 440 OUTPUT @Afg;"SOUR:LIST1:SEGM:SEL SINE" !segment name 450 OUTPUT @Afg;" SOUR:LIST1:SEGM:DEF 512" !segment size 460 OUTPUT @Afg;"SOUR:LIST1:SEGM:VOLT ";Waveform(*) !amplitude points 470 SUBEND 480 ! 490 SUB Tri_wave 500 Tri_wave: !Subprogram which computes a triangle wave and marker list. 510 COM @Afg 520 DIM Waveform(1:512),Marker_list(1:512) 530 FOR I=1 TO 256 !Calculate triangle wave 540 Waveform(I)=I*.0195313 550 NEXT I 560 FOR I=257 TO 512 570 Waveform(I)=(512-I)*.
910 Wf_del: !Subprogram which deletes all sequences and segments.
Generating Single Marker Pulses in Single Waveform Segments The MARKSEG2 program shows how to generate marker pulses using [SOURce:]LIST[1][:SEGMent]:MARKer:SPOint and [SOURce:]LIST[1]:SSEQuence:MARKer:SPOint. The program generates a sine wave and triangle wave. It outputs Active high marker pulse at the center of the triangle waveform. The program generates a 512 point, 5 V sine wave and 5 V triangle wave.
BASIC Program Example (MARKSEG2) The MARKSEG2 program is the same as the MARKSEG1 program on page 209 except it selects the marker pulses differently. The differences are as follows: 1 2 3 4 170 180 190 200 210 220 230 !RE-STORE“MARKSEG2” !This program computes a sine wave and a triangle wave as arbitrary !waveforms. A single marker pulse is output with amplitude point 256 !of the triangle wave.
Generating Marker Pulses for Each Waveform Point The MARKTRG program shows how to generate and output a 12 nS wide marker pulse at each point of the waveform. The pulses are output at the “Marker Out” BNC. Since the pulses are output each time a segment is output, the pulse rate is the same as the sample rate (you can use this function as another way to lockstep multiple AFGs). The example generates a 10 point, +5 V ramp.
5. Select the Marker Polarity [SOURce:]MARKer:POLarity NORMal selects active high marker pulses; INVerted selects active low marker pulses. 6. Enable Marker Outputs [SOURce:]MARKer[:STATe] ON This commands enables the AFG to output marker pulses. (Although *RST automatically enables the AFG for marker outputs, it is given here for good programming practice.) 7.
190 OUTPUT @Afg;":SOUR:FUNC:SHAP USER;"; !function 200 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 5.1V" !amplitude 210 OUTPUT @Afg;"SOUR:MARK:FEED ""TRIG:STAR""" !marker source 220 OUTPUT @Afg;"SOUR:MARK:POL NORM" !marker polarity 230 OUTPUT @Afg;"SOUR:MARK:STAT ON" !enable marker 240 ! 250 CALL Ramp_wave 260 ! 270 OUTPUT @Afg;"SOUR:FUNC:USER RAMP_OUT" !waveform sequence 280 OUTPUT @Afg;"INIT:IMM" !wait-for-arm state 290 ! 300 WAIT .
670 Errmsg: !Subprogram which displays E1445 programming errors 680 COM @Afg 690 DIM Message$[256] 700 !Read AFG status byte register and clear service request bit 710 B=SPOLL(@Afg) 720 !End of statement if error occurs among coupled commands 730 OUTPUT @Afg;"" 740 OUTPUT @Afg;"ABORT" !abort output waveform 750 REPEAT 760 OUTPUT @Afg;"SYST:ERR?" !read AFG error queue 770 ENTER @Afg;Code,Message$ 780 PRINT Code,Message$ 790 UNTIL Code=0 800 STOP 810 SUBEND Visual BASIC and Visual C/C++ Program Versions Cha
Operating Multiple AFGs Together The DRIFT program shows how to operate multiple AFGs together to synchronize their outputs to each other. One AFG (the master AFG) uses its Reference Oscillator Output as the Reference Oscillator source for the second AFG (the servant AFG). Thus, any frequency change caused by drift of the master AFG reference results in the same amount of change in the servant AFG. The master AFG generates a 1 MHz square wave; the servant, a 500 KHz square wave. The commands are: 1.
4. Enable the ECLTrg0 Line [SOURce:]MARKer:ECLTrg0[:STATe] ON This enables the marker output on the ECLTrg0 trigger line. (Although *RST automatically enables the AFG for marker outputs, it is given here for good programming practice.) 5. Select the Master AFG’s ECLTrg1 Feed Trigger Source [SOURce:]MARKer:ECLTrg1:FEED “ARM:STARt:LAYer2” This source outputs a marker pulse when the master’s waveform output starts. The marker is output on the ECLTrg1 trigger line. 6.
BASIC Program Example (DRIFT) 1 !RE-STORE"DRIFT" 2 !This program sets up two AFG’s to output 1 MHz square waves. 3 !To prevent these signals from drifting and creating a phase 4 !difference, the reference oscillator of a "master" AFG is shared 5 !by a "servant" AFG. The master’s reference oscillator signal is 6 !output on VXI backplane trigger line ECLT0. 10 !Assign I/O paths between the computer and the AFGs.
420 OUTPUT @Afg_m;"SOUR:MARK:ECLT0:FEED "SOUR:ROSC"" !feed ref osc 430 OUTPUT @Afg_m;"SOUR:MARK:ECLT0:STAT ON" !enable ECLT0 trig line 440 OUTPUT @Afg_m;"SOUR:MARK:ECLT1:FEED "ARM:STAR:LAY2"" !feed arm source 450 OUTPUT @Afg_m;"SOUR:MARK:ECLT1:STAT ON" !enable ECLT1 trig line 460 SUBEND 470 ! 480 SUB Square_wave_s 490 Square_wave_s: !Subprogram which sets up servant AFG: square wave 500 !in phase with master AFG, reference oscillator source 510 !external.
910 920 930 940 950 960 970 980 990 1000 1010 1020 1030 1040 1050 1060 1070 1080 PRINT Code,Message$ UNTIL Code=0 STOP ELSE !servant error B=SPOLL(@Afg_s) !End of statement if error occurs among coupled commands OUTPUT @Afg_s;"" OUTPUT @Afg_s;"ABORT" !abort output waveform PRINT "Servant AFG" PRINT REPEAT OUTPUT @Afg_s;"SYST:ERR?" !read AFG error queue ENTER @Afg_s;Code,Message$ PRINT Code,Message$ UNTIL Code=0 STOP END IF SUBEND Visual BASIC and Visual C/C++ Program Versions The Visual BASIC example pro
Chapter 7 High Speed Operation Chapter Contents This chapter explains how to use the Agilent E1445A Arbitrary Function Generator at faster speeds and other operations. Chapter 3 shows how to transfer waveform segments and segment sequences to the AFG as voltage values and ASCII data, respectively. This is the slowest method to transfer the lists to the AFG. This chapter shows faster ways to transfer the lists to the AFG. The sections are as follows: • Data Transfer Methods and Speed Comparisons . . . . .
- Downloading Data Directly into the DAC . . . . . . . . . . . . . Page 269 • Using the Front Panel’s “Digital Port In” Connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 272 - “Digital Port In” Connector Pinout . . . . . . . . . . . . . . . . . . . Page 278 - Using the “Digital Port In” Connector to Select a Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 279 - Using the “Digital Port In” Connector to Download Data . . . . . . . . .
Using Signed Data to Generate Waveforms Transferring waveform segments as Digital-to-Analog Converter (DAC) Codes to the AFG is faster than transferring a voltage list. This section shows how to transfer the lists as DAC codes using the Signed number format. The DAC codes are transferred to the AFG as a comma (“,”) separated list. Note The AFG can only accept a single number format at a time.
The commands are: 1. Reset the AFG *RST 2. Clear the AFG Memory of All Sequence and Segment Data [SOURce:]LIST[1]:SSEQuence:DELete:ALL [SOURce:]LIST[1][:SEGMent]:DELete:ALL 3. Setup the AFG for Output [SOURce:]FREQuency[1][:CW | :FIXed] [SOURce:]FUNCtion[:SHAPe] USER [SOURce:]VOLTage[:LEVel][:IMMediate][:AMPLitude] 4. Select the DAC Data Source [SOURce:]ARBitrary:DAC:SOURce INTernal This command selects the source that transfers data to the DAC (see “DAC Sources” on page 280).
BASIC Program Example (SIGN_DAT) The SIGN_DAT program is very similar to the example programs used in Chapter 3. The only difference is that this program generates (in line 360) and transfers (in line 430) segment data as DAC codes in the Signed number format instead of voltage values. 1 !RE-STORE"SIGN_DAT" 2 !This program downloads arbitrary waveform data as signed 3 !(2’s complement) DAC codes. The waveform defined is a 200 point, 4 !-5V to +5V ramp wave.
390 OUTPUT @Afg;"SOUR:ARB:DAC:SOUR INT" !dac data source 400 OUTPUT @Afg;"SOUR:ARB:DAC:FORM SIGN" !dac data format (signed) 410 OUTPUT @Afg;"SOUR:LIST1:SEGM:SEL RAMP" !segment name 420 OUTPUT @Afg;" SOUR:LIST1:SEGM:DEF 200" !segment size 430 OUTPUT @Afg;" SOUR:LIST1:SEGM:VOLT:DAC ";Waveform(*) !waveform pts 440 ! 450 OUTPUT @Afg;"SOUR:LIST1:SSEQ:SEL RAMP_OUT" !sequence name 460 OUTPUT @Afg;" SOUR:LIST1:SSEQ:DEF 1" !sequence size 470 OUTPUT @Afg;" SOUR:LIST1:SSEQ:SEQ RAMP" !segment order 480 SUBEND 490 ! 500
Using Unsigned Data to Generate Waveforms Transferring waveform segments as Digital-to-Analog Converter (DAC) Codes to the AFG is faster than transferring a voltage list. This section shows how to transfer the lists as DAC codes using the Unsigned number format. The DAC codes are transferred to the AFG as a comma (“,”) separated list. Note The AFG can only accept a single number format at a time.
5. Select the DAC Data Format [SOURce:]ARBitrary:DAC:FORMat UNSigned This command selects the UNSigned number format. 7. Store the Waveform Segment as Unsigned DAC Data [SOURce:]LIST[1][:SEGMent]:VOLTage:DAC This command stores the waveform segment into segment memory according to the Unsigned number format set by the [SOURce:]ARBitrary:DAC:FORMat UNSigned command. BASIC Program Example (UNS_DAT) Use the same BASIC program as the “SIGN_DAT” program beginning on page 227.
Using Definite Length Arbitrary Blocks to Transfer Data The AFG can receive DAC codes as Definite Length Arbitrary Block Data using either the Signed or Unsigned number format. This is a much faster method to transfer data than using a comma (“,”) separated list that was used in “Using Signed Data to Generate Waveforms” on page 225 and “Using Unsigned Data to Generate Waveforms” on page 229.
BASIC Program Example (DACBLOK1) The DACBLOK1 program shows how to store a waveform segment (i.e., points of an arbitrary waveform) into the AFG’s segment memory. The waveform segment is stored as DAC codes in the Signed number format. This program is the same program as SIGN_DAT beginning on page 227, except the data is transferred to the AFG using the Definite Length Arbitrary Block method. The example generates a 200 point -5 V to +5 V positive going ramp.
290 300 310 320 330 340 350 360 370 380 390 400 410 420 430 440 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 610 620 630 640 650 660 670 680 690 700 710 720 730 740 750 760 770 780 Chapter 7 END ! SUB Ramp_wave Ramp_wave: !Subprogram which defines a ramp waveform and output !sequence. COM @Afg,@Afg1 INTEGER Waveform(1:200) !Calculate waveform points as dac codes FOR I=-100 TO 99 Waveform(I+101)=(I*.050505)/.
790 800 810 820 830 ENTER @Afg;Code,Message$ PRINT Code,Message$ UNTIL Code=0 STOP SUBEND Visual BASIC and Visual C/C++ Program Versions 234 High Speed Operation The Visual BASIC example program, DACBLOK1.FRM, is in directory “VBPROG” and the Visual C example program, DACBLOK1.C, is in directory “VCPROG” on the CD that came with your Agilent E1445A.
Using Indefinite Length Arbitrary Blocks to Transfer Data The AFG can receive DAC codes as Indefinite Length Arbitrary Block Data using either the Signed or Unsigned number format. This is a much faster method to transfer data than using a comma (“,”) separated list that was used in “Using Signed Data to Generate Waveforms” on page 225 and “Using Unsigned Data to Generate Waveforms” on page 229.
BASIC Program Example (DACBLOK2) The DACBLOK2 program shows how to store a waveform segment (i.e., points of an arbitrary waveform) into the AFG’s segment memory. The waveform segment is stored as DAC codes in the Unsigned number format. This program is the same program as UNS_DAT beginning on page 230. The data is transferred to the AFG using the Indefinite Length Arbitrary Block method. The example generates a 200 point +5 V to -5 V negative going ramp.
260 270 280 290 300 310 320 330 340 350 360 370 380 390 400 410 420 430 440 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 610 620 630 640 650 660 670 680 690 700 710 720 730 740 750 Chapter 7 ! WAIT .1!allow interrupt to be serviced OFF INTR 7 END ! SUB Ramp_wave Ramp_wave: !Subprogram which defines a ramp waveform and output !sequence. COM @Afg,@Afg1 INTEGER Waveform(1:200) !Calculate waveform points as dac codes FOR I=100 TO -99 STEP -1 Waveform(101-I)=((I*.050505)/.
760 770 780 790 800 810 820 830 OUTPUT @Afg;"ABORT" REPEAT OUTPUT @Afg;"SYST:ERR?" ENTER @Afg;Code,Message$ PRINT Code,Message$ UNTIL Code=0 STOP SUBEND Visual BASIC and Visual C/C++ Program Versions 238 High Speed Operation !abort output waveform !read AFG error queue The Visual BASIC example program, DACBLOK2.FRM, is in directory “VBPROG” and the Visual C example program, DACBLOK2.C, is in directory “VCPROG” on the CD that came with your Agilent E1445A.
Using Combined Signed Data The Combined Segment Lists transfers both the arbitrary waveform segment data and marker pulses to the AFG (see Chapter 6 for information on marker pulses). You can use either the Signed or Unsigned number format for the list.
Using the Combined List with the Signed Number Format This section shows how to setup the AFG to receive a combined list in the Signed number format and how to generate the list from voltage values. Transferring the List in the Signed Number Format With the AFG set to receive codes in the Signed number format, it receives the codes in 16-bit two’s complement numbers. Use the [SOURce:]ARBitrary:DAC:FORMat SIGNed command to select the format.
The COMBSIGN program shows how to store a combined list (i.e., points and/or marker bit of an arbitrary waveform) into the AFG’s segment memory. The list is stored in the Signed number format. The data is transferred to the AFG using the Definite Length Arbitrary Block Data method. The example generates a 200 point -5 V to +5 V positive going ramp. A marker is output at the zero crossing (or center) of the ramp. The commands are: 1. Reset the AFG *RST 2.
6. Set the Marker Output Source [SOURce:]MARKer:FEED “[SOURce:]LIST[1]” This command selects the LIST[1] source as the source that outputs a marker pulse at the “Marker Out” front panel terminals (see Chapter 6 for information on other sources). 7. Setup the Waveform Segment [SOURce:]LIST[1][:SEGMent]:SELect [SOURce:]LIST[1][:SEGMent]:DEFine 8.
160 CALL Wf_del 170 ! 180 OUTPUT @Afg;"SOUR:FREQ1:FIX 200E3;"; !frequency 190 OUTPUT @Afg;":SOUR:FUNC:SHAP USER;"; !function 200 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 5.11875V" !amplitude 210 ! 220 CALL Ramp_wave 230 ! 240 OUTPUT @Afg;"SOUR:FUNC:USER RAMP_OUT" !waveform sequence 250 OUTPUT @Afg;"INIT:IMM" !wait-for-arm state 260 ! 270 WAIT .1!allow interrupt to be serviced 280 OFF INTR 7 290 END 300 ! 310 SUB Ramp_wave 320 Ramp_wave: !Subprogram which defines a ramp waveform and output 330 !sequence.
660 SUBEND 670 ! 680 SUB Wf_del 690 Wf_del: !Subprogram which deletes all sequences and segments.
Using Combined Unsigned Data The Combined Segment Lists transfers both the arbitrary waveform segment data and marker pulses to the AFG (see Chapter 6 for information on marker pulses). You can use either the Signed or Unsigned number format for the list.
To calculate combined list codes from NEGATIVE voltage values, use the formula: DAC Code = ((voltage value / .00125) shift left by 3) + 32768 For example, to output -2V: DAC Code = ((-2 / .00125) shift left by 3) + 32768 = -12800 + 32768 = 19968 To calculate combined list codes from POSITIVE voltage values, use the formula: DAC Code = ((voltage value / .00125) shift left by 3) - 32768 For example, to output +5V: DAC Code = ((5 / .
The commands are the same ones listed on page 241, except on how to select the Unsigned format and how to generate the data. These exceptions are as follows: 5. Select the DAC Data Format [SOURce:]ARBitrary:DAC:FORMat UNSigned This command selects the UNSigned data number format. 8.
180 OUTPUT @Afg;"SOUR:FREQ1:FIX 200E3;"; !frequency 190 OUTPUT @Afg;":SOUR:FUNC:SHAP USER;"; !function 200 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 5.11875V" !amplitude 210 ! 220 CALL Ramp_wave 230 ! 240 OUTPUT @Afg;"SOUR:FUNC:USER RAMP_OUT" !waveform sequence 250 OUTPUT @Afg;"INIT:IMM" !wait-for-arm state 260 ! 270 WAIT .1!allow interrupt to be serviced 280 OFF INTR 7 290 END 300 ! 310 SUB Ramp_wave 320 Ramp_wave: !Subprogram which defines a ramp waveform with a marker 330 !pulse and the output sequence.
680 COM @Afg,Afg1 690 OUTPUT @Afg;"*RST;*OPC?" !reset the AFG 700 ENTER @Afg;Complete 710 SUBEND 720 ! 730 SUB Wf_del 740 Wf_del: !Subprogram which deletes all sequences and segments.
Using Combined Waveform Segments and Segment Sequences Using Combined Segment Lists and Combined Segment Sequence Lists to generate arbitrary waveforms is one of the fastest methods to download or transfer waveform segments and segment sequences to the AFG. Both can be downloaded to the AFG either as Definite Length or Indefinite Length Arbitrary Block Data. The Combined Segment Lists transfers both the arbitrary waveform segment data and marker pulses to the AFG.
Selecting the Waveform Segments To select a waveform segment, determine the address of the waveform segment and include the address in the Combined Sequence List. Do the following to determine the address: 1. Select the Waveform Segment Use the [SOURce:]LIST[1][SEGMent]:SELect command, where is the name of the waveform segment to be output. 2. Get the Selected Waveform Segment Address Use the [SOURce:]LIST[1][:SEGMent]:ADDRess? query command to get the address.
The COMBSEQ program shows how to transfer multiple Combined Segment Lists (i.e., waveform segments and/or marker bit of an arbitrary waveform) and a Combined Sequence List (waveform segments to be executed, marker enables, and repetition counts) into the AFG’s memory. The waveform segments are transferred in the Signed number format and transferred as Definite Length Arbitrary Block Data. The segment sequence is transferred as Indefinite Length Arbitrary Block Data in the Unsigned number format.
5. Select the DAC Data Format [SOURce:]ARBitrary:DAC:FORMat SIGNed This command selects the SIGNed data (or UNSigned) data format. 6. Setup the First Waveform Segment [SOURce:]LIST[1][:SEGMent]:SELect [SOURce:]LIST[1][:SEGMent]:DEFine 7. Store the First Waveform Segment as Signed Combined Data [SOURce:]LIST[1][:SEGMent]:VOLTage:DAC This command stores the waveform segment into segment memory in the format set by the [SOURce:]ARBitrary:DAC:FORMat command.
13. Add the Marker Enable Add the value of the marker enable bit of the second waveform segment to the value in the second element of the data array. 14. Add the Second Waveform Segment’s Repetition Count Add the repetition count (number of times the waveform segment is to be executed) of the second waveform segment to the value in the second element of the data array. 15. Setup the Sequence List [SOURce:]LIST[1]:SSEQuence:SELect [SOURce:]LIST[1]:SSEQuence:DEFine 16.
BASIC Program Example (COMBSEQ) Sending the Combined Segment Lists is similar to the other BASIC programs in this chapter. However, since BASIC does not support 32-Bit Integer variables, sending a Combined Segment Sequence List is done differently. How BASIC Transfers 32-Bit Integer Data The Combined Segment Sequence List must be treated in BASIC as 2, 16-Bit Integers. The first integer contains the repetition count, marker enable, and the most significant bit (MSB) of and the segment address.
40 COM @Afg,@Afg1 50 ! 60 !Set up error checking 70 ON INTR 7 CALL Errmsg 80 ENABLE INTR 7;2 90 OUTPUT @Afg;"*CLS" 100 OUTPUT @Afg;"*SRE 32" 110 OUTPUT @Afg;"*ESE 60" 120 ! 130 !Call the subprograms 140 CALL Rst 150 CALL Wf_del 160 ! 170 OUTPUT @Afg;"SOUR:FREQ1:FIX 2.048E6;"; !frequency 180 OUTPUT @Afg;":SOUR:FUNC:SHAP USER;"; !function 190 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 5.
540 Tri_wave: !Subprogram which computes a triangle wave and downloads 550 !the corresponding dac codes as signed numbers (in a 560 !definite length block) to segment memory. Marker pulses 570 !coincide with the output voltages of Waveform(1024) 580 !through Waveform(1033). 590 COM @Afg,@Afg1 600 INTEGER Waveform(1:2048) !Calculate triangle wave (dac codes) 610 FOR I=1 TO 1023 620 Waveform(I)=I*.0048828/.
1040 ! 1050 !Sequence (2,1) is the repetition count and marker enable for 1060 !segment M2. Sequence (2,2) is the starting address of segment M2.
Using the VXIbus Backplane You can use the VXIbus backplane to download or transfer segment and sequence data to the AFG, and to set the phase modulation angle.
Figure 7-5 shows a single 32-bit integer used to download a Combined Segment Sequence List. Bits 0 through 16 select the combined waveform segments for output, bit 18 enables the marker output, and bits 20 through 31 sets the repetition count. Combined Segment Sequence List Format 32-bit combined list that defines the segment lists to be executed, enables the marker, enables the last point, and defines the repetition count for the segment lists. Figure 7-5.
The VXIDOWN program shows how to download multiple Combined Segment Lists (i.e., waveform segment and/or marker bit of an arbitrary waveform) and a single Combined Segment Sequence List (waveform segments to be executed, marker enables, and repetition counts) into the AFG’s memory using the VXIbus backplane. The combined segment lists are downloaded in the Signed format and as Definite Length Arbitrary Block Data. The example generates two 5 V sine waves and a single 0 to +5 V triangle wave.
8. Place the AFG into Hold Until All Commands are Executed *OPC? This commands prevents the AFG from receiving data over the VXIbus until it executes all the previous commands. If *OPC? is not sent, the AFG will try to receive data, and thus generate an error, even before it completes executing the previous commands. 9.
controller. (You can also use the command module, like the E1406A Command Module, but at a slower data transfer rate.) Be sure to set the last point bit and marker bits at the appropriate points on the waveform. 15. Notify the AFG that Downloading is Completed [SOURce:]ARBitrary:DOWNload:COMPlete Send this command to the AFG after all data is downloaded. 16.
name of the segment sequence list to be downloaded, and contains the size of the segment sequence list in number of segment lists (i.e., the same size set in [SOURce:]LIST[1]:SSEQuence:DEFine ). 24. Place the AFG into Hold Until All Commands are Executed *OPC? This commands prevents the AFG from receiving data over the VXIbus until it executes all the previous commands.
90 OUTPUT @Afg;"*SRE 32" 100 OUTPUT @Afg;"*ESE 60" 110 ! 120 !Call the subprograms 130 CALL Rst 140 CALL Wf_del 150 CALL A24_offset 160 ! 170 OUTPUT @Afg;"SOUR:FREQ1:FIX 2.048E6;"; !frequency 180 OUTPUT @Afg;":SOUR:FUNC:SHAP USER;"; !function 190 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 5.
580 !Download the waveform segment to segment memory using WRITEIO and 590 !the AFG’s high-speed data register. The register’s address is 600 !located in A24 address space. 610 FOR I=1 TO 2048 620 WRITEIO -16,Base_addr+IVAL("26",16);Waveform(I) 630 NEXT I 640 OUTPUT @Afg;"SOUR:ARB:DOWN:COMP" !disable downloading 650 SUBEND 660 ! 670 SUB Tri_wave 680 Tri_wave: !Subprogram which computes a triangle wave and downloads 690 !the corresponding dac codes to segment memory over the 700 !VXIbus.
1080 ! 1090 SUB Seq_list 1100 Seq_list: !This subprogram downloads the sequence list (repetition 1110 !count, marker, segment address) to sequence memory over 1120 !the VXIbus.
1580 CONTROL 16,25;2 !access A16 space with READIO and WRITEIO 1590 A16_addr=DVAL("D400",16) !AFG A16 base address 1600 Offset=READIO(-16,A16_addr+6) !read AFG offset register 1610 Base_addr=Offset*256 !shift offset for 24-bit address 1620 SUBEND 1630 ! 1640 SUB Rst 1650 Rst: !Subprogram which resets the E1445. 1660 COM @Afg,Base_addr 1670 OUTPUT @Afg;"*RST;*OPC?" !reset the AFG 1680 ENTER @Afg;Complete 1690 SUBEND 1700 ! 1710 SUB Wf_del 1720 Wf_del: !Subprogram which deletes all sequences and segments.
Downloading Data Directly into the DAC This method disables the AFG’s ARM subsystem and immediately outputs the DAC data point when received. The DAC code received by the AFG only sets the DAC to output to the received value. It thus does not disables the AFG’s DAC code format, triggering, marker selection and enabling, and amplitude setting. Send the DAC codes as Combined lists.
[SOURce:]ARBitrary:DAC:FORMat SIGNed command. The downloading method used depends on the device that downloads the data. For example, the device may be an embedded controller or a command module. The AFG output depends on the data received by the DAC and the currently selected amplitude. BASIC Program Example (VXISRCE) The program uses the V360 Controller to download the data using the VXIbus instead of transferring it directly to the AFG using GPIB.
350 ! 360 SUB Dac_drive 370 Dac_drive: !Subprogram which computes a 128 point, 5 Vpp triangle wave and 380 !writes the corresponding codes directly to the DAC via 390 !the VXIbus and High Speed Data register. 400 COM @Afg,Addr 410 !CONTROL 16,25;3 !access A24 space with WRITEIO 420 ! 430 INTEGER I,Waveform(1:128) !Calculate triangle wave (dac codes) 440 FOR I=1 TO 64 450 Waveform(I)=I*.0755/.
Using the Front Panel’s “Digital Port In” Connector You can use the “Digital Port In” connector to download data to the segment memory ([SOURce:]ARBitrary:DOWNload command), to change segment sequences without aborting the present operation, or to drive the DAC directly ([SOURce:]ARBitrary:DAC:SOURce command). The WAVSELFP program selects three different sequences using the “Digital Port In” connector.
200 !Subprograms which define waveforms and load them into segment 210 !and sequence memory, which determine the AFG’s register locations 220 !in A24, and which configure the AFG’s sequence base memory. 230 CALL Waveform_def 240 CALL A24_offset(Laddr) 250 CALL Build_ram 260 ! 270 !Select an output sequence, and initiate (start) waveform output.
700 OUTPUT @Cmd;"DIAG:POKE ";Base_addr+8;",16,";Traffic 710 ! 720 !Write the location of the sequence base address (waveform index) 730 !to the Waveform Select register. Write the base address of 740 !of the sequence in sequence memory to the Sequence Base register.
1200 Sequence(1)=SHIFT(4096-1,-4)+Addr_seg1 DIV 65536 1210 Sequence(2)=Addr_seg1 MOD 65536-65536*(Addr_seg1 MOD 65536.
1700 OUTPUT @Afg;CHR$(10);END !terminate with Line Feed (LF) and EOI 1710 ! 1720 OUTPUT @Afg;"SOUR:LIST1:SSEQ:ADDR?" !sequence location 1730 ENTER @Afg;Seq2_addr 1740 SUBEND 1750 ! 1760 SUB Spike_def 1770 Spike_def: !Compute the waveform (sine wave with spike). Download the 1780 !data as a combined list (voltage and marker) of signed 1790 !numbers in an indefinite length block.
2200 OUTPUT @Afg;"SOUR:LIST1:SSEQ:DEF 1" !sequence size 2210 OUTPUT @Afg USING "#,K";"SOUR:LIST1:SSEQ:COMB #0" !segm execution order 2220 OUTPUT @Afg1;Sequence(*) !sequence list in indefinite length block 2230 OUTPUT @Afg;CHR$(10);END !terminate with Line Feed (LF) and EOI 2240 ! 2250 OUTPUT @Afg;"SOUR:LIST1:SSEQ:ADDR?" !sequence location 2260 ENTER @Afg;Seq3_addr 2270 SUBEND 2280 ! 2290 SUB Rst 2300 Rst: !Subprogram which resets the E1445.
“Digital Port In” Connector Pinout Figure 7-6 shows a pinout of the “Digital Port In” connector. Figure 7-6.
Using the “Digital Port In” Connector to Select a Sequence Figure 7-7 shows the timing relationship to select a segment sequence. Figure 7-7. "Digital Port In" Data Timing The following explains the relationship. 1. The AFG generates an FPPACE* signal after the next segment sequence has been selected, but before completing its output. 2. The AFG is now ready for a new segment sequence. Set the FPCLK* line low to select a new segment sequence.
High Speed Operation Program Comments The following comments give additional details on the program examples in this chapter. Amplitude Effects on DAC Codes Incorrect AFG Operation from Incorrect DAC Codes DAC Sources The AFG stores the Signed or Unsigned DAC codes directly into memory. Thus, the amplitude setting has no affect on the codes. Unlike sending a voltage list, the output amplitude can be set to any of the values listed in Appendix B.
Chapter 8 Command Reference Chapter Contents This chapter describes the Standard Commands for Programmable Instruments (SCPI) command set and the IEEE 488.2 Common Commands for the Agilent E1445A Arbitrary Function Generator (AFG). Included in this chapter are the following sections: • • • • • • • • • Command Types . . . . . . . . . . . SCPI Command Format . . . . . . . . SCPI Command Parameters . . . . . SCPI Command Execution . . . . . . SCPI Command Reference . . . . . . SCPI Command Quick Reference .
[SOURce:] ................................................319 FREQuency[1]......................................319 :CENTer............................................321 [:CW|:FIXed] .....................................322 :FSKey ..............................................323 :SOURce.......................................324 :MODE ..............................................325 :RANGe ............................................326 :SPAN...............................................327 :STARt ......
[SOURce:] ................................................368 RAMP ...................................................368 :POINts .............................................368 :POLarity...........................................369 [SOURce:] ................................................370 ROSCillator ..........................................370 :FREQuency .....................................370 :EXTernal ......................................370 :SOURce...........................................
Command Types Commands are separated into two types: IEEE 488.2 Common Commands and SCPI Commands. Common Command Format The IEEE 488.2 standard defines the Common Commands that perform functions like reset, self-test, status byte query, etc. Common commands are four or five characters in length, always begin with the asterisk character (*), and may include one or more parameters. The command keyword is separated from the first parameter by a space character.
Command Separator A colon (:) always separates one command keyword from a lower level command keyword as shown below: ARM:LAY2:SOUR EXT Abbreviated Commands The command syntax shows most commands as a mixture of upper and lower case letters. The upper case letters indicate the abbreviated spelling for the command. For shorter program lines, send the abbreviated form. For better program readability, you may send the entire command. The AFG will accept either the abbreviated form or the entire command.
SCPI Command Parameters Parameters are enclosed in greater than/less than symbols (< >) in the command syntax and must always be separated from the keywords by a space. When more than one parameter is allowed, the parameters are separated by a vertical line ( | ). The following information contains explanations and examples of the parameter types found in this chapter.
The syntax for data in the blocks is as follows: Definite length block: # Where the value of equals the number of . The value of taken as a decimal integer indicates the number of in the block.
SCPI Command Execution The following information should be remembered when executing SCPI commands. Command Coupling Many of the AFG SCPI commands are value coupled. This means that sending a command can change parameter values set by previous commands. Often, this results in “ Settings Conflict” errors when the program executes. To prevent these errors, the AFG commands must be executed in “ Coupling Groups” . The coupling groups and associated commands are listed in Table B-2 in Appendix B.
SCPI Command Reference This section describes the SCPI commands for the Agilent E1445A Arbitrary Function Generator. Commands are listed alphabetically by subsystem and also within each subsystem. A command guide is printed in the top margin of each page. The guide indicates the subsystem listed on that page.
ABORt ABORt The ABORt command places the TRIGger subsystem in the idle state, regardless of any other settings. The command halts waveform generation, but keeps the output voltage at the value generated when ABORt was executed. Only another INITiate:IMMediate command will restart waveform output. Subsystem Syntax ABORt [no query] Comments • ABORt does not affect any other settings of the Agilent E1445A.
ARM ARM The ARM subsystem operates with the TRIGger subsystem to control the starting of waveform output and frequency sweeps or list generation, as follows: – The source and slope for arming (starting) waveform generation. – The number of waveform start arms the Agilent E1445A will accept before trigger system returns to the idle state. – The number of repetitions of a waveform that will be output for each start arm accepted.
ARM • Executable when Initiated: Query form only • Coupling Group: None • Related Commands: ABORt, TRIGger:STOP[:IMMediate] • *RST Condition: ARM:STARt:LAYer1:COUNt INFinity Example Setting Waveform Repetitions per Arm ARM:COUN 10 Sets 10 repetitions/arm. [:STARt]:LAYer2:COUNt ARM[:STARt]:LAYer2:COUNt specifies the number of waveform start arms the Agilent E1445A will accept after an INITiate:IMMediate command before returning the trigger system to the idle state.
ARM [:STARt]:LAYer2[:IMMediate] ARM[:STARt]:LAYer2[:IMMediate] immediately arms the waveform regardless of the selected arm source. The trigger system must be initiated and the start trigger sequence must be in the wait-for-arm state. The selected start arm source remains unchanged. Comments • Executing this command with the start trigger sequence not in the wait-for-arm state generates Error -212,"Arm ignored".
ARM [:STARt]:LAYer2:SOURce ARM[:STARt]:LAYer2:SOURce selects the source that will start waveform output. The available sources are: BUS – The Group Execute Trigger (GET) GPIB command or the IEEE-488.2 *TRG common command. ECLTrg0 and ECLTrg1 – The VXIbus ECL trigger lines. EXTernal – The Agilent E1445A’s front panel “Start Arm In” BNC connector. HOLD – Suspend arming. Use the ARM[:STARt]:LAYer2[:IMMediate] command to start the waveform. IMMediate – Immediate arming.
ARM :SWEep:COUNt ARM:SWEep:COUNt specifies the number of sweep arms the Agilent E1445A will accept after an INITiate:IMMediate command before the sweep trigger sequence returns to the idle state. This command is equivalent to the [SOURce:]SWEep:COUNt command; either command may be used, and executing either one changes the value of the other. Parameters Parameter Name Parameter Type Range of Values Default Units numeric 1 through 2147483647 | 9.
ARM Example Starting a Frequency Sweep SWE:START 1E3;STOP 10E3 Sets sweep frequency limits. SWE:POIN 10 Sets 1 kHz steps. ARM:SOUR IMM Sets output to start immediately. ARM:SWE:SOUR HOLD Sets manual sweep arm. INIT Initiates trigger system. ARM:SWE Starts sweep. :SWEep:LINK ARM:SWEep:LINK selects the internal event that starts a frequency sweep or list when ARM:SWEep:SOURce is set to LINK. The only defined internal event to start a sweep or list is “ ARM[:STARt | :SEQuence[1]]:LAYer2” .
ARM :SWEep:SOURce ARM:SWEep:SOURce selects the source that starts a frequency sweep or list. The available sources are: BUS – The Group Execute Trigger (GET) GPIB command or the IEEE-488.2 *TRG common command. HOLD – Suspend sweep or list arming. Use ARM:SWEep[:IMMediate] to start the frequency sweep or list. IMMediate – Immediate sweep or list arming.
CALibration CALibration The CALibration subsystem has commands that calibrate the Agilent E1445A. The subsystem also includes commands to prevent and detect accidental or unauthorized calibration of the Agilent E1445A. The calibration procedure using these commands is located in the Agilent E1445A Service Manual.
CALibration Example Querying the Calibration Count CAL:COUN? Queries calibration count. :DATA:AC[1] CALibration:DATA:AC[1] transfers the 250 kHz filter portion of the Agilent E1445A’s calibration constants in IEEE-488.2 arbitrary block program data format. The query form returns this portion of the calibration constants in IEEE-488.2 definite block data format. Both forms require that calibration security have been previously disabled.
CALibration :DATA[:DC] CALibration:DATA[:DC] transfers the DC portion of the Agilent E1445A’s calibration constants in IEEE-488.2 arbitrary block program data format. The query form returns the current DC portion of the calibration constants in IEEE-488.2 definite block data format. Both forms require that calibration security have been previously disabled. See the Agilent E1445A Service Manual for detailed information on the use of this command.
CALibration [:DC]:POINt? CALibration[:DC]:POINt? takes the measured value for the current DC calibration point, computes needed calibration constants, and sets up the Agilent E1445A for the next measurement. When all measurements have been made, the calibration constants are checked for validity. If the validity check passes, the constants are stored in the Agilent E1445A’s non-volatile calibration memory and the calibration count (CALibration:COUNt? query) is incremented.
CALibration :SECure:CODE CALibration:SECure:CODE sets the code which is required to disable calibration security. Calibration security must have been previously disabled. Parameters Parameter Name Parameter Type Range of Values Default Units character data 0 through 12 characters none The code must start with a letter (“ A” through “ Z”) and may contain letters, digits, and underscores. Lower case letters are converted to upper case.
CALibration :SECure[:STATe] CALibration:SECure[:STATe] [,] enables or disables calibration security. Calibration security must be disabled to calibrate the Agilent E1445A, read or write calibration data, change the security code, or change the protected user data.
CALibration :STATe CALibration:STATe specifies whether corrections using the calibration constants are made or not. If STATe is OFF, then no corrections are made. If STATe is ON, DC and/or AC corrections will be made or not according to the states of the CALibration:STATE:DC and AC commands.
CALibration :STATe:DC CALibration:STATe:DC specifies whether DC corrections using the calibration constants are made or not. If state is OFF, then no DC corrections are made. If state is ON, DC corrections will be made if CALibration:STATe ON is also set.
INITiate INITiate The INITiate subsystem initiates the trigger subsystem and prepares the Agilent E1445A for waveform generation. Once initiated, a start arm received from the programmed arm source (TRIGger:STARt:SOURce command) starts the waveform output. For frequency sweeping, the initial sample or waveform frequency is the STARt frequency when [SOURce:]FREQuency[1]:MODE SWEep is set, or the first frequency in the frequency list when [SOURce:]FREQuency[1]:MODE LIST is set.
INITiate Comments • Use the ABORt command to prematurely halt the waveform generation and place the trigger system in the idle state. • Waveform output begins immediately if ARM[:STARt]:LAYer2:SOURce IMMediate is set. • Executing this command when [SOURce:]FUNCtion[:SHAPe] DC is set, when [SOURce:]ARBitrary:DAC:SOURce is not set to INTernal, or the trigger system is not in the idle state, Error -213,"Init ignored" is generated.
OUTPut[1] OUTPut[1] The OUTPut[1] subsystem controls the characteristics of the output waveform. The subsystem sets the low-pass output filter, sets the output source impedance, and enables or disables the output. Subsystem Syntax OUTPut[1] :FILTer [:LPASs] :FREQuency [:STATe] :IMPedance :LOAD :AUTO [:STATe] :FILTer[:LPASs]:FREQuency OUTPut[1]:FILTer[:LPASs]:FREQuency sets the output filter’s cutoff frequency to either 250 kHz or 10 MHz.
OUTPut[1] :FILTer[:LPASs][:STATe] OUTPut[1]:FILTer[:LPASs][:STATe] enables or disables the output filter. Parameters Parameter Name Parameter Type Range of Values Default Units boolean OFF | 0 | ON | 1 none Comments • Executable when Initiated: Yes • Coupling Group: None • Related Commands: OUTPut[1]:FILTer[:LPASs]:FREQuency • *RST Condition: OUTPut1:FILTer:LPASs:STATe OFF Example Enabling the 10 MHz Low-pass Filter OUTP:FILT:FREQ 10 MHZ Selects 10 MHz output filter.
OUTPut[1] :LOAD OUTPut[1]:LOAD indicates whether the actual load applied to the Agilent E1445A’s “Output 50/75Ω” is either matched to the output impedance specified by OUTPut[1]:IMPedance or is an open circuit. The output voltage into an open circuit is twice that into a matched load.
OUTPut[1] :LOAD:AUTO OUTPut[1]:LOAD:AUTO indicates whether the OUTPut[1]:LOAD value should be coupled to (track) the OUTPut[1]:IMPedance value. Parameters Parameter Name Parameter Type Range of Values Default Units boolean OFF | 0 | ON | 1 | ONCE none Comments • With OUTPut[1]:LOAD:AUTO ON set, the OUTPut[1]:LOAD value is coupled to the OUTPut[1]:IMPedance value. Changing the IMPedance changes the LOAD value. Specifying a value for LOAD sets AUTO OFF.
[SOURce:] [SOURce:] The [SOURce:] subsystem is divided into multiple sections, each of which control a particular aspect of the Agilent E1445A. Each section of the subsystem is separately documented in the following sections of the command reference. The [SOURce:] node itself is optional. Subsystem Syntax The first level [SOURce:] syntax tree is: [SOURce:] ARBitrary . . . FREQuency[1] FREQuency2 . FUNCtion . . . LIST[1] . . . . LIST2 . . . . . MARKer . . . PM . . . . . . RAMP . . . . . ROSCillator . .
[SOURce:]ARBitrary [SOURce:]ARBitrary The [SOURce:]ARBitrary subsystem controls: – The data format for the digital-to-analog converter (DAC). – The DAC data source. – Direct downloading of DAC data to the waveform segment memory. Subsystem Syntax [SOURce:] ARBitrary :DAC :FORMat :SOURce :DOWNload ,, :COMPlete [no query] [no query] :DAC:FORMat [SOURce:]ARBitrary:DAC:FORMat specifies the format for the DAC codes.
[SOURce:]ARBitrary • There is no need to specify the DAC format with waveforms programmed in volts. The format should be specified if you are: a. Programming waveforms in DAC codes ([SOURce:]LIST[1][:SEGMent]:COMBined or [SOURce:]LIST[1][:SEGMent]:VOLTage:DAC commands). b. Driving the DAC directly ([SOURce:]ARBitrary:DAC:SOURce). c. Directly downloading waveform segments ([SOURce:]ARBitrary:DOWNload).
[SOURce:]ARBitrary :DAC:SOURce [SOURce:]ARBitrary:DAC:SOURce selects the DAC’s data source. Parameters Parameter Name Parameter Type Range of Values Default Units discrete DPORt | INTernal | LBUS | VXI none Comments • The available sources are: – DPORt: The Agilent E1445A’s front panel “Digital Port In” connector. – LBUS: The VXIbus local bus. – INTernal: The [SOURce:]LIST[1] subsystem or built-in waveforms. – VXI: The VXIbus data transfer bus.
[SOURce:]ARBitrary :DOWNload [SOURce:]ARBitrary:DOWNload ,, enables the direct download mode to the waveform segment or segment sequence memory. It selects the download source, waveform segment or segment sequence name, and number of points. The available download sources are: – DPORt: The Agilent E1445A’s front panel “Digital Port In” connector. Only waveform segment memory may be downloaded via this source. – LBUS: The VXIbus local bus.
[SOURce:]ARBitrary When downloading segment sequence data from the VXIbus data transfer bus, the most significant 16 bits should be written to offset 34 decimal (22 hex) in the Agilent E1445A’s A24 address space. The least significant 16 bits should be written to offset 36 decimal (24 hex).
[SOURce:]ARBitrary :DOWNload:COMPlete [SOURce:]ARBitrary:DOWNload:COMPlete disables direct downloading mode. Send it when downloading is complete. Comments • Executable when Initiated: No • Coupling Group: None • Related Commands: [SOURce:]ARBitrary:DOWNload • *RST Condition: Downloading disabled Example Set up to download 512 points from the VXIbus to waveform segment “ABC” LIST:SEL ABC Creates segment name. LIST:DEF 512 Reserves 512 points of segment memory.
[SOURce:]FREQuency[1] [SOURce:]FREQuency[1] The [SOURce:]FREQuency[1] subsystem controls the first of the Agilent E1445A’s two frequency generators. ([SOURce:]FREQuency2 controls the second generator.) The first generator uses a direct digital synthesis (NCO) technique to generate the specified frequencies. It has an upper frequency limit of the reference oscillator frequency divided by 4 (the second generator operates up to the reference oscillator frequency). This generator has excellent resolution (.
[SOURce:]FREQuency[1] ([SOURce:]FUNCtion[:SHAPe]), and whether or not frequency doubling is enabled ([SOURce:]FREQuency[1]:RANGe), according to the following rules: – Arbitrary Waveforms and Sine Wave Outputs: the maximum possible frequency is the current reference oscillator frequency divided by 4. – Square Wave Outputs: the maximum possible frequency is the current reference oscillator frequency divided by 16.
[SOURce:]FREQuency[1] :CENTer [SOURce:]FREQuency[1]:CENTer sets the center sample rate or waveform frequency for a frequency-swept waveform. Parameters Parameter Name Parameter Type Range of Values Default Units numeric see below | MINimum | MAXimum Hz The legal range for , as well as the MINimum and MAXimum values, are context-dependent. See “Coupling Rules” on page 319 for a description of the coupling between STARt, STOP, CENTer, and SPAN.
[SOURce:]FREQuency[1] [:CW|:FIXed] [SOURce:]FREQuency[1][:CW|:FIXed] selects the non-swept sample rate for arbitrary waveforms or waveform frequency for the built-in waveforms (sine, square, etc.). Parameters Parameter Name Parameter Type Range of Values Default Units numeric see below | MINimum | MAXimum Hz MINimum selects 0 Hz. Arbitrary Waveforms and Sine Wave Outputs: MAXimum selects the current reference oscillator frequency divided by 4.
[SOURce:]FREQuency[1] :FSKey [SOURce:]FREQuency[1]:FSKey , sets the two sample rates or waveform frequencies for frequency-shift keying. [SOURce:]FREQuency[1]:FSKey:SOURce sets the source which selects between the two sample rates or waveform frequencies. A TTL high level on the selected source generates frequency1; a TTL low level generates frequency2.
[SOURce:]FREQuency[1] :FSKey:SOURce [SOURce:]FREQuency[1]:FSKey:SOURce sets the source which will control which of the two FSKey sample rates or waveform frequencies is generated when [SOURce:]FREQuency[1]:MODE FSKey is selected. A high level on the source selects [SOURce:]FREQuency[1]:FSKey ; a low level selects .
[SOURce:]FREQuency[1] :MODE [SOURce:]FREQuency[1]:MODE determines which set of commands control the frequency subsystem. Parameters Parameter Name Parameter Type Range of Values Default Units discrete CW | FIXed | FSKey | LIST | SWEep none Comments • The parameter has the following meanings: – CW or FIXed: Selects single-frequency mode. [SOURce:]FREQuency[1][:CW | :FIXed] selects the sample rate or waveform frequency. CW and FIXed are equivalent.
[SOURce:]FREQuency[1] :RANGe [SOURce:]FREQuency[1]:RANGe enables or disables frequency doubling for non-sine wave outputs. When doubling is enabled, the waveform is advanced on both edges, instead of one edge, of the square wave generated by the direct digital synthesis chip, thus doubling the maximum sample output rate. However, since the square wave symmetry is not perfect, doubling introduces some systematic jitter in the sample rate.
[SOURce:]FREQuency[1] Example Enabling Frequency Doubling FUNC:SHAP SQU Selects square wave output. ROSC:SOUR INT1 Selects 42.94 MHz oscillator. FREQ:RANG 5MHZ Sets frequency range to 5 MHz. :SPAN [SOURce:]FREQuency[1]:SPAN sets the sample rate or waveform frequency span for a frequency-swept waveform.
[SOURce:]FREQuency[1] :STARt [SOURce:]FREQuency[1]:STARt sets the starting sample rate or waveform frequency for a frequency-swept waveform. Parameters Parameter Name Parameter Type Range of Values Default Units numeric see below | MINimum | MAXimum Hz The legal range for , as well as the MINimum and MAXimum values, are context-dependent. See “Coupling Rules” on page 319 for a description of the coupling between STARt, STOP, CENTer, and SPAN.
[SOURce:]FREQuency[1] :STOP [SOURce:]FREQuency[1]:STOP sets the stopping sample rate or waveform frequency for a frequency-swept waveform. Parameters Parameter Name Parameter Type Range of Values Default Units numeric see below | MINimum | MAXimum Hz The legal range for , as well as the MINimum and MAXimum values, are context-dependent. See “Coupling Rules” on page 319 for a description of the coupling between STARt, STOP, CENTer, and SPAN.
[SOURce:]FREQuency2 [SOURce:]FREQuency2 The [SOURce:]FREQuency2 subsystem controls the second of the Agilent E1445A’s two frequency generators. ([SOURce:]FREQuency[1] controls the first generator.) This second generator consists of a simple divide-by-n of the currently selected reference oscillator source, where n may be 1, 2, 3, or any even value between 4 and 131,072.
[SOURce:]FREQuency2 [:CW | :FIXed] [SOURce:]FREQuency2[:CW|:FIXed] selects the sample rate for arbitrary waveforms or the frequency for the standard waveforms (square, ramp, triangle). Parameters Parameter Name Parameter Type Range of Values Default Units numeric see below | MINimum | MAXimum Hz Arbitrary Waveforms: MINimum selects the current reference oscillator frequency divided by 131,072; MAXimum selects the current reference oscillator frequency.
[SOURce:]FUNCtion [SOURce:]FUNCtion The [SOURce:]FUNCtion subsystem controls what waveform shape (arbitrary, sinusoid, etc.) the Agilent E1445A generates. For arbitrary waveforms generation, the subsystem controls which of the 128 possible segment sequences are selected. Subsystem Syntax [SOURce] :FUNCtion [:SHAPe] :USER [:SHAPe] [SOURce:]FUNCtion[:SHAPe] selects what waveform shape the Agilent E1445A generates.
[SOURce:]FUNCtion – TRIGger[:STARt:]SOURce selects the sample source. SINusoid requires that TRIGger[:STARt:]SOURce INTernal1 be selected. – The [SOURce:]FREQuency[1] or [SOURce:]FREQuency2 subsystems specify the signal frequency for RAMP, SINusoid, SQUare, and TRIangle waveforms. They specify the sample rate for arbitrary (USER) waveforms.
[SOURce:]LIST[1] [SOURce:]LIST[1] The [SOURce:]LIST[1] subsystem defines the waveform segments and segment sequence for arbitrary waveform generation. The Agilent E1445A can simultaneously store up to 256 waveform segments and up to 128 segment sequences.
[SOURce:]LIST[1] :FORMat[:DATA] [SOURce:]LIST[1]:FORMat[:DATA] [,] specifies the format of numeric waveform segment and segment sequence list return data in the [SOURce:]LIST[1] subsystem. The available numeric list return data formats are: ASCii: Returns numeric data as an NR1 or NR3 number as defined in IEEE-488.2. PACKed: Returns data in IEEE-488.2 definite block format. Internal to the block, the format depends on the query being executed, as list below.
[SOURce:]LIST[1] [:SEGMent]:ADDRess? [SOURce:]LIST[1][:SEGMent]:ADDRess? returns the address in the waveform segment memory at which the currently selected waveform segment is located. Comments • Executable when Initiated: Yes • Coupling Group: None • *RST Condition: No waveform segment is selected • Power-On Condition: No waveform segments are defined Example Query Waveform Segment Memory Address LIST:SEGM:ADDR? Queries segment address.
[SOURce:]LIST[1] [:SEGMent]:COMBined [SOURce:]LIST[1][:SEGMent]:COMBined defines in one step both the output voltage and marker pulse lists that constitute a waveform segment. Parameters The may be either a comma-separated list of values or an IEEE-488.2 definite or indefinite length block containing the values in 16-bit integer format.
[SOURce:]LIST[1] Example Defining a Waveform Segment Combined List LIST:SEL ABC Selects waveform segment ABC. LIST:DEF 8 ABC is 8 points long. LIST:COMB 16000,32000,16000,0,-16000,-32000,-16000,0 Defines waveform segment. [:SEGMent]:COMBined:POINts? [SOURce:]LIST[1][:SEGMent]:COMBined:POINts? returns a number indicating the length of the currently selected waveform segment’s combined voltage point and marker pulse list.
[SOURce:]LIST[1] [:SEGMent]:DEFine [SOURce:]LIST[1][:SEGMent]:DEFine reserves enough waveform segment memory for a waveform segment of length points for the segment currently selected by [SOURce:]LIST[1][:SEGMent]:SELect. Parameters Parameter Name Parameter Type Range of Values Default Units numeric see below | MINimum | MAXimum none The length will be rounded up, if needed, to a multiple of 8 points. All defined waveform segments share the waveform segment memory.
[SOURce:]LIST[1] [:SEGMent]:DELete:ALL [SOURce:]LIST[1][:SEGMent]:DELete:ALL deletes all defined waveform segment definitions from memory and makes all of the waveform memory available for new waveform segment definitions. Comments • If any waveform segment is used in any segment sequence, executing this command generates Error +1102,"Segment in use". No waveform segments will be deleted.
[SOURce:]LIST[1] • Power-On Condition: No waveform segments are defined Example Deleting a Waveform LIST:SEL ABC Selects waveform segment ABC. LIST:DEL Deletes segment. [:SEGMent]:FREE? [SOURce:]LIST[1][:SEGMent]:FREE? returns information on waveform segment memory availability and usage. The return data format is: , The first numeric value shows the amount of waveform segment memory available in points; the second, the amount of waveform segment memory used in points.
[SOURce:]LIST[1] [:SEGMent]:MARKer [SOURce:]LIST[1][:SEGMent]:MARKer defines, for each voltage point of a waveform segment, whether the Agilent E1445A may output a marker pulse. To actually output a marker pulse, the marker enable list value for the segment sequence entry for the segment must also be set to 1.
[SOURce:]LIST[1] Example Defining a Waveform Segment Marker Pulse List LIST:SEL ABC Selects waveform segment ABC. LIST:DEF 8 ABC is 8 points long. LIST:VOLT -1,.5,.5.,5.,.5,0,-.5,-1 Defines waveform voltages. LIST:MARK 1,0,0,0,1,0,0,0 Outputs a marker pulse on first and fifth voltage points. [:SEGMent]:MARKer:POINts? [SOURce:]LIST[1][:SEGMent]:MARKer:POINts? returns a number indicating the length of the currently selected waveform segment’s marker pulse list.
[SOURce:]LIST[1] • *RST Condition: Unaffected • Power-On Condition: No waveform segments are defined Example Creating a Single Point Marker List LIST:SEL ABC Selects waveform segment ABC. LIST:DEF 8 ABC is 8 points long. LIST:VOLT -1,.5,.5.,5.,.5,0,-.5,-1 Defines waveform voltages. LIST:MARK:SPO 5 Outputs a marker pulse on the fifth voltage point. [:SEGMent]:SELect [SOURce:]LIST[1][:SEGMent]:SELect selects a waveform segment for subsequent [SOURce:]LIST[1][:SEGMent] subsystem commands.
[SOURce:]LIST[1] [:SEGMent]:VOLTage [SOURce:]LIST[1][:SEGMent]:VOLTage defines the series of output voltage points that constitute a waveform segment. The points are specified in terms of volts. Parameters The may be either a comma-separated list of voltage values or an IEEE-488.2 definite or indefinite length block containing the values in IEEE-754 64-bit floating-point format.
[SOURce:]LIST[1] Example Defining a Waveform Segment Voltage Point List LIST:SEL ABC Selects waveform segment ABC. LIST:DEF 8 ABC is 8 points long. LIST:VOLT .5,1,.5,0,-.5,-1,-.5,0 Defines waveform voltages. [:SEGMent]:VOLTage:DAC [SOURce:]LIST[1][:SEGMent]:VOLTage:DAC defines the series of output voltage points that constitute a waveform segment. The points are specified in terms of digital-to-analog converter (DAC) codes.
[SOURce:]LIST[1] • Power-On Condition: No waveform segments are defined Example Defining a Waveform Segment Voltage Point List ARB:DAC:FORM SIGN Selects signed DAC code format. LIST:SEL ABC Selects waveform segment ABC. LIST:DEF 8 ABC is 8 points long. LIST:VOLT:DAC 400,800,400,0,-400,-800,-400,0 Defines waveform voltages. [:SEGMent]:VOLTage:POINts? [SOURce:]LIST[1][:SEGMent]:VOLTage:POINts? returns a number indicating the length of the currently selected waveform segment’s voltage point list.
[SOURce:]LIST[1] :SSEQuence:CATalog? [SOURce:]LIST[1]:SSEQuence:CATalog? returns a comma-separated list of quoted strings, each containing the name of a defined segment sequence. If no segment sequence names are defined, a single null string ("") is returned. Comments • Executable when Initiated: Yes • Coupling Group: None • *RST Condition: None • Power-On Condition: No segment sequence names are defined Example Cataloging Segment Sequence Names LIST:SSEQ:CAT? Catalogs segment sequence names.
[SOURce:]LIST[1] • Using combined lists is faster than separately defining the waveform segment, marker enable, and repetition count lists. • Executing this command with waveform segment, marker pulse, and repetition count lists defined with different lengths generates Error -221,"Settings conflict" unless the different length lists are the marker pulse and/or repetition count list and have a length of 1.
[SOURce:]LIST[1] :SSEQuence:DEFine [SOURce:]LIST[1]:SSEQuence:DEFine reserves enough segment sequence memory for a segment sequence of length segment names for the sequence currently selected by [SOURce:]LIST[1]:SSEQuence:SELect. Parameters Parameter Name Parameter Type Range of Values Default Units numeric see below | MINimum | MAXimum none The segment sequence memory can store a maximum of 32,768 points (32,767 points if a square, ramp, or triangle wave exists).
[SOURce:]LIST[1] :SSEQuence:DELete:ALL [SOURce:]LIST[1]:SSEQuence:DELete:ALL deletes all defined segment sequence definitions from memory and makes all of the sequence memory available for new segment sequence definitions. "In use" sequences cannot be deleted. Comments • Use [SOURce:]LIST[1]:SSEQuence:DELete[:SELected] to delete a single segment sequence definition.
[SOURce:]LIST[1] :SSEQuence:DWELl:COUNt [SOURce:]LIST[1]:SSEQuence:DWELl:COUNt defines, for each waveform segment of a segment sequence, how many times the waveform segment will be output before advancing to the next segment in the sequence. Parameters The may be either a comma-separated list of repetition counts or an IEEE-488.2 definite or indefinite length block containing the counts in 16-bit integer format. The legal range for the counts is 1 to 4096.
[SOURce:]LIST[1] :SSEQuence:DWELl:COUNt:POINts? [SOURce:]LIST[1]:SSEQuence:DWELl:COUNt:POINts? returns a number indicating the length of the currently selected segment sequence’s repetition count list. Comments • Executable when Initiated: Yes • Coupling Group: None • *RST Condition: None • Power-On Condition: No segment sequences are defined Example Query Repetition Count List Length LIST:SSEQ:SEL ABC Selects segment sequence ABC. LIST:SSEQ:DWEL:COUN:POIN? Queries repetition count list length.
[SOURce:]LIST[1] :SSEQuence:MARKer [SOURce:]LIST[1]:SSEQuence:MARKer defines, for each waveform segment of a segment sequence, whether the Agilent E1445A may output the marker pulses defined by the marker list for that waveform segment. Parameters The may be either a comma-separated list of values or an IEEE-488.2 definite or indefinite length block containing the values in 16-bit integer format.
[SOURce:]LIST[1] :SSEQuence:MARKer:POINts? [SOURce:]LIST[1]:SSEQuence:MARKer:POINts? returns a number indicating the length of the currently selected segment sequence’s marker pulse list. Comments • Executable when Initiated: Yes • Coupling Group: None • *RST Condition: None • Power-On Condition: No segment sequences are defined Example Query Marker Pulse List Length LIST:SSEQ:SEL ABC Selects segment sequence ABC. LIST:SSEQ:MARK:POIN? Queries marker pulse list length.
[SOURce:]LIST[1] :SSEQuence:SELect [SOURce:]LIST[1]:SSEQuence:SELect selects a segment sequence for subsequent [SOURce:]LIST[1]:SSEQuence subsystem commands. This command will define the segment sequence name if it is undefined, but does not reserve any segment sequence memory.
[SOURce:]LIST[1] :SSEQuence:SEQuence [SOURce:]LIST[1]:SSEQuence:SEQuence defines the ordered sequence of waveform segments that constitute a full waveform. Parameters The is a comma-separated list of waveform segment names. The waveform segment names must have been previously defined. Comments • The maximum length of the segment sequence is 32,768 points.
[SOURce:]LIST2 [SOURce:]LIST2 The [SOURce:]LIST2 subsystem defines the sample rate or frequencies list to be generated when [SOURce:]FREQuency[1]:MODE is set to LIST. Frequency list generation requires that TRIGger[:STARt]:SOURce INTernal1 and [SOURce:]FREQuency[1]:MODE LIST be set. Frequency list generation is started by a sweep arm (ARM:SWEep subsystem) and is advanced by a sweep advance trigger (TRIGger:SWEep subsystem).
[SOURce:]LIST2 :FREQuency [SOURce:]LIST2:FREQuency defines the list of sample rates or frequencies to be generated when [SOURce:]FREQuency[1]:MODE is set to LIST. Parameters The has one of the two following formats: 1. A comma-separated list of frequency values. 2. An IEEE-488.2 definite or indefinite length block containing the frequency values in IEEE-754 64-bit floating-point format. The maximum length of the list is 256 frequency values.
[SOURce:]LIST2 :FREQuency:POINts? [SOURce:]LIST2:FREQuency:POINts? returns a number that shows the length of the currently defined frequency list. Comments • Executable when Initiated: Yes • Coupling Group: None • *RST Condition: Unaffected • Power-On Condition: No frequency list is defined Example Query the Frequency List Length LIST:FREQ2:POIN? 360 Command Reference Queries frequency list length.
[SOURce:]MARKer [SOURce:]MARKer The [SOURce:]MARKer subsystem controls: – Which signal is routed to the “ Marker Out” BNC. – The polarity of the “ Marker Out” BNC signal. – Which signals, if any, are routed to the VXIbus ECL trigger lines.
[SOURce:]MARKer Parameters Parameter Name Parameter Type Range of Values Default Units string “ARM[:STARt|:SEQuence[1]][:LAYer[1]]” | “ARM[:STARt|:SEQuence[1]]:LAYer2” | “[SOURce:]FREQuency[1]:CHANge” | “[SOURce:]LIST[1]” | “[SOURce:]PM:DEViation:CHANge” “[SOURce:]ROSCillator” | “TRIGger[:STARt|:SEQuence[1]]” none Comments • Executable when Initiated: Yes • Coupling Group: None • Related Commands: [SOURce:]MARKer:ECLTrg[:STATe] • *RST Condition: [SOURce:]MARKer:ECLTrg0:FEED “ ARM[:STARt
[SOURce:]MARKer :FEED [SOURce:]MARKer:FEED selects the source for the front panel “ Marker Out” BNC. The available sources are: – “ ARM[:STARt|:SEQuence[1]][:LAYer[1]]”: For arbitrary waveforms, the marker level changes with the first waveform point of the first repetition. A marker pulse is then output with the next-to-last waveform point of each repetition. For sine waves , the marker is a 50% duty cycle square wave at the sine wave frequency.
[SOURce:]MARKer Example Setting the “Marker Out” BNC Source MARK:FEED “SOUR:LIST” Sets marker list as source. :POLarity [SOURce:]MARKer:POLarity selects the polarity of the marker signal at the front panel “ Marker Out” BNC. NORMal polarity selects an active high marker output; INVerted an active low output.
[SOURce:]PM [SOURce:]PM The [SOURce:]PM (Phase Modulation) subsystem controls the modulation for sine wave output (only). Phase modulation is not possible with other waveform shapes. Subsystem Syntax [SOURce:] PM [:DEViation] :SOURce :STATe :UNIT [:ANGLe] [:DEViation] [SOURce:]PM[:DEViation] sets the modulation DEViation for a sine wave output when [SOURce:]PM:SOURce is set to INTernal.
[SOURce:]PM :SOURce [SOURce:]PM:SOURce selects the source for phase modulation data. Parameters Parameter Name Parameter Type Range of Values Default Units discrete DPORt | INTernal | LBUS | VXI none Comments The available sources are: – DPORt: The Agilent E1445A’s front panel “Digital Port In” connector. – LBUS: The VXIbus local bus. – INTernal: The [SOURce:]PM[:DEViation] command. – VXI: The VXIbus data transfer bus.
[SOURce:]PM :STATe [SOURce:]PM:STATe enables or disables phase modulation for sine wave output. Phase modulation is always disabled for other waveform shapes.
[SOURce:]RAMP [SOURce:]RAMP The [SOURce:]RAMP subsystem selects the polarity of ramp waveforms, and the number of points on generated ramps and triangle waveforms. Subsystem Syntax [SOURce:] RAMP :POINts :POLarity :POINts [SOURce:]RAMP:POINts specifies the number of points to be used to generate the stepped ramp or triangle waveform.
[SOURce:]RAMP :POLarity [SOURce:]RAMP:POLarity selects the polarity of the ramp, triangle, or square wave. For ramps, NORMal generates a positive-going ramp; INVerted generates a negative-going ramp. For triangles, NORMal generates a triangle with an initial positive-going slope; INVerted generates an initial negative-going slope. For square waves, NORMal generates a waveform with initial voltage being the more positive voltage; INVerted generates the more negative voltage first.
[SOURce:]ROSCillator [SOURce:]ROSCillator The [SOURce:]ROSCillator subsystem controls the reference oscillator’s source and indicates the frequency of an external oscillator. The Agilent E1445A uses the source and frequency information to generate sample output rate for arbitrary waveforms or waveform frequency for ramp, sine, square, and triangle wave output.
[SOURce:]ROSCillator :SOURce [SOURce:]ROSCillator:SOURce selects the reference oscillator source. Parameters Parameter Name Parameter Type Range of Values Default Units discrete CLK10 | ECLTrg0 | ECLTrg1 | EXTernal | INTernal[1] | INTernal2 none Comments • The available sources are: – CLK10: The VXIbus CLK10 (10 MHz) line. – EXTernal: The Agilent E1445A’s front panel “ Ref/Sample In” BNC. – ECLTrg0 and ECLTrg1: The VXIbus ECL trigger lines. – INTernal[1]: The internal 42.
[SOURce:]SWEep [SOURce:]SWEep The [SOURce:]SWEep subsystem selects: – The number of frequency sweeps or repetitions of a frequency list to be performed. – The direction of a frequency sweep. – The number of points in a frequency sweep. – A linear or logarithmic frequency sweep with respect to time. – The sweep rate for frequency sweeps and frequency lists when TRIGger:SWEep:SOURce TIMer is set.
[SOURce:]SWEep • *RST Condition: SOURce:SWEep:COUNt 1 Example Setting the Sweep Count SWE:COUN 10 Sets 10 sweeps per INITiate. :DIRection [SOURce:]SWEep:DIRection selects the direction of the frequency sweep.
[SOURce:]SWEep :POINts [SOURce:]SWEep:POINts selects the number of points in a frequency sweep. The frequencies generated by the sweep are evenly spaced linearly or logarithmically, depending on the [SOURce:]SWEep:SPACing setting, between the frequencies specified by [SOURce:]FREQuency[1]:STARt and STOP, or CENTer and SPAN, inclusive.
[SOURce:]SWEep :SPACing [SOURce:]SWEep:SPACing selects either linear or logarithmic frequency sweep mode. Parameters Parameter Name Parameter Type Range of Values Default Units discrete LINear | LOGarithmic none Comments • The available modes are: – LINear: Selects the linear sweep mode. The sample rate or waveform frequency increases or decreases linearly between the start and stop frequencies selected by [SOURce:]FREQuency[1]:STARt and STOP, or CENTer and SPAN.
[SOURce:]SWEep :TIME [SOURce:]SWEep:TIME selects the duration of the sweep or frequency list generation when TRIGger:SWEep:SOURce is set to TIMer. The duration is the time from the start of the sweep or list until when the last frequency begins to be output.
[SOURce:]VOLTage [SOURce:]VOLTage The [SOURce:]VOLTage subsystem controls the amplitude and offset values for all output waveform shapes. Subsystem Syntax [SOURce:] VOLTage [:LEVel] [:IMMediate] [:AMPLitude] :UNIT [:VOLTage] :OFFSet [:LEVel][:IMMediate][:AMPLitude] [SOURce:]VOLTage[:LEVel][:IMMediate][:AMPLitude] sets the output amplitude when SOURce:FUNCtion[:SHAPe] is set to DC, RAMP, SINusoid, SQUare, or TRIangle.
[SOURce:]VOLTage Parameters Parameter Name Parameter Type Range of Values Default Units numeric see below | MINimum | MAXimum see below DC Output: When a matched load has been specified, MINimum selects -5.12 V; MAXimum selects 5.11875 V. Arbitrary Waveform, Ramp, Sine, Square, and Triangle Outputs: When a matched load has been specified, if the current offset voltage is less than or equal to 1 V, MINimum selects the equivalent of .
[SOURce:]VOLTage [:LEVel][:IMMediate][:AMPLitude]:UNIT[:VOLTage] [SOURce:]VOLTage[:LEVel][:IMMediate][:AMPLitude]:UNIT[:VOLTage] sets the default units for subsequent [SOURce:]VOLTage[:LEVel][:IMMediate][:AMPLitude] commands. Parameters Parameter Name Parameter Type Range of Values Default Units discrete DBM | DBMW | V | VPK | VPP | VRMS | W none Comments • The available default units are: – DBM | DBMW: dB referenced to 1 milliwatt. – V: Volts.
[SOURce:]VOLTage [:LEVel][:IMMediate]:OFFSet [SOURce:]VOLTage[:LEVel][:IMMediate]:OFFSet sets the output offset voltage for all waveform shapes except DC. Output offset amplitude is programmed in volts. Parameters Parameter Name Parameter Type Range of Values Default Units numeric see below | MINimum | MAXimum volts DC Output: When a matched load has been specified, MINimum selects -5.0 V; MAXimum selects +5.0 V.
STATus STATus The STATus subsystem controls the SCPI-defined Operation and Questionable Signal status registers. Each is comprised of a Condition Register, an Event Register, an enable mask, and negative and positive transition filters. Each Status Register works as follows: When a condition occurs, the appropriate bit in the Condition Register is set or cleared. If the corresponding transition filter is enabled for that bit, the same bit is set in the associated Event Register.
STATus Subsystem Syntax STATus :OPC :INITiate :OPERation :CONDition? :ENABle [:EVENt]? :NTRansition :PTRansition :PRESet :QUEStionable :CONDition? :ENABle [:EVENt]? :NTRansition :PTRansition [query only] [query only] [no query] [query only] [query only] :OPC:INITiate STATus:OPC:INITiate controls whether the *OPC, *OPC?, and *WAI commands will complete immediately or whether they will wait for waveform generation to complete.
STATus :OPERation:CONDition? STATus:OPERation:CONDition? returns the contents of the Operation Condition Register. Reading the register does not affect its contents. Comments • Executable when Initiated: Yes • Coupling Group: None • Related Commands: STATus commands, *SRE, *STB? • *RST Condition: All bits of the Operation Condition Register are cleared as a result of the state present after *RST. Example Querying the Operation Condition Register STAT:OPER:COND? Queries the Operation Condition Register.
STATus :OPERation[:EVENt]? STATus:OPERation[:EVENt]? returns the contents of the Operation Event Register. Reading the register clears it to 0. Comments • The Operation Event Register is also cleared to 0 by the *CLS common command. • Executable when Initiated: Yes • Coupling Group: None • Related Commands: STATus commands, *SRE, *STB? • *RST Condition: Unaffected • Power-on Condition: Operation Event Registers are cleared to 0.
STATus :OPERation:PTRansition STATus:OPERation:PTRansition sets the positive transition mask. For each bit unmasked, a 0-to-1 transition of that bit in the Operation Condition Register will set the same bit in the Operation Event Register. Parameters Parameter Name Parameter Type Range of Values Default Units numeric or non-decimal numeric 0 through +32767 none The non-decimal numeric forms are the #H, #Q, or #B formats specified by IEEE-488.2.
STATus :QUEStionable:CONDition? STATus:QUEStionable:CONDition? returns the contents of the Questionable Signal Condition Register. Reading the register does not affect its contents. Comments • Executable when Initiated: Yes • Coupling Group: None • Related Commands: STATus commands, *SRE, *STB? • *RST Condition: All bits of the Condition Register are cleared as a result of the state present after *RST, except for the Calibration bit, which will remain set if the condition persists.
STATus :QUEStionable[:EVENt]? STATus:QUEStionable[:EVENt]? returns the contents of the Questionable Signal Event Register. Reading the register clears it to 0. Comments • The Event Register is also cleared to 0 by the *CLS common command. • Executable when Initiated: Yes • Coupling Group: None • Related Commands: STATus commands, *SRE, *STB? • *RST Condition: Unaffected • Power-on Condition: The Event Register is cleared to 0.
STATus :QUEStionable:PTRansition STATus:QUEStionable:PTRansition sets the positive transition mask. For each bit unmasked, a 0-to-1 transition of that bit in the Questionable Signal Condition Register will set the same bit in the Questionable Signal Event Register. Parameters Parameter Name Parameter Type Range of Values Default Units numeric or non-decimal numeric 0 through +32767 none The non-decimal numeric forms are the #H, #Q, or #B formats specified by IEEE-488.2.
SYSTem SYSTem The SYSTem subsystem returns error messages and the SCPI version number to which the Agilent E1445A complies. Subsystem Syntax SYSTem :ERRor? :VERSion? [query only] [query only] :ERRor? SYSTem:ERRor? returns the error messages in the error queue. See Table B-6 in Appendix B for a listing of possible error numbers and messages. Comments • The Agilent E1445A places any generated errors into the error queue. The queue is first-in, first out.
SYSTem :VERSion? SYSTem:VERSion? returns the SCPI version number to which the Agilent E1445A complies: “ 1991.0” . Comment • Executable when Initiated: Yes • *RST Condition: None Example Querying the SCPI Revision SYST:VERS? 390 Command Reference Queries SCPI revision.
TRIGger TRIGger The TRIGger subsystem operates with the ARM subsystem to control the behavior of the trigger system, as follows: – The source and slope for generating the individual samples of a waveform. – The source and slope of the signal that may gate sample generation. – The source and slope for prematurely stopping one trigger cycle, without aborting the entire trigger system. – The source for advancing a frequency sweep or list.
TRIGger [:STARt]:COUNt TRIGger[:STARt]:COUNt would normally specify the number of triggers the Agilent E1445A would accept after an INITiate:IMMediate command before returning the start trigger sequence to the wait-for-arm state. However, since this is equal to the length of the current waveform, and is not configurable here, the only legal value for this command is 9.91e37 or NaN (not a number). There is no need to send this command. It is included for SCPI compatibility purposes only.
TRIGger [:STARt]:GATE:POLarity TRIGger[:STARt]:GATE:POLarity selects the polarity of the Agilent E1445A’s front panel “Stop Trig/FSK/Gate In” BNC which gates the TRIGger:STARt subsystem. NORMal polarity selects an active high gate; INVerted polarity selects an active low gate. This polarity is significant only when TRIGger[:STARt]:GATE SOURce is set to EXTernal. The programmed value is retained but not used when other sources are selected.
TRIGger the active level for the front panel’s “ Stop Trig/FSK/Gate In” BNC when used as the gate source. • The front panel’s “Stop Trig/FSK/Gate In” BNC is a three-use connector; for FSK control, as a stop trigger source, or as a sample gate source. Only one of these uses may be active at any time. • If a VXIbus TTLTrg trigger line is used as the sample gate source, then no TTLTrg trigger lines can be used for FSK control or as a stop trigger source.
TRIGger [:STARt][:IMMediate] TRIGger[:STARt][:IMMediate] immediately advances to the next sample in a waveform regardless of the selected trigger source, provided that the trigger system has been initiated and a start arm received. The selected trigger source remains unchanged. Comments • Executing this command with the start trigger sequence not in the wait-for-trigger state generates Error -211,"Trigger ignored".
TRIGger [:STARt]:SOURce TRIGger[:STARt]:SOURce selects the source that advances the waveform to the next sample point. Parameters Parameter Name Parameter Type Range of Values Default Units discrete BUS | ECLTrg0 | ECLTrg1 | EXTernal | HOLD | INTernal[1] | INTernal2 | TTLTrg0 through TTLTrg7 none Comments • The sources available are: – BUS: The Group Execute Trigger (GET) GPIB command or the IEEE-488.2 *TRG common command. – ECLTrg0 and ECLTrg1: The VXIbus ECL trigger lines.
TRIGger :STOP[:IMMediate] TRIGger:STOP[:IMMediate] terminates the current start arm cycle at the end of the current waveform repetition regardless of the selected stop trigger source. The command aborts the remaining ARM[:STARt][:LAYer[1]]:COUNt repetitions of the current trigger cycle. The start trigger sequence is placed into the wait-for-arm state at the end of the current waveform repetition. The selected stop trigger source remains unchanged.
TRIGger :STOP:SLOPe TRIGger:STOP:SLOPe selects the edge (rising or falling) on the Agilent E1445A’s front panel “Stop Trig/FSK/Gate In” BNC which terminates the current start arm cycle at the end of the current waveform repetition. This edge is significant only with TRIGger:STOP:SOURce set to EXTernal. The programmed value is retained but not used when other sources are selected.
TRIGger • If a stop trigger is received while the start trigger sequence is in the idle or wait-for-arm states, it is ignored with no error generated. • If the start trigger sequence is on the last of ARM[:STARt]:LAYer2:COUNt arm cycles, a stop trigger places the trigger system in the idle state at the end of the current waveform repetition.
TRIGger • *RST Condition: None Example Advancing a Frequency Sweep SWE:STAR 1E3;STOP 10E3 Sets sweep frequency limits. SWE:POIN 10 Sets 1 kHz steps. ARM:LAY2:SOUR IMM Sets output to start immediately. ARM:SWE:SOUR IMM Sets sweep to start immediately. TRIG:SWE:SOUR HOLD Sets sweep to advance sweep manually. INIT Initiates trigger system. TRIG:SWE Advances to next frequency.
TRIGger :SWEep:SOURce TRIGger:SWEep:SOURce selects the source that causes a frequency sweep or list to advance to the next frequency. Parameters Parameter Name Parameter Type Range of Values Default Units discrete BUS | HOLD | LINK | TIMer | TTLTrg0 through TTLTrg7 none Comments • The available sources are: – BUS: The Group Execute Trigger (GET) GPIB command or the IEEE-488.2 *TRG common command. – HOLD: Suspend sweep or list frequency advance triggering.
TRIGger :SWEep:TIMer TRIGger:SWEep:TIMer selects the time between frequency values for sweep or frequency list generation when TRIGger:SWEep:SOURce is set to TIMer. This value set by command is coupled to the [SOURce:]SWEep:TIME command value by the following equation: TIME = TIMer * (points - 1) where points is the [SOURce:]SWEep:POINts value for frequency sweeps, or the length of the frequency list for frequency list generation.
VINStrument VINStrument The VINStrument subsystem operates with the [SOURce:]ARBitrary and [SOURce:]PM subsystems to control the virtual instrument features of the Agilent E1445A. These features include the ability to use the VXIbus Local Bus and normal data transfer bus to download data to the segment and segment sequence memories, directly drive the main output DAC, and provide phase deviations for sine waves.
VINStrument • With VINStrument[:CONFigure]:LBUS[:MODE]:AUTO ON set, the Local Bus operation mode is automatically set to CONSume when downloading segment or segment sequence data ([SOURce:]ARBitrary:DOWNload LBUS command), directly driving the main output DAC ([SOURce:]ARBitrary:DAC:SOURce LBUS command), or providing phase deviation data ([SOURce:]PM:SOURce LBUS command); the mode is set to OFF when none of these are active.
VINStrument • *RST Condition: VINStrument:CONFigure:LBUS:MODE:AUTO ON Example Uncoupling Local Bus Operation Mode VINS:CONF:LBUS:AUTO OFF Uncouple operation mode. [:CONFigure]:TEST:CONFigure VINStrument[:CONFigure]:TEST:CONFigure configures the Agilent E1445A for Local Bus testing. The parameter indicates that, during the test, that number of bytes will be sent to the Agilent E1445A. The data will be placed into unused waveform segment memory.
VINStrument [:CONFigure]:TEST:DATA? VINStrument[:CONFigure]:TEST:DATA? returns the received VXIbus Local Bus test data. The data is returned in 16-bit integer format in an IEEE-488.2 definite block.
VINStrument [:CONFigure]:VME:RECeive:ADDRess:DATA? VINStrument[:CONFigure]:VME:RECeive:ADDRess:DATA? returns two values: A24,offset. A24 indicates that the Agilent E1445A’s A24 address space should be used for writing waveform segment, segment sequence, DAC, or phase deviation data, and offset is the offset into the A24 address space to be written to. The offset returned depends on which of the above operations is active when the ADDRess:DATA? query is executed.
VINStrument • *RST Condition: None Example Querying the A24 Address Space Ready Indication Offset VINS:VME:REC:ADDR:READ? Queries A24 offset for ready indication. :IDENtity? VINStrument:IDENtity? returns a response consisting of 4 fields, indicating the virtual instrument capability of the Agilent E1445A: HEWLETT-PACKARD VIRTUAL INSTRUMENT,ANY DTOA,0,A.01.00 The first and last fields indicate that the Agilent E1445A conforms to revision A.01.
SCPI Command Quick Reference Table 8-1.
Table 8-1.
Table 8-1.
Table 8-1.
Table 8-1.
SCPI Conformance Information The Agilent E1445A Arbitrary Function Generator conforms to the SCPI-1991.0 standard. Table 8-2 and 8-3 list all the SCPI confirmed, approved, and non-SCPI commands that the Agilent E1445A can execute. Table 8-2.
Table 8-3.
IEEE-488.2 Common Commands *CLS *CLS clears the Standard Event Status Register, the Operation Status Register, the Questionable Signal Register, and the error queue. This clears the corresponding summary bits (3, 5, and 7) in the Status Byte Register. *CLS does not affect the enable masks of any of the Status Registers.
• Power-On Condition: No macros are defined Example Define Macro to Restart Waveform *DMC "RESTART",#19ABOR;INIT Defines macro. *EMC and *EMC? *EMC enables and disables macro usage. When is zero, macro usage is disabled. Any non-zero value in the range of -32768 to +32767 enables macro usage. *EMC? returns 1 if macro usage is enabled, 0 if disabled. Comments • Macro definitions are not affected by this command.
• Power-On Condition: No events are enabled Example Enable All Error Events *ESE 60 Enables error events. *ESR? *ESR? returns the value of the Standard Event Status Register. The register is then cleared (all bits 0). Comments • Executable when Initiated: Yes • Coupling Group: None • *RST Condition: None • Power-On Condition: Register is cleared *GMC? *GMC? returns the definition of the specified macro in IEEE-488.2 definite block format.
*IDN? *IDN? returns identification information for the Agilent E1445A. The response consists of four fields: HEWLETT-PACKARD,E1445A,0,A.01.00 The first two fields identify this instrument as model number E1445A manufactured by Agilent (Agilent was spun off from Hewlett-Packard in 1999 and firmware will return Hewlett-Packard). The third field is 0 since the serial number of the Agilent E1445A is unknown to the firmware. The last field indicates the revision level of the firmware.
*LRN? *LRN? returns a sequence of commands that may be resent to the Agilent E1445A to return it to its current programming state. Only those commands that are affected by *RST are included in the sequence. Notable exceptions include the DAC code format (signed vs. unsigned), the [SOURce:]LIST commands, including waveform segment, segment sequence, and frequency list definitions, the STATus subsystem commands, and the CALibration:SECure command state.
*OPC? *OPC? causes the Agilent E1445A to wait for all pending operations to complete. A single ASCII “ 1” is then placed in the output queue. If STATus:OPC:INITiate OFF is set, the ASCII “ 1” will be placed in the output queue when all commands received prior to the *OPC? have been executed. If ON is set, *OPC? waits for waveform generation to complete before placing the “ 1” in the output queue. No other commands will be executed until the “ 1” is placed in the output queue.
*PUD and *PUD? *PUD stores the specified data in the Agilent E1445A’s non-volatile calibration memory. The data must be sent in IEEE-488.2 definite or indefinite block format. Calibration security must have been previously disabled. *PUD? returns the current protected user data in IEEE-488.2 definite block format. The query form may be executed regardless of the state of calibration security.
*RCL *RCL restores a previously stored programming state from one of the 10 possible stored state areas. The indicates which of the stored state areas should be used. This command affects the same command settings as does *RST. Notable exceptions include the DAC code format (signed vs. unsigned), the [SOURce:]LIST commands, including waveform segment, segment sequence, and frequency list definitions, the STATus subsystem commands, and the CALibration:SECure command state.
*RST *RST resets the Agilent E1445A as follows: – Sets all commands to their *RST state. – Aborts all pending operations including waveform generation. *RST does not affect: – The state of VXIbus word serial protocol – The output queue – The Service Request Enable Register – The Standard Event Status Enable Register – The enable masks for the Operation Status and Questionable Signal Registers – Calibration data – Calibration security state – Protected user data – The DAC code format (signed vs.
• Related Commands: *LRN?, *RCL, *RST • *RST Condition: unaffected • Power-on Condition: all saved states set to the same state as the *RST state *SRE and *SRE? *SRE specifies which bits of the Status Byte Register are enabled to generate a service request (VXIbus reqt signal). Event and summary bits are always set and cleared in the Status Byte Register regardless of the enable mask. The is the sum of the decimal weights of the bits to be enabled. *SRE? returns the current enable mask.
*STB? *STB? returns the value of the Status Byte Register. Bit 6 (decimal weight 64) is set if a service request is pending. STB? should not be used to read the Status Byte Register if a service request is generated by a message available (MAV) condition. Comments • *STB? is a query. Thus, sending the command in response to a MAV condition will generate Error -410 "Query interrupted".
*WAI *WAI causes the Agilent E1445A to wait for all pending operations to complete before executing any further commands. If STATus:OPC:INITiate OFF is set, command execution resumes when all commands received prior to the *WAI have been executed. If ON is set, *WAI waits for waveform generation to complete before resuming command execution.
Common Commands Quick Reference This section describes the IEEE-488.2 Common Commands implemented in the Agilent E1445A. The table below shows the commands listed by functional group; however, commands are listed alphabetically in the reference. Examples are shown in the reference when the command has parameters or returns a non-trivial response; otherwise, the command string is as shown in the table. For additional information, refer to IEEE Standard 488.2-1987. Table 8-4.
Chapter 9 AFG Status Introduction This chapter describes the Agilent E1445A Arbitrary Function Generator status system. Included is information on the status groups used by the AFG, the conditions monitored by each group, and information on how to enable a condition to interrupt the computer. This main sections of this chapter include: • Status System Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - The Questionable Signal Status Group . . . . . . . . . . . . . . . .
Figure 9-1.
The Questionable Signal Status Group The Questionable Signal Status Group monitors the quality of various aspects of the output signal. In the AFG, the Questionable Signal Status Group monitors the frequency accuracy of the divide-by-n subsystem, and also error conditions in non-volatile calibration memory. Divide-by-n frequency accuracy and non-volatile calibration memory errors are monitored with the following bits in the Condition Register. All other bits are unused.
is the decimal, hexadecimal (#H), octal (#Q), or binary (#B) value of the Condition Register bit to be unmasked. (The decimal values of bits 5 and 8 are 32 and 256.) The Event Register The Event Register latches transition events from the Condition Register as specified by the Transition Filter.
2. Unmask bit 4 (FREQ) in the Enable Register so that the event latched into the Event Register will generate a Questionable Signal Status Group summary bit. STATus:QUEStionable:ENABle 3. Unmask bit 3 (QUE) in the Service Request Enable Register so that a service request is generated when the Questionable Signal Status Group summary bit is received.
310 OUTPUT @Afg;":SOUR:FREQ2 10E6;"; !frequency 320 OUTPUT @Afg;":SOUR:FUNC:SHAP SQU;"; !function 330 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 1V" !amplitude 340 OUTPUT @Afg;"INIT:IMM" !wait_for_arm state 350 LOOP !loop continuously until frequency error occurs 360 END LOOP 370 SUBEND 380 ! 390 SUB Disp_msg 400 Disp_msg: !Subprogram which is called when output frequency 410 !varies from 10 MHz by more than 1%.
The Operation Status Group The Condition Register 15 14 13 The Operation Status Group monitors current operating conditions within the AFG. The specific conditions include: calibrating, sweeping, entering the wait-for-arm state, and execution of the INITiate:IMMediate command. Calibration, sweeping, waiting for an arm signal, and the INITiate:IMMediate command are monitored with the following bits in the Condition Register. All other bits are unused.
PTRansition sets the positive transition. For each bit unmasked, a 0 to 1 transition of that bit in the Condition Register sets the associated bit in the Event Register. is the decimal, hexadecimal (#H), octal (#Q), or binary (#B) value of the Condition Register bit to be unmasked. (Bits 0, 3, 6, and 8 have corresponding decimal values of 1, 8, 64, and 256.) The Event Register The Event Register latches transition events from the Condition Register as specified by the Transition Filter.
2. Unmask bit 6 (ARM) in the Enable Register so that the event latched into the Event Register will generate an Operation Status Group summary bit. STATus:OPERation:ENABle 3. Unmask bit 7 (OPR) in the Service Request Enable Register so that a service request is generated when the Operation Status Group summary bit is received. *SRE BASIC Program Example (OSG_RQS) 1 !RE-STORE "OSG_RQS" 2 !This program generates a service request when the AFG enters the 3 !wait-for-arm state.
320 OUTPUT @Afg;"SOUR:ROSC:SOUR INT1;"; !reference oscillator 330 OUTPUT @Afg;":TRIG:STAR:SOUR INT1;"; !frequency generator 340 OUTPUT @Afg;":SOUR:FREQ1:FIX 1E3;"; !frequency 350 OUTPUT @Afg;":SOUR:FUNC:SHAP SIN;"; !function 360 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 1V" !amplitude 370 OUTPUT @Afg;"ARM:STAR:LAY2:SOUR HOLD" !hold off arm signal 380 OUTPUT @Afg;"INIT:IMM;*OPC?" !set wait-for-arm state 390 ENTER @Afg;Ready 400 OUTPUT @Afg;"ARM:STAR:LAY2:IMM" !arm AFG (output signal) 410 SUBEND 420 ! 430 SUB Afg_
The Standard Event Status Group The Standard Event Status Register The Standard Event Status Group monitors command execution, programming errors, and the power-on state. It is the status group used by the error checking routine in the BASIC example programs found throughout the manual. The conditions monitored by the Standard Event Status Register are identified below.
The Standard Event Status Enable Register The Standard Event Status Enable Register specifies which bits in the Standard Event Status Register can generate a summary bit which is subsequently used to generate a service request. The AFG logically ANDs the bits in the Event Register with bits in the Enable Register, and ORs the results to obtain a summary bit.
BASIC Program Example (ERRORCHK) 1 !RE-STORE"ERRORCHK" 2 !This program represents the method used to check for programming 3 !errors in BASIC programs. 4 ! 10 !Assign I/O path between the computer and E1445A. 20 ASSIGN @Afg TO 70910 30 COM @Afg 40 !Define branch to be taken when an E1445A error occurs. 50 !Enable GPIB interface to generate an interrupt when an error 60 !occurs.
Visual BASIC and Visual C/C++ Program Versions The Status Byte Status Group The Status Byte Register The Visual BASIC example program, ERRORCHK.FRM, is in directory “ VBPROG” and the Visual C example program, ERRORCHK.C, is in directory “ VCPROG” on the CD that came with your Agilent E1445A. The registers in the Status Byte Status Group enable conditions monitored by the other status groups to generate a service request.
The Service Request Enable Register The Service Request Enable Register specifies which (status group) summary bit(s) will send a service request message to the computer over GPIB. The bits are specified (unmasked) with the command: *SRE All unmasked bits in the Enable Register can be determined with the command: *SRE? The Service Request Enable Register is cleared at power-on, or by specifying an value of 0.
Notes 444 AFG Status Chapter 9
Chapter 10 Block Diagram Description Chapter Contents This chapter shows how the Agilent E1445A 13-Bit Arbitrary Function Generator (AFG) operates. The sections are as follows: • AFG Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 445 • Arbitrary Waveform Description. . . . . . . . . . . . . . . . . . . . . . Page 446 • Generating Non-Sinusoid Arbitrary Waveforms. . . . . . . . . . - Output DAC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Arbitrary Waveform Description Refer to Figure 10-1. An arbitrary waveform is equally divided into points that are the actual voltage points of the waveform. The AFG stores these points as a waveform segment in its segment memory. The waveform segments are stored as Digital-to-Analog Converter (DAC) codes. The codes set the output DAC to the voltage values of the waveform. Figure 10-1. Arbitrary Waveform The segment sequence selects the waveform segment to be output for waveform generation.
Generating Non-Sinusoid Arbitrary Waveforms Refer to Figure 10-2. The following describes the blocks that generate non-sinusoid waveforms. Figure 10-2. AFG Simplified Block Diagram Output DAC The AFG uses the 13-bit DAC to generate the waveforms. Each time the AFG’s frequency generator clocks the DAC, the DAC outputs a voltage value that corresponds to the point value in the waveform segment. The bits set in the DAC determine the voltage value.
Memory Concurrent with the DAC, the frequency generator also clocks the segment memory to output the next code to set the DAC bits to the next point on the waveform. By clocking both the memory and DAC at a certain clock rate (i.e., sample rate), the AFG outputs a waveform at a frequency determined by the length and number of waveform segments and the sample rate. (See “ AFG Memory Description” on page 452 for more information on how the memory operates.
DDS Frequency Generator (Frequency1 Generator) Refer to Figure 10-3. This generator has excellent resolution and allows for frequency sweeping, frequency-shift-keying, and output frequency lists. However, its maximum frequency is the Reference Oscillator frequency divided by 4. Figure 10-3. Generating Waveforms Using a Frequency1 Generator To generate precision frequencies for the memory and output DAC clock, the output of the DDS frequency generator is applied to a DAC.
Trigger Circuitry The trigger circuitry advances the waveform to the next segment. The external trigger sources advances the waveform directly. Thus, the sample rate and resultant waveform frequency depend on the frequency of the applied triggers. Output Circuitry The output circuitry outputs the waveform at the front panel’s “ Output” connector. The circuitry sets the output amplitude, offset voltages, output impedances, and has a 250 kHz and a 10 MHz low-pass filter.
Output Circuitry Description Refer to Figure 10-6. The output circuitry consists of an output amplifier, attenuator, offset circuitry, and filter. The following describes the different parts of the circuitry. Figure 10-6. AFG Output Circuitry Attenuator The attenuator provides 30 dB attenuation in .01 dB steps for the output voltage. The AFG automatically sets the attenuator to the appropriate value dependent on the output amplitude selected by the user. The DC volts function does not use the attenuator.
AFG Memory Description The segment memory that stores the segment list as DAC codes can store the codes either in the Signed or Unsigned number format. This memory uses 16-bit integer values for the codes. To change the number format to a different format, the memory must be completely empty before selecting the different format. Because of hardware restrictions, the segment space in memory allocates for a multiple of 8 words for each waveform segment.
Appendix A Agilent E1445A Specifications Appendix Contents This appendix contains the Agilent E1445A Arbitrary Function Generator operating specifications. Except as noted, the specifications apply under the following conditions: • Period: 1 year • Temperature: 0°–55° C • Relative Humidity: ≤ 65% @ 0°–40° C • Warm up Time: 1 hour “ Typical” , “typ”, or “ nominal” values are non-warranted supplementary information provided for applications assistance.
Sequence Memory (This memory concatenates segments into larger waveforms): Size: 32768 entries Sequence Length: 1 to 32768 entries Number of Sequences: 1 to 128 Contents of Each Entry: Designator of which segment to output Loop Count: # times to repeat the designated segment (1 to 4096, default = 1) “Marker Enable” Bit: a mask (default = enabled) for the marker data in the specified segment System Use: When square, triangle, or ramp waveform is selected, one entry is used Frequency and Sample Rate
Frequency Generator #2: Internal Reference: 40.000000 MHz Rate Generation Method: Divide-by-N, or direct use of reference Range: Minimum : Maximum : Resolution : 305.175781 Sa/s (40/131072 MSa/s) 40.000000 MSa/s Not Applicable. Attainable rates are 40/N MSa/s where N = 1,2,3, and all even values up to 131072.
Frequency Agility: The capabilities in this section apply to all built-in standard waveforms and to all arbitrary waveforms generated with Frequency Generator #1 (i.e., the DDS timebase). Digital Sweep: Linear and Log phase-continuous (0.2 to 800 points/sec typical) (Note 1) Frequency List: Up to 256 points phase-continuous (0.
Amplitude Characteristics Low-Pass Filtering: Programmable choice of three configurations: 250 kHz (nominal 3 dB point) 5th-order Bessel 10 MHz (nominal 3 dB point) 7th-order Bessel No Filter Output Impedance (nominal): 50 Ω or 75 Ω (programmable) Output Disconnect: Uses a relay. Output is unterminated when relay is open. DAC Resolution (including sign): 13 bits (12 bits, sine waves only) monotonic to 11 bits DC Volt Function: into 50 Ω or 75 Ω: -5.12 to +5.11875 volts in nominal steps of 1.
Sine Wave Spectral Purity Output frequencies less than 250 kHz are characterized using the 250 kHz filter, higher output frequencies with the 10 MHz filter. Frequencies given below refer to the desired output sine wave (fc).
Interface Characteristics BNC Connector Functions TTL levels, except for analog output Outputs - analog output 50 Ω or 75 Ω nominal; or open “Output 50/75 Ohm” “Marker Out” - marker bits stored with arbitrary (This output is parallelwaveforms terminated with 50 Ω nominal) - reference frequency - waveform clock - a pulse indicating each waveform repetition - a level change at the start and the end of each burst of waveform repetitions - frequency change - phase change Inputs “Ref/Sample In” - external r
VXI ECLTrg Functions Input Functions - reference frequency in trigger source in (i.e. the waveform clock) start arm in (enables waveform clock) Output Functions - marker bits stored with arbitrary waveforms - reference frequency - waveform clock - a pulse indicating each waveform repetition - a level change at the start and the end of each burst of waveform repetitions - frequency change - phase change VXI TTLTrg Functions Input Functions - trigger source (i.e.
VME Register Access All hardware registers are mapped directly into VME A24 space, permitting advanced users to bypass the on-board uP. The manual documents a functional subset. While a waveform is running, waveform memory may not be loaded, but on-the-fly re-selection (Note 2) permits a new sequence to begin immediately upon completing the present sequence.
Notes 462 Agilent E1445A Specifications Appendix A
Appendix B Useful Tables Appendix Contents The tables in this appendix contain information often referred to during Agilent E1445A programming. The tables in this appendix include: • Table B-1. Agilent E1445A Example Program Listing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 464 • Table B-2. Agilent E1445A Command Coupling Groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 467 • Table B-3. Agilent E1445A Frequency Limits . .
Example Program Listing Table B-1. Agilent E1445A Example Program Listing Program Type Program Name Introductory Language Description SLFTST BASIC, Visual BASIC, Visual C/ C++ RSTCLS " Resetting and clearing the AFG. LRN " Power-on/reset configuration. ERRORCHK " Error checking program. RSTSINE " Sine wave output from reset settings. Standard Functions DCVOLTS BASIC, Visual BASIC, Visual C/ C++ (Chapter 2) SINEWAVE " 1kHz, 5Vp sine wave.
Table B-1. Agilent E1445A Example Program Listing (continued) Program Type Program Name Language Description Sweeping, Frequency Lists, Frequency-Shift Keying SMPLSWP1 BASIC, Visual BASIC, Visual C/ C++ LIST1 " 1 kHz, 10 kHz, 100 kHz, 1 MHz frequency list. (Chapter 4) SMPLSWP2 " 1 kHz to 21 kHz sweep using start and span frequencies. LISTDEF " Definite length arbitrary block frequency list LOG_SWP " Seven point logarithmic frequency sweep. SWP_PVST " Setting the sweep time.
Table B-1. Agilent E1445A Example Program Listing (continued) Program Type Program Name High-Speed Data Transfer Language SIGN_DAT BASIC, Visual BASIC, Visual C/ C++ UNS_DAT " Downloads arbitrary waveform data as unsigned DAC codes. DACBLOK1 " Downloads arbitrary waveform data as signed DAC codes in a definite length block DACBLOK2 " Downloads arbitrary waveform data as unsigned DAC codes in an indefinite length block.
Command Coupling Groups Table B-2.
Table B-2.
Table B-2.
Frequency Limits Table B-3.
Amplitude Limits Table B-4. Agilent E1445A Amplitude Limits Amplitude Limits for Volts* Function V (volts) VPK (volts peak) VPP (volts peak-to-peak) VRMS (volts rms) DC -5.12 to +5.11875 N/A N/A N/A SINusoid +.161869088 to +5.11875 +.161869088 to +5.11875 +.323738175 to +10.2375 +.114458730 to +3.61950284 SQUare +.161869088 to +5.11875 +.161869088 to +5.11875 +.323738175 to +10.2375 +.161869088 to +5.11875 TRIangle +.161869088 to +5.11875 +.161869088 to +5.11875 +.323738175 to +10.
Power-On/Reset Configuration Table B-5.
Table B-5. Agilent E1445A Power-On/Reset Configuration (continued) Parameter Command Power-on/Reset Setting Sweep spacing (points) :SWE:SPAC LINear Sweep time :SWE:TIME +1.000000000E+000 Stop trigger source TRIG:STOP:SOUR HOLD Sweep start source ARM:SWE:SOUR IMMediate Sweep advance source TRIG:SWE:SOUR TIMer Function :FUNC:SHAP SINusoid Ramp/triangle waveform points :RAMP:POIN +100 Ramp/triangle waveform polarity :RAMP:POL NORMal Output amplitude :VOLT:AMPL +1.
Table B-5. Agilent E1445A Power-On/Reset Configuration (continued) Parameter Command Power-on/Reset Setting "Marker Out" BNC state :MARK:STAT 1 (on) Output state OUTP:STAT 1 (on) Output filter frequency :FILT:FREQ +2.50000000E+005 Output filter state :FILT:STAT 0 (off) Phase modulation deviation :PM:DEV +0.
Error Messages Table B-6. Agilent E1445A Error Messages Code Message -101 Invalid character -102 Syntax error -103 Invalid separator -104 Data type error -108 Parameter not allowed -109 Missing parameter Command requires a parameter(s). -112 Program mnemonic too long Command keyword > 12 characters -113 Undefined header -121 Invalid character in number -123 Numeric overflow -124 Too many digits More than 256 digits were used to specify a number.
Table B-6. Agilent E1445A Error Messages (continued) 476 Code Message -161 Invalid block data -168 Block data not allowed -178 Expression data not allowed The parameter was specified as an expression (e.g. SOUR:FREQ1:FIX (A*B). -183 Invalid inside macro definition Voltage or segment list is inside a macro. -211 Trigger ignored -212 Arm ignored Arm was received and the AFG was not in the wait-for-arm state. Or, an arm was received from a source other than the specified source.
Table B-6. Agilent E1445A Error Messages (continued) Code Message -312 PUD memory lost -313 Calibration memory lost -330 Self-test failed -350 Too many errors -410 Query INTERRUPTED -420 Query UNTERMINATED -430 Query DEADLOCKED The E1445A’s input and output buffers are full and the AFG cannot continue. -440 Query UNTERMINATED after indefinite response Occurs when the *IDN? query is not the last query executed in a command string.
Table B-6. Agilent E1445A Error Messages (continued) Code 478 Message Description +1015 Illegal when SOUR:ARB:DAC not SOUR:LIST1 commands cannot be executed unless INT the DAC data source is internal. +1016 Illegal when VIN:LBUS:MODE not The operating mode for the local bus is "off" and CONS SOUR:ARB:DOWN is set to LBUS.
Table B-6. Agilent E1445A Error Messages (continued) Code Message +1109 Segment list length less than minimum +1110 Illegal sequence name Attempting to download to a sequence that doesn’t exist, or selecting a sequence name that’s the same as an existing segment name. +1111 Too many sequence names There are >256 sequence names defined. Use SOUR:LIST1:SSEQ:DEL:SEL to delete the current (selected) sequence, or SOUR:LIST1:SSEQ:DEL:ALL to delete all sequences.
Settings Conflict Error Messages Table B-7.
Table B-7.
Table B-7.
Appendix C Register-Based Programming Appendix Contents The Agilent E1445A Arbitrary Function Generator (AFG) is a message-based device. As such, it supports the VXI word-serial protocol used to transfer ASCII command strings and is capable of converting the SCPI commands it receives to reads and writes of its hardware registers. Register-based programming allows the user to access the hardware registers directly.
System Configuration The example programs and programming techniques shown in this appendix are based on the following system configuration: Mainframe: Agilent 75000 Series C (Agilent E1401) Controller: Agilent E1480A V/360 (select code 16) Programming Language: BASIC/UX (6.0) Agilent E1445A AFG: Logical address = 80 Each program uses a combination of SCPI commands and register reads/writes. In most cases, SCPI commands set up the AFG and initiate the waveform.
Reading the AFG’s Offset Register As shown in Figure C-1, the AFG’s configuration registers are mapped into the upper 25% of A16 address space. The Offset Register is one of the AFG’s configuration registers. Figure C-1.
In a system using a V/360 (Agilent E1480) controller, for example, the base address of the configuration registers is computed as: C00016 + (LADDR * 64)16 or 49,152 + (LADDR * 64) where C00016 (49,152) is the starting location of the register addresses, LADDR is the AFG’s logical address, and 64 is the number of address bytes in A16 per VXI device. The AFG’s factory set logical address is 80.
Changing the Output Frequency This section explains how the frequency of the output signal is changed instantaneously by writing frequency codes to the appropriate registers. The section shows how to change the frequency when either the direct-digital-synthesis ([SOURce:]FREQuency[1]) or divide-by-n ([SOURce:]FREQuency2) frequency synthesis method is used.
The Frequency Load Strobe Register Writing any value to the Frequency Load Strobe Register loads the contents of the Phase Increment Registers into the DDS micro-chip. Address 15–8 7 base + 8D16 unused 6 5 4 3 2 1 0 Strobe Data Stobe Data: Writing any value to this register loads the contents of the Phase Increment Registers into the DDS micro-chip. Once the data has been loaded, it takes 20 reference oscillator clock cycles for the new frequency to appear at the output.
Frequency Control Programs DDS Frequency Control The following programs demonstrate how to change the signal frequency while the waveform is currently at the AFG output. The FREQ_REG program changes the signal frequency that is generated using the DDS ([SOURce:]FREQ[1]) subsystem and the reference oscillator from any of the available sources. The program accesses the Phase Increment and Frequency Load Strobe Registers.
340 Output_function: !Subprogram which uses SCPI commands to set the 350 !42.94967296 MHz reference oscillator, to set DDS 360 !frequency synthesis, to set the output frequency/ 370 !function/amplitude, and to start the waveform.
Comments • To simplify the program, SCPI commands are included to select the reference oscillator, the DDS subsystem, and to start the waveform. This requires that the only registers written to be the Phase Increment and Frequency Load Strobe Registers. This program executes as intended when the SCPI commands in subprogram Output_function are executed before the registers are written to. • The subprogram Output_function sets the initial reference oscillator frequency to 42.94967296 MHz.
Divide-by-N Frequency Control The FREQ2_REG program changes the signal frequency that is generated using the Divide-by-N ([SOURce:]FREQuency2) subsystem and the reference oscillator from any of the available sources. The program accesses the Sample/Hold and ROSC/N Control Register, and the ROSC/N Divider Registers.
340 Output_function: !Subprogram which uses SCPI commands to set the 350 !40 MHz reference oscillator, to set divide-by-n 360 !frequency synthesis, to set the output frequency/ 370 !function/amplitude, and to start the waveform.
830 WRITEIO -16,Base_addr+IVAL("63",16);BINAND(Sample_hold,127) 840 SUBEND 850 ! 860 SUB Rst 870 Rst: !Subprogram which resets the E1445. 880 COM @Afg,Base_addr 890 OUTPUT @Afg;"*RST;*OPC?" !reset the AFG 900 ENTER @Afg;Complete 910 SUBEND Comments • To simplify the program, SCPI commands are included to select the reference oscillator, the divide-by-n subsystem and to start the waveform.
Changing the Signal Phase This section explains how the phase of a sine wave generated by the DDS ([SOURce:]FREQuency[1]) subsystem is changed by writing phase data to the Phase Modulation Registers.
Phase Control Program The PHAS_CHNG program demonstrates how to change the sine wave signal phase while the waveform is currently at the AFG output. BASIC Program Example (PHAS_CHNG) 1 !RE-STORE "PHAS_CHNG" 2 !This program changes the phase of the output signal by writing 3 !phase offset data to the phase modulation registers.
410 OUTPUT @Afg;":SOUR:VOLT:LEV:IMM:AMPL 5V" !amplitude 420 OUTPUT @Afg;"SOUR:PM:DEV 0DEG" !phase modulation angle 430 OUTPUT @Afg;"INIT:IMM" !wait_for_arm state 440 OUTPUT @Afg;"STAT:OPC:INIT OFF;*OPC?" !wait for INIT to complete 450 ENTER @Afg;Complete 460 SUBEND 470 ! 480 SUB Phase_change(Phase) 490 Phase_change: !Subprogram which changes the phase of the output signal 500 !by writing phase data to the registers on the AFG.
Selecting the Waveform Sequence This section shows how to select and output an arbitrary waveform without aborting the current waveform and re-initializing the AFG.
The Waveform Select Register The Waveform Select Register contains the location of the output sequence’s base address in sequence base memory. Address 15 14 13 base + A16 12 11 10 9 8 7–0 Waveform Index other control bits Waveform Index: The Waveform Index is the location in sequence base memory where the base address of the sequence in sequence memory is located. When specifying a waveform index it is recommended that you begin with an index of 1, then 2, and so on.
Sequence Selection Program The WAVE_SEL program shows how to change the output waveform (sequence) without aborting the current waveform and re-initializing the AFG.
400 A24_offset: !Subprogram which determines the base address for 410 !the AFG registers in A24 address space.
900 Wav_sel=READIO(-16,Base_addr+IVAL("A",16)) 910 WRITEIO -16,Base_addr+IVAL("A",16);Wav_sel 920 ! 930 !Select a waveform by writing to the Waveform Select register 940 !following a 0-to-1 transition of the WFUSED bit in the Status 950 !register. The transition indicates a new waveform can be selected. 960 !256 selects sequence 1, 512 selects sequence 2, and 768 selects 970 !sequence 3.
1390 ! 1400 OUTPUT @Afg;"SOUR:LIST1:SSEQ:SEL SEQ1" !sequence name 1410 OUTPUT @Afg;"SOUR:LIST1:SSEQ:DEF 1" !sequence size 1420 OUTPUT @Afg USING "#,K";"SOUR:LIST1:SSEQ:COMB #0" !segm execution order 1430 OUTPUT @Afg1;Sequence(*) !sequence list in indefinite length block 1440 OUTPUT @Afg;CHR$(10);END !terminate with Line Feed (LF) and EOI 1450 ! 1460 OUTPUT @Afg;"SOUR:LIST1:SSEQ:ADDR?" !sequence location 1470 ENTER @Afg;Seq1_addr 1480 SUBEND 1490 ! 1500 SUB Sind_def 1510 Sind_def: !Compute the damped sine wa
1880 ! 1890 OUTPUT @Afg;"SOUR:LIST1:SSEQ:ADDR?" !sequence location 1900 ENTER @Afg;Seq2_addr 1910 SUBEND 1920 ! 1930 SUB Spike_def 1940 Spike_def: !Compute the waveform (sine wave with spike). Download the 1950 !data as a combined list (voltage and marker) of signed 1960 !numbers in an indefinite length block. Download the sequence as 1970 !a combined list (repetition count, marker, and segment address) 1980 !in an indefinite length arbitrary block.
2370 OUTPUT @Afg;"SOUR:LIST1:SSEQ:DEF 1" !sequence size 2380 OUTPUT @Afg USING "#,K";"SOUR:LIST1:SSEQ:COMB #0" !segm execution order 2390 OUTPUT @Afg1;Sequence(*) !sequence list in indefinite length block 2400 OUTPUT @Afg;CHR$(10);END !terminate with Line Feed (LF) and EOI 2410 ! 2420 OUTPUT @Afg;"SOUR:LIST1:SSEQ:ADDR?" !sequence location 2430 ENTER @Afg;Seq3_addr 2440 SUBEND 2450 ! 2460 SUB Rst 2470 Rst: !Subprogram which resets the E1445.
Loading the DAC from the VXIbus This section shows how to load waveform data into the AFG’s DAC directly from the VXIbus backplane. For additional information on loading the DAC directly, refer to Chapter 7. The High Speed Data Register Waveform data from the VXIbus is loaded into the DAC via the following register.
180 CALL Dac_drive 190 END 200 ! 210 SUB A24_offset 220 A24_offset: !Subprogram which determines the base address for 230 !the AFG registers in A24 address space, then adds the 240 !offset and register number to the base to get the 250 !complete address.
Comments • To simplify the program, SCPI commands are included so that the only register written to is the High-Speed Data Register. This program executes as intended when those SCPI commands which configure the AFG are executed before the register is written to. • This program was written using the system configuration described on page 484. Data is written to the DAC at a rate of 115 µs per amplitude point, which is limited by the execution speed of BASIC.
Index Agilent E1445A User’s Manual *CLS, 47, 416 *DMC, 416 *EMC, 417 *EMC?, 417 *ESE, 417 *ESE?, 417 *ESR?, 418 *GMC?, 418 *IDN?, 419 *LMC?, 419 *LRN?, 48, 420 *OPC, 420 *OPC?, 421 *PMC, 421 *PUD, 422 *PUD?, 422 *RCL, 423 *RMC, 423 *RST, 47, 424 *SAV, 424 *SRE, 425 *SRE?, 425 *STB?, 426 *TRG, 426 *TST?, 46, 426 *WAI, 427 32-Bit Integer Data how BASIC transfers, 255 A A24 Address base address, 484, 486 query space, 407 Abbreviated SCPI Commands, 285 ABORt subsystem, 290 using, 196 waveforms, 196 AC Calibra
A (continued) output, default voltage units, 379 output, setting, 72-74, 377-380 voltage list effect, 113Arbitrary Block data, 156-157 frequency lists using, 130-132 SCPI command parameters, 286 Arbitrary Waveforms commands flowchart, 84-85 description, 446 doubling frequency, 155 FSK, using, 152-153 generating, 83-116 damped sine waves, 107-108 description, 86-87 exponential charge/discharge waveform, 108-109 half rectified sine waves, 111 marker pulses, 206 noise, 112 non-sinusoid, 447 sample programs, 10
B (continued) BASIC Language Programs (continued) FSK2, 150-151 FSK_ARB, 152-153 GATE, 184-185 LIST1, 125-126 LIST_STP, 194-195 LIST_TME, 139-140 LISTDEF, 131-132 LOCKSTEP, 177-180 LOG_SWP, 133-134 LRN, 48 MARKSEG1, 209-211 MARKSEG2, 213 MARKTRG, 215-217 MULSEG, 96-98 NOISE, 112 OSG_RQS, 437 OUTPLOAD, 70-71 OUTPUNIT, 73-74 PHAS_CHNG, 496-497 PHS_MOD, 76-77 QSSG_RQS, 433-434 RSTCLS, 47 RSTSINE, 51 SIGN_DAT, 227-228 SIN_D, 107-108 SIN_R, 111 SIN_X, 105-106 SINEWAVE, 59-60 SLFTST, 47 SMPLSWP1, 122-123 SMPLSWP2
C (continued) Combined (continued) segment sequence list, 250, 348-349 determining size, 280 format, 250, 260 query, 349 segments and sequences, 250-258 sequences, using, 250-258 signed data, using, 239-244 unsigned data, using, 245-249 waveform segment list format, 259 COMBSEQ Example Program, 255-258 COMBSIGN Example Program, 242-244 COMBUNS Example Program, 247-249 Command Module, GPIB port address, 22 Command Reference, 281-312 ABORt subsystem, 290 ARM subsystem, 291-297 CALibration subsystem, 298-305 *
C (continued) Commands (continued) [SOURce:]FREQuency[1], 319-329 [SOURce:]FREQuency2, 330-331 [SOURce:]FUNCtion, 332-333 [SOURce:]LIST[1], 334-357 [SOURce:]LIST2, 358-360 [SOURce:]MARKer, 361-364 [SOURce:]PM, 365-367 [SOURce:]RAMP, 368-369 [SOURce:]ROSCillator, 370-371 [SOURce:]SWEep, 372-376 [SOURce:]VOLTage, 377-380 *SRE, 425 *SRE?, 425 standard waveform generation, 54-55 STATus, 381-388 *STB?, 426 SYSTem, 389-390 *TRG, 426 TRIGger, 391-402 triggering, 172, 391-402 *TST?, 46, 426 types, 284 VINStrument,
D (continued) DAC Codes amplitude effects on, 280 incorrect, 280 output voltage points, 346 sending segment data with, 114 specifying format, 313-314 transferring in signed number format, 225, 240 in unsigned number format, 229, 245 DACBLOK1 Example Program, 232-234 DACBLOK2 Example Program, 236-238 Damped Sine Waves, generating, 107-108 Data arbitrary block, 156-157 byte size definite length blocks, 231 indefinite length blocks, 235 downloading directly into the DAC, 269-271, 506-508 segment into memory, 2
D (continued) Downloading (continued) into memory, 259-268 using backplane, 259 sources, 280 DRIFT Example Program, 220-222 Driving TTLTrg Trigger Lines, 162 E ECLTrg functions, 460 trigger lines, 204-205, 361-362 Embedded Controller, using, 23 *EMC, 417 *EMC?, 417 Enable Register, 383, 386 operation status group, 436 questionable signal status group, 432 Enabling analog output, 311 calibration corrections, 304-305 ECL trigger lines, 362 frequency doubling, 326 gate, 200 low-pass output filter, 309 m
E (continued) Example Programs (continued) SQUWAVE, 63-64 STOPTRIG, 181-182 SWP_ARB, 141-143 SWP_LEVL, 30-31, 145-146 SWP_PVST, 136-137 SWP_STEP, 191-192 SWP_TRIG, 188-189 TRIWAVE, 67-68 UNS_DAT, 230 VXIDOWN, 264-268 VXISRCE, 270-271, 506-508 WAVE_SEL, 500-505 WAVSELFP, 272-277 Executing coupled commands, 28, 288 SCPI commands, 288 several waveform segments, 93-98 Exponential Charge/Discharge Waveform generating, 108-109 EXT_ARM Example Program, 167-168 External reference oscillator frequency, 370 stop trig
F (continued) Frequency (continued) sweep advance source, 158 advance trigger, 201 arming, 190-192, 201, 295 commands flowchart, 118-119 count, 372 direction, 157, 373 sweep points, 374 sample rate, 160 spacing, 157, 375 time, 158-159, 376 triggering, 190-192, 399-402 using triggers, 186-189 synthesis modes, 197 vs.
G (continued) Generating (continued) ramp waves, 65-68 selecting amplitude levels, 72-74 selecting output loads, 69-71 selecting output units, 72-74 sine waves, 58-60 square waves, 61-64 triangle waves, 65-68 triangle waves, 65-68 waveforms shape selection, 332 using signed data, 225-228 using unsigned data, 229-230 Generators frequency1 characteristics, 454 description, 449 range, 116 SCPI commands, 319-329 frequency2 characteristics, 455 description, 449 SCPI commands, 330-331 Getting Started, 19-52 GPIB
G (continued) Lock-Stepping Multiple AFGs, 176-180 LOCKSTEP Example Program, 177-180 LOG_SWP Example Program, 133-134 Logarithmic Sweeping, 133-134, 319, 375 Logical Address, 22 description, 21 Low-pass Output Filter cut-off frequency, 308 disabling, 309 enabling, 309 LRN, 48 LRN Program Example, 48 *LRN?, 48, 420 M Mainframe, installing/removing modules, 25 Marker enable, 251 out BNC disabling marker signal, 364 enabling marker signal, 364 marker pulses, 204 output pulse, 342 selecting polarity, 364 selec
M (continued) Multiple (continued) SCPI commands, linking, 288 segment lists, 207-211 N Naming Segment Sequences, query, 348 Naming Waveform Segments, 86 query, 336 Negative Transition Filter, 384, 387, 431, 435 NOISE Example Program, 112 Noise, generating, 112 Non-Sinusoid Arbitrary Waveforms, 447 Number of arms, setting, 169-171 of frequency sweep points, 374 of marker points, determining, 222 of points, 87, 374 of points vs.
P PACKed Data Format, 335 Parameters arbitrary block, 286 boolean, 286 discrete, 286 MAXimum, using, 81 MINimum, using, 81 numeric, 286 optional, 287 query settings, 287 SCPI commands, 286-287 Password, changing, 302 PHAS_CHNG Example Program, 496-497 Phase control program, 496-497 registers, 495 increment registers, 487 load strobe register, 495 Phase Modulation, 75 commands, 365-367 data source, 366 default units, 367 deviation, 76, 365 enabling/disabling, 367 registers, 495 selecting deviation units, 80,
Q (continued) Query (continued) virtual instrument capacity, 408 VXIbus local bus test data, 406 waveform segment address, 336 combined list, 338 marker pulse list, 343 memory, 341 names, 116, 336 size, 116 voltage point list, 347 Questionable Signal Status condition register, 386, 431 enable register, 386, 432 event register, 386, 432 query contents, 387 group, 431-434 negative transition filter, 387, 431, 435 positive transition filter, 388 register, 381, 431-434 summary bit, 386 using, 432-434 Quick Refe
R (continued) Repetition Count, 251 segment sequence list, 353 output, 352 Repetition Frequency, determining, 87 Reset Configuration list, 472-474 query, 48 Resetting AFG, 47 example program, 47 Returning ASCii data format, 335, 358 definite block data format, 335, 358 PACKed data format, 335 REAL data format, 358 repetition count list length, 116 segment sequence list names, 116 waveform segment names, 116 *RMC, 423 ROSC/N Divider Register, 488 *RST, 47, 424 RSTCLS Program Example, 47 RSTSINE Program Examp
S (continued) Secondary GPIB Address, 22 Security Code enabling/disabling, 303 setting, 302 Segment data, downloading into DAC, 269-271, 506-508 into memory, 259-268 using backplane, 259 list combined, 239-250 waveform format, 259 determining size, 280 multiple, 207-211 marker pulses determining number, 222 multiple, 207-211 single, 212-213 memory characteristics, 453 determining amount, 113 freeing, 113 number of points, 87 sample rate, 87 sequence combined list, 348-349 data, 316 defining, 357 outputs, 35
S (continued) Setting AFG bus request level, 24 arming sources, 166-168, 294 sweeps, 295-296, 372 sources, 297 frequency lists, 124-126 logical address switch, 22 number of arms, 169-171 output amplitude, 72-74, 377-380 impedance, 69-71, 309 phase modulation deviation, 76, 365 security code, 302 servant area, 23 switch, 23 start arm slope, 293 source, 294 start trigger slope, 395 stop trigger slope, 398 waveform cycles per arm, 169-171 See also Selecting SIGN_DAT Example Program, 227-228 Signal marker enabl
S (continued) [SOURce:]LIST[1] Subsystem (continued) [:SEGMent]:FREE?, 341 [:SEGMent]:MARKer, 342 [:SEGMent]:MARKer:POINts?, 343 [:SEGMent]:MARKer:SPOint, 343 [:SEGMent]:SELect, 344 [:SEGMent]:VOLTage, 345-346 [:SEGMent]:VOLTage:DAC, 346 [:SEGMent]:VOLTage:POINts?, 347 :SSEQuence:ADDRess?, 347 :SSEQuence:CATalog?, 348 :SSEQuence:COMBined, 348 :SSEQuence:COMBined:POINts?, 349 :SSEQuence:DEFine, 350 :SSEQuence:DELete:ALL, 351 :SSEQuence:DELete[:SELected], 351 :SSEQuence:DWELl:COUNt, 352 :SSEQuence:DWELl:COUNt
S (continued) Standard Waveforms commands flowchart, 54-55 frequencies, setting, 331 generating, 53-82 ramp waves, 65-68 sine waves, 58-60 square waves, 61-64 triangle waves, 65-68 phase modulation data sources, 366 default angle units, 367 enabling/disabling, 367 selecting deviation units, 80, 365 using, 75-77 program comments, 78 selecting amplitude levels, 72-74 output loads, 69-71 output units, 72-74 Start arm slope, setting, 293 arm source, setting, 294 DC calibration, 300-301 frequencies, 121-123 sett
S (continued) Sweep advance source, 158 trigger, 201, 399 linking, 400 source, 401 time, 402 arm, linking, 296 arming, 190-192, 201, 295-297, 372 count, 156 setting, 295, 372 direction, 157, 373 linear, 375 points, 374 versus time, 135-137, 159 sources, setting, 297 spacing, 157 time, 158, 376 specifying, 158 versus points, 135-137, 159 triggering, 190-192, 399-402 using triggers, 186-189 with output leveling, 30-31 Sweeping and frequency lists, 120 and frequency-shift keying, 117-162 arbitrary waveforms, 1
T (continued) TRIGger Subsystem, 391-402 TRIG[:STARt]:COUNt, 392 TRIG[:STARt]:GATE:POLarity, 393 TRIG[:STARt]:GATE:SOURce, 393 TRIG[:STARt]:GATE:STATe, 394 TRIG[:STARt][:IMMediate], 395 TRIG[:STARt]:SLOPe, 395 TRIG[:STARt]:SOURce, 396 TRIG:STOP[:IMMediate], 397 TRIG:STOP:SLOPe, 398 TRIG:STOP:SOURce, 398 TRIG:SWEep[:IMMediate], 399 TRIG:SWEep:LINK, 400 TRIG:SWEep:SOURce, 401 TRIG:SWEep:TIMer, 402 Triggering and arming, 163-202 a frequency list, 193-195 a frequency sweep, 190-192 frequency sweeps and lists, 1
V (continued) Visual BASIC Language Programs, 32-39 ARBWAVE.FRM, 33-39 list of, 464-466 running a program, 32 system configuration, 32 using SICL, 32 Visual C/C++ Language Programs, 40-45 ARBWAVE.
W (continued) waveforms segment (continued) marker points, 222 memory, 113 freeing memory, 113 marker pulses, 337-338, 342-343 multiple marker pulses, 207-211 naming, 86 number of points, 87 output voltage, 337-338, 345-347 query memory, 336, 341 names, 116, 336 size, 116 reserving memory for, 339 sample rate, 87 selecting, 251, 344 single marker pulses, 212-213 storing in memory, 86-87 using combined, 250-258 combined sequence, 250-258 different, 93-98 sequence determining marker points, 222 memory, 113 fr
Notes 532 Agilent E1445A User’s Manual Index