Chapter 2
Programming Examples
Using This Chapter
This chapter provides examples and descriptions of the most common
operations using the HP E1418A. Use this chapter to gain an overview of how
to program the module, and to obtain programming hints. The examples
shown in this chapter are in ANSI C and use SCPI commands to control the
module. The SCPI commands are described in detail in Chapter 3 of this
manual. SCPI usage conventions and syntax rules are described beginning on
page 59.
This chapter is divided into the following sections:
•
Querying Module Identification and Configuration. . . . . . . . . Page 40
•
APPLy Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 45
•
Error Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 47
•
SOURce Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 50
•
Setting the Output Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 52
•
Controlling the Output Relay. . . . . . . . . . . . . . . . . . . . . . . . . Page 53
•
Triggering. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 54
•
Using *OPC? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Page 56
•
Combining Output Channels . . . . . . . . . . . . . . . . . . . . . . . . . Page 57
Program Examples
Example programs in ANSI C format are included on the driver CD
supplied with the HP E1418A. Most examples in this chapter are included.
The examples are ASCII files with the *.c extension.
Note
The int data type is system dependent. These examples were developed on
a system where int is a 16-bit integer. Other systems may define int to be a
different width.
In the examples, the HP VISA Transition Library is used for I/O operations
with the VXIbus. An HP command module (HP E1405/E1406) is used and
controlled via HP-IB.
To use the HP VISA Transition Library (abbreviated as VTL), include the
visa.h header file.
#include visa.h
Chapter 2
Programming Examples 39
Summary of Contents for E1418A
Page 6: ...Notes 6 Contents HP E1418A 8 16 Channel D A Converter Module ...
Page 10: ...Notes 10 HP E1418A User s Manual ...
Page 12: ...12 HP E1418A User s Manual ...
Page 105: ...TRIGger 105 HP E1418A SCPI Command Reference Chapter 3 ...
Page 111: ...Notes HP E1418A Command Quick Reference 111 HP E1418A SCPI Command Reference Chapter 3 ...
Page 135: ...135 HP E1418A Register Based Programming Appendix B ...
Page 157: ...Notes 156 HP E1418A Error Messages Appendix C ...
Page 170: ...Notes Appendix D Voltage Current Output Adjustment 169 ...
Page 174: ...Figure E 1 8 Channel Disassembly 172 Configuration and Disassembly Appendix E ...
Page 175: ...Figure E 2 16 Channel Disassembly Appendix E Configuration and Disassembly 173 ...
Page 192: ...Notes 192 HP E1418A 8 16 Channel D A Converter Module Index ...