03-11-2008 06:17 PM
myTask =
new Task();myTask.AOChannels.CreateFunctionGenerationChannel(
"Dev1/ao0", "aoChannel", AOFunctionGenerationType.Square, 45.0, 5.0);myTask.AOChannels[0].FunctionGenerationSquareDutyCycle = 50.0;
writer =
new AnalogSingleChannelWriter(myTask.Stream);An exception with Status Code: -200432 : Create a Channel of an Output type that is supported by the physical channel, or select a physical channel that supports the output type.
Thanks,
Argneka
03-12-2008 11:07 AM
03-12-2008 12:05 PM
Hi,
Ok, then is there an easy way to generate a square wave on one of the 2 Analog output ports on the 6025E? I need to be able to set freq and duty cycle.
Thanks,
Alan
03-12-2008 01:55 PM
Hi Argneka,
There are two possible options that may work for you.
1. Use the analog output channels. This example may help you get started.
Continuous Analog Output on Multiple Channels with C#
2. Use the counters on your board to generate a pulse train.
DAQmx - Retriggerable Pulse Train Generation - LabVIEW - CVI - ANSI C - VB.NET - C#.NET
You can also look at the examples that should have been installed when you installed the NI-DAQmx driver. They are usually found at:
C:\Documents and Settings\USERNAME\Documents\National Instruments\NI-DAQ\Examples
Hope this helps.
03-12-2008 03:34 PM
Thanks,
This example is excally what I am looking for. I am already using the co outputs and these work fine.
Thanks for in great insight,
Alan