LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding data points to multiple plots at once

Solved!
Go to solution

I have a source that generates between 1 and N (here 5) data points per update. I would like to create a vi that will put generated point 1 in graph 1 generated point 2 in graph 2...ect

I'm not sure why, but my XY Graph clears every few updates. If someone could help me solve/optimize, it would be greatly appreciated.
True CaseTrue Case
False CaseFalse Case

0 Kudos
Message 1 of 7
(2,840 Views)
Solution
Accepted by topic author ATE-EGNE

Each element of your XY Graph data is a single plot. When you "receive" your data, you keep working on the same plot due to your index array, which is probably not a valid index. If your For Loop runs 3 times because the size of the array is 3, then you will try to work on the 4th plot (because 0 would be the 1st plot) which doesn't exist. 

Message 2 of 7
(2,823 Views)

SolvedSolved

You are correct. Pesky LabVIEW doing what I tell it to and not what I mean

0 Kudos
Message 3 of 7
(2,803 Views)

I like to use the in place element structure, just to make it a little more obvious what is going on. 

 

temp.png

0 Kudos
Message 4 of 7
(2,797 Views)

@Gregory wrote:

I like to use the in place element structure, just to make it a little more obvious what is going on. 

 

temp.png


I was under the impression from this post that the in-place element structure was no longer in the meta (for lack of a better term XD )

0 Kudos
Message 5 of 7
(2,789 Views)

The consensus from that thread is that you probably don't need to use the IPE for performance gains because the compiler will try to do most of that behind the scenes. 

 

However, there are definitely still use cases for the IPE. If you are accessing a DVR you have to use it. I think it makes the above situation look clearer on the block diagram, which the compiler will not help you with 😊

Message 6 of 7
(2,785 Views)

@Gregory wrote:

The consensus from that thread is that you probably don't need to use the IPE for performance gains because the compiler will try to do most of that behind the scenes. 

 

However, there are definitely still use cases for the IPE. If you are accessing a DVR you have to use it. I think it makes the above situation look clearer on the block diagram, which the compiler will not help you with 😊


Ok, I understand now. thanks

0 Kudos
Message 7 of 7
(2,753 Views)