10-24-2022 08:10 AM
im trying to hide and unhide the waveform chart history using the property node. im attaching the snippet using this i can bale to hide the data on chart but im not getting how to unhide it. you can see the when true its hiding when false it should unhide.. how can i do it..?
looking for suggestions
thank you
Solved! Go to Solution.
10-24-2022 09:08 AM
1. You aren't just *hiding* the chart history data, you're actually *deleting* it when you define the chart history to be an empty array.
2. Before you get any farther, I'd also recommend you rework the way you plan to hide a bunch of unlabeled controls/indicators using discrete property nodes. How are you going to keep track of which are which? How will you make sure that there's a corresponding property node for each one that makes it visible again?
One approach is to create *references* to all the similar-behaving controls & indicators and building an array from them. It's easiest to do this one time before the loop and then pass the array into the loop without auto-indexing on it. When it's time to hide or unhide, then you pass that array into an auto-indexed For loop that can set the visible property False or True.
By operating over the whole array of references, you can know that you're taking care of hide/unhide for all of them without accidentally missing any.
-Kevin P
10-24-2022 10:40 AM
Showing us a picture with tons of property nodes without labels (Sorry, I cannot open your snippet because I currently don't have access to LabVIEW 2021) makes no sense.
A chart without history makes very little sense. You can hide any plot you want (i.e. make it invisible), then unhide it later and the history data (and new data received since) will show again (except for the oldest that that exceeded the size of the history buffer). You could even make the entire chart invisible.
So take a step back and tell us exactly what you are trying to do from the perspective of the user of the program. A am sure there are much better solutions!
10-24-2022 11:12 AM
Hi altenbach,
Thank you for the suggestion.
Im doing continuous measurement using lab view that is Voltage , current and resistance and displaying resistance on chart and this is inside the case stucture. True case is for measurement and false is for stop the measurement.. now what i want to do is if case in true( measurement is on) then it should show the grap data and when case is false then it should not show any data on graph( invisible data).. how can i do it? Is there any simple way to do this?
10-24-2022 11:37 AM - edited 10-24-2022 11:38 AM
Easiest would be to just sow the visibility checkbox in the graph legend. No code needed.
@jeet4230 wrote:
now what i want to do is if case in true( measurement is on) then it should show the grap data and when case is false then it should not show any data on graph( invisible data).. how can i do it? Is there any simple way to do this?
You need to tell us the detailed requirements for all possible scenarios. For example what should be displayed if the measurements is started again (show the old data from the previous run, clear the chart history and only show the new data, etc.)
Why don't you attach a simplified version of your VI so we get a better understanding?
10-24-2022 11:41 AM
If the time axis is important, you can also place the chart terminal outside the case structure and send NaNs if the case is false. This will cause gaps in the charts for the time periods where there is no data while the chart keeps running..
10-25-2022 05:00 AM
hi, thank but time axis is important..
10-25-2022 09:51 AM
@jeet4230 wrote:
hi, thank but time axis is important..
So have you tried my last suggestion?
10-25-2022 10:06 AM
@jeet4230 wrote:
Hi altenbach,
Thank you for the suggestion.
Im doing continuous measurement using lab view that is Voltage , current and resistance and displaying resistance on chart and this is inside the case stucture. True case is for measurement and false is for stop the measurement.. now what i want to do is if case in true( measurement is on) then it should show the grap data and when case is false then it should not show any data on graph( invisible data).. how can i do it? Is there any simple way to do this?
Quick tip: NaN values do not display on plots
10-25-2022 10:47 AM - edited 10-25-2022 10:47 AM
@altenbach wrote:
If the time axis is important, you can also place the chart terminal outside the case structure and send NaNs if the case is false. This will cause gaps in the charts for the time periods where there is no data while the chart keeps running..
Here's a quick draft to show what I had in mind. The time axis will keep running and show the elapsed seconds since program start, irrelevant if there is data or not.