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); rst_clr(ADDR_A); rst_clr(ADDR_MEM); configure(); initiate();

}

/* reset generator digitizer */ /* reset appender digitizer */ /* reset memory card */

/* configure the digitizers and the memory card */ /* 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 Using the Digitizer

Chapter 2

Page 88
Image 88
HP E1429A manual On Next