LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I plot this graph with respect to time?

Hey guys,

I'm having trouble trying to plot the x1 data with respect to time on the x-axis. My file is in the attachment

 

Please and TY

0 Kudos
Message 1 of 2
(2,399 Views)

If you want to update the graph in realtime inside the loop, use a chart instead. Set dx of the x axis to 0.001 (your time increment is 1ms). Since the loop executes in one second, you can also place the existing graph after the loop and autoindex the x1 output at the loop boundary fefore wiring to the graph terminal.

 

Why do you care about execution order? You should not force it with a sequence structure if the outcome does not depend on the execution order. You might even place both formula nodes in the same loop. Most likely your computer has multiple cores so more than one thing can be done at the same time and the VI will finish in half the time. Of course there is also no reason to place a delay inside the loop. The calculation should be done as fast as possible. (You can calculate virtual time as 1ms per step)

 

Of course I recommend you use graphical programming instead of formula nodes. Try it! (There is also an entire palette for differential equations)

 

 

 

 

Message 2 of 2
(2,392 Views)