Programming instructions
Programming Examples
GPIB Programming Examples
Chapter 234
GPIB Programming Examples
• “Interface Check using Agilent BASIC” on page 35
• “Interface Check Using NI-488.2 and C++” on page 36
• “Interface Check using VISA and C” on page 37
• “Local Lockout Using Agilent BASIC” on page 38
• “Local Lockout Using NI-488.2 and C++” on page 39
• “Queries Using Agilent BASIC” on page 41
• “Queries Using NI-488.2 and C++” on page 43
• “Queries Using VISA and C” on page 45
• “Generating a CW Signal Using VISA and C” on page 47
• “Generating an Externally Applied AC-Coupled FM Signal Using VISA and C” on page 49
• “Generating an Internal AC-Coupled FM Signal Using VISA and C” on page 51
• “Generating a Step-Swept Signal Using VISA and C” on page 53
• “Saving and Recalling States Using VISA and C” on page 55
• “Reading the Data Questionable Status Register Using VISA and C” on page 57
• “Reading the Service Request Interrupt (SRQ) Using VISA and C” on page 60
Before Using the Examples
If the Agilent GPIB interface card is used, then the Agilent VISA library should be installed
along with Agilent SICL. If the National Instruments PCI-GPIB interface card is used, the
NI-VISA library along with the NI-488.2 library should be installed. Refer to “2. Selecting I/O
Libraries for GPIB” on page 7 and the documentation for your GPIB interface card for details.
NOTE Agilent BASIC addresses the signal generator at 719. The GPIB card is
addressed at 7 and the signal generator at 19. The GPIB address designator for
other libraries is typically GPIB0 or GPIB1.