MATLAB EMBEDDED IDE LINK 4 - FOR USE WITH TEXAS INSTRUMENTS CODE COMPOSER STUDIO Guía de usuario Pagina 60

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 575
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 59
2 Automa tion Interface
12 17
13 18
Because a 5-by-2 matrix requires ten elements, MATLAB software reads
one message into
outdata to ll th e matrix.
17 To check your progress, see how many messages remain in the queue. You
have read eight messages from the queue so 12 should remain.
num_of_msgs = cc.rtdx.msgcount('ochan')
num_of_msgs =
12
18 To demonstrate the connection between messages and a matrix in MATLAB
software, read data from
'ochan' to lla4-by-5matrixinyourworkspace.
outdata = cc.rtdx.readmat('ochan','int16',[4 5])
outdata =
10 14 18 13 17
11 15 19 14 18
12 16 11 15 19
13 17 12 16 20
Filling the matrix required two messages w orth of data.
19 To ve rify that the last step used two messages, recheck the message count.
You should nd 10 messages waiting in the queue.
num_of_msgs = cc.rtdx.msgcount('ochan')
20 Continuing with matrix reads, ll a 10-by-5 matrix (50 matrix elements or
ve messages).
outdata = cc.rtdx.readmat('ochan','int16',[10 5])
outdata =
12 13 14 15 16
13 14 15 16 17
14 15 16 17 18
2-38
Vista de pagina 59
1 2 ... 55 56 57 58 59 60 61 62 63 64 65 ... 574 575

Comentarios a estos manuales

Sin comentarios