Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I control digital output?

I am programming in VC++ with the NIDAQmx API. I am using the PCI-6052e and PCI-6154 cards.

I would like to be able to control two digital channels, i.e. line 0 go high, line 1 go low.  Then a few seconds or minutes later, I would change the output of line 0.

// create the task
DAQmxCreateTask("",&taskDigitalHandle);        
DAQmxCreateDOChan(taskDigitalHandle,"Dev1/port0/line0","",DAQmx_Val_ChanPerLine);
// line 0 high
DAQmxWriteDigitalScalarU32(taskDigitalHandle, 1, 10.0, true, NULL);
// do something (removed)
// line 0 low
DAQmxWriteDigitalScalarU32(taskDigitalHandle, 1, 10.0, false, NULL);

I am getting the warning -200012 (Clock rate specified exceeds the maximum conversion rate of the ADC) back, which I have no idea how to resolve.
But I feel like I'm missing something big here... can this even be done, and am I right to use DAQmxWriteDigitalScalarU32 to do it?

Also, I can't find much documentation on these functions, is there any available?
0 Kudos
Message 1 of 2
(2,909 Views)
I have posted this question in Digital I/O since that is the more relavent forum: http://forums.ni.com/ni/board/message?board.id=70&thread.id=7818


Moderator: Please delete this thread.
0 Kudos
Message 2 of 2
(2,904 Views)