| Contents | Index |
Note Support for isenabled on C5000 processors will be removed in a future version. |
isenabled(rx,'channel')
isenabled(rx)
This function supports the following IDEs:
Texas Instruments Code Composer Studio v3
isenabled(rx,'channel') returns ans=1 when the RTDX channel specified by string 'channel' is enabled for read or write communications. When 'channel' has not been enabled, isenabled returns ans=0.
isenabled(rx) returns ans=1 when RTDX has been enabled, independent of any channel. When you have not enabled RTDX you get ans=0 back.
On the processor side, isenabled depends on RTDX to determine and report the RTDX status. Therefore the you must meet the following requirements to use isenabled.
The processor must be running a program when you query the RTDX interface.
You must enable the RTDX interface before you check the status of individual channels or the interface.
Your processor program must be polling periodically for isenabled to work.
Note For isenabled to return reliable results, your processor must be running a loaded program. When the processor is not running, isenabled returns a status that may not represent the true state of the channels or RTDX. |
With a program loaded on your processor, you can determine whether RTDX channels are ready for use. Restart your program to be sure it is running. The processor must be running for isenabled and enabled to function. This example creates a ticcs object IDE_Obj to begin.
IDE_Obj.restart
IDE_Obj.run('run');
IDE_Obj.rtdx.enable('ichan');
IDE_Obj.rtdx.isenabled('ichan')
MATLAB software returns 1 indicating that your channel 'ichan' is enabled for RTDX communications. To determine the mode for the channel, use IDE_Obj.rtdxto display the properties of object IDE_Obj.rtdx.

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |