Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

Triangle wave asymmetry

Hello I am trying to create a asymmetric triangle or ramping signal.  I can get a single ramp to show on my graph, but I can not get it to do continuous generation of that signal.  Can anyone help, I am very new to Labview.  I want a signal that looks like this,below,  to repeat continuously and to be able to control duty%, amplitude, frequency, delay, and sample duration.  Sorry for the poor picture, thank you for the help.

 

                                            /                                             /

                                       /   !                                         /   !

                                  /        !                                     /       ! 

                              /            !                                 /           !

                          /                !                             /               !

                     /                     !                        /                    !

.............../                           !.................../                         !..............

0 Kudos
Message 1 of 4
(7,820 Views)
Hello New,

The best thing to start with would be the Cont Gen Voltage Wfm-Int Clk VI found in the Example finder under Hardware Input and Output»DAQmx»Analog Generation»Voltage.

Instead of using the Waveform Buffer Generation (multi) VI inside the example you will need to use some code of your own devising. I would recommend using the Sawtooth Waveform and Square Waveform VIs found in the functions palette under Functions»Signal Processing»Waveform Generation.

Once you create the two parts of your waveform you can use the Append Waveform VI found in the functions palette under Programming»Waveform»Analog Waveform to append the two signals into a single waveform for the generation.

For more information on each of these functions reference the context help for each of the functions and detailed information in the LabVIEW Help.

Regards,
Dan King

0 Kudos
Message 2 of 4
(7,804 Views)

Sorry for the late reply, we were on break and I could not get into the lab.  I tried what you suggested and it worked well till the append waveform.  This seems to add the signal to the end of another signal and I would like to replace a part of a signal.  So what I have ended up trying is using max(x1,1) so I only have the positive part of a sawtooth signal.  Do you know if I can now control the length of the signal part that is zeroed?  In essence to control the duty%.  Attached is the program that I will put into my other code that I am working with.  If I could use "if" or "then" statements to control that length I think I could get it to work.  The problem is I can not find and examples of how to use conditional statements to control a signal.

Thanks for all your help

0 Kudos
Message 3 of 4
(7,741 Views)

Hello New,

I'm sorry for the late reply, but I've been out of the office for the last week. One easy way to adjust for the amount of the sawtooth that will be passed through the formula node would be to subtract a scalar from the dynamic data from the output of the Simulate Signal Express VI and then feed the output of the subtract function into your formula node. The value of the amplitude and this subtracted value will determine the percentage of the sawtooth that is passed through.


Here is an example of exactly what I am talking about.

Message Edited by Dan_K on 03-30-2009 02:58 PM

Regards,
Dan King

0 Kudos
Message 4 of 4
(7,696 Views)