isrunning - Determine whether target processor is executing process

Syntax

isrunning(cc)

Description

isrunning(cc) returns 1 when the target processor is executing a program. When the processor is halted, isrunning returns 0.

Using isrunning with Multiprocessor Boards

When your target board contains more than one processor, isrunning checks each processor on the target, as defined by the cc object, and returns the state for each processor on the board. In the returned variable b, you find a vector that contains the information for each accessed processor.

By providing a return variable, as shown here,

b = isrunning(cc)

b contains a vector that holds the information about the state of all processors accessed by cc.

Examples

isrunning lets you determine whether the target processor is running. After you load a program to the target, use isrunning to be sure the program is running before you enable RTDX™ channels.

cc = ticcs;

isrunning(cc)

ans =

     0
% Load a program to the target.

run(cc)
isrunning(cc)

ans =

     1

halt(cc)
isrunning(cc)

ans =

     0

See Also

halt, restart, run

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS
 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS