Data Acquisition Toolbox | ![]() ![]() |
Remove device objects, channels, or lines from the data acquisition engine
Syntax
Arguments
obj |
A device object or array of device objects. |
obj.Channel(index) |
One or more channels contained by obj . |
obj.Line(index) |
One or more lines contained by obj . |
Description
removes the device object specified by delete(obj)
obj
from the engine. If obj
contains channels or lines, they are removed as well. If obj
is the last object accessing the driver, then the driver and associated adaptor are unloaded.
removes the channels specified by delete(obj.Channel(index))
index
and contained by obj
from the engine. As a result, the remaining channels might be reindexed.
removes the lines specified by delete(obj.Line(index))
index
and contained by obj
from the engine. As a result, the remaining lines might be reindexed.
Remarks
Deleting device objects, channels, and lines follows these rules:
delete
removes device objects, channels, or lines from the data acquisition engine but not from the MATLAB workspace. To remove variables from the workspace, use the clear
function.
clear
function.
You should use delete
at the end of a data acquisition session. You can quickly delete all existing device objects with the command delete(daqfind)
.
If you use the help
command to display the M-file help for delete
, then you must supply the pathname shown below.
National Instruments
Create the analog input object ai
for a National Instruments board, add hardware channels 0-7 to it, and make a copy of hardware channels 0 and 1.
To delete hardware channels 0 and 1:
These channels are deleted from the data acquisition engine and are no longer associated with ai
. The remaining channels are reindexed such that the indices begin at 1 and increase monotonically to 6. To delete ai
:
Sound Card
Create the analog input object AI1
for a sound card, and configure it to operate in stereo mode.
You can now configure the sound card for mono mode by deleting hardware channel 2.
If hardware channel 1 is deleted instead, an error is returned.
Functions
![]() | dec2binvec | digitalio | ![]() |