Showing results for 
Search instead for 
Did you mean: 

Graph multiple plot curseur

Go to solution


I am creating a program that allows you to plot multiple graphs on the same graph. I created a subVI that allows you to select the measurement range between two Y points and then create a new graph. I encounter a problem when I create a reference of my graph, I cannot connect it with my subVi. Thank you for your support.

Download All
0 Kudos
Message 1 of 14
Accepted by topic author ibahr

Please use "save for previous" (2020 or below) before attaching. I currently cannot look at your VIs.


From the "capture" image, you have giant race conditions due to blatant overuse of local variables. All your local variables will get read way before their indicators have received data, so the outcome is completely unpredictable. You can easily eliminate ALL locals by just branching the wires, guaranteeing that the execution order is correct.

Why are there terminals without labels and so (so!) many wire bends and hidden wires? Clean code would be much easier to handle.


I cannot tell from the image alone what the problem with the reference is.

0 Kudos
Message 2 of 14

Thank you for your suggestion I will modify

it here is the 2020 version

0 Kudos
Message 3 of 14
Accepted by topic author ibahr

We are missing the toplevel (

0 Kudos
Message 4 of 14

Sorry, here it is

0 Kudos
Message 5 of 14
Accepted by topic author ibahr

Most likely you created the reference before defining the datatype of the xy graph and now the datatype differs.

(XY graphs can have many datatypes (complex, cluster, points, etc.) and only after connecting the data to the terminal it will be defined. You need to change the control reference.


If you get the "value" in your subVI, you can see that it is a single cluster of xy arrays instead of an array of such clusters.





See if this can give you some ideas. I took the liberty to simplify a few things. Of course you probably want to expand it so the second graph adjust whenever the cursors change, by creating a proper state machine.











0 Kudos
Message 6 of 14

Thank you, it works really well and you simplified it very well.

0 Kudos
Message 7 of 14

This solution works but it's not exactly what I want to do because it doesn't take into account all the points. Here is the photo of the final result that I want to obtain. Thank you for your feedback.




0 Kudos
Message 8 of 14

It is because thresholding in your implementation only finds the first crossing point. If you want all data in the given Y range, you need to inspect every point. That's even easier!

0 Kudos
Message 9 of 14

That's absolutely correct. I don't see how else to do it.
If I create a cursor for each graph it complicates things further.

0 Kudos
Message 10 of 14