LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I XY graph two different signals each with its own y-axis on the same graph?

I have wired an n-ch, 1 sample VI to an xy graph express VI.  I have two y-axis scales, but I only see a plot of one of the signals.  Can anyone help me understand what I am doing wrong, and how to do it correctly?  The VI as a whole may look ugly, but the flow of the signal from the xy-graph is obvious (but not working the way I want it to...). My sub-VI is attached.  Thanks in advance, Christian

0 Kudos
Message 1 of 10
(5,203 Views)

Christian,

             The attachment may be to help you.

0 Kudos
Message 2 of 10
(5,181 Views)

Evan,

Thanks for the reply.  I am aware that I can use property nodes to customize the scales.  To clarify my question, how do I assign one plot (or signal) to one scale (or y-axis), and assign the other plot (or signal) to the other scale (y-axis)?

I have successfully created the two scales, (Thickness and Width).  But when I try to assign the signals to their respective scales (in the express vi properties dialog) LabVIEW will not accept the changes... Is it a problem with the block diagram code, or something else?

0 Kudos
Message 3 of 10
(5,167 Views)

I can't seem to open your examples and I don't use the Express VIs or graphs but it is very easy in LV7.1.

1. Right click on the Y scale (usually on the right side) and select duplicate scale.

2. Right click on the graph, select properties, goto the 'Scales' tab and rename it.

3. Goto the 'Plots' tab and select signal you want to assign and pick the proper Y-scale from the pull-down below.

It sound like you already have the scales so just you may need only steps 2 and 3.

Of course, these properties can also be controlled progamatically through property nodes but it's easier to get the hang of it by playing with the properties pop-up.

K

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
Message 4 of 10
(5,159 Views)
K, You may be having difficulty because I am using LV 8.  I did the 3 steps as you suggest, but when I try and assign one of the plots to the other scale the screen shutters and then switches my selection back to the original scale...  Thanks for your input.
0 Kudos
Message 5 of 10
(5,144 Views)
Christian,
 
          I will be glad if I can help you,so I programed a vi for your problem.Please refer to the attachment.
0 Kudos
Message 6 of 10
(5,135 Views)
Hi Christian,
 
That express VI requires that you input an X data set for each plot.
 
If you must use that express VI, then for your program you need to insert a "build array" function, with two (or more) inputs, in line with the express VI's "X input", and wire your X data array to each of the build array function's inputs - see the example I've attached.
 
Personaly, I wouldn't use the express VI at all - it really isn't difficult to manipulate your data into the right format for the XY graph using simple functions - see the second example I've attached.
 
Mark H.
 
P.S. Gotta be worth about 6 stars I reckon! Smiley Wink 
Message 7 of 10
(5,119 Views)
Thank you both for the examples.  As I am trying to use an xy graph as a "chart" (appending point by point with each itteration of the loop) I ultimately used an example from the example finder to buffer the data.  I was never able to get each of the signals on the same chart each with its own scale so I used two charts stacked horizontally...  Thanks again for the examples.  Christian
0 Kudos
Message 8 of 10
(5,084 Views)
how about costum x axis?
0 Kudos
Message 9 of 10
(4,467 Views)
how about give name to x and y axis with report generation?
0 Kudos
Message 10 of 10
(4,438 Views)