HP (Hewlett-Packard) B Network Router User Manual


 
4. Packed Reading Conversion Formula. The equation for converting
packed readings to voltages is:
reading
voltage
= (reading
packed
/ 16) * reading resolution
The reading resolutions, which are a function of the signal range, are listed
in Chapter 3 in the section "Converting Packed Readings".
VME Bus Data Transfers
The following programs demonstrate:
how post-arm readings are transferred from the digitizer’s A/D
converter directly to the VME bus (VME_REAL.C)
how segmented readings (pre- and post-arm) are transferred from the
digitizer’s A/D converter directly to the VME bus (VME_SEG1.C)
how segmented, 32-bit readings (channel 2 and channel 1 combined)
are transferred from the A/D converter to the VME bus
The system configuration on which programs VME_REAL.C and
VME_SEG1.C were developed is listed on page 1-10.
VME_REAL.C
/* VME_REAL.C - This program reads data directly from the digitizer’s A/D */
/* converter and places it on the VME (VXI data transfer) bus. Each time the */
/* digitizer’s data register is accessed, a measurement is triggered and the */
/* reading is transferred to the VME bus during the same reading cycle. */
/* Include the following header files */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <cfunc.h> /* This file is from the HP-IB Command Library */
#define ADDR 70905L /* I/O path between the digitizer and PC */
#define CMD_MOD 70900L /* I/O path between the digitizer and the Command Module */
Continued on Next Page
Chapter 2 Usin
g
the Di
g
itizer 63