LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hide and unhide waveform chart history using property node

Solved!
Go to solution

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

0 Kudos
Message 1 of 10
(1,950 Views)

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

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 2 of 10
(1,932 Views)

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!

0 Kudos
Message 3 of 10
(1,903 Views)

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? 

0 Kudos
Message 4 of 10
(1,888 Views)

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?

0 Kudos
Message 5 of 10
(1,880 Views)

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..

Message 6 of 10
(1,878 Views)

hi, thank but time axis is important..  

0 Kudos
Message 7 of 10
(1,824 Views)

@jeet4230 wrote:

hi, thank but time axis is important..  


So have you tried my last suggestion?

0 Kudos
Message 8 of 10
(1,804 Views)

@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


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 10
(1,800 Views)
Solution
Accepted by topic author jeet4230

@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.

 

altenbach_1-1666712801077.png

 

Message 10 of 10
(1,778 Views)