Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to output sample and convert clocks to PFI lines of E-Series DAQ (DAQPad-6015)

Highlighted
Hi,
 
Can someone tell me how to output sample and convert clocks to PFI lines of E-Series DAQ (DAQPad-6015)?
 
Thank you very much.
 
Jack
0 Kudos
Message 1 of 15
(3,021 Views)
Highlighted
Are you using Traditional or DAQmx? C/C++, Labview, VB, ... ? Why do you want to do this (there may be a different way to do it)?
John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
Message 2 of 15
(3,014 Views)
Highlighted
Hi John,
 
> Are you using Traditional or DAQmx? C/C++, Labview, VB, ... ?
> Why do you want to do this (there may be a different way to do it)?

I am using DAQmx and LabView 7.1.
 
I need to sample an analog input signal with a microsecond timing accurace.
The DAQ is programed to use external sample clock pulses, and I would like
to varify the exact timeing when the A/D conversion is conducted.
 
It has been mentioned in NI's documents that the actual sample and convert clocks
(independ of it source) can be output to PFI lines, but shows no examples of how to do it.
 
Hope you can give some suggestions!
 
Kind regards,
 
Jack.
 
0 Kudos
Message 3 of 15
(3,000 Views)
Highlighted
If I understand the documentation correctly (I'm looking at a diagram of "32-pin screw terminals") the convert clock should be, by default, available as an output at pin 46 and the scan clock (mx terminology; also called sample clock) is at pin 56.

If you don't get the outputs there, you may need to connect them programmatically. I don't know Labview, unfortunately. In the C APIs you would use the function DAQmxExportSignal. I'm sure there's a vi based on it.
John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 4 of 15
(2,990 Views)
Highlighted
Hello Jack,

John is absolutley correct.  In LabVIEW, there is a DAQmx Export Signals VI that you can use to export the AI sample clock or the AI convert clock to PFI pins.  Take a look a this KB for a more detailed description.  There is also a block diagram image showing how to do this.  If you are intereseted in which pins you can route the sample/convert clock to, open up Measurement and Automation Explorer, select your DAQPad under NI-DAQmx Devices and click on the Device Routes tab at the bottom of the window.  This will show you all the valid direct and indirect routes you can make.
Eric
DE For Life!
Message 5 of 15
(2,974 Views)
Highlighted
Hi --

I'd like to do this same thing (enable the CONVERT signal on PFI2) using DAQmx base on Mac OS X. It appears that DAQmxBaseExportSignal is commented out in the header file. Am I totally out of luck, or is there another way to enable this output?

Thanks,

spg
------------------
scott gillespie
applied brain, inc.
------------------
0 Kudos
Message 6 of 15
(2,901 Views)
Highlighted
Right- DAQmxExportSignals does not have an equivalent in DAQmx Base. As they say, DAQmx Base is a sub-set...

What are you trying to do? It might be possible to do it another way. If you need the convert clock to drive another process on the same device, you may be able to make the connection by specifying the ai/convertclock signal to another task.

Also, I thought (someone correct me if I'm wrong) that it used to be that E-series devices had the CONVERT* pin connected by default. That said, I see in the DAQmx documentation that DAQmx tri-states PFI lines by default.

Have you tried it and found that you get no signals? DAQmx Base is sometimes different from DAQmx in details like this.
John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 7 of 15
(2,895 Views)
Highlighted
Hi John --

I would like to observe the CONVERT clock on my scope to verify that my tasks are set up correctly. This is a very convenient technique that I have used in the past with the old NI-DAQ interface.

Indeed, I am currently seeing no signal on PFI2/CONVERT pin 43 (on a 6024 E-series board). It is my recollection from the old NI-DAQ driver that I had to explicitly enable this signal.

--spg
------------------
scott gillespie
applied brain, inc.
------------------
0 Kudos
Message 8 of 15
(2,891 Views)
Highlighted
Ah. So you really do need the signal externally.

The only thing I can think of is to do something kludgey like feeding /dev/ai/convertclock to the input of a counter, and set up the counter to produce a pulse train. The counter output *is* available externally.

On the other hand, that may be more trouble than it's worth for debugging.

For my application, I abandonded DAQmx Base, and I tell my customers to use Windows 😞
John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 9 of 15
(2,888 Views)
Highlighted
John --

Windows is not an option for me. I like your idea of using a counter output -- it may be helpful as I am getting ramped up, but my application will eventually require both timer outputs.

I have a legacy C application written for Macintosh, and I am in the process of moving it onto OS X. So my options are to use DAQmx Base, or write an in-kernel driver. I actually have already done the latter for 6024/6025 E-series boards (for another company); for this client I was hoping to use the DAQmx Base to allow an easy transition to M-series boards, without the cost of writing and supporting a low-level driver.

The specific task I am doing is relatively straightforward. I record 2 channels of AI for a short period (usually about 250 ms.) and during this time I drive 2 external digital signals. Right now, I use the 2 timer outputs, which allows precise synchronization with the output and AI sampling.

I appreciate your comments, and thanks in advance for any additional suggestions you can lob my way.

--spg

Scott Gillespie
Applied Brain, Inc.
------------------
scott gillespie
applied brain, inc.
------------------
0 Kudos
Message 10 of 15
(2,886 Views)