02-05-2007 02:12 PM
02-05-2007 05:01 PM
I only program LabVIEW so I don't know the specifics of "C" calls to the DAQmx driver. However, here are some tidbits that may help:
1. You definitely should NOT set up either counter to generate a "finite pulsetrain." Generating 1 finite pulsetrain output would require using up both of your counters. (One is used "behind the scenes" to control how long the other one generates its output.) You'd have no counters available for the 2nd pulsetrain. You should either generate continuous pulsetrains or single pulses so you can create 2 independent outputs.
2. The code snippet looks like you are trying to put both counter output channels into a single task. This capability is relatively new in the LabVIEW world, and I'm not sure how it would work or be coded in C. I'm also not 100% sure how closely the start times are sync'ed if you put them in the same task.
3. I don't know what you mean by the phrase "one gating the other within 1 microsec". Exactly what do *you* mean by this? I find that people have different notions of what the term "gating" should mean...
4. Two basic ideas I'd offer for generating 2 pulsetrains at the same freq but one having phase delay relative to the other.
A. Configure both to use a particular TTL signal as a Digital Start Trigger. Configure both as continuous pulse trains. Define both pulsetrains with the same freq & duty cycle, but with different "initial delay" parameters to produce the desired phase delay.
B. Configure one as a continuous pulsetrain. Configure the other for Retriggerable Single Pulse generation and start it first. Define both with same "high time", but use the "low time" and/or "initial delay" of the retriggerable single pulse to produce the desired phase delay.
Sorry I can't help more with the code syntax, but I *do* know that these techniques are viable with your DAQ board so at least you can know that your pursuit of syntax won't be a dead end.
-Kevin P.
02-05-2007 05:34 PM