LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pulse

Hi everyone.
 
How could I make a bipolar pulse(changes polarity every time) using VI examples on LabView 7.1?
I tried to manage it by using two VIs and by configuring it's duty rate and delay time.
I've checked it by using oscilloscope but it didn't work out.
 
I am feeling that VI's like  "Generate Single Pulse Train" can't generate square wave from 0 V to under 0 V.
(for example, 0 to -5v square wave) In my case, it starts with 10v, then goes to 0v when setting the output polarity to negative.
 
Am I just confused or is there a way to solve this problem?
If anyone have an idea, please give me an advise.
 
I am using DAQ board for outputs.
0 Kudos
Message 1 of 8
(2,770 Views)

Which DAQ board do you ahve??

Does it have analog output channels??

It if does, you may generate a square wave which would be bipolar.

In Find examples>>Hardware input output>>DAQmx>.analog generation>> voltage>> Cont Gen Voltage Wfm-Int Clk.vi should serve your purpose

Note: In AO channels, you will not achieve pulse rates as high as you would get with a counte/timer channel

Hope this helps

Regards

Dev

Message 2 of 8
(2,767 Views)
Thank you very much for the advice. 
Sorry I didn't mention the details of my board.
 
My DAQ is DAQ 6036E and is connected to BNC-2090.
I would like to make a pulse (square wave) bipopular with 0V resting period each  time.
   _         _
_|  |_   _|   |_    ___ 
       |_|         |_|
 
The image is like this.
 
I've tried the example Mr. devchander told me but couldn't manage to make resting period after each square wave.
Another problem is that I have to make a 100kHz wave.
In these high frequency range, the only way I can manage to make wave is use the counter channel.
 
Counter channel won't generate square wave like 0v to -5V. So I came up with a following idea.
 
1. Using two counter channel and generating two square train wave.(0V, 0V, 5V, 5V, 0V ...) 
2. Modulate one of its delaytime and make it reverse by using Op-Amp. 
3. Add up the two wave.
 
 
Could you give me an idea of what VI's I should use?
One (maybe both) could be "generate pulse train" but couldnot configurate its delay time.
 
Thank you anyway for the advice.
 
 
Kouim
0 Kudos
Message 3 of 8
(2,736 Views)
Hello,

There are some good samples in LabVIEW's Example Finder that will help you accomplish this.
Sample Finder>Hardware input output>>DAQmx>Generate Digital Pulse Signal (Counter output)> Gen Dig Pulse Train-Continuous.vi
On the block diagram, you'll find a VI called "DAQmx Create Channel".  There is an input on the bottom part of that VI called "Initial Delay" that let's you apply delay.
If you make a copy of the above VI, use one as Counter 0 and the other as Counter 1, and apply delay to one of them with the procedure above, you should be able to accomplish step 1.
By the way, the above sample is for DAQmx.  If you're using LabVIEW 6.1 or earlier, you'll need to use the Traditional DAQ samples; here's one that's pretty close, except it's finite instead of continuous:
http://zone.ni.com/devzone/cda/epd/p/id/1029

Please let us know if the above works for you.

Also, it looks like you have your region set to Japan.  We can work on this in Japanese, if you prefer.

Thank You, and Best of Luck,

Daisuke Arase
Applications Engineer
National Instruments Japan


0 Kudos
Message 4 of 8
(2,714 Views)

Hello, everyone.

 

Mr.Arase, thank you very much for your kind advise.

I tried the way you adviced me using two counters. The VIs seemed just what I wanted.

My version of LabView is 7.1,  so there were no problem in function.

 

I've made two "Gen Dig Pulse Train-Continuous.vi" as sub VI's and linked Initial Delay by making new connector.

After setting the frequency to 100kHz, I've checked the wave by using oscilloscope.

Before I could set the delay time,  I came up to the problem that each wave from ctr0 & 1 won't start in the same timing.

It seems that there are no meaning of setting the delay time in this situation.

Phase delay could be seen in a frequency higher than 70Hz. (or small?)

 

Is there any way to solve this problem or is this something to do with the limit of using two counters?

Actually, there are tough overshoots in each square wave. (it doesn't really matter)

My DAQ-card is 6036E.

 

Please help me out with this problem.

I don't mind if you use English or Japanese, either comfortable way for you.

Thank you very much for your reply.

 

Kouim

0 Kudos
Message 5 of 8
(2,694 Views)
Hello Mr. Kouim,

Thank you for your reply.

It looks like we're almost there!  The problem you're seeing now is that the two counters are starting out-of-sync.  You'll need to synchronize the counters by sharing the start trigger.  A good sample to start with is:
Sample Finder>Hardware input output>>DAQmx>Generate Digital Pulse Signal (Counter output)> Gen Dig Pulse Train-Continuous-Dig Start.vi

Modifying the above to work with two counters will enable you to start both counter outputs in-sync using an external trigger signal.

For your reference, I've made a simple program that does this.  Please see the attached file.

Thank you,

Daisuke Arase
Applications Engineer
National Instruments Japan
0 Kudos
Message 6 of 8
(2,674 Views)

Hi, Mr. Arase

 

Thank you so much for the "sync_2_counters.vi."

It worked out perfectly and I am getting two waves I desired to have!

 

I've connected OP-AMPs and made the wave reverse, but edge of the pulse has delayed.

Well, it seems that there are no problem in the digital side, and now I have to configure the analog circuit.

 

Thank you very much for your advice.

Regards

 

Kouim

0 Kudos
Message 7 of 8
(2,645 Views)
Hi Kouim-san,

Thank you for your reply.  I'm glad to hear things are starting to work!

Please let us know if we can be of further help.

Best Regards,

Daisuke Arase
Applications Engineer
National Instruments Japan
0 Kudos
Message 8 of 8
(2,639 Views)