User`s guide

2 Automa tion Interface
We use four functions in this section; each has a purpose the operational
details in the following list explain how and why we use each one. They are
clear remove all RT DX objects and handles associated with a CCS
and RTDX link. When you nish a session with RTDX,
clear removes all
traces of the specied link, or all links when you use the
all’optioninthe
syntax. When you clear one or more links, they no longer exist and cannot
be reopened or used. If y ou are ending your programming session and do
not want to retain any of the channels or links you created, use
clear to
end the RTDX comm unications and links and release all channels and
resources associated with existing CCS IDE a nd RTDX links. You do not
need to use the
close or disable functions rst.
To load a new program to a processor on which you have a program
running, and to which you have links, you must clear the existing links
before you load the new program to the processor.
close —closethespecied RTDX channel. To use the channel again,
you must open and enable the channel. Compare
close to disable.
close('rtdx') close s the communications provided by RTDX. After you
close RTDX, you cannot communicate with your processor.
disable remove RTDX communications from the specied channel, but
does not remove the channel, or link. Disabling channels may be useful
when you do not w a nt to see the data that is being fed to the channel, but
you may want to read the channel later. By enabling the channel later, you
have access to the data entering the channel buffer. Note that data that
entered the ch annel whi le it was disabled is lost.
halt stop a running processor. You may still h ave one or more messages
in the host buffer.
Use the following procedure to shut dow n communications b etw een MATLAB
software and the processor, and end your session:
1 Begin the process of shutting down the processor and RTD X by stopping
the processor. Type the following functions at the prompt.
if (isrunning(cc)) % Use this test in scripts.
cc.halt; % Halt the processor.
end % Done.
2-40