01-16-2016 02:55 AM
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
Solved! Go to Solution.
01-16-2016 10:37 AM
01-16-2016 11:39 AM
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
01-16-2016 01:57 PM
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
01-16-2016 06:43 PM
01-16-2016 11:46 PM
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
01-17-2016 12:55 AM
01-17-2016 01:24 AM
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
01-17-2016 02:03 AM
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