LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Attribute node slows down VI

My VI shows about 5000 curves, consiting of 2 points each. If I want to change the colour of the lines this is fast until some 100 plots have been processed. Thereafter the time needed per update is suddenly  increased to about 1s per line, and thus causing about 2000s inaceptable runtime. I'm then able to watch how the colour changes from line to line and have good reason to get a coffee or two.

Basically would it be enough to disable the automatic colour assingment and have all traces black only and with exactly the same attributes. Is there any possibility to do that really fast, e.g. with writing to one single attribute or any other means to avoid redrawing of the graph?

Marco

mailto:Marco.Mailand@gmail.com
0 Kudos
Message 1 of 7
(3,178 Views)
Try disabling front panel updates while doing cosmetic work.  I've found in the past that this can greatly speed things up.

Get a reference to the current VI, get the panel reference, and use a property node to disable updates before you start, and re-enable them after you've finished.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Message 2 of 7
(3,173 Views)
Thanks to all who suggested me how to treat this feature or bug - I always get dem confused - of LabVIEW. On my way searching for a front panel attribute which could be used to defer updates I found in a chain of sub VI's the picture indicator which is set per default to black on white. I had to change only to my VI to use the "move to" and "draw line" functions from picture functions palette an add a little scaling and tinkering to get the same result but 10000 times faster, really!

Again thanks to all.

Marco
0 Kudos
Message 3 of 7
(3,159 Views)
This definitely falls in the range of "feature" as it's expected behaviour.

Normally when you want to draw something to the fornt panel, you also want it shown.  If you want to delay the screen update, you need to tell LV that.  All normal and above-board.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Message 4 of 7
(3,147 Views)
Hi Shane,
 
I don't agree completely that it is a feature because of the following:
 
1. One of the new features of LV4, I believe, was the optimised front panel updates. They are carried out only at a reasonable speed, read: only as much updates as make sense to be drawn.
2. If this is true and well implemented there would not be two different actualisation speeds, but it would redraw either all 5000 lines at slow or even at high speed. But LV changes its update speed sort-of randomly. This is at least a very bad feature if not an uncritical programming error.
3. I couldn't find the attribute node for accessing the front panel update speed in LV8.20. Could it be that this feature is gone?
4. There is no deterministics between update of a graph and update of changes to a graph, caused by an attribute node. It appeares like that the latter are independent from update speed of the graph. From a logical point of view changes of attribute nodes have to be executed immediatly and I can not imagine how their execution could be controlled: Attribute node execution control, maybe, with: 0 = immediate, >0 = each X ms, -1 = only if indicator is actualized.
 
 
0 Kudos
Message 5 of 7
(3,139 Views)
Courtesy of Ben,



This controls the updating of the front panel.

Any questions regarding features you feel are mistaken, faulty of buggy need to be directed directly to NI.  Internal workings of the LV code are hidden from us all.

Have a look here, here or here for some further reading.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Message 6 of 7
(3,132 Views)

Is it possible to set the color properties of each line before they are drawn?

Unfortunately, property nodes are slow.  You may be seeing the effects of the properties try to set the color at the same time as the lines are being drawn.  Both having high priorities...  😞  If it is possible to set the colors before the data is obtained and the lines are drawn, it should no longer have an effect on the lines...  Unfortunately, you won't have time to get a coffee while they are being drawn...  😉

that reminds me...  it's time for my coffee..

😄

Message 7 of 7
(3,113 Views)