HP E1340A User manual

Contents
HP E1340A Arbitrary Function Generator User’s Manual
Warranty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
WARNINGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Safety Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Declaration of Conformity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Reader Comment Sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1. Getting Started with the HP E1340A . . . . . . . . . . . . . . . . . . . . . . . . 15
Chapter Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Preparation for Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Installing the AFG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Downloading the AFG Device Driver . . . . . . . . . . . . . . . . . . . . . . . . 15
AFG Logical Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Addressing the AFG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Instrument and Programming Languages . . . . . . . . . . . . . . . . . . . . . . . . . 19
SCPI Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
SCPI Command Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Command Coupling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
How to Execute Coupled Commands . . . . . . . . . . . . . . . . . . . . . . . . 21
HP IBASIC Language Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
C Language Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
QuickBASIC Language Programs . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Introductory Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
AFG Self-Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Resetting and Clearing the AFG . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Querying the Power-On/Reset Configuration . . . . . . . . . . . . . . . . . . . . 37
Checking for Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Generating a Sine Wave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
HP E1340A Example Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
2. Generating Standard Waveforms with the HP E1340A . . . . . . . . . . . . . . 41
Chapter Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Standard Waveforms Flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Generating DC Voltages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
C and QuickBASIC Program Versions . . . . . . . . . . . . . . . . . . . . . . . . 44
Generating Sine, Triangle, and Square Waves . . . . . . . . . . . . . . . . . . . . . . 45
C and QuickBASIC Program Versions . . . . . . . . . . . . . . . . . . . . . . . . 46
Generating Ramp Waves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
C and QuickBASIC Program Versions . . . . . . . . . . . . . . . . . . . . . . . . 49
Selecting the Amplitude Levels and Output Units . . . . . . . . . . . . . . . . . . . . 50
C and QuickBASIC Program Versions . . . . . . . . . . . . . . . . . . . . . . . . 51
Program Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Reference Oscillator Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Output Load Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Contents HP E1340A Arbitrary Function Generator User’s Manual 1

Output Units Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Using MINimum and MAXimum Parameters . . . . . . . . . . . . . . . . . . . . 53
3. Generating Arbitrary Waveforms with the HP E1340A . . . . . . . . . . . . . . 55
Chapter Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Arbitrary Waveforms Flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
How the AFG Generates Arbitrary Waveforms . . . . . . . . . . . . . . . . . . . . . . 56
Generating a Simple Arbitrary Waveform . . . . . . . . . . . . . . . . . . . . . . . . 59
C and QuickBASIC Program Versions . . . . . . . . . . . . . . . . . . . . . . . . 62
Executing Several Waveform Segments . . . . . . . . . . . . . . . . . . . . . . . . . 65
C and QuickBASIC Program Versions . . . . . . . . . . . . . . . . . . . . . . . . 68
Arbitrary Waveform Hopping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
C and QuickBASIC Program Versions . . . . . . . . . . . . . . . . . . . . . . . . 72
Generating Built-In Arbitrary Waveforms . . . . . . . . . . . . . . . . . . . . . . . . 73
C and QuickBASIC Program Versions . . . . . . . . . . . . . . . . . . . . . . . . 75
Sample Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Generating a Damped Sine Wave . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Generating an Exponential Charge/Discharge Waveform . . . . . . . . . . . . . . 78
Generating a Sine Wave with Spikes . . . . . . . . . . . . . . . . . . . . . . . . . 79
Generating a Half-Rectified Sine Wave . . . . . . . . . . . . . . . . . . . . . . . 80
Program Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Amplitude Effects on Voltage List . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Reference Oscillator Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Waveforms in the EPRom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
4. HP E1340A Sweeping and Frequency-Shift Keying . . . . . . . . . . . . . . . 83
Chapter Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
The Command Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Programming Flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Sweeping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Sweeping Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Sweeping Using Start and Stop Frequencies . . . . . . . . . . . . . . . . . . . . . 85
C and QuickBASIC Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Sweeping Using Start and Span Frequencies . . . . . . . . . . . . . . . . . . . . . 88
C and QuickBASIC Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Sweep Points Vs. Sweep Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
C and QuickBASIC Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Frequency-Shift Keying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Program Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Program Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Reference Oscillator Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
AFG Frequency Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Frequency Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
2 HP E1340A Arbitrary Function Generator User’s Manual Contents

5. HP E1340A Arming and Marker Outputs . . . . . . . . . . . . . . . . . . . . . 95
Chapter Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
The ARM Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
The ARM States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Initiating Waveforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Arming the AFG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Arming Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Setting the
Arm Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Setting the Arm and Waveform Cycle Count . . . . . . . . . . . . . . . . . . . . 99
Gating the Waveforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Aborting Waveforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Marker Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Marker Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Available Marker Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Generating Zero Crossing Marker Pulses . . . . . . . . . . . . . . . . . . . . . . 104
Program Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Reference Oscillator Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
AFG Frequency Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
AFG Arming Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
AFG Arm Count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Waveform Repetition Count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Enabling the Gate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
6. HP E1340A High Speed Operation . . . . . . . . . . . . . . . . . . . . . . . . . 109
Chapter Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Using DAC Data to Generate Waveforms . . . . . . . . . . . . . . . . . . . . . . . . 109
Program Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Using Definite Length Blocks to Transfer Data . . . . . . . . . . . . . . . . . . . . . . 113
Definite Length Block Data Format . . . . . . . . . . . . . . . . . . . . . . . . . 113
Data Byte Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Program Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Using the VXIbus Backplane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Using the VXIbus Backplane to Download Segment Data . . . . . . . . . . . . . 120
Downloading Segment Data into Memory . . . . . . . . . . . . . . . . . . . . . . 120
Downloading Directly into the DAC . . . . . . . . . . . . . . . . . . . . . . . . . 120
Program that Downloads and Executes Waveform Segments in Memory . . . . . . 120
Program to Download Directly to the DAC . . . . . . . . . . . . . . . . . . . . . 126
Program Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Amplitude Effects on DAC Codes . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Incorrect AFG Operation from Incorrect DAC Codes . . . . . . . . . . . . . . . . 129
Contents HP E1340A Arbitrary Function Generator User’s Manual 3

7. HP E1340A Command Reference . . . . . . . . . . . . . . . . . . . . . . . . . 131
Chapter Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Command Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Common Command Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
SCPI Command Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Command Separator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Abbreviated Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Implied (Optional) Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
SCPI Command Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Parameter Types, Explanations, and Examples . . . . . . . . . . . . . . . . . . . 134
Optional Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Querying
Parameter
Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
SCPI Command Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Command Coupling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Linking Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
SCPI Command Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
ABORt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
ARM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
[:STARt][:LAYer[1]] :COUNt . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
[:STARt]:LAYer2 :COUNt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
[:STARt]:LAYer2 :SLOPe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
[:STARt]:LAYer2 :SOURce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
CALibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
:AC:BEGin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
:AC:POINt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
:DATA:AC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
:DATA[:DC] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
[:DC]:BEGin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
[:DC]:POINt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
:STATe:AC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
INITiate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
[:IMMediate] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
OUTPut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
:IMPedance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
:LOAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
[SOURce:]ARBitrary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
:DAC:SOURce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
:DOWNload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
:DOWNload :COMPlete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
[SOURce:]FREQuency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
:CENTer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
[:CW|:FIXed] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
:FSKey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
:MODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
:SPAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
:STARt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
4 HP E1340A Arbitrary Function Generator User’s Manual Contents

:STOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
[SOURce:]FUNCtion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
[:SHAPe] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
:USER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
[SOURce:]LIST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
[:SEGMent] :CATalog? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
[:SEGMent]:DEFine? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
[:SEGMent]:SELect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
[:SEGMent]:VOLTage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
[:SEGMent]:VOLTage:DAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
[:SEGMent]:VOLTage:POINts? . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
:SSEQuence :CATalog? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
:SSEQuence :DEFine? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
:SSEQuence:SELect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
:SSEQuence :SEQuence? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
:SSEQuence :SEQuence :SEGMents? . . . . . . . . . . . . . . . . . . . . . . . . 166
[SOURce:]MARKer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
:FEED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
:POLarity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
[SOURce:]RAMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
:POLarity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
[SOURce:]ROSCillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
:FREQuency :EXTernal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
:GATE:STATe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
:SOURce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
[SOURce:]SWEep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
:COUNt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
:POINts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
:TIME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
[SOURce:]VOLTage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
[:LEVel][:IMMediate] [:AMPLitude] . . . . . . . . . . . . . . . . . . . . . . . . 177
[:LEVel][:IMMediate] [:AMPLitude]:UNIT [:VOLTage] . . . . . . . . . . . . . . 179
[:LEVel][:IMMediate]:OFFSet . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
STATus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
:OPERation |QUEStionable :CONDition? . . . . . . . . . . . . . . . . . . . . . . 182
:OPERation |QUEStionable :ENABle . . . . . . . . . . . . . . . . . . . . . . . . 182
:OPERation |QUEStionable [:EVENt]? . . . . . . . . . . . . . . . . . . . . . . . 183
:OPERation |QUEStionable :NTRansition . . . . . . . . . . . . . . . . . . . . . . 183
:OPERation |QUEStionable :PTRansition . . . . . . . . . . . . . . . . . . . . . . 184
:PRESet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
SYSTem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
:ERRor? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
:VERSion? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
TRIGger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
[:STARt]:COUNt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
[:STARt]:SOURce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
IEEE-488.2 Common Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Contents HP E1340A Arbitrary Function Generator User’s Manual 5

*CLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
*DMC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
*EMC and *EMC? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
*ESE and *ESE? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
*ESR? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
*GMC? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
*IDN? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
*LMC? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
*LRN? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
*OPC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
*OPC? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
*PMC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
*RCL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
*RMC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
*RST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
*SAV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
*SRE and *SRE? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
*STB? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
*TST? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
*WAI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
SCPI Conformance Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
8. HP E1340A AFG Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Status System Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
The Operation Status Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
The Standard Event Status Group . . . . . . . . . . . . . . . . . . . . . . . . . . 207
The Status Byte Status Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Using the Standard Event Status Group . . . . . . . . . . . . . . . . . . . . . . . 210
9. HP E1340A Block Diagram Description . . . . . . . . . . . . . . . . . . . . . . 211
Chapter Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
AFG Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
What is an Arbitrary Waveform? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Generating Waveforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Output DAC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Reference Oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Frequency Generators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Output Circuitry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Microprocessor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Input/Output Connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
A. HP E1340A Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Appendix Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Instrument Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
General and VXI Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
6 HP E1340A Arbitrary Function Generator User’s Manual Contents

B. HP E1340A Useful Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Appendix Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
C. HP E1340A Register-Based Programming . . . . . . . . . . . . . . . . . . . . 229
Appendix Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Register Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
The Base Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Computer Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Throughput Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Embedded Computer Programming (C-Size Systems) . . . . . . . . . . . . . . . . 232
IBASIC Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
External Computer Programming . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Programming Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Register Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
The READ Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
The ID Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
The Device Type Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
The Status Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
The Query Response Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
The WRITE Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
The Control Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
The Command and Parameter Registers . . . . . . . . . . . . . . . . . . . . . . . 238
The Input Data Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Command Descriptions and Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Setting the Output Function and Loading RAM . . . . . . . . . . . . . . . . . . . 243
Setting the Signal Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Setting the Output Attenuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Setting the Amplitude Offset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Setting the Sweep Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Setting the Burst Count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
The AFG Output Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Starting the Waveform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Querying the AFG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
AFG Soft Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Aborting the Waveform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Program Timing and Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
AFG Reset Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Configuring the AFG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Querying AFG Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Example Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Opcode/Parameter Quick Reference . . . . . . . . . . . . . . . . . . . . . . . . . 256
Generating a
Sine Wave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Multiple Waveforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Internally Triggering a Burst of Cycles . . . . . . . . . . . . . . . . . . . . . . . . 260
Externally Triggering a Burst of Cycles . . . . . . . . . . . . . . . . . . . . . . . 261
Frequency-Shift Keying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Contents HP E1340A Arbitrary Function Generator User’s Manual 7

Waveform Hopping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Sweeping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Gating the Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Downloading an Arbitrary Waveform . . . . . . . . . . . . . . . . . . . . . . . . 266
Fast Frequency Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Sending Data Directly to the DAC . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Example Program Subprograms . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
Querying AFG Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Notes
8 HP E1340A Arbitrary Function Generator User’s Manual Contents

Certification
Hewlett-Packard Company certifies that this product met its published specifications at the time of shipment from the factory. Hewlett-
Packard further certifies that its calibration measurements are traceable to the United States National Institute of Standards and Tech-
nology (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.
Warranty
This Hewlett-Packard product is warranted against defects in materials and workmanship for a period of three years from date of ship-
ment. Duration and conditions of warranty for this product may be superseded when the product is integrated into (becomes a part of)
other HP products. During the warranty period, Hewlett-Packard Company will, at its option, either repair or replace products which
prove to be defective.
For warranty service or repair, this product must be returned to a service facility designated by Hewlett-Packard (HP). Buyer shall pre-
pay shipping charges to HP and HP shall pay shipping charges to return the product to Buyer. However, Buyer shall pay all shipping
charges, duties, and taxes for products returned to HP from another country.
HP warrants that its software and firmware designated by HP for use with a product will execute its programming instructions when
properly installed on that product. HP does not warrant that the operation of the product, or software, or firmware will be uninterrupted
or error free.
Limitation Of Warranty
The foregoing warranty shall not apply to defects resulting from improper or inadequate maintenance by Buyer, Buyer-supplied prod-
ucts or interfacing, unauthorized modification or misuse, operation outside of the environmental specifications for the product, or im-
proper site preparation or maintenance.
The design and implementation of any circuit on this product is the sole responsibility of the Buyer. HP does not warrant the Buyer’s
circuitry or malfunctions of HP products that result from the Buyer’s circuitry. In addition, HP does not warrant any damage that oc-
curs as a result of the Buyer’s circuit or any defects that result from Buyer-supplied products.
NO OTHER WARRANTY IS EXPRESSED OR IMPLIED. HP SPECIFICALLY DISCLAIMS THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Exclusive Remedies
THE REMEDIES PROVIDED HEREIN ARE BUYER’S SOLE AND EXCLUSIVE REMEDIES. HP SHALL NOT BE LIABLE
FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER BASED ON CON-
TRACT, TORT, OR ANY OTHER LEGAL THEORY.
Notice
The information contained in this document is subject to change without notice. HEWLETT-PACKARD (HP) MAKES NO WAR-
RANTY OF ANY KIND WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WAR-
RANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. HP shall not be liable for errors contained
herein or for incidental or consequential damages in connection with the furnishing, performance or use of this material. This docu-
ment contains proprietary information which is protected by copyright. All rights are reserved. No part of this document may be photo-
copied, reproduced, or translated to another language without the prior written consent of Hewlett-Packard Company. HP assumes no
responsibility for the use or reliability of its software on equipment that is not furnished by HP.
Restricted Rights Legend
Use, duplication or disclosure by the U.S. Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
Technical Data and Computer Software clause in DFARS 252.227-7013.
Hewlett-Packard Company
3000 Hanover Street
Palo Alto, California 94304 U.S.A.
Rights for non-DOD U.S. Government Departments and Agencies are as set forth in FAR 52.227-19 (c) (1,2).
HP E1340A Arbitrary Function Generator Module User’s Manual
Edition 3
Copyright © 1995 Hewlett-Packard Company. All Rights Reserved.
HP E1340A Arbitrary Function Generator Module User’s Manual 9

Frame or chassis ground terminal—typi-
cally connects to the equipment’s metal
frame.
Alternating current (AC).
Direct current (DC).
Indicates hazardous voltages.
Calls attention to a procedure, practice, or
condition that could cause bodily injury or
death.
Calls attention to a procedure, practice, or con-
dition that could possibly cause damage to
equipment or permanent loss of data.
Indicates the field wiring terminal that must
be connected to earth ground before operat-
ing the equipment—protects against electri-
cal shock in case of fault.
Instruction manual symbol affixed to prod-
uct. Indicates that the user must refer to the
manual for specific WARNING or CAU-
TION information to avoid personal injury
or damage to the product.
or
WARNINGS
The following general safety precautions must be observed during all phases of operation, service, and repair of this product.
Failure to comply with these precautions or with specific warnings elsewhere in this manual violates safety standards of design,
manufacture, and intended use of the product. Hewlett-Packard Company assumes no liability for the customer’s failure to
comply with these requirements.
Ground the equipment: For Safety Class 1 equipment (equipment having a protective earth terminal), an uninterruptible safety earth
ground must be provided from the mains power source to the product input wiring terminals or supplied power cable.
DO NOT operate the product in an explosive atmosphere or in the presence of flammable gases or fumes.
For continued protection against fire, replace the line fuse(s) only with fuse(s) of the same voltage and current rating and type.
DO NOT use repaired fuses or short-circuited fuse holders.
Keep away from live circuits: Operating personnel must not remove equipment covers or shields. Procedures involving the removal
of covers or shields are for use by service-trained personnel only. Under certain conditions, dangerous voltages may exist even with the
equipment switched off. To avoid dangerous electrical shock, DO NOT perform procedures involving cover or shield removal unless
you are qualified to do so.
DO NOT operate damaged equipment: Whenever it is possible that the safety protection features built into this product have been im-
paired, either through physical damage, excessive moisture, or any other reason, REMOVE POWER and do not use the product until
safe operation can be verified by service-trained personnel. If necessary, return the product to a Hewlett-Packard Sales and Service Of-
fice for service and repair to ensure that safety features are maintained.
DO NOT service or adjust alone: Do not attempt internal service or adjustment unless another person, capable of rendering first aid
and resuscitation, is present.
DO NOT substitute parts or modify equipment: Because of the danger of introducing additional hazards, do not install substitute
parts or perform any unauthorized modification to the product. Return the product to a Hewlett-Packard Sales and Service Office for
service and repair to ensure that safety features are maintained.
Documentation History
All Editions and Updates of this manual and their creation date are listed below. The first Edition of the manual is Edition 1. The Edi-
tion number increments by 1 whenever the manual is revised. Updates, which are issued between Editions, contain replacement pages
to correct or add additional information to the current Edition of the manual. Whenever a new Edition is created, it will contain all of
the Update information for the previous Edition. Each new Edition or Update also includes a revised copy of this documentation his-
tory page.
Edition 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . January, 1992
Update 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . August, 1992
Edition 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . March, 1993
Edition 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . April, 1995
Safety Symbols
WARNING
CAUTION
10 HP E1340A Arbitrary Function Generator Module User’s Manual

Declaration of Conformity
according to ISO/IEC Guide 22 and EN 45014
Manufacturer’s Name: Hewlett-Packard Company
Loveland Manufacturing Center
Manufacturer’s Address: 815 14th Street S.W.
Loveland, Colorado 80537
declares, that the product:
Product Name: Arbitrary Function Generator
Model Number: E1340A
Product Options: All
conforms to the following Product Specifications:
Safety: IEC 1010-1 (1990) Incl. Amend 1 (1992)/EN61010-1 (1993)
CSA C22.2 #1010.1 (1992)
UL 1244
EMC: CISPR 11:1990/EN55011 (1991): Group1 Class A
IEC 801-2:1991/EN50082-1 (1992): 4kVCD, 8kVAD
IEC 801-3:1984/EN50082-1 (1992): 3 V/m
IEC 801-4:1988/EN50082-1 (1992): 1kV Power Line
.5kV Signal Lines
Supplementary Information: The product herewith complies with the requirements of the Low Voltage Directive
73/23/EEC and the EMC Directive 89/336/EEC and carries the CE-marking accordingly.
Tested in a typical configuration in an HP B-Size VXI mainframe.
European contact: Your local Hewlett-Packard Sales and Service Office or Hewlett-Packard GmbH, Department
HQ-TRE, Herrenberger Straße 130, D-71034 Böblingen, Germany (FAX +49-7031-14-3143).
April, 1995 Jim White, QA ManagerApril, 1995 Jim White, QA Manager
HP E1340A Arbitrary Function Generator Module User’s Manual 11

Notes
12 HP E1340A Arbitrary Function Generator Module User’s Manual

Reader Comment Sheet
HP E1340A Arbitrary Function Generator Module User’s Manual
Edition 3
You can help us improve our manuals by sharing yourcomments and suggestions. In appreciation of your time, we will
enter you in a quarterly drawing for a Hewlett-Packard Palmtop Personal Computer (U.S. government employees
cannot participate in the drawing).
Please list the system controller, operating system, programming language, and plug-in modules you are using.
Please pencil-in one circle for each statement below: Disagree Agree
•Thedocumentationiswellorganized. OOOOO
•Instructions are easy to understand. OOOOO
•Thedocumentationisclearlywritten. OOOOO
•Examples are clear and useful. OOOOO
•Illustrations are clear and helpful. OOOOO
•Thedocumentationmeetsmyoverallexpectations. OOOOO
Please write any comments or suggestions below--be specific.
cut along this line
fold here
Your Name
Company Name
Job Title
Address
City, State/Province
Country
Zip/Postal Code
Telephone Number with Area Code
BUSINESS REPLY MAIL
FIRST CLASS PERMIT NO. 37 LOVELAND, CO
HEWLETT-PACKARD COMPANY
Learning Products Department
P.O. Box 301
Loveland, CO 80539-9984
NO POSTAGE
NECESSARY
IF MAILED
IN THE
UNITED STATES
Measurement Systems Division
fold here
Please fold and tape for mailing

14 HP E1340A Arbitrary Function Generator Module User’s Manual

Chapter 1
Getting Started with the HP E1340A
Chapter Contents
This chapter shows you how to configure, install, and begin using the
HP E1340A Arbitrary Function Generator (AFG). The main sections of this
chapter include:
•Preparation for Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 15
Installing the AFG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 15
Downloading the AFG Device Driver. . . . . . . . . . . . . . . . Page 15
AFG Logical Address. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 17
Addressing the AFG. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 18
•Instrument and Programming Languages . . . . . . . . . . . . . . . Page 19
HP IBASIC Language Programs. . . . . . . . . . . . . . . . . . . . Page 22
C Language Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 25
QuickBASIC Language Programs. . . . . . . . . . . . . . . . . . . Page 31
•Introductory Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 36
AFG Self-Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 36
Resetting and Clearing the AFG . . . . . . . . . . . . . . . . . . . . Page 37
Querying the Power-On/Reset Configuration . . . . . . . . . . Page 37
Checking for Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 38
Generating a Sine Wave. . . . . . . . . . . . . . . . . . . . . . . . . . . Page 40
•HP E1340A Example Programs . . . . . . . . . . . . . . . . . . . . . . Page 40
Preparation for Use
This section shows how to prepare the AFG for use. Included are
instructions to install the AFG, to download the AFG Device Driver, and to
address the AFG.
Installing the AFG The AFG can be installed in any mainframe slot, except slot 0. For
installation instructions in a B-Size VXIbus System, refer to the B-size
Installation and Getting Started Guide. For installation instructions in
C-Size VXIbus Systems, refer to the C-size Installation and Getting Started
Guide.
Downloading the
AFG Device Driver The HP E1340A AFG driver allows the AFG to operate in an
HP E1300/E1301 Mainframe or HP E1405/E1406 Command Module using
the Standard Commands for Programmable Instruments (i.e., SCPI)
instrument command language. The driver is supplied on the AFG’s
example program disks (see “Instrument and Programming Languages” on
page 19 for more information on the disks).
15 Getting Started with the HP E1340A Chapter 1

The procedure for downloading the driver is contained in the HP
Installation Note Downloading Device Drivers. The E1300/E1301
Mainframe Manual,HP E1405 Command Module Manual, and E1406
Command Module Manual also contain the installation procedure.
Mainframe/Command
Module Requirements To download a driver, the ROM version number of the HP E1300/E1301
Mainframe or HP E1405 Command Module must be A.06.00 or above. To
determine the version number, send the IEEE 488.2 common command
*IDN?. A typical returned value (for the HP E1300A Mainframe) is:
HEWLETT-PACKARD,E1300A,0,A.06.01
where "A.06.01" is the version number.
Recommended
Systems to Download
the Drivers
The AFG instrument driver can be downloaded with the following systems.
HP BASIC with an External HP-IB Controller
This system downloads the driver over the Hewlett-Packard Interface Bus
(HP-IB*) with an HP BASIC controller, like the HP Series 200/300
computer. Be sure to connect the computer to the Mainframe’s / Command
Module’s HP-IB port. The program to download the driver is named
“VXIDLD_GET”, and is in GET/SAVE format. The program is located on
the HP IBASIC example program disk (HP part number E1340-10035).
This disk is formatted in the LIF format.
HP IBASIC in an HP E1300/E1301 Mainframe or
HP E1405/E1406 Command Module
This system downloads the drivers using the HP IBASIC (i.e., HP
Instrument BASIC) program language. The language comes with options to
the HP E1300/E1301 Mainframe and the HP E1405/E1406 Command
Modules. IBASIC reads disks formatted in either the LIF or MS-DOS®
format and can use either example program disk (dependent on your disk
drive). To download the driver from the LIF disk or the DOS disk, use
“AUTOST”.
Externally Connected MS-DOS® Computer
This system downloads the driver using an MS-DOS computer over the
RS-232 serial interface. Connect the computer to the Mainframe’s /
Command Module’s RS-232 port. The program to download the driver is
named “VXIDLD.EXE” and is located on the DOS example program disk
(HP part number E1340-10036). This disk is formatted for MS-DOS.
Chapter 1 Getting Started with the HP E1340A 16
*HP-IB is Hewlett-Packard’s implementation of IEEE Std 488.1-1978

AFG Logical
Address The AFG is shipped from the factory with a logical address setting of 80,
as shown in Figure 1-1.
The E1340A AFG logical address is used:
•to place the AFG in the servant area of a commander
(e.g. HP E1405/E1406 Command Module).
•to address the AFG (see “Addressing the AFG” later in this chapter).
Figure 1-1. Setting the Logical Address
17 Getting Started with the HP E1340A Chapter 1

Assigning the AFG to a
Commander In VXIbus systems, each device must be in the servant area of a
commander. Note the following when assigning the E1340A AFG:
•In a B-size system, the system instrument is the commander. Any
AFG logical address (1 - 255) places the AFG in the commander
servant area. The AFG logical address should remain at 80, or if
necessary, set to some other multiple of 8 (see “Addressing the
AFG”).
•The E1340A AFG is a register-based device. If the AFG’s driver is
downloaded in the HP E1405/E1406 Command Module, then the
AFG must be in the servant area of the Command Module to
program with SCPI commands.
Addressing the AFG The following information explains how the AFG is addressed using
differentcomputer (controller) configurations.
IBASIC To program the AFG in a B-size or C-size system using IBASIC, the AFG
must have a unique address. The address is a combination of the IBASIC
interface select code, the Mainframe’s/Command Module’s primary HP-IB
address, and the AFG’s secondary HP-IB address. An address in this form
in an HP IBASIC statement appears as:
OUTPUT 80910;"SOUR:ROSC:SOUR INT"
Interface Select Code (8): The IBASIC interface select code is 8. This
select code is used to access all devices installed in B-size and C-size
systems under IBASIC control.
Primary HP-IB Address (09): This is the address of the HP-IB port on the
Mainframe or Command Module. Valid addresses are 0 to 30. The
mainframe/command module has a factory set address of 9.
Secondary HP-IB Address (10): This address is derived from the logical
address of the device (AFG) by dividing the logical address by 8. For the
E1340A AFG factory set logical address of 80, the secondary address is 10.
External Controller
and PC When programming the AFG from an external computer such as a HP
Series 300 or PC, the addressing convention used is the same as IBASIC
except for the interface select code. An example is shown below:
OUTPUT 70910;"SOUR:ROSC:SOUR INT"
Interface Select Code (7): Determined by the address of the HP-IB
interface card in the computer. In most Hewlett-Packard computers, this
card has a factory set address of 7, including the HP 82335 HP-IB Interface
Card (this card was used with an HP Vectra personal computer to create the
C and QuickBASIC example programs).
The Primary HP-IB Address and Secondary HP-IB Address are the
same as described previously for IBASIC programming.
Chapter 1 Getting Started with the HP E1340A 18

Instrument and Programming Languages
The purpose of this manual is to teach you how to use the E1340A AFG. To
do this, the manual uses block diagrams, flowcharts, and example programs.
The programs shown in the manual are SCPI programs written in HP
IBASIC. These programs, and QuickBASIC and C language versions of the
programs are on the following disks which ship with the manual:
•HP E1340A Instrument Driver and HP IBASIC Example Programs -
3.5" 720 kbyte disk (E1340-10035)
•HP E1340A Instrument Driver and QuickBASIC and C Language
Example programs - 3.5" 1.44 Mbyte disk (E1340-10036)
SCPI Programming SCPI (Standard Commands for Programmable Instruments) is an
ASCII-based instrument command language designed for test and
measurement instruments. The HP E1300/E1301 Mainframe or
HP E1405/E1406 Command Module with the AFG driver installed
interprets the ASCII command strings and sets the AFG accordingly. The
Mainframe/Command Module does this by writing to the AFG registers.
SCPI Command
Structure The AFG SCPI command set is found in Chapter 7. SCPI commands are
based on a hierarchical structure, also known as a tree system. In this
system, associated commands are grouped together under a common node
or root, thus, forming subtrees or subsystems. An example is the AFG’s
’ARM’ subsystem shown below.
ARM
[:STARt|SEQuence[1]]
[:LAYer[1]]
:COUNt <number>
:LAYer2
:COUNt <number>
:SLOPe <edge>
:SOURce <source>
ARM is the root keyword of the command, :STARt|SEQuence1 is the
second level keyword, :LAYer1 and :LAYer2 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
19 Getting Started with the HP E1340A Chapter 1

A semicolon (;) is used to separate two commands within the same
subsystem, and can also save typing. For example, sending this command
message:
ARM:LAY2:SOUR EXT;SLOP POS;COUN 10
Is the same as sending these three commands:
ARM:LAY2:SOUR EXT
ARM:LAY2:SLOP POS
ARM:LAY2:COUN 10
Manual Format The typical format of commands listed in the command reference and
throughout this manual is:
[SOURce:]FREQuency:MODE <mode>
Command headers enclosed in brackets are optional. UPPER CASE letters
in the header are required, lower case letters can be omitted. To aid in
learning the AFG command set, all headers are included in the example
programs; however, the headers are abbreviated. In an example
program, the previous statement with a mode parameter of FIX would
appear as:
SOUR:FREQ:MODE FIX
Command Coupling Many of the AFG SCPI commands are value coupled. This means that the
value set by one command may affect the valid limits for the values of other
commands. This can result in "Settings Conflict" errors when the program
executes. To prevent these errors, the AFG commands must be executed in
a "Coupling Group".
The AFG uses one coupling group. Commands not in the coupling group
must precede or follow commands in the coupling group. Executing
uncoupled commands in the coupling group breaks the coupling and can
cause a "Settings Conflict" error.
The coupling group and associated commands can be found in Appendix B,
Table B-2.
Chapter 1 Getting Started with the HP E1340A 20
Other manuals for E1340A
1
Table of contents
Other HP Inverter manuals
Popular Inverter manuals by other brands

Sensata
Sensata Magnum-Dimensions MagnaSine MS-G Series owner's manual

Controlled power company
Controlled power company UltraLITE Series owner's manual

Solplanet
Solplanet ASW LT-G2-Pro Series user manual

ToolPRO
ToolPRO PLU 553024 instruction manual

NewMar
NewMar 24-1000RM Installation & operation manual

RNG
RNG KIT-STCS60D owner's manual