I'm updating a Traditional DAQ application to NI-DAQmx.
The old system uses PXI-6602 boards. The new one uses PXIe-6614 boards.
Because of limitations of DAQmx, I don't think a straight port is going to be possible. (Details below.)
The problem I'm trying to solve:
I need to measure the time between two input pulses. Let's call them t0 and t1, and their difference is n ticks.
I need to generate an output pulse at a fixed offset in time before t1 + 2n ticks.
The old application took advantage of a feature in Traditional DAQ that I don't think is present in DAQmx.
The program uses three counters. One counter is set up to divide the 80MHz clock base depending on the gate. It is programmed to give a 40MHz clock when the gate is low, and a 20MHz clock when the gate is high.
In Traditional DAQ, you could set up the counter in FSK (Frequency Shift Keying) mode, setting up one duty cycle for gate low, and another for gate high. That's the part that I don't think can be done in DAQmx.
The output of that counter becomes the source of another counter which counts down at 40MHz and then up at 20MHz. When you get back up to zero, you've computed the "2n ticks". You can account for the fixed offset by doing some simple offset of the count of this second counter. (I know that's confusing; I can provide more detail, but I'm not sure it's relevant if I can't shift the clock frequency for the counting.) You can take the output of the second counter and feed it to a third counter to generate the output pulse when the second counter gets back up to zero.
Any ideas on how to tackle this problem with DAQmx? I'm open to using other hardware if necessary, or different approaches to my problem. I like the 6614 because it's pin-compatible with the 6602, and I'm using a bunch of the DIO lines for other purposes.