LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

X Y simple function graph representation (harmonic movement)

Solved!
Go to solution

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 Smiley Happy Thanks a lot!

 

 

0 Kudos
Message 1 of 9
(2,927 Views)
Solution
Accepted by topic author cismarel

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. 😄

Message 2 of 9
(2,913 Views)

i will try this, thanks a lot my friend Smiley Wink

0 Kudos
Message 3 of 9
(2,908 Views)

Note that there are also functions that generate a sine pattern directly (sine pattern, sine wavesine_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.

 

Message 4 of 9
(2,892 Views)

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 .Smiley Happy

0 Kudos
Message 5 of 9
(2,844 Views)

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 .Smiley Happy


 

0 Kudos
Message 6 of 9
(2,840 Views)

 


@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?

 

0 Kudos
Message 7 of 9
(2,825 Views)

The two other nodes that are used are Sine and Bundle.

Tanya Visser
National Instruments
LabVIEW Group Manager
0 Kudos
Message 8 of 9
(2,811 Views)

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!

0 Kudos
Message 9 of 9
(2,771 Views)