LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY graph collecting data

Solved!
Go to solution

Hello,

 

I'm trying to collect the data from a XY graph, for further purpose in my program. 

But when the graph doesn't get any information anymore it appears to clear its chart.

I'm using this vi as a subvi if that is any help, that's why I'm using while loop so forget that one.

 

Or isn't there anyway to collect the data from it and I simply have to save it in a 2D array?

 

Koen

 

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
Download All
0 Kudos
Message 1 of 14
(3,240 Views)

Hi Koen,

 

THINK DATAFLOW: a graph only displays data!

You have to collect the data on your own in a shift register.

 

Your subVI might look like this:

check.png

Best regards,
GerdW


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

Hi Gerd,

 

You actually improved my sub subvi, haha.

I just added it because it would be easier to understand.

Anyway, so the best thing to do is just to build it in an Array rather then predefining it as a Cluster?

 

Koen

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
0 Kudos
Message 3 of 14
(3,231 Views)

Hi Koen,

 

you can collect data in a cluster too, but using arrays for such tasks is (usually) easier...

Best regards,
GerdW


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

Hi gerd,

 

I converted it to arrays as you proposed though it still doesnt work.

In the attachment is the subvi which will process data.

 

Koen

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
Download All
0 Kudos
Message 5 of 14
(3,221 Views)

Hi Koen,

 

what is "still not working"?

 

In your picture you wired a scalar value to the SaveReport-VI, so I would not wonder when there is just one data value in your report (instead of an array of values)...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 14
(3,217 Views)

Hello Gerd,

 

I'm trying to save the data acquired from the apply filter vi to the savereport vi.

Where in the savereport via the array will be clustered because that will give the nicest result.

As the picture says, the scalar value you see isn't what it is, it is a stack of wires. Otherwise it would become really messy.

 

Koen

 

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
0 Kudos
Message 7 of 14
(3,215 Views)

Hi Koen,

 

hiding elements in the block diagram is considered very bad programming style, especially stacking wires behind each other!

You should use AutoCleanup more often (ctrl-U)!

 

You should also get rid of all local variables in your SaveReport-VI, as they lead to race conditions...

 


Where in the savereport via the array will be clustered because that will give the nicest result.


 

I don't get the point here...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 14
(3,212 Views)

Hi gerd,

 

I'm normally neither a fan of the stacking, though it is absolutely necessary, otherwise 10 different wires will just go to right.

Only way to fix this wire stacking is using a cluster, but will this make any sense?

 

I removed all the local variables now, though it didnt work.

 

I use it clustered because i like how the XY graph gets represented.

Why i wanted it this way? because it gives a better view for a report in my opinion.

 

Koen

 

P.S. Thanks for all your help in advance!

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
0 Kudos
Message 9 of 14
(3,209 Views)

Hi koen,

 


otherwise 10 different wires will just go to right


When those 10 values have the same datatype you can use an array, otherwise use a cluster.

Yes, that makes sense!

 


Why i wanted it this way? because it gives a better view for a report in my opinion.


As long as the data remains the same you will get the same plot. It doesn't matter if you're using clusters of arrays or arrays of clusters!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 14
(3,203 Views)