| Data Acquisition Toolbox | Search  Help Desk |
| analogoutput | Examples See Also |
Create an analog output object.
Syntax
AO = analogoutput('adaptor')
AO = analogoutput('adaptor', ID)
Arguments
adaptor |
Name of the hardware driver adaptor |
ID |
Device identifier |
AO |
The analog output object |
Description
analogoutput creates an analog output object. This device object exists both in the data acquisition engine and the MATLAB workspace. When the object is created:
adaptor is loaded and initialized.
analogoutput accepts one or two input arguments depending on the hardware you are accessing. The input arguments are given below.| Description |
Supported Vendors and Devices | ||
| sound card |
National Instruments |
Hewlett-Packard |
|
adaptor |
winsound |
nidaq |
hpvxi |
ID |
N/A |
Device number |
Device ID |
ID must be specified as a double. For Hewlett-Packard hardware, ID can be specified as a double or a string.
If the values supplied to analogoutput are incomplete or incorrect, or the referenced driver is not found, then an error is returned. To use the analog output object to perform data acquisition tasks, channels must be added with the addchannel function.
Example
Sound Card
To create an analog output object for a sound cardAO = analogoutput('winsound')
National Instruments
To create an analog output object for a National Instruments device defined as device number 1AO = analogoutput('nidaq', 1)
Hewlett-Packard
To create an analog output object for a Hewlett-Packard (HP) VXI device with device ID 8 (slot 8)AO = analogoutput('hpvxi', 8)
AO = analogoutput('hpvxi', [8 9])
See Also
Functions
addchannel, analoginput, digitalio