LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does Waveform Chart Initalized by Property nodes behave erratically when hidden such as by the Tab Control?

I am using wave form Chart on a tab control. The problem is that the chart works fine when it is showing. I can stop the data and reset the chart history successfully. The Fun begins when I go to say Page 2 of Tab control ( The wave form Chart is on Page 1). If I now try to initilize my chart with offset, multiplier, min and max rage values - The chart assumes values on the X scale which are arbitrary. I can see this when I go back to Page 1.!!

But If Page 1 were showing and I did the same Operation The chart behaves as I expect it too.

Can this behaviour be explained? How do I resolve this Problem? Also I have Observed that from time to time the Sca
ling on X Axis may also change when the Chart is Hidden by the tab control. I have not been able to identify the reason for this, It is totally random.
Good Luck!

Mache
0 Kudos
Message 1 of 3
(2,985 Views)
A workaround for this is to set the Key Focus property for the Waveform Chart to true in your initialization of the graph. The graph will update correctly even when initialized from Page 2 with this set. This will make Page 1 show when you toggle the Run button, but you could add code to change the focus back to something on Page 2 if you choose.

I am not sure how to explain this behavior, but I suspect it stems from LabVIEW optimizing resources by not updating front panel objects that are invisible.

Regards,
Molly K
National instruments
Molly K.
Web Support & Operations Manager
National Instruments
0 Kudos
Message 2 of 3
(2,985 Views)
I did a similar workaround ...

Everytime I Toggle the Run Button, I am making sure the active Tab is the one with Waveform Chart. This way the waveform Initializes fine. Then I try to Switch the active tab back to its One Previous Value, programatically - So that the user may have somewhat seamless interaction.

There is one hitch however - The waveform Chart needs some time to initialize and my data stream is also coming at every second. So if I switch Immediately to some other tab, Sometimes I am successful, Sometimes I am not. Again this depends om System Speed and such. If I update the Tab Control at the next iteration, it is very irritating visually. So I left the Tab control at the waveform chart after reset. If the User wants they can switch it Bac
k.

Of Course the best thing to do is don't Reset. Referred the problem to NI Apps. They said it will be fixed in the next version.

Well! Got to make enough money without resetting so that we can buy the new Version, which will reset!! Ciao! And Thanks for your answer.

Regards,

Mache
Good Luck!

Mache
0 Kudos
Message 3 of 3
(2,985 Views)