Technical data

Contents
v
Queries for GPIB Using VISA and C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Generating a CW Signal Using VISA and C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Generating an Externally Applied AC- Coupled FM Signal Using VISA and C . . . . . . . . . . 95
Generating an Internal FM Signal Using VISA and C. . . . . . . . . . . . . . . . . . . . . . . . . . 97
Generating a Step- Swept Signal Using VISA and C++ . . . . . . . . . . . . . . . . . . . . . . . . . 99
Generating a Swept Signal Using VISA and Visual C++ . . . . . . . . . . . . . . . . . . . . . . . 100
Saving and Recalling States Using VISA and C. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Reading the Data Questionable Status Register Using VISA and C . . . . . . . . . . . . . . . . 105
Reading the Service Request Interrupt (SRQ) Using VISA and C . . . . . . . . . . . . . . . . . 109
Using 8757D Pass- Thru Commands (PSG with Option 007 Only) . . . . . . . . . . . . . . . . . 113
LAN Programming Interface Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
VXI- 11 Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
VXI- 11 Programming Using SICL and C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
VXI- 11 Programming Using VISA and C++. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Sockets LAN Programming and C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Queries for Lan Using Sockets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Sockets LAN Programming Using Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Sockets LAN Programming Using Perl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
TCP- IP (LAN) Programming Using Matlab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
RS- 232 Programming Interface Examples (ESG/PSG Only) . . . . . . . . . . . . . . . . . . . . . . . . 152
Before Using the Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Interface Check Using HP BASIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Interface Check Using VISA and C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Queries Using HP Basic and RS- 232 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Queries for RS- 232 Using VISA and C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
4 Programming the Status Register System
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Overall Status Byte Register Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Status Register Bit Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Example: Enable a Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Example: Query a Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Accessing Status Register Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Determining What to Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Deciding How to Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Status Register SCPI Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Status Byte Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Status Byte Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Service Request Enable Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Status Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177