10-18-2010 01:08 PM
Hey guis ! I'm new in labview and I want to represent on a graph a simple sinusoidal function y(t)=A*sin(w*t+f) ( harmonic movement law) where A is the maximum amplitude and y is the amplitude in function of t(time). A, w and f are introduced from keyboard in a numeric field. f-is the initial phase , it means that in t=0 the amplitude is y=A*sin(f). What I don't know is how to put time in this function, please help me Thanks a lot!
Solved! Go to Solution.
10-18-2010 01:32 PM - edited 10-18-2010 01:33 PM
You can create an array of times using the "ramp pattern". Now simply apply your function and you'll get an array of Y's to be fed to a waveform graph. No loop needed. Adjust x0 and dx of the x-axis according to the ramp.
Use an event structure so the recalculation only occurs when one of the inputs changes.
See how far you get. 😄
10-18-2010 01:35 PM
i will try this, thanks a lot my friend
10-18-2010 02:23 PM - edited 10-18-2010 02:24 PM
Note that there are also functions that generate a sine pattern directly (sine pattern, sine wave, sine_waveform, even the simulate signal express VI) . You simply need to transform your inputs suitably.
Here's how a literal implementation using the ramp would look like. Modify as needed.
10-20-2010 03:21 PM
can you attach the project because i need it for school at physics. i don't know how to add a ramp pattern. Thanks you a lot , it really helped me to get more of labview .
10-20-2010 03:28 PM
i managed to add ramp pattern but i don't know what's until the waveform graph :-??
@cismarel wrote:
can you attach the project because i need it for school at physics. i don't know how to add a ramp pattern. Thanks you a lot , it really helped me to get more of labview .
10-20-2010 08:14 PM
@cismarel wrote:
i managed to add ramp pattern but i don't know what's until the waveform graph :-??
Is this a question or a comment? Are you still having problems?
10-21-2010 10:56 AM
The two other nodes that are used are Sine and Bundle.
10-25-2010 04:34 AM
i managed to handle with the waveform buider, there was a problem connecting the start variable with the t0 of the graph, i did the conection with a time stamp converter , now i want to make this project an exe in worder to send it to my physics teacher. I'm very thankful guys . Have a productive day!