Skip to Main Content Skip to Search
Product Documentation

isenabled - Determine whether RTDX link is enabled for communications

Syntax

isenabled(rx,'channel')
isenabled(rx)

IDEs

This function supports the following IDEs:

Description

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.

Important Requirements for Using isenabled

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.

  1. The processor must be running a program when you query the RTDX interface.

  2. You must enable the RTDX interface before you check the status of individual channels or the interface.

  3. Your processor program must be polling periodically for isenabled to work.

Examples

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.

See Also

clear | disable | enable

  


Related Products & Applications

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