03-19-2009 09:49 AM
I am attempting to send a short serial message using a buffer for Digitial Out and need a clock reference (up to 2MHz).
When I set up using DAQmxCfgSampClkTiming ( taskhandle, source as String, rate, active edge, sample mode, samples per channel)
then follow with DAQmxWriteDigitalLines (same taskhandle, buffer size, autoStart=False, timeout, data layout, write array, samples per channel written)I get an error message stating that the source is invalid. I have tried every source I can think of but believe "PFI12" is the appropiate one.Can someone tell me how to set up the source properly?
03-19-2009 12:03 PM
03-22-2009 10:36 AM - edited 03-22-2009 10:38 AM
Hi
One of the C examples included with the DAQmx driver shows that you should use /"Device name"/PFIx (for example /Dev1/PFI0) if you wish to use an external clock with your digital output.
The Daqmx C examples can be found under Start>>Programs>>National Instruments>>NI-DAQ>>Text Based Code Support. They have some different examples on how to set up a correlated digital output task.