07-14-2010 11:20 AM
I want to get a 10MHz reference clock output from a PCI-6110 to synchronize with another non-NI DAQ card. (1) Is there a pre-set terminal in the 68-pin output connector? (2) Can I use the C-code DAQmxExportSignal function to do this? (3) For either question 1 or 2, what are the parameters of the 10MHz waveform?
07-14-2010 12:31 PM
Hi src42,
There is no PLL on the 6110 but it does have a 20 MHz and a 100 kHz timebase. Would the 20 MHz timebase suffice for your external DAQ card? If so the best way to route the signal (using DAQmx Export Signal) would be to use one of the following:
-PFI 3 (requires counter 1)
-PFI 8 (requires counter 0)
-RTSI 7 (direct but you'll need a RTSI cable to connect to the device).
You can divide-down the timebase using an on-board counter to 10 MHz if you want. You'll need to set the output mode to pulse instead of toggle, the source to the 20 MHz timebase, and generate 2 ticks high / 2 ticks low. This will give a pulse every time the counter rolls over, which would be every 2 pulses of the 20 Mhz timebase.
Our newer DAQ hardware supports reference clocks and does have a 10 MHz Reference Cock available for export.
Best Regards,
07-15-2010 11:32 AM
John,
What is the situation with the PCI-6115 card? According to a data sheet I have found, a "frequency scaler" output of 10MHz is supposedly available. I can't tell from the NI documentation about the DAQmxExportSignal function, which cards its signalID value 'DAQmx_Val_10MHzRefClock' applies to.
Thanks,
Steve
07-15-2010 12:09 PM
Hi Steve,
Very good call, both the 6110 and the 6115 have the frequency scaler. It's mentioned in the S Series user manual on page 7-10 as the "Frequency Output Signal". The frequency scaler is essentially a limited counter--you could use it instead of one of the full-featured counters to output the divide-down of the 20 MHz timebase. The available frequencies on the frequency scaler are {100 kHz, 10 MHz} / {1:16}. In DAQmx, it's programmed just like a basic counter output. You wouldn't have to worry about the pulse/toggle mode that I mentioned in my last post if you're using the frequency scaler.
The 10MHzRefClock signal only currently applies to the 6124, 6154, M Series Devices, X Series Devices, and SC Express Devices. Device-specific information about synchronization methods can be found in the DAQmx Help:
If you're trying to synchronize the PCI 6110 to the PCI 6115, the best bet is to use RTSI and share the 20 MHz timebase between the two.
It should be noted that the PXI version of the 6115 does have a sort of PLL--it automatically locks its 20 MHz timebase to the 10 MHz reference clock on the PXI backplane.
Best Regards,
07-20-2010 09:58 AM
John,
There seems to be a conflict in the documentation. When I use the NI MAX explorer application on my mounted PCI-6110 device, there is no routable source shown for a 10MHz reference clock, only 20MHz.
07-20-2010 01:30 PM
Hi Steve,
There is no 10 MHz Reference Clock on the 6110 or 6115. If you're referring to the frequency generator (i.e. "frequency scaler"), then this isn't in the device routes tab in MAX since it is hard-wired to pin 1 on these devices:
To output 10 MHz on this line, you can program it like a regular counter:
Best Regards,
07-20-2010 01:37 PM - edited 07-20-2010 01:37 PM
Hi, John-
This is interesting to me also, but I need to do it in C/C++. Can you tell me what calls are required to enable to output (the documentation I found says it is tri-state by default). Would DAQmx_ConnectTerminals do it? How do you control the divider?
Thanks!
07-20-2010 01:50 PM - edited 07-20-2010 01:51 PM
The equivalent calls in C would be:
-DAQmxCreateTask (not pictured / necessary in LabVIEW)
-DAQmxCreateCOPulseChanFreq
-DAQmxCfgImplicitTiming
-DAQmxStartTask
-DAQmxIsTaskDone (call this in a loop to check for errors while the task is running)
-DAQmxClearTask (to stop the generation)
The driver will choose the divider for you based on the desired output frequency (specified in DAQmxCreateCOPulseChanFreq). If you choose a frequency outside of the range of the device, an error should be thrown. If you choose a frequency within the range of the device but not attainable exactly, the driver will coerce the output to the nearest available frequency.
So... if you want a frequency of 10MHz, you would need to specify 10000000 as the freq input to DAQmxCreateCOPulseChanFreq.
EDIT: Left out DAQmxStartTask
Best Regards,
07-20-2010 04:02 PM
Thanks, John. That was fast!
And, presumably, the counter to use as input to DAQmxCreateCOPulseChanFreq would be "Dev1/freqout".
07-21-2010 10:48 AM
Hi John,
That's correct, assuming your device is Dev1.
Best Regards,