Change propertyof array in subvi

Hello,
i know how to change
a property of an OK-button.
Now i have an
array of OK-buttons. How can i change a property of one of the buttons in the
array?
See the attached
VIs. In the top-vi i have two arrays. The "main-array" is the array where the
properties have to cange. the disable list is the array where i select which
indices to disable. Now the subvi gets a reference of the
main-array.
The propblem is how
to get from this array-reference a reference to only one button in the
array.
Has someone a tipp
for me?
Thx for your
help
Attachments:
Top.zip ‏12 KB

Hi NewOne,
could you add the .ctl files also...
If  I look at your code I would change the matrixtoindex.vi to output two arrays, one with the elements to disable and one with the elements to enable, this will process each control one time (or better let the output array put the 'enabled' state out for each of the controls (thus 0 or 2 in your case) and make the matrix to index.vi reentrant in that case the processing will go faster.
Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be!

Similar Messages

  • Change 1D array of 32 bit integer to 1D array of BV tag

    i just want to change 1D array of 32 bit data type to 1D array of BV tag to display this in Historical trend viewer
    an urgent reply wud b highly appreciable
    VINO

    What you are asking for is not really clear for me... I assume you want your array of numeric values to be replaced by a boolean array.
    Also, I was not sure about what numeric value has to correspond with TRUE or FALSE...
    Here is a possibility to do this :
    I hope this will help you...
    Message Edité par TiTou le 03-29-200609:07 AM
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
    Attachments:
    QH.png ‏6 KB

  • How can I display a changing variable in a subvi on the front panel of the main vi as the subvi is excuting

    In the document attached the vi on the right is sub to the vi on the left. On the subvi on the right the variable "Field Reading" is continuously updated on the front panel of the subvi as the "for" loop is executed, but only the last value of the variable is updated on the main vi front panel which is what is expected. My question is how can I display the changing value of "Field Reading" on the main vi front panel as the "for" loop in the subvi is running?
    Thank you.
    Solved!
    Go to Solution.
    Attachments:
    Doc2.docx ‏554 KB

    Hopefully I can explain it well enough. It really is simple.
    1) Create an empty global variable and call it something like User Interface References.vi
    2) For each and every control and indicator on your front panel, right-click and select Create/Reference
    3) Place these references wherever you like (I use a series of Event cases to perform my initialisation and these all live in one of these event cases). They can be placed anywhere in the main vi.
    4) For each of the references, right-click and select Create/Indicator
    5) Moving to the front panel, Cut all the indicators and Paste them in the global variable (eg. User Interface References.vi)
    6) Moving back to the block diagram, wire the global variable to each of the references and select the same named global variable.
    All the hard work is now done (until you add another user interface terminal). You should now have something that look as shown below, [except the reference labels would be to the left (not sure why the snippet put them above)]. In my latest program I have 82 references!
    Done. You can now access all your front panel controls and indicators anywhere in your program as shown below.
    You can just select Value in most cases, but in this particular case I wanted to fire off an Event to do some things (log the alarm) as well as just update the value. So, this is another bonus with the method.
    Hopefully this all makes sense. If not, let me know.

  • Can you change the Arrays inside a ColorModel?

    Is there a way to reset the rgb arrays in an indexColorModel without having to create a new color model.
    I am creating an application that does color contrasting by changing the values in the rgb arrays in which I am creating a new colormodel each time the values change, but I would really like to simply reuse the color model I already have and avoid new object creation.
    Thanks
    Gina

    I don't know how to do this with a color model.
    I can help you, if you want use BufferedImage.
    Buffered image=new BufferedImage(width,height,BufferedImage.TYPE_INT_ARGB);
    to create the image.
    To have a color :
    int rgba=image.getRGB(x,y);
    Color col=new Color(rgba,true);
    To draw :
    Grahics2D g=(Graphics2D)image.getGraphics();
    g.drawLine(x,y,x,y); // Draw a plot
    g.setColor(c); //Cahnge the current color
    I hope, it will help you

  • Change source array in JComboBox

    Is there a way to change the list of items in a combo box while the code is running? Thanks

    The one time I don't preview my posting I make a typo. As I was trying to say:
    Read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/model.html]Using Models for information on Models. Like I said every Swing component uses a Model so take the time to read the tutorial and understand what a Model is. Its called Model-View-Controller (MVC) design.
    Also, I checked the tutorial, it uses string arrays as wellTo quote the combo box tutorial:
    No matter which constructor you use, a combo box uses a combo box model to contain and manage the items in its menu. When you initialize a combo box with an array or a vector, the combo box creates a default model object for you
    Yes, you can create a JComboBox with an Array. The data from the array is copied to the Model.
    I just can't figure out how to change it.You don't.
    Thats why I just told you that you need to change the model. This can be done using the methods in the DefaultComboBoxModel. I gave you the convenience methods from the combo box that does this for you.

  • Changing an Array of Strings to an Array of Double or Int

    How would I change a string of arrays to ints or doubles...here my code:
         File inputFile = new File("testing");
            FileReader in = new FileReader(inputFile);
         BufferedReader bufin = new BufferedReader(in);
         String c;
         String[] x = new String[300];
         String[] Xcoord = new String[300];
         String[] Ycoord = new String[300];
         int counter = 1;
                while ((c = bufin.readLine()) != null)
              if( counter >= 3 )
                   x[counter] = c;
                   String[] xySplit = x[counter].split(" ");
                   System.out.println("X: "+xySplit[0]+"  Y: "+xySplit[2]);
                   Xcoord[counter] = xySplit[0];
                   Ycoord[counter] = xySplit[2];
               in.close();

    Use a parsing method:int i = Integer.parseInt (s);
    double d = Double.parseDouble (s);>> String[] x = new String[300];
    You seem like you want to use a list instead.

  • Change 2D array index value

    I am working on 2D array of size 1024x1280 (zero indexing). now i need to change both row and column indexing
    row indexing change from (0,1,2,3....1023) to (0.5, 1.0, 1.5, 2.0, 2.5, ....., 512)
    column indexing change from (0,1,2,3.....1279) to (0.5, 1.0, 1.5, 2.0, 2.5,........, 640)
    I tried with property node IndexVals, but not success.. please help

    Try this VI...!!
    so by keeping this (attached) VI in between, you may consider that the index has changed from 1..1023 to 0.5..511.5.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.
    Attachments:
    Index (float to int).vi ‏11 KB

  • Changing individual array element properties

    In the attached VI, I have a 1D array of slider controls ("Phase Coefficients") where each array element represents the coefficient in a polynomial of arbitrary order. The problem I'm having is that the slider range I set for the lowest order coefficient (array element 0) quickly becomes impractical for higher order coefficients (elements >5). Small changes in the higher order coefficients dramtically change the overall polynomial.  I want each element/slider to have its own range, but I know this isn't strictly possible as each element in an array shares the same properties. I've implemented a work around (Use boolean to activate) in which the range of all sliders is adjusted depending on which element is being viewed, but my implementation prevents editing of the range while running the VI. Is there any way to adapt my method (or use another method all together) to allow for different, editable ranges for each element slider?
    Thanks!
    Solved!
    Go to Solution.
    Attachments:
    Arb Poly Gen.vi ‏39 KB

    Hi RavensFan, 
    Thanks for the suggestion! I tried your idea, but I still seem to be having the same problem with each slider sharing properties despite now being in a cluster inside the array. I may be misunderstanding you. Would you mind showing me an example please?
    *Edit: Nevermind, got it to work. Thanks again!
    Attachments:
    Array Cluster Slider.vi ‏7 KB

  • How to change an array element color?

    Hi everyone,
    I'm trying to acheive something I tough would be easy... seems its not.
    I have a 1D array inside a While loop. I want the n-element of the array be highlighted with the corresponding n-iteration of the loop.
    I mean:
    First loop cycle - First element of the array is highlighted (ex: yellow)
    Second loop cycle - Second element of the array is highlighted (first element come back to normal)
    ... and so on...
    Anyone has ever suceed? Can't find any answer anywhere.
    Thank a lot
    Eric

    Am not sure with the array but you can do that with a list box control.
    Good luck
    The best solution is the one you find it by yourself
    Attachments:
    List Box color Example.vi ‏7 KB

  • Event structure to detect value change of a control within a cluster in an array

    I have 1D array that contains a cluster. The cluster contains a numeric and a boolean control.
    If the user starts to edit the numeric control value i would like to call one subVI, and if the boolean control value is changed, call a different subVI.
    The array control on the front panel allows the user to edit a number of the array elements. 
    I would like to use an event structure to detect a value change in the cluster. When editing the Events, in the Event Sources panel i get the option to select only the array, not the cluster within the array or the controls within the cluster. Can the Event structure be opened up to show controls within clusters and arrays?
    The solution i am using is to detect a mouse up event on the array and then use property nodes to  determine if the key focus is on the numeric, and  a case structure to determine which subVI to call. This works, but is there a better (simpler) way?
    Thanks, Blue.

    Thanks for the responses guys.
    The tricky bit was that i wanted the numeric control values to flag they were going to be edited, so i could call a subVI, before their values were changed by the user. This is done by using the key focus property node, - i need to detect changes on the fly rather than post the event.  Probably didn't make this clear enough in my original post. 
    The array is of variable size depending on if the user decides to insert or delete elements. The user also has the option to click and edit the array without having to do to much scrolling through the array index, as the FP shows several elements at a time. The Event Structure does a good job of automatically determining which element in the array is being edited, and returning those values to the property nodes. Turned out simpler than i thought it might be at one point!
    Cheers, Blue. 
    Message Edited by BlueTwo on 01-15-2009 06:52 AM
    Attachments:
    evstrct1.jpg ‏63 KB

  • Change array index font size using VI scripting

    Hello All,
                         I have a array control in my front panel, I'm wondering is there any way to change that "array index" font size using VI scripting?
    Example:
    1. I have this array
    2. Manually I have changed the font size of the array in "Selection Font" panel as below
    3. Through VI scripting I'm able to control control font size, label font size.,.. But not the index font size. So it looks odd.
    4. I'm expecting to be modify this array as same as picture 1 through VI scripting.
    Note: It may not have any practical application, but some time it will be helpful for the programmers to make a quick drop. If anybody have any idea, please share.
    <Electro Sam>
    ELECTRO SAM
    For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
    - John 3:16

    Raven - you are right, Actually I'm looking for options to change the font size of the array index.
    Actually we have coding standard to follow. In that, all the front panel controls needs to be in Font size 14 and the size should be 25X120, so I'm trying to write a code which automatically converts the VI FP control sizes to be in standard size.
    I'm not only using one customer VI, I'm handling various customer VIs, so each one VI FP control sizes are different. So I'm developing this utility to standardize the VI's as per the guidelines we have.
    Except this array index most of the VI FP control elements I have handled, Only this array is troubling me.
    Appreciate your support guys, please share your thoughts.
    <ElectroSam>
    ELECTRO SAM
    For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.
    - John 3:16

  • How to change array size in forms6i

    Does anyone know how to change the array size in Forms6i.
    The only runtime option i see is Array=YES (Use array SQL processing). But I want to increase the number of records per request retrieved. There's supposed to be a 'Query Array Size' parameter but I have no clue where to find this ...
    kind regards

    Kurt, it may sound an obvious point to make but - did you even consider the on the help??
    We spend a lot of effort in producing this and it should be the first stop for quesions.
    Bring up the help, click on index and then type in "QUERY ARRAY" - and the list automatically moved to the topic you want.
    Regards
    Grant Ronald
    Forms Product Management

  • Cluster or array or other solution

    Hi
    I have an labView6i program roughly consisting of 3 components :
    'main program' : calls the 'read subvi' every program cycle, and displays
    the the output.
    'read subvi' : read a number of ADC channels, convert the ADC voltages to
    physical values, and return them as an cluster/array.
    'save subvi' : save current readback values and names of ADC channel to a
    file.
    Every physical measurable quantity has a name, conversion formula, and an
    ADC channel. So I want all these informations in the 'read subvi' (as an
    constant) and only once (so it is easy to change).
    The 'save subvi' needs the names from the 'read subvi' so I have changes
    the 'read subvi' to output both values and names(two different
    clusters/arrays).
    1:
    If I output the va
    lues from the 'read subvi' as an named cluster, they are
    farely easy to distribute to difrent instruments(placed in different tabs)
    in the 'main program' using 'unbundle by name'. But in that way every
    channel has two names... the label in the cluster, and the string conctant
    used e.g. by the 'save subvi' .
    2:
    If I output the values an an array there i a big risk that an instrument in
    the 'main program' vill show the wrong channel (if you change the order in
    the 'read subvi' and forget to do the same thing in the 'main program').
    Is it posible to convert an string constant to an label/name(later to be
    used to 'unbundle by name') on runtime ? or is there an other brilliant
    solution to my problem?
    / Peter

    Why not define the cluster array in your main VI and pass it (as an array or as individual clusters) to the read and save sub-VI's? The sub-VI's will then be more general purpose: they'll read and save whatever you tell them to.
    You can use Property Nodes to read the names (label text) of controls in a cluster. But you can't use Property Nodes to change the control names: you'll get an error like "Error 1073 occurred at Property Node (arg 1) in Read Cluster Control Names.vi. Possible reasons: LabVIEW: This property is writable or this method is available only when the VI is in edit mode."
    You need to select the item for Unbundle by name while editing the VI, not at run-time.
    If the main VI defines the cluster, why do you need to read the control labels at r
    un-time? Why not just use a string control in your cluster instead of constants and labels?
    Here's an example of reading and trying to write label text for controls in a cluster. I really don't think you need to do anything like this, but I don't really understand your application.
    Attachments:
    Read_Cluster_Control_Names.vi ‏47 KB

  • Inserting a associative array into a table

    Hi,
    I am working on a process where I want to store the temporary results in an associative array. At the end of the process I plan to write the contents of the array into a table that has the same structure. (the array is defined as a %rowtype of the table)
    Is it possible to execute ONE sql statement that transfers the array into the table? I am on 10g (10.2.0.4.0)
    Here's what I have now:
    declare
      type t_emp is table of emp%rowtype index by pls_integer;
      v_emp t_emp;
    begin
      -- a process that fills v_emp with lots of data
      for i in v_emp.first .. v_emp.last
      loop
        insert into emp values v_emp(i);
      end loop;  
    end;But it would be better if the loop could be replaced by sql one statement that inserts all of v_emp into emp. Is that possible?
    Thanks!
    PS: I'm not sure whether it's a good idea to use this approach... building a table in memory and inserting it into the database at the end of the process. Maybe it's better to insert every record directly into the table... but in any case I'm curious to see if it is possible in theory :)
    Edited: Added version info

    True, SQL cannot access the PL/SQL type.
    So you can not do something like this:
    insert into emp
    select * from table(v_emp)That is not possible.
    But FORALL is possible:
    FORALL i in v_emp.first .. v_emp.last
        insert into emp values v_emp(i);FORALL makes just one "round trip" to SQL bulk binding the entire contents of the array.
    It is much more efficient than the normal FOR loop, though it is mostly a PL/SQL optimization - even the FORALL actually inserts the rows "one at the time", it just hands the entire array to the SQL engine in one go.
    If the logic has to be done procedurally, FORALL is efficient.
    If the logic can be changed so arrays can be avoided completely and everything done in a single "insert into ... select ..." statement, that is the most efficient.

  • Hi, how can i break the value for a row and column once i have converted the image to the array?????​??

    Hi, I would like to know how can i break the value for a row and column once i have converted the image to the array. I wanted to make some modification on the element of the array at a certain position. how can i do that?
    At the moment (as per attachhment), the value of the new row and column will be inserted by the user. But now, I want to do some coding that will automatically insert the new value of the row and the column ( I will use the formula node for the programming). But the question now, I don't know how to split the row and the column. Is it the value of i in the 'for loop'? I've  tried to link the 'i' to the input of the 'replace subset array icon' , but i'm unable to do it as i got some error.
    Please help me!
    For your information, I'm using LABView 7.0.

    Hi,
    Thanks for your reply.Sorry for the confusion.
    I manage to change the array element by changing the row and column value. But, what i want is to allow the program to change the array element at a specified row and column value, where the new value is generated automatically by the program.
    Atatched is the diagram. I've detailed out the program . you may refer to the comments in the formula node. There are 2 arrays going into the loop. If a >3, then the program will switch to b, where if b =0, then the program will check on the value of the next element which is in the same row with b but in the next column. But if b =45, another set of checking will be done at a dufferent value of row and column.
    I hope that I have made the problem clear. Sorry if it is still confusing.
    Hope you can help me. Thank you!!!!
    Attachments:
    arrayrowncolumn2.JPG ‏64 KB

Maybe you are looking for

  • Iframe content in YUI tab disappearing - only in firefox 11

    We have an internal web site developed with YUI which uses the tabview control along with some content provided through an iframe. When the page initially loads the iframe is displayed but when switching between the YUI tabs the iframe content disapp

  • Album artwork info and help

    Hi all, i have a question, when iTunes find itself album images, everything is ok, i transfer music on iPod and images are correctly displayed. Th e problems is when iTuns can't find it , so i find it by mysel, I select all the songs and from the inf

  • Addition of field on notification header

    Hi, I want to add the extra field on the notification header to capture the client specific data. I tried to find user field or field key to that but i am unable to find both these options in SPRO. Then i have found one user exit i.e. QQMA0001 and do

  • Forum for discussions around "My Oracle Support"

    Since there isn't a forum specifically for "My Oracle Support" what do people think about having one created. There are forums both here and in the MOS communities for just about every other product that Oracle has what about one for MOS on http://fo

  • Built-in isight not clear

    I bought my iMac 17" for 1 year, I found the video signal of the built-in isight is not sharp, just like the camera using iso 800, the pixel is quite big, before I think it is normal. Recently, my friend bought a new iMac 24"(aluminum), I found the v