from
Mac OS X Data Aquisition with National Instruments device
by Fred Sigworth
Analog input with a National Instruments device on Mac OS X, using a mex file.
|
| daqStart(h,numchannels,vrange) |
function daqStart(h,numchannels,vrange)
% function daqStart(h,numchannels,vrange)
% Define the number of channels and desired voltage range for A-D
% conversion using National Instruments hardware.
% h is the TaskHandle returned by daqInit.
% The device being used is 'Dev1' and the hardware channels start with
% channel 0 and run to channel number (numchannels-1).
% The AD converter is set to accept voltages from -vrange to vrange,
% in volts.
if nargin<2
numchannels=1;
end;
if nargin<3
vrange=1;
end;
DAQ(int32(2),uint32(h),uint32(numchannels),double(vrange));
|
|
Contact us at files@mathworks.com