Agilent Technologies N5183A MXG User Manual

Page 4

Advertising
background image

Contents

Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide

iv

Selecting IO Libraries for RS- 232 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

Setting Up the RS- 232 Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

Verifying RS- 232 Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

Character Format Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

If You Have Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

RS- 232 Programming Interface Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

Before Using the Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

Interface Check Using HP BASIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

Interface Check Using VISA and C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

Queries Using HP Basic and RS- 232 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

Queries for RS- 232 Using VISA and C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

Using USB (Agilent MXG) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

Selecting I/O Libraries for USB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

Setting Up the USB Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

3

Programming Examples

Using the Programming Interface Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

Programming Examples Development Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

Running C++ Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

Running C# Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

Running Basic Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

Running Java Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

Running MATLAB Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

Running Perl Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

Using GPIB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

Installing the GPIB Interface Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

GPIB Programming Interface Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

Before Using the GPIB Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

GPIB Function Statements (Command Messages) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

Interface Check using HP Basic and GPIB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

Interface Check Using NI- 488.2 and C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

Interface Check for GPIB Using VISA and C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

Local Lockout Using HP Basic and GPIB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

Local Lockout Using NI- 488.2 and C++. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

Queries Using HP Basic and GPIB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

Queries Using NI- 488.2 and Visual C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

Queries for GPIB Using VISA and C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

Generating a CW Signal Using VISA and C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

Generating an Externally Applied AC- Coupled FM Signal Using VISA and C . . . . . . . . . . 79

Generating an Internal FM Signal Using VISA and C . . . . . . . . . . . . . . . . . . . . . . . . . 81

Generating a Step- Swept Signal Using VISA and C++ . . . . . . . . . . . . . . . . . . . . . . . . . 83

Advertising
This manual is related to the following products: