MATLAB XPC TARGET 4 - DEVICE DRIVERS Dokumentacja Strona 88

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 653
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 87
3 GPIB I/O Support
3-22
GPIB_Message(1).RecData = ’%f%d’;
GPIB_Message(1).OutputPorts = [1 -1];
The code %d reads the length of data and the -1 discards the length. Using the
modified xPC Target
rd command, you would write
GPIB_message(1).Command = ’rd #20 16’;
GPIB_message(1).RecData = ’%f’;
GPIB_message(1).OutputPorts = [1];
Automatic Addition of Escape Characters - The message interpreter
automatically places the correct escape characters at the end of the message
fields
.Command, .SendData, and .Ack. However, if you add the escape
characters, then the message interpreter does not add additional characters.
The escape characters that are:
\\, \a, \b, \f, \r,\t, \v, \’, \’’, and \n.
For example, you can write
GPIB_Message.Command = ’wrt 16\n’;
GPIB_Message.SendData = ’:conf:volt:dc\r’;
GPIB_Message.Ack = ’10\n\r’;
or you can write the following, and the appropriate escape characters are
added.
GPIB_Message.Command = ’wrt 16’;
GPIB_Message.SendData = ’:conf:volt:dc’;
GPIB_Message.Ack = ’10’;
Przeglądanie stron 87
1 2 ... 83 84 85 86 87 88 89 90 91 92 93 ... 652 653

Komentarze do niniejszej Instrukcji

Brak uwag