LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate N-pulses repeatedly

 Hello dino,

 

Thanks for the response, I understand your dilema now. Unfortunately I do not have a card to simulate a working VI, however I agree with nathand in the sense that you have to setup a trigger to get this accomplished.

 

I believe that you can do this through DAQ assist. The general idea is that you will set the number of samples wanted and the frequency(40KHz) but those samples (pulse burst) would be triggered by a secondary frequency/signal, in this case, 500Hz or 2ms. You should also be able to set the idle state of the line through DAQ assist. Experiment with that feature because I believe that there lays your answer.

 

Blessings,

 

hmarcano

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

Wisdom is the principal thing; therefore get wisdom: and with all thy getting get understanding. Proverbs 4:7
0 Kudos
Message 21 of 25
(1,415 Views)

Hi again,

 

That is what I have been doing! Using the DAQ-assist as to configure two counter outputs gives me the error message "NI Platform Services:  The specified resource is reserved. The operation could not be completed as specified". Not able to call two separate DAQ-assists as to setup the desired trigger. Have also been experimenting with DAQ-functions doe without any success so far. Not even sure if this is possible with the USB 6211, not much found on this topic in the manual.

 

 

0 Kudos
Message 22 of 25
(1,406 Views)

Right - the reason the resource is reserved is because a finite pulse generation requires TWO counter channels (I didn't realize that earlier in this thread). The first generates the pulse train; the second basically counts the number of pulses and stops the pulse train after the desired number. So, setting up the finite pulse generation reserves both counters, and then you get an error when you try to configure the second counter channel. That's why I was suggesting you configure two infinite pulse trains, with one gating the other, but I don't know how to synchronize the start triggers, although it must be possible since that's basically what happens (as far as I understand it) in a finite pulse generation. Perhaps it's possible to put both counters in the same task and start them together that way.

Message 23 of 25
(1,400 Views)

That expains allot, nice observation! Indeed there is no "reserved resource problem" when running two counter outputs continuously.

0 Kudos
Message 24 of 25
(1,384 Views)

Hello!

 

Finally I have managed to configure a working VI that utilizes two countinuous counter outputs, with CTR0 serving as a pause trigger for CTR1, as to repeatedly generate a finite counter output consisting of N-cycles on the USB-6211 device (see http://digital.ni.com/public.nsf/allkb/4A9AF19480E50C6D862571B70058142A). The main drawback of this solution is that it requires some amount of fiddling with the parameters as to achieve the desired output and all possible configuration may not be possible.  Thank you for participating in the discussion!

 

Untitled.png

0 Kudos
Message 25 of 25
(1,341 Views)