10-30-2022 02:56 PM
I like the Build XY Graph express VI, because it allows me to add one point at a time and it incrementally plots the new point. However, it allows only one plot in XY graph. If I want to have two or more plots in the same XY graph, is there an equivalent of the Build XY Graph express vi? Any other alternatives.
Thank you.
Girish Joglekar
10-30-2022 03:18 PM
Hi Girish,
@girish53 wrote:
is there an equivalent of the Build XY Graph express vi? Any other alternatives.
Use a shift register and BuildArray...
10-30-2022 04:43 PM
@girish53 wrote:
However, it allows only one plot in XY graph. If I want to have two or more plots in the same XY graph, is there an equivalent of the Build XY Graph express vi?
This is incorrect. The build xy graph express VI allows multiple graphs.. By default, the inputs are dynamic data, which can have one or more signals.
10-30-2022 04:55 PM - edited 10-30-2022 04:57 PM
Most advanced LabVIEW programmer stay far away from express VIs and dynamic data, but as a proof of concept, here's one possibility how it could be done.
(Of course this is a silly example, because x are spaced equally, so chart is all that's needed)
Now forget about all that and implement your own using simple datatypes. 😄
10-31-2022 09:20 AM
I tried giving elapsed as X Input, and a cluster of two values (corresponding to two variables I want to plot) as Y Input, but it gave me an error. See below.
How do I input the two y's and one x to the Build XY Graph.vi?
Thank you.
Girish
10-31-2022 09:44 AM
Hi Girish,
@girish53 wrote:
How do I input the two y's and one x to the Build XY Graph.vi?
Did you look at the example you got from Christian?
He showed you two ways to create inputs for two plots…
10-31-2022 11:15 AM
Thank you very much. It worked the way you showed in the example. My next challenge is: Would it be possible to fix x min,max, and y min,max so that the graph keeps growing steadily instead of readjusting every few time intervals? I tried setting the corresponding plot properties before starting the while loop which generates the points. But they were completely ignored.
Girish
10-31-2022 11:21 AM
Hi Girish,
@girish53 wrote:
Would it be possible to fix x min,max, and y min,max so that the graph keeps growing steadily instead of readjusting every few time intervals? I tried setting the corresponding plot properties before starting the while loop which generates the points. But they were completely ignored.
Why do you want to change plot properties when you want to set axis properties???
Which plot properties do "correspond" to axis ranges?
Solution: to "fix axis ranges" you switch of axis autoscaling and set the desired range…
10-31-2022 11:24 AM
You can turn of autoscale for the x axis and set the lower and upper limit to a reasonable value corresponding to the expected range. Of course once X is outside these boundaries, you won't see that data.
10-31-2022 11:28 AM
Build the x-array and y-array for each channel into its own cluster then build an array of these clusters. Feed the array of clusters direct into the XY Graph