03-30-2008 01:14 PM
03-31-2008 10:20 AM
It's likely that these routings can be accomplished withtout any special programming. For example, suppose your 6602 is Dev2 and your DIO card is Dev1. Then when you configure your digital task on Dev1, you can probably directly configure it to use the encoder signal as a trigger, with syntax similar to "Dev2/PFIx". Same for the other encoder as an acq clock.
However, some routings won't be possible and I don't have the resources handy to double check these particular ones. If you have to handle this manually, your idea of using "retriggerable single pulse" generation is likely the best way to go. Just realize that you probably won't be producing true 50% duty cycle square waves. You probably won't want to anyway. For trigger and acq clock purposes, you probably want to define minimal low and high times to minimize delay.
Normally you would use "pause triggering" to pause an acq clock but I think it might not be possible to configure both an edge-sensitive start trigger and a level-sensitive pause trigger on the same DIO task.
Hmm, sorry, I shoulda read the whole thing before answering in parts. Is it a single DIO task that needs both start triggering *and* pause triggering? If this can't be accomplished directly in hardware, you may need to approach this as a problem to be solved with post-processing. Let me ask a couple more questions:
1. Why exactly are you triggering off the 7.2 kHz encoder? Are you using that encoder signal *only* as a trigger? Do you need to trigger off the very first edge it generates? Or are you triggering from it for another reason (sync, confirm that it *is* generating, etc.)
2. Why do you need to pause acquisition when the enable goes off? One workaround would involve capturing the enable signal to timestamp the on and off times, then filtering out acq data that occurs when the enable is off.
-Kevin P.
03-31-2008 11:14 AM
03-31-2008 04:19 PM
03-31-2008 05:53 PM
I'm not at all familiar with the 6533 board -- hopefully someone else can help there.
Usually you *can* route signals from one board's PFI pins, up to RTSI / PXI Trigger lines, then back down to another board's task without having to define a specific DAQ task to help do it. DAQmx can do quite a lot of the management under the hood. As I mentioned before, it's often literally as simple as wiring in a signal like "Dev2/PFIx" to the DAQmx Timing vi that you use to define the sample clock for your Dev1 digital task. (Or similar with the DAQmx Trigger vi).
Meanwhile, I can describe a way to accomplish edge triggering with a pause-able sample clock. You'll have to use a couple of your 6602's counters.
1. Configure your digital task to use the 7.2 kHz signal as a digital start trigger. This can probably be done the easy way as outlined above.
2. Futher configure your digital task to use the output of Counter 0 as its sample clock.
3. Configure Counter 0 for retriggerable single pulse generation. Trigger it off the 21.6 kHz signal.
4. Configure Counter 1 for continuous pulse train generation at, say 1 MHz. This will be your app's master timebase.
5. Now here's the sneaky part. Specify that Counter 0 use the output of Counter 1 as its timebase. You'll need to use the DAQmx property nodes to get at this kind of detailed config. Now, Counter 0's means for keeping time as it generates retriggerable pulses is based on the output of Counter 1.
6. You can configure Counter 1 to be pause triggered, so that it pauses when the enable signal is low. When Counter 1 gets paused, Counter 0 will no longer see any timebase cycles, so it will be paused as well. Thus your digital task will also be paused.
7. Be careful defining the pulse high and low times for Counter 0. I would recommend you use units="Ticks". If you know you are generating a 1 MHz timebase with Counter 1, then you need to make sure that the # high ticks plus the # low ticks is less than about 40. (Because 40 microsec is a simple round number that's a bit less than 1 / 21.6 kHz)
-Kevin P.
04-01-2008 08:05 AM
04-04-2008 05:36 PM
04-07-2008 03:52 PM
04-11-2008 04:15 PM - edited 04-11-2008 04:17 PM
It took me almost 2 weeks to get this setup, but everything is working just like I want it to.
I did change a few things. LabVIEW wouldn't let me change the timebase for an individual counter. So I set the 1MHZ pausauble clock as the master timebase for my Digital I/O card. Retriggerable pulse generation wasn't very practical for my application since I was pausing or never starting the 21.6KHz waveform. So I abandoned it and just used the actual pulse train signal as the sampling clock for my digital task.
Thanks for your help Kevin!