MATLAB Link for Code Composer Studio Development Tools    

Details About the Link Properties

To use the links for CCS IDE and RTDX Interface you set values for:

Details of the properties associated with links to CCS IDE and RTDX Interface appear in the following sections, listed in alphabetical order by property name.

Many of these properties are object linking and embedding (OLE) handles. The MATLAB COM server creates the handles when you create links for CCS IDE and RTDX. You can manipulate the OLE handles using get, set, and invoke to work directly with the COM interface with which the handles interact.

apiversion

Property appversion contains a string that reports the version of the application program interface (API) for CCS IDE that you are using when you create a link. You cannot change this string. When you upgrade the API, or CCS IDE, the string changes to match. Use display to see the apiversion property value for a link. This example shows the appversion value for link cc.

Note that the API version is not the same as the CCS IDE version.

boardnum

Property boardnum identifies the target board referenced by a link for CCS IDE. When you create a link, you use boardnum to specify the board you are targeting. To get the value for boardnum, use ccsboardinfo or the CCS Setup utility from Texas Instruments. The CCS Setup utility assigns the number for each board installed on your system.

ccsappexe

Property ccsappexe contains the path to the CCS IDE executable file cc_app.exe. When you use ccsdsp to create a link, MATLAB determines the path to the CCS IDE executable and stores the path in this property. This is a read-only property. You cannot set it.

numchannels

Property numchannels reports the number of open RTDX communications channels for an RTDX link. Each time you open a channel for a link, numchannels increments by one. For new links numchannels is zero until you open a channel for the link.

To see the value for numchannels create a link to CCS IDE. Then open a channel to RTDX. Use get or display to see the RTDX link properties.

page

Property page contains the default value CCS IDE uses when the user does not specify the page input argument in the syntax for a function that access memory.

procnum

Property procnum identifies the processor referenced by a link for CCS IDE. When you create a link, you use procnum to specify the processor you are targeting. The CCS Setup Utility assigns a number to each processor installed on each board. To determine the value of procnum for a processor, use ccsboardinfo or the CCS Setup utility from Texas Instruments.

To identify a processor, you need both the boardnum and procnum values. For boards with one processor, procnum equals zero. CCS IDE numbers the processors on multiprocessor boards sequentially from 0 to the number of processors. For example, on a board with four processors, the processors are numbered 0, 1, 2, and 3.

rtdx

Property rtdx is a subclass of the ccsdsp link and represents the RTDX portion of a link for CCS IDE. As shown in the example, rtdx has properties of its own that you can set, such as timeout, and that report various states of the link.

In addition, you can create an alias to the rtdx portion of a link, as shown in this code example.

Now you can use rx with the functions in the MATLAB Link for Code Composer Studio, such as get or set. If you have two open channels, the display looks like the following

when the processor is from the C62 family.

rtdxchannel

Property rtdxchannel, along with numchannels and proctype, is a read-only property for the RTDX portion of a link for CCS IDE. To see the value of this property, use get with the link. Neither set nor invoke work with rtdxchannel.

rtdxchannel is a cell array that contains the channel name, handle, and mode for each open channel for the link. For each open channel, rtdxchannel contains three fields, as follows:

.rtdxchannel{i,1}
Channel name of the ith-channel, i from 1 to the number of open channels
.rtdxchannel{i,2}
Handle for the ith-channel
.rtdxchannel{i,3}
Mode of the ith-channel, either 'r' for read or 'w' for write

With four open channels, rtdxchannel contains four channel elements and three fields for each channel element.

timeout

Property timeout specifies how long CCS IDE waits for any process to finish. Two timeout periods can exist--one global, one local. You set the global timeout when you create a link for CCS IDE. The default global timeout value 10 s. However, when you use functions to read or write data to CCS IDE or your target, you can set a local timeout that overrides the global value. If you do not set a specific timeout value in a read or write process syntax, the global timeout value applies to the operation. Refer to the help for the read and write functions for the syntax to set the local timeout value for an operation.

version

Property version reports the version number of your RTDX software. When you create a link, version contains a string that reports the version of the RTDX application that you are using. You cannot change this string. When you upgrade the API, or CCS IDE, the string changes to match. Use display to see the version property value for a link. This example shows the appversion value for link rx.


  Link Properties Tutorial 2-1--Using Links and Embedded Objects