06-13-2007 11:18 PM
06-14-2007 06:22 PM
Hi Gopal,
The digital lines do not update until there is a rising edge of the clock. Since you are writing a high bit on one rising edge, then a low bit on the next, you will be dividing the clock by two. To get a 100 kHz digital output, you will have to use a 200 kHz clock as your clock source. You can divide your same source clock further with by modifying the value of samples that you output (such as writing two high samples then two low samples to get a divide down of 4). I hope this helps!
Regards,
07-26-2007 01:16 AM
07-27-2007 01:19 AM
Hi Gops,
The error is being caused because the card is outputting
your 2 samples before the buffer has more samples in it, and therefore it runs
out of samples and gets a memory underflow. I would suggest looking at the
example ‘Cont Write Dig Port-Ext Clk.vi’ (Help >> Find Examples… >>
Hardware Input and Output >> Digital Generation ). Please note, you will
need to change the DAQmx write to use waveforms instead of U32. This example
writes the entire waveform to the buffer before starting generation, and then
continuously repeats the waveform until the while loop finishes (I.E. – the stop
button is pressed). If you would like to do correlated (clocked) DIO using the
onboard clock, this requires an analog clock to be routed and used as the sample
clock for the digital lines. Please see this DevZone Example.
07-31-2007 12:18 AM
Hi,
The DEVzone lonk is not working. Can you please send me an alternative link?
Regards
Gopal
07-31-2007 07:55 AM