MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Manuel d'utilisateur Page 353

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 408
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 352
Writing and Reading Data
8-33
For example, suppose you write the string command *IDN? to the TDS 210
oscilloscope using the
fprintf function. As shown below, the string is first
written to the output buffer as six values.
The
*IDN? command consists of six values since the terminator is
automatically written. Moreover, the default data format for the
fprintf
function specifies that one value corresponds to one byte. For more information
about bytes and values, refer to “Bytes Versus Values” on page 8-11.
fprintf
and the terminator are discussed in “Writing Text Data” on page 8-34.
s=serial('COM1');
fopen(s)
fprintf(s,'*IDN?')
...
*IDN?
6 values
6 bytes
MATLAB Output Buffer
Bytes used during write
Bytes unused during write
Vue de la page 352
1 2 ... 348 349 350 351 352 353 354 355 356 357 358 ... 407 408

Commentaires sur ces manuels

Pas de commentaire