05-23-2014 04:03 AM
I use the DAQ NI6703 for output voltage negative by using Matlab , I used putsample function putsample(ao,-1); however ,I cannot output the voltage negative. I have tested the NI6703 by NI MAXmx, it fonctionne correctly.
this is my code :
%-------write to a NI 6703 DAQ device---------%
%-------------Initialization------------------%
%--------------analog Output------------------%
ao=analogoutput('nidaq','Dev2');
%-------Adding Channels----------------------%
%-------Analog Output------------------------%
addchannel(ao,0);
%--------write data--------------------------%
ao_value =-1;
putsample(ao,ao_value);
%----cleaning Up------%
%waittilstop(ao,5)
delete(ao);
clear ao;
05-26-2014 07:49 AM
Hi Leeou,
I am not familiar with Matlab but I think this forum can help you:
How do I use the PCI 6703 digital outputs with Matlab xpc
Bye
05-26-2014 10:49 AM
Cindy,
I think Leeou is referring to the analog outputs, not the digital ouputs.
Lynn
05-27-2014 04:53 AM
thank you for your response, I have fund my problem, and your information is alos useful for me.
05-27-2014 04:57 AM
Proven Zealot,
yes I refer to analog output, I fund the problem is that I need to use the funtion:
ao.Channel(i).OutputRange=[-10 10];
thank you
leeou