03-03-2022 01:57 PM
Hello, I'm new to labview and i have a problem with labview WaveformChart.
I need to plot all data sets to one plot but all data sets ends it's calculation right before WaveformChart in for loop so the end result is 1D array. and when i'm trying to print it to Waveform chart with for loop it leaves only last printed dataset. How can i change this?
Solved! Go to Solution.
03-03-2022 02:07 PM
Maybe others on this forum are better than me... but I'm not visualizing what you're actually doing in the code here.
Please post your code or a mockup showing what your problem is and we can go from there.
03-03-2022 03:59 PM
Yes, we need actual code here to be sure, but this sounds like a classic example of the difference between a "graph" and a "chart" in LabVIEW.
A "chart" has internal history/memory, so it takes what you send it and adds it to what it had before (up to a limit). A graph takes what you send it and only shows the most recent values sent.
The "lazy" way to do this would be to get a history property node for the chart and use that.
The "proper" way would be to maintain the array of data you want manually and get that, instead of relying on a chart.
03-03-2022 04:54 PM
If you have a fixed dataset, you need a graph, not a chart.
Please attach a simplified version of your VI so we can give more specific advice.
03-04-2022 12:14 AM - edited 03-04-2022 12:15 AM
Hello, here you have it. It has dataset from measurements with accelerometers. Each accelerometer has 3 axis and there were 4 of them. I need to plot all of them in a specific way. Each accelerometer axis has to be printed to the same plot area. And each accelerometer has to have personal plot area with all 3 axis.
I want it to be controlled automatically to recognize that how many accelerometers has been uploaded and create as many plots area as a amount of accelerometers.
03-04-2022 12:15 AM
I've posted code. Thank you!
03-04-2022 12:16 AM
Hello, thank you. I've posted code for you to better understand the problem.
03-04-2022 02:35 AM - edited 03-04-2022 02:41 AM
Most people here don't use dynamic data and express VIs. Too opaque and too much overhead.
Apparently, you have an array of dynamic data and each array element contains three signals. Notice that you have an array of dynamic data, but your output tunnels throws everything away except the last filtered array element.
It is not clear what you want? (append the four array elements? Create four graphs, each with three plots? Something else?)
You definitely want a graph, not a chart.
Maybe something like this?
If you want the number of graphs to adjust automatically, there will be some limitations, but it's doable.
03-04-2022 02:45 AM
@IlyaChaban wrote:
I want it to be controlled automatically to recognize that how many accelerometers has been uploaded and create as many plots area as a amount of accelerometers.
If the max number is small (1..5, maybe), you could use an array of graphs (but they need to be inside a cluster). Here's one possibility. Still, it seem silly to resize the array, because you need to leave sufficient room for the max size.
03-04-2022 02:46 AM
That is not what wanted. There were no problem for me to create 4 graphs. but when you have more than 4 sensors that doesn't make sense to do it manually. That's why i need it to be done programmatically. (In this case machine was having not only accelerometers but also 6 strain gauges of them with 3 axis each. That's already 10 graphs that i need to add manually. But if next time i would like to measure another amount of graphs that wouldn't work and i need to reattach all of the wires again add new or delete old graphs)