I have a tunable laser that generates 5001 trigger pulses on a BNC trigger out (during a wavelength sweep).
Can I use the USB6259 to generate one trigger pulse after the first trigger, and then a second trigger pulse after the 5001th trigger? I would use those outputs to start and stop an optical power meter. I cannot connect the laser and the power meter directly because it is not possible to configure the power meter to ignore the intermittent triggers.
I've been looking through the NI-DAQmx C Reference/google/message board for over an hour but I still have no clue on how to do it. I've used the C api before to do simple tasks, but not for this. Any input would be greatly appreciated!
This could probably be done using both your board's counters, but it may be more straightforward using a digital output line on port 0. Only port 0 allows hardware-timed output.
Then you'd just use the laser trigger signal as a sample clock and define a 5001 point finite digital output buffer. The first and last entries would be digital high, all others would be digital low. There'd be a little further monkeying about to make sure the digital line is set low before the task starts and after it ends to make sure you create triggering edges for your power meter.
I don't have hw (or time) to test it all out, but through some combo of pull-down resistor, MAX config, and configuring a separate unclocked direct digital output task to force the line to digital low when needed, you should be able to accomplish this.