Data Acquisition Toolbox
  Function/Property:
    Search    Help Desk 

Accessing Individual Channels

As discussed in "Property Names and Property Values", 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.

Channel contains all the channels associated with an analog output object as created with addchannel. Using Channel, you can access individual channels to:

Using Channel to configure channel properties is illustrated in "Data Range and Engineering Units".

Setting the Sampling Rate

The rate that data is output per channel is set with the SampleRate property. SampleRate must be specified as samples per second. For example, to set the sampling rate of your sound card to 44,100 samples per second (44.1 kHz)

Data acquisition boards typically have predefined sampling rates that can be set. If you specify a sampling rate that does not match one of these predefined values but is within the range of valid values, then the toolbox automatically selects a valid sampling rate. If you specify a sampling rate that is outside the range of valid values, then an error is returned. The rules applied by the toolbox to select a valid sampling rate are described in Chapter 7, "Property Reference."

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

The default value for SampleRate is 8 kHz for most sound cards. For other hardware devices, the default value is supplied by the hardware driver.

Defining a Trigger

For analog output objects, a trigger is defined as an event that initiates sending (outputting) data to the D/A converter. The sending status is indicated by the Sending property. When a trigger occurs, Sending is set to On.

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 5-3: TriggerType Values and Description
Values
Description
{Immediate}

The trigger occurs just after the start command is issued. This is the default value.

Manual

The trigger occurs just after you manually issue the
trigger function.

For some hardware, additional trigger types may be available.



[ Previous | Help Desk | Next ]