10-11-2006 04:41 PM
10-12-2006 12:16 PM
I don't know any of the syntax for VB calling DAQmx functions, but can describe some options. I'm surprised you say that it's easy under traditional NI-DAQ -- dividing by 4 or more is fairly easy, but dividing by 2 is more of a special case. Here are 2 different general ideas.
1. When you configure your pulse generation, set "Units = Ticks" rather than seconds or other time units. Note that the minimum allowable values for both high time and low time are 2 ticks each. This would give you divide-by-4 behavior. So you'll also need to change a relatively obscure property for the counter's output behavior. The default behavior is "toggle on terminal count." To perform a divide-by-2, you'd need to make it "pulse on terminal count." Now instead of toggling state every 2 input pulses (requiring 4 pulses to produce a cycle), you'll generate a pulse for every 2 input pulses. However, the pulses you generate will be very narrow. If I recall correctly, they'll be 50 nanoseconds wide, corresponding to one cycle of the internal 20 MHz timebase. As far as I know, there's no way to change this pulse width.
2. If you know the freq of the input pulses, you could perform a "retriggerable single pulse" generation, where the total cycle time of your output pulse is long enough for you to deliberately miss every other input trigger.
-Kevin P.
10-12-2006 12:33 PM
10-12-2006 04:40 PM