This generates an object listing that has the same name as the program name
with an OBJ extension. This object file must be linked to the HP-IB library.
Second, link the HP-IB library:
link <
path \program name
>
After prompted for a run file, press the Enter key. The executable file with
an EXE extension is then generated.
QuickBASIC Program
Example
The following is an example program written in QuickBASIC using the HP
82335 HP-IB Interface Card. The program:
•
sends commands to the AFG to generate an arbitrary waveform
•
receives data from the AFG
•
shows how to send coupled commands
•
performs error checking of the AFG
’ ARB_GEN.BAS - This program generates a 4096 points ramp. The data to
’ generate the ramp is transferred to the AFG as voltages
DECLARE SUB GenSeg ()
DECLARE SUB CmdExe (Commands$(), Length%)
DECLARE SUB SendData (Commands$, WaveSeg!(), NumSize%)
DECLARE SUB RstClr ()
DECLARE SUB CheckError (FuncType$)
DECLARE SUB RunQuery ()
COMMON SHARED ADDR&, ISC&
REM $INCLUDE: ’QBSETUP’
ISC& = 7 ’Assigns the HP-IB select code
ADDR& = 70910 ’Assign an I/O path between the computer and the AFG
CALL RstClr ’ Reset the AFG
CALL GenSeg ’ Generate segment list and output sequence
CALL RunQuery ’ Query segment name
END
SUB CheckError (FuncType$)
Max.Length% = 160: Actual.Length% = 0
Continued on next page
Chapter 1
Getting Started with the HP E1340A 32
Summary of Contents for E1340A
Page 12: ...Notes 12 HP E1340A Arbitrary Function Generator Module User s Manual ...
Page 14: ...14 HP E1340A Arbitrary Function Generator Module User s Manual ...
Page 42: ...Chapter 2 Generating Standard Waveforms with the HP E1340A 42 ...
Page 54: ...Chapter 2 Generating Standard Waveforms with the HP E1340A 54 ...
Page 58: ...Chapter 3 Generating Arbitrary Waveforms with the HP E1340A 58 ...
Page 84: ...Chapter 4 HP E1340A Sweeping and Frequency Shift Keying 84 ...
Page 130: ...Chapter 6 HP E1340A High Speed Operation 130 ...
Page 202: ...202 HP E1340A SCPI Conformance Information Chapter 7 ...
Page 218: ...218 HP E1340A Specifications Appendix A ...
Page 284: ...284 HP E1340A Register Based Programming Appendix C ...
Page 295: ...Index HP E1340A Arbitrary Function Generator User s Manual 295 ...