MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Bedienungsanleitung Seite 353

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 408
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 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
Seitenansicht 352
1 2 ... 348 349 350 351 352 353 354 355 356 357 358 ... 407 408

Kommentare zu diesen Handbüchern

Keine Kommentare