05-25-2017 11:44 PM
Hi,
I am trying to generate a square wave as per below attached graph.
I tried using square wave pt by pt VI. But graph is not generating as per requirement. I think timing which i am giving is wrong. Could anyone please help me with solutions?
Graph is Duty cycle vs time.
Regards
Solved! Go to Solution.
05-26-2017 12:04 AM
Instead of attaching the image, please attach your code.
Is there any specific reason on why you are using the point by point VI?
05-26-2017 12:07 AM
Hi,
you should not expect solutions...
When your VI doesn't follow the requirements you made something wrong. Maybe you attach your VI?
Hint: use a For loop on your input array, add up time and create a XY plot using this time scale...
05-26-2017 01:05 AM
Hi,
Please find below code. There is no specific reason for using the point by point VI.
Regards
Sagar S
05-26-2017 01:16 AM
Hi,
Thank You for the reply. I tried xy graph but it is not generating as square wave.
Regards
Sagar
05-26-2017 01:55 AM
You are trying to generate a square wave based on a while loop and system timer which would not give you the waveform what you expect. Try using Square Wave.vi by configuring the number of samples upfront, which would give you a perfect square wave of your interest.
05-26-2017 02:07 AM
Hi,
Thank you for the reply. I tried with Square Wave.vi . But the desired wave form is not generating.
Please take a look.
05-26-2017 05:55 AM
Thank You. It works.
Regards
Sagar