From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-07-2011 04:49 AM
Hello everybody,
sorry to bother you with this but I have a little problem with the refresh of a plot legend (LV 8.6). In an XY-Graph I'm displaying temperatures along a railtrack. When the temperatures cross some alarm boarders I'm changing the way the plotlines appear (different colour and line style). This works well, the only thing is that the plot legend will not show these changes immediately. I've tried to force the frontpanelelements to update by setting the "Defer Front Panel Update" Property to False but this does not really work. The FP is always in Front but it updates sometimes seconds, sometimes minutes later, sometimes only when I bring the frontpanel to the background and then to the front again.
As the "Defer FP Update" did not really work out, is there another possibility to force the plot legend to update?
Greetings,
Robert
02-07-2011 06:02 AM
Hi,
Can you post your code?
02-07-2011 12:54 PM
Hi,
as my original code involves some external hardware it is not suitable as an example and so I tried to get a simple VI done that demonstrates the problem.
Doing this made me nearly mad as the problem seemed to be not reproducible at first ... it really took some time to find out about a rather strange behaviour of the plotlegend ... so maybe I stumbled across some kind of Bug (may be LV-Version dependent, i don't know).
The code I attached simple generates a sine wave with increasing amplitude and as soon as the maximum value crosses an alert boarder (in the example 30% of amplitude) the alert boarders will change to a bold dotted line.
When you run the VI the plotlegend get's updated immediately, just as one would suspect. But as soon as you rename "Plot 1" to "alert" or something alike, the plotlegend will not update anymore!!! This is also what happens when you drag the plotlegend to a different position.
As this is (in my opinion) rather strange behaviour I can not guarantee that this will show up on any other PC or when running it in another LV-Version but that's how it behaves on my PC using LV8.6.
Any ideas how to avoid this?
Regards,
Robert
02-08-2011 04:49 AM
Hi,
I have tried to reproduce your problem with LV 8.6 and your description of renaming and moving the plotlegend but I was not able to get the error. Have you tried to slow things down for debugging with the highlight-tool?
Cheers,
Niceday
02-08-2011 05:27 AM
Hi robert p,
Try this. As you said you have some other code as well ...may be it is taking some time to execute so your case structure which decides plot type executes late.
Try to put your case structure in other loop. With less delay. May be this will help.
02-08-2011 06:57 AM
Hi Gak,
hi Niceday,
thanks for your effort but I have to admit that I'm slightly puzzled. As Niceday wrote that he could not reproduce the error and Gak made the suggestion to alter the code and both suggestions did not change the behaviour of my plotlegend I suspected some sort of graphicproblem specific to my PC. But when I copied the VI to another PC with LV2009 it still was (nearly) the same. Dragging the plotlegend around did not effect the refresh of the legend but after renaming "Plot 1" to something different the plotlegend again did not update anymore except on things as Mouse-Over or Minimizing/Resizing the whole window.
So the problem must be something different and is not dependent on the PC or the LabView-Version used!
I'd be grateful for any further suggestions!
Thanks,
Robert
02-08-2011 09:59 AM
Hi,
okey... seems odd. Can you give use some details about the operating systems and computers? And to get things straight, have you used the example or your old version on the "LV 2009 computer"? Hope we can be of any help!
Cheers,
Niceday
02-08-2011 10:58 AM
Hi,
I used the example I posted in this thread and also a new one that included the changes Gak suggested. Both showed the behaviour I described in the above post.
I have to admit, that in the meantime I found a quite dirty (and not really satisfying) workaround with an independent VI that serves as a hideable plotlegend that displays the colors and linestyles depending on boolean alert states (visualized as boolean elements with correspondig graphical elements). In my case this was very easy to do, so for me this problem has lost quite a bit of importance.
But concerning the machines I tested the example with ... both are machines running WinXP, the hardware of both machines is not very common I guess. They are industrial Mainboards (both iBase, a MB930F-R and the older one MB800) because we need to have ISA-Ports in both of those systems.
Greetings,
Robert
11-28-2017 08:14 AM
I'm also having this problem. Anybody know a fix? Force redraw on the plot doesn't do it. The best thing I have come up with is hiding and showing the legend scrollbar. If it's fast enough you won't see the scrollbar flash but it will redraw the plot legend. It's also definitely a hack so if anyone has a better solution I'd love to know what it is.