Data Acquisition Toolbox    
delete

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

delete(obj) removes the device object specified by 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.

delete(obj.Channel(index)) removes the channels specified by index and contained by obj from the engine. As a result, the remaining channels might be reindexed.

delete(obj.Line(index)) removes the lines specified by 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:

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.

Example

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.

See Also

Functions

clear, daqreset


  dec2binvec digitalio