HP E1429A manual Using the Digitizer, Programming Language

Models: E1429A

1 420
Download 420 pages 44.04 Kb
Page 49
Image 49

Chapter 2

Using the Digitizer

Chapter Contents

This chapter contains example programs that show you how to use the digitizer. The programs, which demonstrate the various features of the digitizer, are presented in the same sequence as the features are covered in Chapter 3 - "Understanding the Digitizer". The examples in this chapter include:

Configuring the Digitizer Input . . . . . . . . . . . . . . . . . . . . . . . 50 Taking a Burst of Readings . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Level Arming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Pre- and Post-Arm Readings . . . . . . . . . . . . . . . . . . . . . . . . . 53 Specifying a Sample Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Dual Rate Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Using Multiple Digitizers . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Using the Packed Data Format . . . . . . . . . . . . . . . . . . . . . . . 59 VME Bus Data Transfers. . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

VME_REAL.C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 VME_•SEG1.C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

VME Bus Data Transfers Using an Embedded

Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 SEGTST16.CPP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 SEGTST32.CPP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Local Bus Data Transfers. . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 LOCAL_AD.C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 LBUS2PST.C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 LBUSAUTO.C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

Using the Digitizer Status Registers . . . . . . . . . . . . . . . . . . . 101

Using the Programs Each example program listed in this chapter (and on the example programs disk) begins with the CONFigure command, and then uses lower-level digitizer commands (Chapter 1, Table 1-3) to customize the configuration. Using this format, the programs can easily be modified to match your application.

The Programming Language

Each example in this chapter lists only the digitizer’s SCPI commands, with the exception of the VME and Local bus data transfer programs. The I/O (input/output) constructs of the programming language you use need to be added to the programs. Note that the example programs disk (HP P/N E1429-10302) contains copies of the programs compiled and tested using Borland Turbo C++ © Version 1.0 and Microso ft® QuickC© Version 2.0. The program name is shown prior to the program listing in the chapter.

Chapter 2

Using the Digitizer 49

Page 49
Image 49
HP E1429A manual Using the Digitizer, Programming Language