george seifert Posted April 27, 2012 Report Share Posted April 27, 2012 I have an M series DAQ (6251) and a Win7 PC. I need to generate a continuously repeating analog output waveform that consists of a positive going pulse and a negative going pulse (total waveform length is roughly 1 sec). That part I can do fine. Now I want to count each time the waveform starts a new cycle. It would be ideal if there was a signal available that pulsed each time the waveform started (then I count route it to a counter input) but I can't find one. Does anyone know of such a signal? I suppose I could use the clock output to generate a pulse train to use as a start signal for the D/A, but doesn't that use both counters? I'd still need a way to count the pulses generated. George Quote Link to comment
patleb Posted May 13, 2012 Report Share Posted May 13, 2012 I know I have done something similar to this using ni-fgen vi's. There is an example in the example finder called Fgen Arb Waeform Streaming.vi. This vi is made for use with a PXI 5421 but could be modified to be used with another device. If you notie after the initiate generation vi there is a while loop that keep tracks of the blocks written until the stop is executed. I beleive I have done something similar using a USB analog I/O device. Let me know if this helps. pat Quote Link to comment
JamesMc86 Posted May 14, 2012 Report Share Posted May 14, 2012 Under the DAQmx Write property node you can do Status.Total Samples Per Channel Generated. Just divide this by your regenerative buffer size and you can see how many are done. This is the only way I can think of off the top of my head. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.