HP E1429A manual VMESEG1.C

Models: E1429A

1 420
Download 420 pages 44.04 Kb
Page 67
Image 67

4.System Configuration. The system configuration on which the program VME_REAL.C was developed is listed on page 1-10.

VME_SEG1.C

/* VME_SEG1.C - This program demonstrates how to transfer segmented readings */ /* over the VME bus. The program sets up 2 bursts (segments) of 10 pre-arm */

/* and 10 post-arm readings. A reading is taken each time the digitizer’s */

/* data register is accessed, and is transferred real time, over the VME bus. */ /* Before the next burst is taken, bit 1 of (offset) register 43h is */

/* monitored to determine when the next segment of readings can be taken. */

/* 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 70905L

/* I/O path from the PC to the digitizer */

#define CMD_MOD 70900L /* Path from the PC to the Command Module */

/* Function Prototypes */

long get_base_addr(void); void rst_clr(void);

void ad_conf(void);

void ad_read(long base_addr); void check_error(char *func_tion);

/****************************************************************************/

void main(void)/* run the program */

{

long base_addr;

/* variable for digitizer A24 base address */

clrscr();

 

rst_clr();

/* reset the digitizer */

base_addr = get_base_addr();

/* function call to get digitizer */

 

/* A24 base address */

ad_conf();

/* function call which configures the digitizer */

ad_read(base_addr);

/* function call which reads the digitizer */

 

/* data register */

}

Chapter 2

Using the Digitizer 67

Page 67
Image 67
HP E1429A manual VMESEG1.C