Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Specified operation cannot be performed while the task is running. Task Name: ClockTriggerBit

I am trying to set the timing for digital line on 6221. As recommended in the documentation "NI DAQ MX C reference guide" I stop the task, run the following:

DAQmxCfgOutputBuffer

DAQmxCfgSampClkTiming (taskHandle, "ao/SampleClock", 100, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, 10);

DAQmxWriteDigitalLines

DAQmxStartTask -> this is when I get the warning 4294766817. Why?

Any better way to set the sample clock? I need to do it using internal clock in 6221.

Thank You,

Mark.

0 Kudos
Message 1 of 7
(4,857 Views)
Did you try starting the task before writing?
John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 2 of 7
(4,856 Views)

Oh yes - with another error/warning telling me not to. Also in an example code that is the sequence - stop, set up, write, start.

Mark

0 Kudos
Message 3 of 7
(4,852 Views)
Huh. I guess we need input from someone more knowledgeable. Sorry.
John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 4 of 7
(4,848 Views)

Hello Metrikos,
I've got a couple things.  First, could you be more specific as to where in the DAQmx C Reference Help you are referring to.  Secondly, attached is an example of corellated digital input with analog input.  I know this isn't exactly what you are trying to do, but it might give you a good reference. 
-Alan A.

0 Kudos
Message 5 of 7
(4,836 Views)
Thank You Alan,
 
I've been away for a few days and could not try your code. I'll try it as soon as I can, but already see the potential solution to my problem - I need to use analog clock, as it seems there is no internal clock for digital.
 
As far as your question - I am not sure an realy do not want to go searching. It was either a line in help or something a warning text said.
 
Again, thank You!Insert Smilies
 
Mark
0 Kudos
Message 6 of 7
(4,825 Views)

That's correct.  I should have mentioned this before, but there is no dedicated digital timing engine on M Series devices.  So to perform timed digital operations, you have to use another clock source, like analog in or out, a counter, or an external source. 
-Alan A.

0 Kudos
Message 7 of 7
(4,813 Views)