HP (Hewlett-Packard) B Network Router User Manual


 
/* base address of (A24) offset register in A16 address space */
long base_addr = (0x1FC000 + (logical_addr * 64)) + 6;
float a24offst; /* A24 offset from A16 offset register */
char rd_addr[80]; /* command string variable */
/* Create the command string which reads the A24 base address */
sprintf(rd_addr, "DIAG:PEEK? %ld, %d", base_addr,16);
/* Send DIAG:PEEK? command */
IOOUTPUTS(CMD_MOD, rd_addr, strlen(rd_addr));
/* Read value from offset register */
IOENTER(CMD_MOD, &a24offst);
/* Multiply offset value by 256 for 24-bit address value */
a24offst *= 256.;
return (long)a24offst;
}
/****************************************************************************/
void rst_clr(void)
/****************************************************************************/
void check_error(char *func_tion)
Comments 1. VME Data Transfer Modes. There are two modes of VME data
transfers: real time and post measurement. In a real time data transfer
(shown in this program) accessing the digitizer’s data register triggers a
measurement and returns the A/D reading directly to the VME bus in the
same measurement cycle. The reading(s) is also stored in digitizer memory.
In a post measurement transfer, each data register access transfers a A/D
reading from digitizer memory to the VME bus.
2. Locating the Data Register. Access to the data register is through its
address which is mapped by the HP E1406 Command Module into A24
address space. The data register has an offset of 12 (0C
16
) which is added to
the A24 base address to form the complete register address. In the program,
the C function long get_base_addr(void) determines the A24 base address
by reading the digitizer’s offset register in A16 address space. Detailed
information on locating the data register can be found in Chapter 3 under
the section "VME Bus Data Transfers".
3. VME Bus Data Format. Data is transferred over the VME bus in the
digitizer’s packed data format. Readings are 16-bits or 32-bits depending on
the source specified by the
VINStrument[:CONFigure]:VME:FEED <source > command. The source
parameters are listed in Chapter 3 under the section "Setting the VME bus
Transfer Mode".
66 Usin
g
the Di
g
itizer Chapter 2