AMX AXP-AI8 ANALOG 8-INPUT BOARD Manuel d'utilisateur Page 22

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 25
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 21
DNA/DNR-AI-217 Simultaneous Sampling Differential Analog Input Board
Chapter 2 18
Programming with the High Level API
Tel: 508-921-4600 www.ueidaq.com Vers: 4.5
Date: April 2013 DNx-AI-217 Chap2x.fm
© Copyright 2013
United Electronic Industries, Inc.
2.6 Read Data Reading data is done using reader object(s). There is a reader object to read
raw data coming straight from the A/D converter. There is also a reader object to
read data already scaled to volts or mV/V.
The following sample code shows how to create a scaled reader object and
read samples.
CUeiAnalogScaledReader aiReader(aiSession.GetDataStream());
double data[2];
aiReader.ReadSingleScan(data);
2.7 Cleaning-up
the Session
aiSession.CleanUp();
The session object will clean itself up when it goes out of scope or when it is
destroyed. To reuse the object with a different set of channels or parameters,
you can manually clean up the session as follows:
// create a reader and link it to the analog-input session’s stream
// the buffer must be big enough to contain one value per channel
// read one scan, where the buffer will contain one value per channel
// clean up the session
Vue de la page 21
1 2 ... 17 18 19 20 21 22 23 24 25

Commentaires sur ces manuels

Pas de commentaire