LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to get inclined periodic waveform in labVIEW?

Solved!
Go to solution

Hi 

 

I want to draw a waveform which has the amplitude from 0 to 360 and have a frequency of 50HZ. the logic which i used in my code is like:

 

50HZ=0.02 seconds.  

360/0.02=18000 (means multiply each sample to 18000 to get inclined wave which has amplitude in range 0 and 360)

 

values are increase from 0 to 0.02, with definate step, and i multiply each step with 18000 to get desired line.

 

1. take present step.

 

2. if present step is>0.02

       then start from zero

 

3. Else                   (less then or equal to 0.02 seconds, then )

       multiply present step with 18000

 

but i am not getting the desired response. kindly help me i will be highly thankful to you

 

with best regards

mudasir ahmed

 

 

Download All
0 Kudos
Message 1 of 9
(4,377 Views)
Solution
Accepted by topic author mudasir11
Why not use the ramp signal function? Check the signal generation palette.

Also it sounds like you're wanting to generate an output signal. If so you need to buffer your data and let the AO board handle the output timing. Windows has way too much timing jitter to do what you want.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 9
(4,315 Views)

Dear Sir,

 

I tried with ramp signal, but unforunaetly fails in this method too. Actually sir,  my VI code is divided into two portions one is generation of this kind of signal (50HZ and amplitude 0 to 360) internally, and 2nd is to perform some calculations and decisions which based on this signal characteristics. I successfully create the logic for my second portion, but i cannot do any thing without the generation of this signal. Please sir, give me one favor and help me in designing of that signal. i will be highly thankful to you.

 

with best regards

mudasir ahmed

0 Kudos
Message 3 of 9
(4,297 Views)
Solution
Accepted by topic author mudasir11

The ramp function seems to work just fine at implementing what you have described. If this is not what you want, please show an image of the desired waveform.

 

I disabled your code because I do not have the Simulation add-on.

 

Lynn

 

 

Message 4 of 9
(4,266 Views)

You can also use the Basic Function Generator.vi set to Sawtooth waveform.

 

Ben64

0 Kudos
Message 5 of 9
(4,244 Views)

Dear sir,

 

The desired waveform is attached herewith. Ramp signal gives output for one period only but i need this waveform in periodic fashion as shown in attached picture . The problem with sawtoothwave is, it gives AC output from minus scale to plus scale vertically, but i need DC which has amplitude from 0 to 360 but repeate the same shape after exactly 0.02 seconds(50Hz), its shape should be like sawtooth but above the referance line. and i really appreciate above kind persons by the core of my heart for trying to help me thanks all of you sir.

 

with best regards

mudasir ahmed 

0 Kudos
Message 6 of 9
(4,217 Views)
You can use the output of the ramp pattern to repeat as many times as you want. From one to infinity. Adding an offset to a sawtooth is just as simple.
0 Kudos
Message 7 of 9
(4,192 Views)

Dear sir, 

 

by adding offset in sawtooth wave, it results in shifting of overall signal upward, and start from the offset vale. but i need signal which start from 0 amplitude and ends at 360 amplitude. i am again attaching the desired waveform.

 

with best regards

 

 

0 Kudos
Message 8 of 9
(4,181 Views)
Solution
Accepted by topic author mudasir11

The slight modifications of the VI I posted earlier show (1) concatenating 5 repetitions of the ramp and (2) use of the Sawtooth Waveform.vi with offset.

 

Reading the Detailed Help files for those VIs may provide some understanding of how to use them effectively.

 

Lynn

Message 9 of 9
(4,163 Views)