LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MINUSING 2 GRAPHS

Solved!
Go to solution

The Sum  and Sum 2 arrays are quite different in length.  How does subtracting one from the other make any sense?  You build the arrays in different order, so that accounts for the difference in size.

 

What are you actually trying to do?

 

Hint: If the data is not already in the Dynamic Data Type, use of the Express VI for an XY graph seems excessive. XY Graph 2 and XY Graph 4 have the same result in the image below.

 

Lynn

 

Simple XY Graph Build.png

0 Kudos
Message 11 of 40
(680 Views)

Hi johnsold !

Thank you for your reply !!!

I need from graph 1 subtract the first element from Sum2 (this will be my first graph), then to subtract the 2nd element from Graph1 and so on. Finally I'll have 5 graphs in one window... 

0 Kudos
Message 12 of 40
(678 Views)

Has anybody any ideas with this?

0 Kudos
Message 13 of 40
(664 Views)

It sounds like you've successfully been able to subtract arrays.  And now you know how to bundle multiple arrays so they can go to one graph.

 

So what do you still need to know?

0 Kudos
Message 14 of 40
(655 Views)

Hi again Moony,

 

Glad my solution helped a bit, I think you need to explain the whole problem from start to finish.

 

At the moment I am finding it hard to understand what you want.

 

I'll have a look again tomorrow when I get back to work.

 

Dominic

0 Kudos
Message 15 of 40
(651 Views)

I didn't be very attentive, so after johnsold's post, I understand that I was wrong... And the version is not that what I need (I wrote it in the post above). Please help me.

0 Kudos
Message 16 of 40
(649 Views)

Thank you, Dominic. Your version is really helpful, but after johnsold's post I'm confused and think he is right and there was a little bit problem to solve.

 

Let's to explain my problem:

 

Array Sum2 has 5 elements. I need to extract the first element from Graph1 (I will get the second graph in the SAME window, let's name it Plot1), then I want to extract from Plot1 the second element of array Sum1 (I will get Plot2 graph again in the SAME window) and so on. Finally, I'll get 5 graphs and my Graph1 in one window.

 

Thanks for attention. I will wait for replies.

 

P.S. Sorry for fuzziness in the beginning of my post... 

0 Kudos
Message 17 of 40
(644 Views)

I still do not understand what you are trying to do.

 

The arrays Xm and Sum have 901 elements. The other arrays (including Sum2) have 12 elements. The number of elements visible on the front panel has nothing to do with how many elements are in the arrays.  Because of the way you have the autoindexing set up on the for loops the graphs and output arrays are different sizes.

 

You talk about extracting one element and plotting it.  A one element plot does not make any sense!

 

What does the data represent and what do you expect from the multiple plots?

 

Lynn

0 Kudos
Message 18 of 40
(639 Views)

Thank you johnsold. 

It's my fault that I can't understand clearly what I want. I'll study it and disturb you once more, when I may describe my problem more clearly.

 

Thanks so much. 

0 Kudos
Message 19 of 40
(636 Views)

Do not consider it a disturbance.  Those of us who participate on the Forums do so because we want to help people learn to use LabVIEW more effectively.

 

One of the keys to any successful program development effort is the design work put in at the beginning.  If you do not know what the program needs to do, then you have very little chance that it will do what is needed.

 

Think about what you are trying to do - without worrying about how to do it in LV. When you can deescribe precisely what you want to do, then it becomes much easier to implement.  That description can be in words, as a mathematical algorithm or function, a flow chart, or other style, so long as it clearly defines what is to be done.  Sometimes a very simple example worked out by hand is helpful.

 

Please post back when you have a more clear description.

 

Lynn

0 Kudos
Message 20 of 40
(621 Views)