From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use DAQmxCfgSampClkTiming(...) on PXI-6259

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?

 

0 Kudos
Message 1 of 3
(3,121 Views)
Just to verify, while specifying the sample clock source you used the string "DevName/PFI12" instead of just "PFI12", isn't it?
------

"A VI inside a Class is worth hundreds in the bush"
യവന്‍ പുലിയാണു കേട്ടാ!!!
0 Kudos
Message 2 of 3
(3,120 Views)

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. 

Message Edited by Jordan F on 03-22-2009 10:38 AM
Regards,
Jordan F
National Instruments
0 Kudos
Message 3 of 3
(3,097 Views)