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

Similar Messages

  • 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!

  • 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

  • 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

  • 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

  • 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!

  • 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

  • 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

  • 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

  • Help with JTree node handles icon

    Hi
    In my application i use Jtree to display the hirearchical data.But i don't want to the node handles icon to be displayed in the screen.The root node handle icon will be not be displayed if we set jtree.setShowsRootHandles(false) .Is there any way to diable the other node handles icons too?.Please help me in overcoming the problem.
    So, i will be handling the expand/collapse operations of the node with the help of mouse click event.
    Thanks in advance.
    Regards,
    Krish.

    Hi all,
    Any ideas to overcome this problem.?
    Thanks,
    Krish

  • Help with a node tree

    hi guys here's the problem i'm having:
    I have a class called Node that I am building a tree out of. Node is a very simple structure, has three parts: element, left and right, with element being the top. Then I have a class called converterTree. This class will take in a postfix (polish notation) string and convert it into a tree through tokenizing etc. for an ultimate calculator class. The code I will post below uses a stack implementation to do so. It should: add all operands to the stack until it hits an operator, then make a new node with the operator as the element, and the left and right are the top and second stack objects respectively. then it pushes this entire tree back onto the stack and keeps going, at each step creating a new tree and linking it to the old one. The problem is that for some reason when I get the top node back in the return, it comes back as only that node, as if all the things it referenced are gone. You wont be able to run the code below since it needs some other classes, but in my main method where all those printlns are know that the return comes back as -, null, null, null, null, null, null with - being the thing on the stack that is SUPPOSED to link to the rest of them, yet for some reason they all come back null? any suggestions? heres the code:
    import java.util.StringTokenizer;
    public class ConverterTree
         String stringToConvert;
         static QueueLi returnQueue = new QueueLi();
         public ConverterTree (String toConvert)
              stringToConvert = toConvert;
         public static boolean isOperator(String op)
              char c = op.charAt(0);
              return (c == '*'|| c =='/' || c == '+' || c =='-');
         public static boolean isLParen (String op )
              char c = op.charAt(0);
              return c== '(';
         public static boolean isRParen (String op)
              char c = op.charAt(0);
              return c == ')';
         public static boolean isSpace(String op)
              char c = op.charAt(0);
              return c == ' ';
         public static boolean isOperand (String op)
              return (!( isOperator(op) || isLParen(op) || isRParen(op) || isSpace(op)));
         public Node toTree (String toConvert)
              String delims = new String("+-/* ");
              StringTokenizer tokenizer = new StringTokenizer(stringToConvert, delims, true);
              String token = new String();
              StackLi stack = new StackLi();
              while (tokenizer.hasMoreTokens())
                   token = tokenizer.nextToken();
                   System.out.println("token: " + token);
                   if (isOperand(token))
                        ListNode node1 = new ListNode(token);
                        System.out.println("This operand is being pushed: " + token);
                        stack.push(token);
                   else if (isOperator(token))
                        Node op2 = new Node(stack.topAndPop());
                        Node op1 = new Node(stack.topAndPop());
                        Node opTree = new Node(token, op1, op2);
                        System.out.println("node and left and right: " + opTree.element + opTree.left + opTree.right);
                        stack.push(opTree);
                        System.out.println("node and left and right: " + opTree.element + opTree.left + opTree.right);
              Node returnNode = new Node(stack.topAndPop());
              return returnNode;
         public static void main (String [] args)
              String toConvert1 = "2 5 + 6 8 + -";
              ConverterTree treeTest = new ConverterTree(toConvert1);
              Node testNode = treeTest.toTree(toConvert1);
              Node right = new Node(testNode.right);
              Node left = new Node(testNode.left);
              System.out.println(testNode);
              System.out.println(left);
              System.out.println(right);
              System.out.println(left.left);
              System.out.println(left.right);
              System.out.println(right.left);
              System.out.println(right.right);
    }

    hi guys here's the problem i'm having:
    I have a class called Node that I am building a tree out of. Node is a very simple structure, has three parts: element, left and right, with element being the top. Then I have a class called converterTree. This class will take in a postfix (polish notation) string and convert it into a tree through tokenizing etc. for an ultimate calculator class. The code I will post below uses a stack implementation to do so. It should: add all operands to the stack until it hits an operator, then make a new node with the operator as the element, and the left and right are the top and second stack objects respectively. then it pushes this entire tree back onto the stack and keeps going, at each step creating a new tree and linking it to the old one. The problem is that for some reason when I get the top node back in the return, it comes back as only that node, as if all the things it referenced are gone. You wont be able to run the code below since it needs some other classes, but in my main method where all those printlns are know that the return comes back as -, null, null, null, null, null, null with - being the thing on the stack that is SUPPOSED to link to the rest of them, yet for some reason they all come back null? any suggestions? heres the code:
    import java.util.StringTokenizer;
    public class ConverterTree
         String stringToConvert;
         static QueueLi returnQueue = new QueueLi();
         public ConverterTree (String toConvert)
              stringToConvert = toConvert;
         public static boolean isOperator(String op)
              char c = op.charAt(0);
              return (c == '*'|| c =='/' || c == '+' || c =='-');
         public static boolean isLParen (String op )
              char c = op.charAt(0);
              return c== '(';
         public static boolean isRParen (String op)
              char c = op.charAt(0);
              return c == ')';
         public static boolean isSpace(String op)
              char c = op.charAt(0);
              return c == ' ';
         public static boolean isOperand (String op)
              return (!( isOperator(op) || isLParen(op) || isRParen(op) || isSpace(op)));
         public Node toTree (String toConvert)
              String delims = new String("+-/* ");
              StringTokenizer tokenizer = new StringTokenizer(stringToConvert, delims, true);
              String token = new String();
              StackLi stack = new StackLi();
              while (tokenizer.hasMoreTokens())
                   token = tokenizer.nextToken();
                   System.out.println("token: " + token);
                   if (isOperand(token))
                        ListNode node1 = new ListNode(token);
                        System.out.println("This operand is being pushed: " + token);
                        stack.push(token);
                   else if (isOperator(token))
                        Node op2 = new Node(stack.topAndPop());
                        Node op1 = new Node(stack.topAndPop());
                        Node opTree = new Node(token, op1, op2);
                        System.out.println("node and left and right: " + opTree.element + opTree.left + opTree.right);
                        stack.push(opTree);
                        System.out.println("node and left and right: " + opTree.element + opTree.left + opTree.right);
              Node returnNode = new Node(stack.topAndPop());
              return returnNode;
         public static void main (String [] args)
              String toConvert1 = "2 5 + 6 8 + -";
              ConverterTree treeTest = new ConverterTree(toConvert1);
              Node testNode = treeTest.toTree(toConvert1);
              Node right = new Node(testNode.right);
              Node left = new Node(testNode.left);
              System.out.println(testNode);
              System.out.println(left);
              System.out.println(right);
              System.out.println(left.left);
              System.out.println(left.right);
              System.out.println(right.left);
              System.out.println(right.right);
    }

  • 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

  • Please help with JTree Node Duplication

    Iam building a JTree which should not allow node duplication.
    1.)First i construct a ArrayList which stores all the previous nodes.
    treeNodeNames=new ArrayList();
    2.)i call the method
              readTreeNodeNames((DefaultMutableTreeNode)dtm.getRoot());
    3.)The method readTreeNodeNames is
    public void readTreeNodeNames(DefaultMutableTreeNode node) {
              if(node.toString().toLowerCase().length()!=0) {
              treeNodeNames.add(node.toString().toLowerCase());
              for(Enumeration en=node.children();en.hasMoreElements();) {
                   DefaultMutableTreeNode childNode=(DefaultMutableTreeNode)en.nextElement();      
                   if(childNode.toString().toLowerCase().length()!=0) {
                        treeNodeNames.add(childNode.toString().toLowerCase());
                   if(!childNode.isLeaf()) {
                        readTreeNodeNames(childNode);
    4.)i have four menu when right click a node add,modify,add subnode,delete.
    node duplication fails in my case.when should i call this method?should i call while doing every above mentioned operations or in TreeModelEvent implementations?
    i have mailed this problem already two times.but no one has not replied.Kinldy consider it and give me a solution.Or anyone having code for JTree Node duplication please send me to [email protected]

    Hi all,
    Any ideas to overcome this problem.?
    Thanks,
    Krish

  • 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

  • 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

Maybe you are looking for