03-07-2024 09:28 AM
I have a problem, I need to graph 2 diiferent pressure sensor vs a servo current, and I can add a second Y (pressure sensor) to have both in one graph vs current on X
03-07-2024 10:14 AM - edited 03-07-2024 10:15 AM
Bundle the data in a cluster and build the 2 clusters in an array that you then wire to an XY graph.
03-07-2024 10:21 AM
This is very easy in LabVIEW. Just take a look at the shipping example called XY Multi Plot.vi. Help > Find Examples... Search tab and search "xy" or "Multi".
You don't need to use the Plot Multi XY .vi and create a 2D picture. I added the XY graph to this example to show you how to connect it.
Sorry if you need to use Express VIs, I have no idea how to use them, or if they can even do multiple plots.
03-07-2024 10:51 AM - edited 03-07-2024 10:55 AM
There is really no such thing as as express xy graph. It is just a plain xy graph with a "build xy graph" express VI tacked in front of it.
One feature of that express VI is that it can retain data between calls and can thus act as an "xy chart". As a first step, we need to know what mode you are using.
I never in my live use that express VI, and if your data arrives one set of three points (x, y1, y2) at a time, You can easily built it into a 2D array and graph that (after some simple processing).
Here are the two possibilities (There are many more ways to do all that!)
The top code simulates "retain data between calls" of the express VI and you could even wrap it into a subVI containing e.g. a feedback node and it would exactly (much better!) as the express VI. Just add some functionality to e.g. an optoin to clear the memory and handle situations where the input array changes (e.g. [x,y1,y2] --->>> [x, y1,y2,y3]).
03-07-2024 11:25 AM
Assuming you want to chart the data live (arriving one point at a time for x, y1, y2), here's one simple way to do it.
Of course if your "servo current" is a linear ramp, you don't need an xy graph at all! we would know much more if you would attach a simplified version of your VI!!!