Using LV Class Property Nodes in In-place Element structure causes the code to halt

I have some code written in LV RT 2010 that uses property nodes from a LVOOP class that I created.  I am using access the property node from inside an in-place element structure.  When the code reaches the property node, LabVIEW stops running.  (as if the abort button was pressed).  I verified this behaviour using highlight execution.  When I remove the in-place structure code runs fine.
Is this is know bug in LabVIEW?  Is there a CAR to resolve this created for a future release?

Bob,
I tried to reproduce the behavior you're seeing by recreating the Trigger and Trigger List classes, but I have not been able to reproduce it.  Please take a look at my version of the project in the attached zip file.  Take a look at Test.vi, and feel free to modify and repost it to show me how to make the problem occur.  I would like to file a CAR to make sure we get the problem fixed, but I will need to be able to reliably reproduce it first.
On a similar note, you can get much better performance out of the Process Triggers VI by preallocating the list array, instead of using build array in a loop.  Take a look at Process Triggers2.vi in my project.  You can run Benchmark.vi to see the performance difference between the two different approaches.
Chris M
Attachments:
triggerlist test.zip ‏165 KB

Similar Messages

  • Use of multiple property nodes for GUI manipulation

    I have a LabVIEW 6.0.2 application where I'm using 14 different property nodes in the main loop. All of these have to do with GUI - hiding buttons when "X" isn't pressed, disabling and greying out controls if <0, popping one button on top of another depending on the mode of operation, etc, etc. While this works fine, the program is getting slow. I've noticed that using the old 2-D buttons works faster - things update faster and redraw quicker. However, more to the point, I once read that if you have to use a lot of Property Nodes like this, that you should bundle them into a sub-vi, thus replacing what would be Property Nodes with references. How does that make it faster?
    Richard

    Not sure if bundling them into a sub-vi by itself would make it faster. The nodes in the sub-vi would still have to access the user interface thread, and that's where the slow down comes from.
    When I use any property node, I put it in a case structure and only write to it when needed. You just need to be able to detect when the value being written is changed from last loop iteration. It's useless to constantly rewrite the same value (doesn't have to be the "value" property) to the node.
    Bundle them into a sub-vi and put the change detector, case structure and nodes in the sub-vi, this should help speed things up a bit. Assuming of course that the nodes are the slowdown. It may also help clean up the diagram a bit.
    Ed
    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.

  • Can event structures be used w/o property nodes?

    I want to know if there can be programming done using event structures but without using property nodes. My prgm has buttons and should be selected exclusively

    Property Nodes really have nothing to do with Event Structures.
    Property Nodes either Read from or Write to the various properties of the linked control/indicator. Event Structures react to an action from a control/indicator.
    Drop an event structure and a single boolean button inside of it, configure the structure to the Value Change event for the button and hit run. The program will run, but the structure will stop the program until you click the button to run the event case, no property nodes required.
    If this is not what you are referring to, provide a few more details and we'll se what we can do.
    Ed
    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.

  • Tentative bug report: property node (and other objects) resizes structure in which they are dropped even when this is not needed

    This one has bugged me for a while, so, since I am in a mood to report annoying features, here it is:
    On the diagram, when you drop an object that could have its size increased by user action (for instance a property node in which you chose "Value", which is a short property, but you could later change this to a "longer" one, which admittedly might require more space on the diagram), a case structure in which you drop it, will automatically increase its size.
    Let me illustrate this with ONE example (can be reproduced with other objects such as enums, clusters, etc...).
    Here is a simple diagram:
    Note that I am going to create a property node from the front panel. This, for a reason that makes the beauty of this "feature", is very important. Apparently, if you create the property node from the diagram, nothing weird happens. The exact location where I will drop the node is not very important but needs to be close enough from the border.
    Here is the result (LV 2011 but as I said, this has bugged me for a few versions already):
    Basically, the case structure (and the whole diagram as a matter of fact) has expanded.
    This is particularly annoying, say, when you are creating a diagram with 10 cases in a case structure and you start dropping things such as property nodes in each case: the structure keeps growing, and growing, and growing...
    That also works with Event structure, and I am ready to bet, with other as well.
    As I said, it is also not limited to Property nodes. I have noticed that this happens if you drop a cluster constant that contains an enum (presumably because some of the enumerated strings are longer than others).
    I could speculate why this is the case, but that is not my job.

    Actually, this might not be true. I found a variant of this behavior. With "Place Structure with Auto Grow enabled" unchecked, here is what I observed while dropping a property node on my diagram:
    Before:
    After:
    This is the expected behavior. The Property Node is partly hidden inside the Case Structure I dropped it in. Now that's not what I wanted to do. I wanted to drop it in in the innermost Case Structure:
    The problem is that now this Structure has grown (as has the whole diagram) to leave space for the whole Property Node:
    It is a subtle bug in the sense that I tried to reproduce it on a new VI with a series of nested Case Structures, but it did not result in this behavior.
    Anybody caring to comment?

  • I'm trying to create a list using CustomSchemalXml property in ListCreationInformation object in CSOM. But, the code throws an error "Invalid List Schema".

    I'm trying to create a list using CustomSchemalXml  property in ListCreationInformation object in CSOM. But, the code throws an error "Invalid List Schema". Any pointers on how to set the CustomSchemalXml property?
    Sri

    Hi Lakshmanan,
    Thanks for your reply.
    I checked this post and there was no solution to the problem there. I undersand we cannot create a list based on custom template in CSOM, but what I'm looking for is how of form xml and set it to CustomSchemalXml
     property, so that everytime when I want to create a list with similar content types and stuff, I can just set the
    CustomSchemalXml  property. 
    Sri

  • Crash when use indexe array with in place element structure

    Hello !
    I have a problem with in place element structure. I want index a waveform array (16 elements) and when i execute or save that labview close....
    I dont have problem with waveform array 15 elements or less, but i need index 16 elements...
    Thanks for your help !!!
    Solved!
    Go to Solution.
    Attachments:
    Test.PNG ‏8 KB

    I give you my code but it work because i used a waveform array with only 15 elements. I can't save or execute with 16 elements...
    So add it (like picture Test.png) and you will see.
    Thank you
    Attachments:
    Test.vi ‏25 KB

  • In-Place Element Structures, References and Pointers, Compiler Optimization, and General Stupidity

    [The title of this forum is "Labview Ideas". Although this is NOT a direct suggestion for a change or addition to Labview, it seems appropriate to me to post it in this forum.]
    In-Place Element Structures, References and Pointers, Compiler Optimization, and General Stupidity
    I'd like to see NI actually start a round-table discussion about VI references, Data Value references, local variables, compiler optimizations, etc. I'm a C programmer; I'm used to pointers. They are simple, functional, and well defined. If you know the data type of an object and have a pointer to it, you have the object. I am used to compilers that optimize without the user having to go to weird lengths to arrange it. 
    The 'reference' you get when you right click and "Create Reference" on a control or indicator seems to be merely a shorthand read/write version of the Value property that can't be wired into a flow-of-control (like the error wire) and so causes synchronization issues and race conditions. I try not to use local variables.
    I use references a lot like C pointers; I pass items to SubVIs using references. But the use of references (as compared to C pointers) is really limited, and the implementation is insconsistent, not factorial in capabilites, and buggy. For instance, why can you pass an array by reference and NOT be able to determine the size of the array EXCEPT by dereferencing it and using the "Size Array" VI? I can even get references for all array elements; but I don't know how many there are...! Since arrays are represented internally in Labview as handles, and consist of basically a C-style pointer to the data, and array sizing information, why is the array handle opaque? Why doesn't the reference include operators to look at the referenced handle without instantiating a copy of the array? Why isn't there a "Size Array From Reference" VI in the library that doesn't instantiate a copy of the array locally, but just looks at the array handle?
    Data Value references seem to have been invented solely for the "In-Place Element Structure". Having to write the code to obtain the Data Value Reference before using the In-Place Element Structure simply points out how different a Labview reference is from a C pointer. The Labview help page for Data Value References simply says "Creates a reference to data that you can use to transfer and access the data in a serialized way.".  I've had programmers ask me if this means that the data must be accessed sequentially (serially)...!!!  What exactly does that mean? For those of use who can read between the lines, it means that Labview obtains a semaphore protecting the data references so that only one thread can modify it at a time. Is that the only reason for Data Value References? To provide something that implements the semaphore???
    The In-Place Element Structure talks about minimizing copying of data and compiler optimization. Those kind of optimizations are built in to the compiler in virtually every other language... with no special 'construct' needing to be placed around the code to identify that it can be performed without a local copy. Are you telling me that the Labview compiler is so stupid that it can't identify certain code threads as needing to be single-threaded when optimizing? That the USER has to wrap the code in semaphores before the compiler can figure out it should optimize??? That the compiler cannot implement single threading of parts of the user's code to improve execution efficiency?
    Instead of depending on the user base to send in suggestions one-at-a-time it would be nice if NI would actually host discussions aimed at coming up with a coherent and comprehensive way to handle pointers/references/optimization etc. One of the reasons Labview is so scattered is because individual ideas are evaluated and included without any group discussion about the total environment. How about a MODERATED group, available by invitation only (based on NI interactions with users in person, via support, and on the web) to try and get discussions about Labview evolution going?
    Based solely on the number of Labview bugs I've encountered and reported, I'd guess this has never been done, with the user community, or within NI itself.....

    Here are some articles that can help provide some insights into LabVIEW programming and the LabVIEW compiler. They are both interesting and recommended reading for all intermediate-to-advanced LabVIEW programmers.
    NI LabVIEW Compiler: Under the Hood
    VI Memory Usage
    The second article is a little out-of-date, as it doesn't discuss some of the newer technologies available such as the In-Place Element Structure you were referring to. However, many of the general concepts still apply. Some general notes from your post:
    1. I think part of your confusion is that you are trying to use control references and local variables like you would use variables in a C program. This is not a good analogy. Control references are references to user interface controls, and should almost always be used to control the behavior and appearance of those controls, not to store or transmit data like a pointer. LabVIEW is a dataflow language. Data is intended to be stored or transmitted through wires in most cases, not in references. It is admittedly difficult to make this transition for some text-based programmers. Programming efficiently in LabVIEW sometimes requires a different mindset.
    2. The LabVIEW compiler, while by no means perfect, is a complicated, feature-rich set of machinery that includes a large and growing set of optimizations. Many of these are described in the first link I posted. This includes optimizations you'd find in many programming environments, such as dead code elimination, inlining, and constant folding. One optimization in particular is called inplaceness, which is where LabVIEW determines when buffers can be reused. Contrary to your statement, the In-Place Element Structure is not always required for this optimization to take place. There are many circumstances (dating back years before the IPE structure) where LabVIEW can determine inplaceness and reuse buffers. The IPE structure simply helps users enforce inplaceness in some situations where it's not clear enough on the diagram for the LabVIEW compiler to make that determination.
    The more you learn about programming in LabVIEW, the more you realize that inplaceness itself is the closest analogy to pointers in C, not control references or data references or other such things. Those features have their place, but core, fundamental LabVIEW programming does not require them.
    Jarrod S.
    National Instruments

  • Object and in place element structure

    Hi!
    I need some help!
    How can I do the following?
    In the 1.)  Set the new value here - make some changes takes effect the whole array, previously and take effect for the 2. wire?
    I have tried that in place element structure without any success.
    The reason is why I would like to do this is : I wanna avoid the always usage of get - set pairs when I am working with objects, tipically array of objects.
    so my goal is, how to see only 10 values in both arrays?
    My real problem is the following:
    I have an array with objects. The order of the objects is very important, can not be changed. I use a stack - algorithm on the elements. Randomly push many elements into the stack, and randomly pop them. When I pop, I wanna use a set-method on the object, (set something flag/property) . So I want this chage to take effect the memory .
    (If used a simle enable - indexing in the loop, I would lost the real order of the original array.)
    (maybe I can calculate the index of the element what I want to update, but I think there is more easier alternative to do that and I should use the get - set again...)
    +++ In God we believe, in Trance we Trust +++
    [Hungary]
    Solved!
    Go to Solution.

    The native LVOOP implementation is by-val and not by ref.as in most OOP implementations. If you are coming from an OOP background, think like: every time you branch a wire, it creates a clone of the object on the wire (or all the objects in the array in your case). As a general rule, this is the desired behaviour in about 80% of the cases (when using LabVIEW). So consider if you can't do it using a by-val implementation.
    There are several falvours of by-ref implementation, where you will have the same objects on both wires:
    * private data inside SEQ (single element queue, no replaced by the next one)
    * private data inside DVR (data value reference)
    * object inside DVR
    which implementation you choose is up to you. From your image/code, I'd place the object inside the DVR. You could create the DVR with the obj in the first for loop. In the secend for loop, index your elements and use the IPE to get the obj out of the DVR for your get-set operation and place it back.
    Felix
    www.aescusoft.de
    My latest community nugget on producer/consumer design
    My current blog: A journey through uml

  • Any alternate solution to using Waveform Chart Property Nodes 'ActPlot', 'Plot.Visible' for mulit-plot color problem on PDA?

    Hello,
        On a waveform chart, 4 signals need to be plotted based on the status of 4 boolean inputs. Eg. if the first boolean input is true, the first signal needs
    to be visible on the waveform chart; if the first boolean input is false, the first signal should not be visible on the waveform chart and so on. This can be
    done on LabVIEW desktop using the Waveform Chart Property Nodes 'ActPlot', 'Plot.Visible' - a sample VI "BundleSignals_Select_Desktop.vi" is attached for
    reference.
        But on PDA, since the Waveform Chart Property Nodes 'ActPlot', 'Plot.Visible' are not supported, some other method has to be used. I have done the
    selection/de-selection of these signals using 'Insert', 'Delete' array functions as shown in the attached VIs "BundleSignals_PDA.zip" which works, but the
    problem is that the colour of these signals do not work as desired when the selection/de-selection of these signals is done - It is required that the first
    signal should always appear in White color, the second signal should always appear in Red color, the third always in Green color & the fourth always in Blue
    color.
        I hope i have made myself clear of the problem. Has anyone faced this problem before & is there a solution?
    Note: Version of LabVIEW that we are using: LabVIEW 8.5 Professional Development System for Windows Vista/XP/2000 and LabVIEW 8.5 PDA Module for Windows
    Mobile.
    Thanks & Regards,
    Subhashini
    Attachments:
    BundleSignals_Select_Desktop1.vi ‏25 KB
    BundleSignals_PDA.zip ‏26 KB

    Unfortunately the only alternative to using property nodes is to set the properties manually on the development environement. The limited size of memory does limit us in terms of features for the module.
    Mehak D.

  • Use of boolean property node in LabView 6i

    I am running LabView 6i version 6.0.2.
    I am using a reference to a front panel boolean control to stop the execution of a state machine in a subVI.  The subVI has a property node linked to this reference.  This property node shows that it is "Bool", but when I set the property node's element to "value", the value is not a boolean type.  I can't figure out how to set the boolean property node's element so that I can read the state of the boolean control.  How should I configure this?  

    The data type of the value property is a variant.  It is possible to convert a variant to a boolean, but you probably don't want to do that.
    The reason is that you have the mechanical action of the boolean set to "latch ...", and that means that the value property isn't very useful.
    Change the mechanical action to "switch ...", then the value property will be a boolean.
    Note that this means that you will probably have to reset the boolean programatically after the user clicks on it.

  • Use of grouped property nodes

    HI,
    I'd like to know if there is a way to use a  property node like  " value "  for a group of controls without doing right click /property node /value on each control.
    Thanks
    Olivier

    There is little reason to have many direct value property nodes in any given diagram. (I am just mention this because you explicitly mention "value"). A local variable has the same functionality but is more efficient. (of course, often you can use a wire or shift register for even cleaner code).
    (see e.g. http://forums.ni.com/ni/board/message?board.id=170&message.id=153611#M153611)
    There is also the shared variable, if you run one of the newer LabVIEW versions.
    I am afraid that you use all these value property nodes as a poor man's substitute of "variables", breaking all dataflow in the process. Can you explain why you need so many???
    (btw: another way to copy a property node would be to ctrl+right-drag an existing property node, then right-click it and "link to...(select another control)". This is not faster in your case, but is quite useful if you want to duplicate a property node that has many properties defined.)
    LabVIEW Champion . Do more with less code and in less time .

  • Is it possible to add text when using flashing button property node?

    I am trying to get a text button that displays TEST to show "running"
    when it flashes.  I am using a property node for flashing. 
    At present it cycles between TEST and default color which is set in
    flashing clolor options.

    hi there,
    use the "Strings[4]" property of the button. right click on the property node and see online doc for more information about the meanings of the 4 elements of strings[4].
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"

  • Graphic - drawing nodes and edges, place elements and mouse event

    Hello, I am new to Java. I would like to do the following:
    show graphically a node and edge structure in star format, where each of the nodes, including the centre node, is a string.
    The number of edges is varialbe, so I guess I have to divide the 360' arc into equally spaced angles, define the distance at which to place the nodes at the extremity and then draw n-lines from the centre node (also a string of characters) to each of the peripherical nodes (also a string of characters).
    Additioanally, I would need a mouse click event, where by when I click on any of the nodes (including the periphery ones), an certain event is triggered, depending on which node I am clicking. Basically, something that recognise that the mouse is on top of a specific String when clicked (to make things more complex, I would need a left click or a righ click with pop-up menu of actions..but I guess, that's the easy part)
    thanks to all for the help

    My advice is to start learning Java:
    http://java.sun.com/docs/books/tutorial/
    ... and using existing tools instead of re-inventing the wheel:
    http://www.jgraph.com/jgraph.html

  • An "Empty" In Place Element Structure rather than using one Flat Sequence?

    Altenbach's neat Idea here got me thinking of the various ways we do synchronization, and I sat down an In Place structure and thought, why not? It saves a "tiny" bit of space, but personally, I think it looks better - especially for the typical Delay-in-a-Box. Thoughts or caveats?
    Richard

    You could use a single run while loop, it'll be correct usage and look different.
    I recently used that solution to get the 1st element of 5 arrays at once.
    /Y 
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • My restrictions are on and I didn't turn them on.  The code is not the one I use to unlock my ipad.  How can I find out the code to turn off my restrictions and why did it turn on?

    My restrictions are turned on. I didn't turn them on.  The only code I've used on my ipad is to unlock it and that code won't work on my restrictions.  How do I turn off restrictions and prevent them being turned on again?

    The only option is to wipe the device clean and restore it to factory settings.  Hope you have a backup.
    Follow the instructions in  iOS: How to back up your data and set up your device as a new device http://support.apple.com/kb/HT4137 to restore the device to factory settings.
    Once you have setup the device as a new one, you can then sync it back with your iTunes account and all your music, apps, contacts and any other content sync'ed with iTunes will be loaded on the device. Any content that is stored only on the device and not sync'ed with iTunes, like app logins or data, will be lost during this process. Be forewarned that this is a long process and can take a couple of hours or more to complete. This can be painful, but it is necessarily so to prevent users from working around the security settings. After the restore is complete, you can setup a new Restrictions passcode. Make a note of the passcode to avoid this situation in future.
     Cheers, Tom

Maybe you are looking for