From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-22-2017 05:40 AM
Hello to everybody, I've started from a while to work on Labview, but i've got a problem.
I'd like to print on the same graph a function that I calculated inside a for case and at the same time the point which is calculated inside the for.
In pratice, the red point on the Phase Portrait should move while it's calculated.
Sorry for my english ^^'
this is the VI, if someone can help me i would be grateful.
05-22-2017 10:24 AM
Hello,
In your code, you put the graph outside of the for loop and enabled auto indexing in the tunnel mode, which would cause the graph to start getting the points only after the loop has been completed the N iterations (100 in your case).
I didn’t understand exactly what you meant by: the point should be moving while it’s calculating…
I have put another XY Graph inside of the for loop and replace some array subsets…
Is it what you mean?
Greetings and Regards,
James
05-22-2017 05:22 PM
Here's a quick modification. Still needs cleanup
05-22-2017 05:25 PM
@JamesSouv wrote:
I have put another XY Graph inside of the for loop and replace some array subsets…
Wow, that's bad! Writing to a terminal and reading from a local variable of that same terminal (e.g. "appended array") in parallel is a prime example of a race condition caused by blatant overuse of local variables.
05-23-2017 01:56 AM
Thank you for your answers! I'm a newbie in Labview and I still have to learn many things. But Thank You Again!
05-23-2017 02:18 AM
Another Question .. If I wanna to plot in the same XY graph again a function calculated outside of the for ? What can I do it ?
05-23-2017 02:49 AM
Hello,
@Altenbach,
My code is not performant, I agree!
I used the provided template to show why the point was not moving.
As I mentioned before, the main problem was that the XY Graph was outside of the for loop.
But thanks for your precision.
@Marco,
Here are some useful tutorials highly recommended for newbies in LabVIEW
Have fun programming in LabVIEW.
-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)
Learn NI Training Resource Videos
6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training
05-23-2017 04:38 AM
Hello again,
To do multiple prints on your XY Graph, you could do following:
Pull down the Build Cluster Array function.
Add the (calculated array) function to the input of the Build Cluster Array function.
More information about Graphs and Charts are provided here.
Did it solve your problem so far?
Greetings,
James.
05-23-2017 05:14 AM
Not at all .. probably I don't understanding how treat cluster and array in Labview .. This is my problem. I tried to implement the VI of altenbach (thank you again!) ma I must link the array of cluster (n.2 in the image) with the other array of cluster (n.1 in the image).
Separately the XY Graph plot both, but I don't be able to plot together, In the same Phase Portrait.
05-23-2017 03:48 PM
You need to decide on a common structure for the plots. I was using complex while you were using clusters. I would recommend to use complex arrays for everything.
Your image is incomplete, so we cannot help much unless you attach the actual VI.