09-13-2007 04:12 PM
09-17-2007 09:02 AM
Hi Hugh,
There are a number of considerations to keep in mind when dealing with this
type of application. The biggest one being the fact that the Analog Inputs on
the 6133 do not support retriggering; meaning they can only be triggered once
for a finite acquisition. The easiest way to work around this limitation is through
the use of our retriggerable counters.
For your application we will create a counter task that outputs a finite
digital pulse train every time it is triggered. We will then route this pulse
train to the sample clock for the analog input. Now each time that your digital
trigger line goes high, the counter will be triggered and will generate a
finite number of pulses which will clock in a finite number of samples for the
analog input.
Here are two example codes from the Example Finder that I would recommend
starting with:
Hardware Input and Output » DAQmx » Generating Digital Pulses » Gen Dig Pulse
Train-Finite-Retriggerable
Hardware Input and Output » DAQmx » Analog Measurements » Voltage » Cont
Acq&Graph Voltage-Ext Clk
Keep me posted on your progress.
09-17-2007 01:10 PM
09-17-2007 04:12 PM
09-18-2007 12:29 PM - edited 09-18-2007 12:29 PM
Hi Hugh,
I think there might be some confusion over the "sample clock" here.
You have to keep in mind that the "clock" generated by the counters
is not a continuous clock. It has a number of pulses, and then dead time, then
more pulses, then dead time....etc.
You will need to use different sample clocks for each card since one will be
continuous pulses and the other will have breaks between groups of pulses.
Since you are already sharing the trigger, the only line left that you might
want to share is the reference clock used to generate the sample clocks on each
device.
You will need to modify the Multi-Function-Ctr Retrigg Pulse Train
Generation for AI Sample Clock.vi example by adding a DAQmx Channel
Property Node in the location shown below. Once it is wired together, configure
the node with the following setting Counter Output » General Properties »
Counter Timebase » Source and point to the reference clock of the first
device (being passed by RTSI) for the reference clock input.
Message Edited by Jordan D on 09-18-2007 12:30 PM
09-19-2007 06:31 AM
Jordan, et. al.,
It didn't work.
I wired in a DAQmx Channel node as you recommended and connected it to the DO/SampleClock of my 6536 board. I got Error # 200143, which said that it needed a Timebase Rate.
So I added a terminal to the DAQmx Channel Property node for CO.CtrTimebaseRate and wired my clock frequency (1 MHz) to it. I also made sure that the Sample delay was 0.5. When I tried it, I got Error # 200136, complaining that the Frequency and Initial Delay property values are inconsistent with one or more counter timebase properties. I tried a bunch of things and could not get past this point. A copy of my VI (Create Data Acquisition Task (Phase I).vi) is in the attached zip file.
(Should I have been trying to import the DO/SampleClockTimebase instead? The problem seems to be that the timebase of the 6536 is 200 MHz, which would be too fast for the 6133.)
Eventually, I tried a different tack. Instead of trying to import the 6536 clock into the 6133, I tried exporting the 6133 timebase to the 6536. I added a DAQmx Timing Property node to the 6536 task to import 20MHzTimebase from the 6133, and then I divided it down to get my 1 MHz sample clock for the digital output patterns. This seemed to work. I was able to see on an oscilloscope that the start trigger was coming at the right rate, and I was able to collect samples on the DAQ.
However, the next problem is that when I put a probe on the output of DAQmx Read function, I expected it to produce a 2D array -- one dimension being the number of channels and the other the number of samples. Instead, I found that the number of samples in the array was much larger than the number I had tried to read. Is this another problem or related to the same one?
Regards,
Hugh
09-20-2007 06:12 PM
09-20-2007 06:28 PM