Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Help Gated Pulse generation!!

Hi,
 
I need to generate 5 TTL pulses of 5MHz frequency, at every 10ms. Like 5 monoshots, repeated at 100Hz. I am using the PXI6602 card to do this. I started with the continous pulse gen NI TIO example  and then used gated counters to get the required wave.
 
I am using traditional DAQ.
 
Now I have a 5 pulses @5MHz followed by 0 level for the next 10ms.And then again 5 pulses and so on.
 
I used counter0(at 100Hz) to genrate a gating signal that I routed to the gate of ctr1 operating in continous mode at 5MHz to get the pulses.
 
Now, I need another pulse in sync with my first burst, but I need a 5V level in between the bursts.(ie for 10ms).I send the gating signal to another counter(ctr2) operating at 5MHz and tried changing the output polarity to negative.Now I have 5V between my bursts, but the two bursts from ctr1 and ctr2 are 180 out of phase.I need the two pulse bursts to be  in-phase, but during the idle period one signal should be 0v while the other should be 5V.
 
Is there any way to change the "idle state" voltage level of the counters without changing the output polarity?
 
please help!!I I need these two waveforms to proceed with my project!!
0 Kudos
Message 1 of 3
(3,960 Views)

Hello JJ,

 

The "Output Polarity" setting in Traditional DAQ has the exact same effect as the "Idle State" setting in DAQmx so I think this is the approach you'll want to take.  Once you set the output polarity you can phase shift one of the signals by 180 degrees using the "Initial Delay Seconds" attribute on the Counter Set Attributes VI.  To do this you'll need to calculate the correct delay in seconds from the pulse frequency.  This should allow you to have the two pulses in phase and have the idle state be the opposite.

 

I was assuming that the reason you didn't want to change the output polarity because of the phase shift that it introduced.  If this isn't an acceptable solution for your application it would be helpful if you can explain a little more about what you want to do.

 

Have a great day!

 

Cheers,

 

Brooks
0 Kudos
Message 2 of 3
(3,928 Views)
The initial delay parameter works for only the very first time the pulses are generated.It does not seem to work for subsequent pulses.I had tried it out earlier.How ever I was able to achieve my end using DAQmx vi's. I generated a finite pulse train in retriggerable mode.Then I used another counter to generate a pulse  with width = my needed delay and frequency  = pulse repetition frequency. I used the risibg edge of this pulse to trigger one of my high freq pulse trains and the falling edge to trigger my other train. And voila I got the two pulse trains in phase but with different idle states. 🙂

Thanks for the help!!  :-))
0 Kudos
Message 3 of 3
(3,911 Views)