MATLAB XPC TARGET 4 - DEVICE DRIVERS Specifications Page 88

  • Download
  • Add to my manuals
  • Print
  • Page
    / 653
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 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’;
Page view 87
1 2 ... 83 84 85 86 87 88 89 90 91 92 93 ... 652 653

Comments to this Manuals

No comments