HP E1429A Manuel d'utilisateur Page 38

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 420
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 37
MEAS.C
/* MEAS.C - This program demonstrates how to take readings using the */
/* digitizer’s MEASure command. In this program, MEASure configures the */
/* digitizer to take 10 readings on the 5V range, using the differential */
/* input port. */
/* 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 PC to the digitizer, via the E1406 */
/* Function Prototypes */
void rst_clr(void);
void ad_meas(void);
void check_error(char *func_tion);
/****************************************************************************/
void main(void) /* run the program */
{
rst_clr(); /* reset the digitizer */
ad_meas(); /* function which configures the digitizer and makes */
/* the measurement */
}
/****************************************************************************/
void ad_meas(void)
{
int i = 0, readings = 10;
float *rdgs;
/* dynamically allocate memory for readings */
rdgs = malloc(10 * sizeof(float));
Continued on Next Page
38 Getting Started Chapter 1
Vue de la page 37
1 2 ... 33 34 35 36 37 38 39 40 41 42 43 ... 419 420

Commentaires sur ces manuels

Pas de commentaire