HP (Hewlett-Packard) B Network Router User Manual


 
LBUS2PST.C This program transfers readings in digitizer memory from two digitizers to
the HP E1488 memory card. The program shows how the digitizers are used
in the Local bus GENerate and APPend modes.
/* LBUS2PST.C - This program demonstrates how to transfer readings in */
/* digitizer memory from multiple digitizers to the E1488 memory card. The */
/* leftmost digitizer is set to GENerate mode and the inner digitizer is set */
/* to the APPend mode. */
/* 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 Disk */
#define ADDR_G 70905L /* I/O path from the PC to the generator digitizer */
#define ADDR_A 70906L /* I/O path from the PC to the appender digitizer */
#define ADDR_MEM 70903L /* I/O path from the PC to the memory card */
/* Function Prototypes */
void rst_clr(long address);
void configure(void);
void initiate(void);
void check_error(char *func_tion, long address);
/****************************************************************************/
void main(void) /* run the program */
{
rst_clr(ADDR_G); /* reset generator digitizer */
rst_clr(ADDR_A); /* reset appender digitizer */
rst_clr(ADDR_MEM); /* reset memory card */
configure(); /* configure the digitizers and the memory card */
initiate(); /* initiate the digitizers and the memory card; */
/* retrieve the readings from the memory card */
}
/****************************************************************************/
void configure(void)
{
int length = 0, loop = 0;
/* use the "digitizer1" array to configure the generator digitizer */
Continued on Next Page
88 Usin
g
the Di
g
itizer Chapter 2