Agilent Technologies FS2010 Guide de l'utilisateur Page 54

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 160
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 53
54 Agilent VISA User’s Guide
3 Programming with VISA
/* Initialize device */
viPrintf(vi, "*RST\n");
/* Set up device and send a comma-separated
list */
viPrintf(vi, "CALC:DBM:REF 50\n");
viPrintf(vi, "MEAS:VOLT:AC? %,2f\n", list);
/* Read results */
viScanf(vi, "%lf", &res);
/* Print results */
printf("Measurement Results: %lf\n", res);
/* Close session */
viClose(vi);
viClose(defaultRM);
}
Using Non-Formatted I/O
There are two non- buffered, non- formatted I/O functions
that synchronously transfer data called viRead and viWrite.
Also, there are two non- formatted I/O functions that
asynchronously transfer data called viReadAsync and
viWriteAsync. These are raw I/O functions and do not
intermix with the formatted I/O functions.
Non-Formatted I/O Functions
The non- formatted I/O functions follow. For more
information, see the viRead, viWrite, viReadAsync,
viWriteAsync, and viTerminate functions in the VISA Online
Help.
viRead. The viRead function synchronously reads raw
data from the session specified by the vi parameter and
stores the results in the location where buf is pointing.
Only one synchronous read operation can occur at any
one time.
viRead(vi, buf, count, retCount);
Vue de la page 53
1 2 ... 49 50 51 52 53 54 55 56 57 58 59 ... 159 160

Commentaires sur ces manuels

Pas de commentaire