Showing results for 
Search instead for 
Did you mean: 
Reply

How to acquire analog input driven by digital output? (NI-6251 with Matlab)

Re: How to acquire analog input driven by digital output? (NI-6251 with Matlab)

My mistakes is up there...

should be like this in NImess.m

taskh1=uint32(1);
[a,b,taskh1] = calllib('myni','DAQmxCreateTask','master',taskh1);
------------------------------------------------------------------------


DAQmx_Val_Volts= 10348; % measure volts

why DAQmx_Val_Volts have this big number? 

taskchans1=['Dev1/ai0:' num2str(numofchans-1)];
[a,b,c,d] = calllib('myni','DAQmxCreateAIVoltageChan',uint32(taskh1),taskchans1,'',-1,-10,10,DAQmx_Val_Volts,'')

And what is the order to define the functions parameters:
for example 'DAQmxCreateAIVoltageChan' --> ,uint32(taskh1),taskchans1,'',-1,-10,10,DAQmx_Val_Volts,''   what meens? 

How to define my task? Smiley Sad
0 Kudos
Message 11 of 12 (2,605 Views)
Reply
0 Kudos
Highlighted

Re: How to acquire analog input driven by digital output? (NI-6251 with Matlab)

 i get it! Smiley Happy
 

0 Kudos
Message 12 of 12 (2,582 Views)
Reply
0 Kudos