LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to subtract graph

20190805_145203.png

One graph is in the form of y=x, the other graph is in the form of y=x*1/2 and the x value is from 1 to 20 in Excel. But I keep getting errors if the price doesn't match. What's wrong?

0 Kudos
Message 1 of 4
(2,583 Views)

Hi chjh,

 

those "build Graph" ExpressVIs create a plot for a XY graph.

Such a plot is NOT compatible to a waveform datatype!

 

One graph is in the form of y=x, the other graph is in the form of y=x*1/2 and the x value is from 1 to 20 in Excel. But I keep getting errors if the price doesn't match.

If you would get rid of those ExpressVIs you could stay with using waveforms for all functions. It would be so much easier to get your resulting waveform:

check.png

 

The other simple option is to use a XY graph (instead of the final waveform) to display your results…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,567 Views)

You don't provide sufficient information to solve the problem, but the difference between two arrays of clusters is certainly not a waveform. You would also subtract the x-values from each other, giving you an array of zeroes.

 


@chjh0607 wrote:

 

One graph is in the form of y=x, the other graph is in the form of y=x*1/2 and the x value is from 1 to 20 in Excel.

 

You only need an xy graph is the x-values are not spaced equally. Are they? If the are spaced equally, all you need is two 1D Y arrays (assuming both use the same x). You can even calculate the difference between y and 0.5y from first principles, right? Your description does not explain the use of express VIs for integral and difference. Can you explain that?

 

In any case, as has been mentioned, don't use express VIs and dynamic data for any of this. It is not needed. Where does the data come from?

 

Also, to get help, please attach your VI. an oversized truncated picture of express VIs is pretty useless because too much is hidden.

0 Kudos
Message 3 of 4
(2,469 Views)

Thanks for the solution. I am trying to do it for the last few weeks but don't know how to do it. Well at this time, I use subtraction in excel and then my half of the problem was solved. But it works only in few cases so it is not a perfect solution. Now after reading this thread I will try it again with a new method. So thank you so much for this amazing thread.

0 Kudos
Message 4 of 4
(2,272 Views)