Data Acquisition Toolbox    

Configuring Analog Output Properties

After hardware channels are added to the analog output object, you should configure property values. As described in Configuring and Returning Properties, the Data Acquisition Toolbox supports two basic types of properties for analog output objects: common properties and channel properties. Common properties apply to all channels contained by the device object while channel properties apply to individual channels.

The properties you configure depend on your particular analog output application. For many common applications, there is a small group of properties related to the basic setup that you will typically use. These basic setup properties control the sampling rate and define the trigger type. Analog output properties related to the basic setup are given below.

Table 6-3: Analog Output Basic Setup Properties
Property Name
Description
SampleRate
Specify the per-channel rate at which digital data is converted to analog data.
TriggerType
Specify the type of trigger to execute.

Setting the Sampling Rate

You control the rate at which an analog output subsystem converts digital data to analog data is controlled with the SampleRate property. SampleRate must be specified as samples per second. For example, to set the sampling rate for each channel of your National Instruments board to 100,000 samples per second (100 kHz):

Data acquisition boards typically have predefined sampling rates that you can set. If you specify a sampling rate that does not match one of these predefined values, there are two possibilities:

Most analog output subsystems allow simultaneous sampling of channels. Therefore, the maximum sampling rate for each channel is given by the maximum board rate.

After setting a value for SampleRate, you should find out the actual rate set by the engine.

Alternatively, you can use the setverify function, which sets a property value and returns the actual value set.

You can find the range of valid sampling rates for your hardware with the propinfo function.

Defining a Trigger

For analog output objects, a trigger is defined as an event that initiates the output of data from the engine to the analog output hardware.

Defining a trigger for an analog output object involves specifying the trigger type. Trigger types are specified with the TriggerType property. The valid TriggerType values that are supported for all hardware are given below.

Table 6-4: Analog Output TriggerType Property Values
TriggerType Values
Description
{Immediate}
The trigger occurs just after you issue the start function.
Manual
The trigger occurs just after you manually issue the trigger function.

Most devices have hardware-specific trigger types, which are available to you through the TriggerType property. For example, to see all the trigger types (including hardware-specific trigger types) for the analog output object ao created in the preceding section:

This information tells you that the National Instruments board also supports a hardware digital trigger. For a description of device-specific trigger types, refer to Device-Specific Hardware Triggers, or the TriggerType reference pages in Base Property Reference.


  Adding Channels to an Analog Output Object Outputting Data