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

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!

  • How to increment array that contains two clusters whose visibility is controlled by a visible property node and selected by a radio button.

    I am trying to use a property node: visible in order to enable or disable one of two clusters. These clusters are in a larger cluster and this larger cluster is in an array. The two clusters are controlled by a radio button (one labeled transistor and the other diode). When diode is selected, the corresponding diode parameters cluster should be visible and when transistor is selected, the corresponding transistor parameters cluster should be visible. In the mean time, the cluster of the device that is not selected should not be visible. There are at least 45 elements in the array (but not more than 45). Data is entered into each cluster (diode or transistor data) for each element in the array via the increment/decrement. The problem is when you select the first radio button (transistor) and enter data, when you increment the array for a new device selection, since a visible property node was used on the cluster, a loop is created where a new cluster is trying to be shown, but the old cluster is also trying to be shown (because it is the one referenced by the property node. How do I get rid of this loop and still be able to increment the array and keep my data intact for future use? Attached is the vi
    Attachments:
    ChooseScan.vi ‏17 KB

    You could try something like this.  However, if you know how to use an xcontrol, that would be a better way to implement the above functionality so that these UI characteristics are not a part of your main VI.  The problem with the above VI is that you're looping every 100 ms just to update your UI.
    Also, try using the "disabled" property node, instead of the "visible" one.  That way, the user will still see the options he has but they will be grayed out.
    Message Edited by Sudhir Gopinath on 06-25-2007 04:45 PM
    S G
    Certified LabVIEW Architect, Certified TestStand Developer, Certified Professional Instructor
    Attachments:
    ChooseScan_1.vi ‏19 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!

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • Populate ENUM RING via Property Node String[]

    Can you populate an ENUM Control using it's Property Node String[] Element? If not, is there a way to do this programmatically? So far I have failed to do this.
    I am Using LV6.1.
    Thanks

    Mr. Kring can probably come up with a much better example, but here's a quick one-off example in LV 6.0.2.
    Download both attached files. Open enum_target.vi, and note that the enum shows only a single choice, "Before". Open Change_enum.vi, and point the file control to the enum_target.vi. Run the Change_enum.vi. The contents of the Enum control in enum_target.vi should have changed to the string array in Change_enum.vi.
    This is a simplistic example, but it should work. Explanations are given on the diagram of Change_enum.vi of how references are pushed around in it.
    Attachments:
    Change_Enum.vi ‏39 KB
    enum_target.vi ‏7 KB

  • Condense property node elements

    Hello,
    Attached is a snippet of a program in which after the program goes into a specific state, the front panel elements are made either visible or invisible or there are value changes.
    In my actual VI, I have a lot more front panel elements, and in trying to keep my code consistent and easy to follow, if I line up the propery nodes of the elements in the block diagram, the block diagram can extend to over 2 screens. 
    I would like to know if there is a procedure that I can adopt where I can condense the activation of the property nodes of elements from the front panel so that the property nodes do not extend over 2 screens as it makes it harder for my collegues with a laptop to follow.
    Thanks,
    hiNi.
    Attachments:
    Visibility.llb ‏39 KB
    Visibility.llb ‏39 KB

    I would suggest that instead of using property nodes in each state to update the values of your indicators, you could just place the indicator terminals outside of your state structure (but within the while loop) and pass whatever value is appropriate for the state out of the case structure.  Writing directly to the control instead of using property nodes will be faster and will save you a lot of space.  It also generally scales better, as you've found out.  You're already doing something like this for your status updates- why not the rest of the indicators?  For hiding/showing elements, it would be more compact to use explicit instead of implicit property nodes and for loops.  You can also use explicit property nodes within subVIs, which will go a long way towards making things smaller and neater.
    Control References: Overview (Creating and using Implicit vs. Explicit nodes)
    http://www.ni.com/white-paper/3159/en/#toc3
    This may be oversimplifying things on account of your basic example, but in general you'll be better off grouping your indicator values into a cluster that's stored in a shift register (like your status string) and then modifiying the cluster contents as needed.  This allows you to start adding logic in subVIs much more easily. It's a lot easier to avoid race conditions caused by writing values from multiple locations as well as things get more complex.
    Regards,
    Tom L.

  • How to read the configuration of a FXP number via property nodes or other methods.

    Hello all,
    I am attempting to store in plain-text the value and configuration specifics of the LV FXP datatype. (please do not suggest I cast it to integer).
    The ini config format does not support FXP. So we'd like to; using property nodes, interrogate the specifics of a FXP numeric control on the FP.
    It appears this is not exposed by control ref's and property nodes.
    Oddly enough, you cannot even interrogate the detailed type of an INT if it is a U8, I8 or I16 etc?! via property nodes, the deepest you can go is 'digital'.
    Specifically, you need to know the following to 'reconstruct' a FXP:
    1. Value
    2. Signed\unsigned
    3. Word length
    4. Integer word length
    Without this, there is a risk of corrupting the value during conversion.i.e we want to load initial FXP from disk at application startup. This is a critical application and we cannot tolerate rounding\conversion errors accumilating with numerous reads\writes of FXP settings.
    It is odd that you cannot interrogate via property nodes the details of a numeric type. ie. you cannot 'discover' via the property node of an INT if it is a U8, I8 or any other type.
    Regards
    Jack Hamilton
    PS: Don't suggest XML either....

    Aristos Queue wrote:
    Alias name here wrote:
    ..second post telling me the 'propertys' of a control have nothing to do with the value is bizzare - via 'properties' for a LV control is the ONLY way to configure the specific type of a numeric...so via the numeric 'property nodes' should\would be able to query it's configuration.
    I do not see any way to set these things through the properties...
    I think he means by right clicking the control on the front panel and configuring with the properties dialog. The properties are exposed there, but not within the property nodes.
    Edit: You beat me.
    CLA, LabVIEW Versions 2010-2013

  • Controlling numeric slider with numeric control

    Hello,
    what i have is a numeric slider and
    a numeric control.  i would like to be able to move the slider and have
    it update the value in the numeric control and vice versa.  the problem
    is that i can update the value in the numeric control when i move the
    slider, but i can't update the slider if i try to change the value in
    the numeric control.  i was trying to use the 'value' property node for
    each of them and and wire each of the controls to the opposite property
    node.  i know they are both control but i thought if i change the
    'value' to an input then it may update.
    i have attached the vi.
    thank you
    Attachments:
    numeric_slider.vi ‏10 KB

    AdamKrzy16 wrote:
    Any help or insight would be appreciated beyond measure!
    Well, since the event structure only executes when one of the controls changes, it is blocking the loop. Dataflow in action!
    A quick solution would be to make the event structure "transparent" by adding a short and empty timeout case. Now just use a feedback node to retain the existing value if the controls did not change.
    There are probably definitely better ways to do this, but they would require more fundamental changes to your code.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    PID LabVIEW Program_slider try number 2MOD.vi ‏282 KB

Maybe you are looking for

  • For-each skip rows based on test null condition

    I thought this would be simple, but I can't seem to find a satisfactory answer in the XML Publisher manuals. For various reasons, I have a pre formatted Oracle Report in EBS which doesn't group the XML tags as I want them. I have some groupings with

  • Jdbc err

    Can anybody what does this messahe mean Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'SKUMASTER' (structure 'insert'): java.sql.SQLException: FATAL ER

  • Computer problem. PC built.

    Alright just to keep this short and simple. I turned on my computer the other day and smelt something burning like dust or what not. Anyways after an hour use my computer just shut off on it own, trying to turn it back on but no success, The power st

  • IPhoto sharing

    Hi, I have a 2010 iMac and have recently added a Macbook Air to my collection, I have my iPhoto library on the iMac I am able to access the libary through my Apple TV 2 however I am not ale to access the library with the new Macbook Air. Can I please

  • E-sourcing - key project sizing factors

    Hi, When implementing e-sourcing, what are some key factors that you have observed that at the end really influence the effort and time required to implement e-sourcing? Thank you, Mike