07-25-2014 04:08 PM
I already have a task created in MAX.
I am loading the task using Task Setpoint_Task = NationalInstruments.DAQmx.DaqSystem.Local.LoadTask("Setpoint");
The channel is called AO-0 in MAX.
I am not sure what I need to do to set that channel to 5V.
07-28-2014 10:06 AM
nyc,
When you create a voltage analog output task in NI MAX, you will set the signal output range to a maximum of 5 volts, and then at the top you will set the voltageOut to 5 volts.
William Fernandez
Applications Engineer
National Instruments
07-28-2014 12:41 PM - edited 07-28-2014 12:41 PM
@wfernand wrote:
nyc,
When you create a voltage analog output task in NI MAX, you will set the signal output range to a maximum of 5 volts, and then at the top you will set the voltageOut to 5 volts.
William Fernandez
Applications Engineer
National Instruments
From reading the Help file, it appears that I would need to
Task setpoint_Task = NationalInstruments.DAQmx.DaqSystem.Local.LoadTask("Setpoint");
AOChannel aochannel_setpoint = setpoint_Task.AOChannels[0]; AnalogSingleChannelWriter setpoint = new AnalogSingleChannelWriter(setpoint_Task.Stream); setpoint.WriteSingleSample(true, 5);
07-29-2014 03:43 PM
nyc,
I thought that you were asking about how to set up the 5 volts output using NI MAX. The code that you posted seems to be right to me. The following white paper can help you with the DAQmx functions.
Mapping the NI-DAQmx .NET API to the NI-DAQmx C API - NI-DAQmx .NET Class Library Help for Visual Studio 2010
http://zone.ni.com/reference/en-XX/help/370473H-01/mstudiowebhelp/html/daqapimapping/
Please give this a try and let me know.
Warm Regards,
William Fernandez
Applications Engineering
National Instruments
www.ni.com/support
07-30-2014 07:30 AM
@wfernand wrote:
Mapping the NI-DAQmx .NET API to the NI-DAQmx C API - NI-DAQmx .NET Class Library Help for Visual Studio 2010
http://zone.ni.com/reference/en-XX/help/370473H-01/mstudiowebhelp/html/daqapimapping/
Thank you for the link, but we are not upgrading from C to C#.