analogoutput - Create analog output object

Syntax

AO = analogoutput('adaptor')
AO = analogoutput('adaptor',ID)

Arguments

'adaptor'

The hardware driver adaptor name. The supported adaptors are advantech, mcc, nidaq, and winsound.

ID

The hardware device identifier. ID is optional if the device object is associated with a sound card having an ID of 0.

AO

The analog output object.

Description

AO = analogoutput('adaptor') creates the analog output object AO for a sound card having an ID of 0 (adaptor must be winsound). This is the only case where ID is not required.

AO = analogoutput('adaptor',ID) creates the analog output object AO for the specified adaptor and for the hardware device with device identifier ID. ID can be specified as an integer or a string.

Remarks

More About Creating Analog Output Objects

More About the Hardware Device Identifier

When data acquisition devices are installed, they are assigned a unique number which identifies the device in software. The device identifier is typically assigned automatically and can usually be manually changed using a vendor-supplied device configuration utility. National Instruments refers to this number as the device number.

For sound cards, the device identifier is typically not exposed to you through the Microsoft Windows environment. However, the Data Acquisition Toolbox software automatically associates each sound card with an integer ID value. There are two cases to consider:

There are two ways you can determine the ID for a particular device:

Examples

National Instruments

To create an analog output object for a National Instruments device defined as 'Dev1':

AO = analogoutput('nidaq','Dev1');

To create an analog output object for a Measurement Computing device defined as '1':

AO = analogoutput('mcc','1');

See Also

Functions

addchannel, daqhwinfo

Properties

Name

  


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