05-16-2011 11:28 AM
I have a NI-USB-6008. I am using Visual Studio 2010, Visual C#, .Net 4.0.
I have tried several things, also i took a look into the examples, but the example WriteDigChan.2010, in ...\Documents\National Instruments\NI-DAQ\Examples\DotNET4.0\Digital\Generate Values\WriteDigChan\CS
It works just when i don't select a chanel to write, by default its written Dev1/Port0/line0:7 when I click write it sends the information, but when I select for example Dev1/port0/line1 it shows me a window with the next information:
Specified read or write operation failed, because the number of lines in the data for a channel does not match the number of lines in the channel... etc etc
What can I do? Really I have no idea.
05-18-2011 12:01 PM
Good morning. I´m José Manuel Vólquez, an Application Engineer from National Instruments México. The problem here is in the moment when the acquisition task is created. I´m your code you must have a function similar to:
DAQmxCreateDOChan (taskHandle, chan, "", DAQmx_Val_ChanForAllLines);
The last parameter is the problem; you must select the option “One Channel For Each Line” instead of “One Channel For All Line”.
Try to implement this change please.
Regards.
05-23-2011 11:52 AM
Hi, could you check the solution that I recommended?
Regards.
05-30-2011 02:49 AM
Thank you so much it worked really fine =D