Performance penalty with property nodes?

In a specific application I have a front panel with three combo boxes and another three string indicators. Based on the selections made in the combo boxes, various messages will have to be displayed in the string displays. This naturally calls for multiple instances in the same VI where the combo boxes will have to be read and string display updates.
One choice would have been local variables ( of combo boxes & string indicators ) for passing the values around. But since this is going to make several copies and hit performance, I decided to use property nodes. And it works fine.
The question is, whether excessive use of property nodes has any adverse effect on performance ?
Thanks
Raghunathan
Raghunathan
LV2012 to Automate Hydraulic Test rigs.

Thanks! I would suggest to just do the experiment.
The attached little demo (LabVIEW 7.1) does the same thing (increment a I32 variable in a loop) in three different ways:
-- shift register
-- local variable
-- value properties
On my slow laptop, 10000 iterations take the following total time in ms.
shift registers: 3ms
Local variables: 5ms
Value Properties: 1891ms (!!)
Notice that the shift register solution would be much faster (more than 10x (or 1000000 in 20ms)) if the indicator is placed outside the loop, the only thing slowing it down is the update of the indicator.
In conclusion value properties are much more expensive than local variables or shift registers. If you just write once e.g. at the beginning of the program, it does not really matter, but once you do things repetitively in a loop, the costs add up. I always prefer wires because they also make the diagram easy to follow. Local variables break the dataflow and can cause race conditions. They have their limited use, especially in user interface related code. They have no business in pure computations.
LabVIEW Champion . Do more with less code and in less time .
Attachments:
timers.vi ‏47 KB

Similar Messages

  • VI Snippet Bug (IMAQ Image Vision Display with Property Node)

    Colleagues,
    Just found small bug in LabVIEW - Creating snippet from selection with Vision Display together with Property node is not working (means that nothing happened - no save dialog appear):
    VI in attachment (VAS or VDM software required). Can someone reproduce this?
    Andrey.
    PS
    LabVIEW 2009f3
    Message Edited by Andrey Dmitriev on 01-21-2010 03:29 PM
    Attachments:
    Snippet BUG.vi ‏40 KB

    Hi Andrey
    Thank you for your post, I will clarify if this is fixed in the LabVIEW SP1.
    If it is not, I am going to write a CAR for that.
    Kind regards
    Beat
    AE NI Germany

  • Working with "property nodes" in pda module

    Hi,
    i already know that it is not possible to work with property node in pda module.
    I have found something that allows to replace the visible property node
    (LabVIEW_PDA_Module_Property_Additions), but i need other property
    nodes.
    I need the following property nodes:
    disabled
    caption.text
    numrows (for a table control)
    numcols (for a table control)
    colhdrs[] (for a table control)
    Can anyone give me a help with this?
    Thanks,
    Pedro

    I think the only one you can do something about is the caption, which you can try to replace with a string indicator.
    Try to take over the world!

  • Error with property nodes and svx_DAQmx Popup for DSA.vi

    Some example vi of the sound and vibration toolset 3.1 use property nodes with an undefined class (e.g. svx_DAQmx Popup for DSA.vi). I use Labview 7.1 and NI-DAQmx. Could it be that the vi uses classes from traditional NI-DAQ?

    The error occurs in:
    C:\Programme\National Instruments\LabVIEW 7.1\examples\Sound and Vibration\Utility\Daq\DAQmx\svx_Get DAQmx Info.vi
    C:\Programme\National Instruments\LabVIEW 7.1\examples\Sound and Vibration\Utility\Daq\DAQmx\svx_DAQmx Popup for DSA.vi
    see also attached screen shot.
    It is a new installation on a PXI-system, WinXP, LabView 7.1, SVT 3.1, NI-DAQ 7.4 (only DAQmx driver installed). The examples had not been tested before.
    Attachments:
    screenshot.jpg ‏144 KB

  • Help with property node

    I have a graph chart with 3 plots. I can make any of the plots visible or not using property node as shown in the attached file.
    Is there a any way I can scale the block diagram and use less case structure . for instance is it possible to use just one case structure to set the plot visible property of the three plots.
    Thank you.
    Attachments:
    PropertyNodeChartAssign.vi ‏29 KB

    (You are using way too much code for these cases! Your true and false cases only differ by the boolean, which you already have from the control. In a first cleanup, you can delete the case structure and wire the button directly to the "visible" property. Same functionality! Right?)
    Still, that's not the way to go!
    Property nodes are expensive! You only need to write these properties if one of the selector changes, and not with every iteration of the loop! You should handle these thing in a seperate loop using an event structure. Attached is a simple example. See if it makes sense.
    Notice that the bottom loop waits until needed and rarely spins.
    Also: Instead of a column of similar controls, use an array of controls. Instead of using thee sets of "dices" use one in a FOR loop.
    Message Edited by altenbach on 05-18-2007 08:32 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    ChartVisible.png ‏16 KB
    PropertyNodeChartAssignMOD.vi ‏28 KB

  • Save array control to .cfg with property nodes.

    Hi there!
    I have a front panel with many (and I mean many!) boolean arrays in tabs, and I want the option to save the values selected by the user to a .cfg file, which will be used to make the same selection again without the tedium of clicking on buttons. The only controls I want to save the value of are 1D boolean arrays of length 7 or 11, and these occur only on some of the tab pages; the others have been setup so that on their iteration a false criteria is met and no code executes.
    I have managed to get references to each control in each tab, and using a 'more specific class' function to narrow it down to Array controls only. However, when this runs, an error from 'convert variant to data' pops up, and use of a probe tells me the reference being called by my property node at the time of the error is that of an array INDICATOR, rather than a control. I thought the 'controls on page' node and subsequently the array control class specifier would mean that references for other types of array wouldn't make it into the true case where the saving to config file happens.
    The indicator in question is an array of a cluster of two strings and a string array, if that makes any sense/has any relevancy, and the error occurs on iteration 1 of the outer loop and iteration 21 of the inner loop, corresponding to the 22nd control reference from the second tab.
    I hope I've made the problem clear.

    There is a property called Is Control? (or Is Indicator?) that will help you sort them out.  I do not recall the exact name of the property but that should get you close enough to find it.
    Lynn

  • Broblem with property node and DAQ-card

    Hi!
    I am using NI DAQ-card to control mini relays and I have a following broblem. I use a "binary" button to control the DAQ-assistant and so on the relays. I have made property node of the "binary" button and set it to value mode(write). When I change the value of property node, the "binary" button in user interface works properly, but the the relay doesn't change the state.

    The boolean array constant that you are writing to the property node is empty. That is it has been defined as a boolean array, but it has no elements.
    The array constant on the left is an empty boolean array. Notice that all teh boolean constants are grayed out. This indicates that none of the constants are 'active'. The array on the right contains 8 active elements. Note that the 8 elemants are more solid in color adn the the 9th element is grayed out.
    What you need to do is define your boolean array with the proper constants to turn on or off the proper digital lines.
    EdMessage Edited by Ed Dickens on 05-25-2005 09:15 AM
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
    Attachments:
    emptyarrays.png ‏2 KB

  • RAC-Performance degarding with all nodes

    Hi,
    I have a RAC with 2 nodes.With individual nodes the performance is good and same.But when with 2 nodes together,the performance is degrading from one of the nodes with gc buffer busy as the topmost event.Kindly throw some light on this.

    Hi;
    Please see below:
    RAC gc buffer busy waits !!
    RAC gc buffer busy waits !!
    High Avg wait for "gc buffer busy" in RAC
    High Avg wait for "gc buffer busy" in RAC
    Also see:
    Wait Event "gc buffer busy"
    Regard
    Helios

  • Class conflict when programmatically editing graphs with property node

    I am trying to programmatically move the cursors on a graph. I want the cursor to look the same on 2 different graphs so I made a subVI. The code works correctly when I have seperate property nodes, but when I try to use the subVI, I get a class conflict -
    "You have connected a refnum of one type to a refnum of another type and both types are members of some class hierarchy, but there is neither a simple up cast nor type cast between the two classes."
    I am not sure how to fix this. The graph that works is of a waveform, and the graph that doesn't is the output of the FFT Power Spectrum VI. Is the problem that the inputs are different? Or is there some kind of resource conflict when using property nodes in subVIs?

    A shot in the dark here.  But maybe if you make the subVI's input reference of type GraphChart it would work.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How can I change the description of a control Icon with property nodes?

    hi
    I want to change the description of a control Icon and use for this the property nodes, but I don't know how. Who can help me?
    labprog

    If you're referring to the control's name on the screen, you can't change the label while the VI is running because it's part of the control's definition. Instead, make the label invisible and the caption visible and use the property Caption.
    If this doesn't help, elaborate more on what it is you need.
    Try to take over the world!

  • Decide showing length with property node?

    Hello!
    We have an array that shows in the front panel. It is very long and we want to be able to see ten elements at a time. Is there any property that we can drag for example number ten to? Or is there another way to do this? Thank you :-)

    Hi, please look attached example. Hope that will help.
    Nadav
    Attachments:
    Array.vi ‏30 KB

  • Property nodes are severely affecting performanc​e

    LabVIEW Gurus,
    I am continually running into some serious performance hits using property nodes to update attributes of FP objects. Attached is a classic example.
    I have 8 XY plots that are being fed 600 SGL points every 200 msec - a very modest data rate. Each plot is a dynamically instanciated .vit placed into one of 8 subpanels in a container VI. The container VI also acts as the data server for the charts, sending each one their data in their own single element queue. The entire architecture runs great (~4% CPU load, see attached picture) until I being updating a property node to display the value of the cursor y-value. When I enable the "Caption.Text" property node of the XY Graph to display the cursor value, the CPU usage soars to over 30%.
    As an aside, I am developing on a dual core 2.1GHz platform with 4G memory with LV8.5.1, and the target machine is not nearly as beefy. That's why 30% CPU on my powerhouse is an issue - it basically brings the embedded target to its knees.
    I have included an example VI for you to run on your machine. Consider it "representative" of my bigger issues. The VI runs about 10% CPU without the caption update, and 20% with the caption updates.
    Finally, I have tried putting the VIs into the UI execution system. I have also tried Defer Panel Updates, but this actually slows down performance.
    Best regards,
    Jack Dunaway
     With Captions
    Without Captions:
    Message Edited by mechelecengr on 10-10-2008 11:23 AM
    Message Edited by mechelecengr on 10-10-2008 11:27 AM
    a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"] {color: black;} a.lia-user-name-link[href="/t5/user/viewprofilepage/user-id/88938"]:after {content: '';} .jrd-sig {height: 80px; overflow: visible;} .jrd-sig-deploy {float:left; opacity:0.2;} .jrd-sig-img {float:right; opacity:0.2;} .jrd-sig-img:hover {opacity:0.8;} .jrd-sig-deploy:hover {opacity:0.8;}
    Solved!
    Go to Solution.
    Attachments:
    WithCaptions.png ‏102 KB
    WithoutCaptions.png ‏96 KB
    GraphPerformanceProblems.vi ‏23 KB

    Yes, property nodes force synchronous execution and if you do that too often, other things suffer.
    The above solution is good. You can simplify things even more by removing all that unneeded extra code that just complicates things.
    Here's a quick draft. Let me know if you have questions.
    Message Edited by altenbach on 10-10-2008 09:58 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    samewithlesscode.png ‏9 KB
    GraphPerformanceProblemsMOD.vi ‏19 KB

  • Y scale flip in waveform graph when using property node.

    I'm having problem with property node. I'm trying to build a stackable scope with Waveform Graph And dynamically change the number of plots. It is working. But The Y scale is flipping. The minimum goes on the upper part and the minimum scale goes down. when I change it appearance it's not very fast. It take about 1 or 2 second on my computer.
    The way it is build actually is:
    Cluster_1 is containing 8 clusters. And each of the 8 clusters are containing a Waveform Graph. By reference I change the property of each Waveform to make visible or not each of the Waveforms.
    First I would like to solve the scale problem and second accelerate the redrawing of my scope.
    Maybe there is an other way t
    o do what I need.
    Thanks.
    Nitrof
    Attachments:
    MultiScopeExample.llb ‏192 KB

    Wow, you have a neat program! The problem with your y axis flipping is because the last four charts in the cluster were programmed with a flipped axis. I relabeled the charts and it worked correctly.
    From what I could tell with your code, you do not need the sequence structures. The one inside of the even actually runs the same code twice. Remove this duplication and you should see improvement. Also clusters are slow, so you should not expect it to blink back with additional coding. Use defer panel updates to get that behavior. I incorporated these changes and attached the program.
    Jeremy Braden
    National Instruments
    Attachments:
    MultiScopeExample.vi ‏163 KB

  • Blinking LED without property node

    Hey!
    I am familiar with property node blinking but I want to make a LED blink because of a timer interfering with a FOR cycle. I have almost made a VI that compares timer value to y value. When timer value is larger than y, then my LED should shine. When timer value is smaller than y then it should turn off. Something is wrong, maybe someone could help me.
    Solved!
    Go to Solution.
    Attachments:
    blinking.vi ‏9 KB

    Here are two simpler versions that don't involve any "math" and operate "in place". Pick one!
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    blinkers.png ‏4 KB

  • Is there a performance loss or gain when enabling 'make available through property nodes' in class accessor?

    As the topic states, I'm pondering if there is a performance hit (or gain?) by making class accessor available through property node?  
    Specifically, I wonder if the 'class accessor property node' is somehow different than 'normal' property nodes, which I tend to avoid as best I can due to how they often involve the GUI thread and are often detrimental to performance.
    And since the follow up question to any answer would be to ask if including error handling terminals changes the answer?
    -People who write LVOOP on a semi-regular basis or more, is there a concensus on when/if you use the property node option?  Is it preferred as a default almost? Is it affected by whether the accessor is dynamic or static?
    Thanks!
    QFang
    QFang
    CLD LabVIEW 7.1 to 2013

    As far as I know, there is no difference between a subVI call and a property call and they should behave identically behind the scenes. There shouldn't be a forced call in the UI thread, because these don't deal with UI elements. It's simply a different syntax, so it should be the same for DD. I have seen some complaints about performance issues and/or bugs in earlier versions, but I don't remember if there was anything concrete. You can search on LAVA.
    Likewise, I don't think the error I/O itself causes delays, but both the serialization of the calls and having case structures acting on those errors can. AQ had some posts on that and he dislikes both. Personally, I tend to like the readability, particularly for serialized calls. Note that some people don't like accessors (at least public ones) as a concept, suggesting that having writers for individual fields leads to all kinds of troubles, and that it's generally better to have specific functions with the relevant inputs.
    Try to take over the world!

Maybe you are looking for