        
        % Analog Input

close all;   
ai = analogInput('nidaq');

% ch0 = addchannel(ai, 0, 'chan0')
% ch0 = ai.channel
% ch0 = get(ai,'chan0')

addchannel(ai, 0);
ai.SampleRate = 10000;
ai.SamplesPerTrigger = 1;
ai.TriggerType = 'Immediate';

while sinal~=0,
start(ai)
sinal = getdata(ai)
disp('fdgh');
% [data,time] = getdata(ai);
% pause(1);

end
% figure
% plot(time,data);
% zoom on
% delete(ai);
 
