01-12-2005 08:24 AM
01-12-2005 08:27 AM
@shoneill wrote:
You can also use a global variable, but then your sub-vi needs to be written so that it updates the global variable from within the loop.
Which is more efficient? I don't know, I'll make clear for someone who can answer.....
Shane.
01-12-2005 08:34 AM
@scott-e wrote:
Correct me if I;m wrong but if you have a subvi routine encased in a while or sequence structure, you need to use a refnum in order to have the main vi show the changed value in realtime?
01-13-2005 07:39 AM
@shoneill wrote:
Hi Rolfk,
Thanks for confirming the UI thread thing.
The panel re-draw forcing is definitely an unwanted side-effect of using refnums. You actually mention property nodes, but I presume you either meant refnums of are including refnums in the same context.
Is it not possible to (given a refnum for a particular control) get the refnum of the parent panel, activate deferred updates, write the value, and then de-activate the deferred updates? For a single control this may have little or no impact, but when updating a series of controls or indicators, does this lead to a performance increase due to less screen re-drawing? When setting the values of the controls or indicators, I don't see any change in update speed whatsoever (The values are re-drawn regardless of the "defer update" setting), but when making something visible or not or changing other cosmetics, the defer panel updates can greatly speed up this action (here the "defer updates" seems to have the desired effect).
An example of 4 digital controls, 2 simple numerics and 2 temp ramps took 1 second to make visible and invisible 100 times without deferred updates, and 40 milliseconds with.
Setting the values of the controls was the same with or without deferring the updates.
So, I suppose it depends on what you want to do really.
I don't know if this helps, but hope springs eternal
Shane.
Ps I'm using LV 6.1, maybe things have changed since 6.1?
01-14-2005 08:19 AM