LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to generate positive only sawtooth waveform?

Solved!
Go to solution

hello, i want to generate a positive only sawtooth waveform, starting from zero, and ramping up to 3.3V, and coming back down only up to zero value, and not swinging to -3.3V. is it possible to do that in labview 11? 

 

something like below. 

Capture.JPG

 

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 1 of 9
(5,974 Views)

If you are using the Waveform signal generation VIs, they have an offset input. If you are using the array output signal generation VIs, they have an offset input. If you are using the array output signal generation VIs, use Array Max & Min to find the minimum value in an array and add the negative of that to the array.

 

Lynn

0 Kudos
Message 2 of 9
(5,957 Views)
Solution
Accepted by topic author LV_Enthu
Of course. What have you tried? Have you looked at the Ramp Pattern function?
0 Kudos
Message 3 of 9
(5,955 Views)

that worked! thx

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 4 of 9
(5,904 Views)

i had a follow up question, how can i control the ramp rate both going up and going down?

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 5 of 9
(5,844 Views)

Hi LV_Enthu,

 

how can i control the ramp rate both going up and going down?

Maybe by setting the correct parameters for the ramp function?

 

Again the same question: What have you tried so far? Where exactly do you have problems?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 9
(5,836 Views)
I would hope that you are using two ramp functions if you want different rates.
0 Kudos
Message 7 of 9
(5,823 Views)

hello,

i have tried out the ramp function, for going up and going down, i varied the number of samples as well which seems to change the ramp rate, but i am not sure if I can confidently say that the positive ramp is going from 0 to 1 V in lets say 20ms, or 40ms, or whatever the user specifies?

attached a snapshot of the vi that i have developed

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 8 of 9
(5,806 Views)

Your ramp time is determined by the number of samples per ramp and the dt.  Right now, since your dt is just the reciprical of the number of samples, you get a ramp is 1 second.  You need to make your dt be the desired time of the ramp divided by the number of samples.  So in this case, you want dt = 40ms/16 = .0025 seconds/sample.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 9
(5,791 Views)