Owning Class: daq
Requires: MathScript RT Module (Windows, Linux)
data = aiwf(device, channels, rate, samples)
data = aiwf(device, channels, rate, samples, limits)
[data, error] = aiwf(device, channels, rate, samples)
[data, error] = aiwf(device, channels, rate, samples, limits)
Acquires samples from each of the given channels of a specified device.
|device||Specifies the device name. device is a string.|
|channels||Specifies the channels from which to acquire samples. channels is a vector of positive integers.|
|rate||Specifies the number of samples to acquire each second for each channel.|
|samples||Specifies the total number of samples to acquire for each channel.|
|limits||Specifies the lowest and highest signal values you expect to acquire. limits is a two-element vector with the following syntax: [lowest, highest]. The default is [-10, 10].|
|data||Returns the acquired samples from each of the channels. data is a real matrix. Each row in data corresponds to a channel.|
|error||Returns 0 if the data acquisition task is successful. Otherwise, this function returns -1. error is a scalar.|
You specify rate, samples, and limits only once for all channels.
The following table lists the support characteristics of this function.
|Supported in the LabVIEW Run-Time Engine||Yes|
|Supported on RT targets||Yes|
|Suitable for bounded execution times on RT||Not characterized|
DEVICE = 'Dev1';
CHANNELS = [0, 1];
RATE = 1000;
SAMPLES = 2000;
DATA = aiwf(DEVICE, CHANNELS, RATE, SAMPLES);