User`s guide
readmat
Caution If the timeout period expires before the output data matrix is
fully populated, you lose all the messages read from the channel to
that point.
MATLAB software suppo rts readin g five data types with readmat:
datatype String Data Format
'double'
Double-precision fl oating point values. 64 bits.
'int16'
16-bit signed integers
'int32'
32-bit signed integers
'single'
Single-precision floating point values. 32 bits.
'uint8'
Unsigned 8-bit integers
data = readmat(rx,channelname,'datatype',siz) reads a matrix
of data from an RTDX channel configured for read access.
datatype
defines the type of data to read, and channelname speci fies the queue
to read.
readmat reads the desired data from the RTDX link specified
by
rx.
Examples In this data read and wr ite example, you write data to the processor
through the CCS IDE. You can then read the data back in two ways —
either through
read or through readmsg.
To duplicate this e xample you need to have a p rogram loaded on the
processor. The channels listed in this ex ample,
ichannel and ochannel,
must be defined in the loaded program. If the current program on the
processor defines different channels, replace the listed channels with
your current ones.
cc = ticcs;
rx = cc.rtdx;
open(rx,'ichannel','w');
enable(rx,'ichannel');
7-121