Array of cluster color change

I have an array of clusters that I'd like to change the color of each cluster programatically. I've attached the cluster hoping for some help. I'd also like to be able to disable some clusters while enabling others. Is this possible? is there a better way to do what i want?
Attachments:
Untitled 1.vi ‏9 KB

Hi Joe,
There is a way for you to change the color or disable a control programmatically, but like Darin said, you wouldn't be able to do this per element through an array. I urge you to go with his recommendation of using a cluster of clusters.
With regards to the necessary programming, a property node should do the job.
Best Regards,
Joshua de la Llana
Applications Engineer
NI ASEAN

Similar Messages

  • Programmatically Change Array to Cluster Size

    Hello,
    I have a Chart with several values scrolling across it. The number of
    values is variable. To prepare the data for the Chart, I use the Array to
    Cluster element. Is there a way I can programmatically change the size of
    the cluster output?
    Thanks,
    Peter

    Peter,
    As far as I know, you cannot programatically chage the size of the cluster output in the Array to Cluster vi. However, you may not need to convert to a cluster for charting. The chart will take a 2D array and plot mutiple lines. See the attached example which uses Reshape Array to form the data for a chart.
    The only hitch is that it erases the plot when you change the number of values to plot. This may or may not be important to you.
    Tim
    Attachments:
    Reshape_array_for_chart.vi ‏18 KB

  • Array to Cluster, Automate cluster size?

    I often use the Array to Cluster VI to quickly change an array of data into a cluster of data that I can then connect to a Waveform Chart.  Sometimes the number of plots can be different which results in extra plots (full of zeros) on the graph, or missing plots if the array is larger than the current cluster size.  I know I can right-click on the node and set the cluster size (up to 256) manually.  I could also use a case structure with as many Array to Cluster nodes as I need, set them individually and wire an Array Size to the case structure selector but that's kind of a PITA. 
    My question is whether or not anyone knows a way to control the cluster size value programatically.  It seems that if I can right-click it and do it manually there must be some way to automate it but I sure can't figure it out.  It would be nice if you could simply wire your desired value right into an optional input on the node itself.  Any ideas will be much appreciated.
    Using LabVIEW: 7.1.1, 8.5.1 & 2013
    Solved!
    Go to Solution.

    I'm under the impression it's impossible.  See this idea for related discussion.
    Tim Elsey
    LabVIEW 2010, 2012
    Certified LabVIEW Architect

  • Add element to array of cluster

    I have an array of cluster. Cluster contains two elements. How to add an element in cluster at run time on the second position efficiently? In other words dont want another copy of cluster which contains three elements and copy the original two elements plus the new element. 
    Original array of cluster lets say has two element Temp1 and Pressure 1.
    Need to add another element in cluster and now the array of cluster will be Temp1, Volt1 and Pressure 1. So Volt 1 is added to all cluster elements at second order throughout the array of clusters programatically. 
    CLD,CTD
    Attachments:
    TestAddElementToCluster.vi ‏10 KB

    It is unclear from your original post what the problem you need to solve actually is.  Are you trying to create a user interface?  Do you need to dynamically add arbitrary data to a data set, or is it a fixed set of functionality that can be dynamically changed in predetermined ways?
    Having done it, I will recommend you not try the scripting and subpanels approach.  There are almost always better ways.
    Remember that your data structures do not need to mirror your user interface.  If you were trying to display the temperature, voltage, and pressure data to the user, a multicolumn listbox may be more appropriate than a raw cluster in an array.  Internally, this would allow you to maintain the temperature, voltage, and pressure as separate arrays and only display the ones you want in the listbox.
    Please give us a more information on the problem so we can help you with an easier solution.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • Add elelment by element in an array of cluster

    Hi All,
    I have a problem in extracting data from array of cluster to a single cluster. Please have a look at the attachment.I have found the solution but it consumes lot of memory because of shif registers andi am using this many places which is loading to nearly 100% in RT. Please provide an better alternative solution.
    Attachments:
    Array of Clusters.JPG ‏153 KB

    AutoTEC wrote:
    Hi,
    No i am almost at the end of coding . If i change the entire architecture affects. Only problem is this logic consumes more time. Pls any other idea...
    Standard situation if a propper data management is not done before coding OR  lead to the wrong architekture.
    Do you use type definitions? Help a lot to avoid the horror of optimizing the datastructure.
    Since it is much faster to rebuild a cluster by indexing the elements from your cluster of arrays than generating a cluster  of arrays from an array of cluster (Puh!) 
    AND you have timing problems I see only two solutions : Faster hardware or a reorganisation of your data.
    So change the datasturcture , create a subvi 'IndexMyData2Cluster' and whereever you indexed the array of cluster  replace it with that vi.
    Or run both structures in parrallel (BRRR, race conditions, inconsistent data , uuuaaahhh)
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • Boolean LED Blinking in Array of Cluster

    Hello,
    I did not found anything to my problem in the developer zone of ni.com. Only how to index a element in an array of cluster.
    I want to set the Property "Blinking" of a boolean LED control in an array of cluster. But all attemps were to no avail and nothing happens.
    Can someone look at my VI please?
    Thanks shavo
    Message Edited by shavo on 05-28-2009 05:12 AM
    Attachments:
    ClusterBlinking.vi ‏58 KB

    It's not possible to change the physical property of the element of a array of cluster.
    Balaji PK (CLA)
    Ever tried. Ever failed. No matter. Try again. Fail again. Fail better
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.

  • 1D Array of Cluster of 2 Elements Write to Spreadshee​t

    Hi all, first time using LabView in many years.  I am trying to write a VI that will acquire data from our cDAQ (right now just trying to get it to work with a single thermocouple in a NI 9211, but eventually will be 8 X thermocouple, 4 X pressure transducer), display it in realtime on a plot, and then when the acquisition is stopped, output the data to a file for later use.  I am currently using the Base LabView package.
    My problem (as I remember it was 7 years ago when I last used this) is with the data types not working together.  This is my thought process currently on building this VI.  Everything is inside a While Loop with the Wait function at 1000ms.
    - Acquire a point of data using the DAQ assistant
    - Send that point of data into a bundle
    - Send the iteration count into the same bundle (as a timestamp)
    - Send the resulting cluster of 2 elements into a Build Array function
    - Send the resulting 1D array to a shift register in the While Loop, as well as to an XY graph for realtime plotting
    - Wire the incoming point on the shift register back into the Build Array function
    In my mind, this allows the XY graph to plot the complete array every iteration, giving a realtime view of the signal.  Everything works fine up to this point.  My problems are:
    When I stop and restart the program, the shift register is not cleared, so the existing data in the array remains on the graph.  I know I need to initialize the shift register to clear it, but I cannot figure out what to wire to it that will be compatible with the data type (I just get broken wires with everything I tried).
    Similarly, I cannot figure out how to output this data to a spreadsheet after I Stop the While Loop.  I think I should wire the "Write to Spreadsheet File" VI to the outgoing shift register, but again, I can't get compatibility with data types (source is a 1D array of cluster of 2 elements).
    I have attached my current program "Production" to this post.
    I look forward to the help!
    Brad
    Attachments:
    Production.vi ‏46 KB

    Hi Brad,
    I would suggest you change your architecture. First, to answer your questions:
    1.
    In order to ensure that your shift register is not reading the last
    value from it's memory location, you just need to create a constant for
    the shift register. To do this, right-click at the input of the
    'left-placed' shift register and create a constant.
    2. The Write
    to Spreadsheet is expecting a 1-d or 2-d array while you are wiring a
    Dynamic Data Type. Use the Convert from Dynamic Data Type to convert
    the data into the appropriate waveform after which you can get the
    waveform attributes which includes the values and the timestamp data. Or, you can use the Write to Measurement File to write to a .lvm file which can be opened in Excel as well.
    Changes to your architecture:
    Since
    you are using a lot of channels, I would advise you use a
    producer/consumer architecture. You can have a look at this
    architecture by navigating to File -> New.. and searching for the
    Producer/Consumer template. You will notice that this architecture uses
    queues. The way you will design your VI is to use DAQ to acquire the
    data into your producer loop, convert this data into a waveform and
    then send this data to the consumer loop via queues. In your consumer
    loop, you can write this data to a file. At this point, I would
    encourage you to write to a binary file instead of a spreadsheet file. The write will happen faster and you will be using less space on your hard disk when compared to ASCII writes.
    I know this can be real confusing for a beginner, so be sure to post back if you have any questions.
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • Shared Variable based on Array of cluster

    Hello,
    I've created a shared variable which is based on an array of cluster (typedef). The cluster only contians two double elements for x-y coordinates of a point.
    Everything seems working until I found the shared variable can only hold the first two elements when I pass an array to it.
    Are there any settings I've missed?
    Thanks
    Yan

    Data is simply created and directly sent to SV.
    The difference during defining the SV is:
    Normally, when define an array SV, it allows to change the "Number of elements" (default as "2").
    However, when define a typedef array SV, the option is gone. Does it then use the default number "2" as the number of elements?

  • Replace an array into the array of cluster!! Possible?

    Hello,
    I got a problem with inserting an array I acquired from another vi into the existing array of cluster. My big array contains a cluster of 5 elements (name, value, save, active and position. I want to connect my sub vi ,whose output is an array of number, to the main vi by replacing only the values in the main array. So all values in the main array are acquired from the sub vi but the remaining data stays the same. I also want my main array to look the same too, except the values have changed. I know it sounds quite simple but I don't really know it.
    Thanks in advance
    Solved!
    Go to Solution.
    Attachments:
    vi connection.vi ‏12 KB
    Data_Read (adapted).vi ‏32 KB

    I guess you need something like this. This will replace the values present in the main array with the values obtained from the sub vi.
    Good luck
    The best solution is the one you find it by yourself
    Attachments:
    vi connection.vi ‏8 KB
    Data_Read (adapted).vi ‏26 KB

  • Array to cluster with adjustable cluster size

    Hi all
    Here I have  a dynamic 1D array and I need to convert it into cluster. So I use Array to Cluster function. But I notice that the cluster size is a fix value. How can I adjust the cluster size according to the 1D array size?
    Anyone pls give advise..
    Thanks....

    I won't disagree with any of the previous posters, but would point out a conversion technique I just recently tried and found to work well for my own particular purposes.  I've given the method a pretty good workout and not found any obvious flaws yet, but can't 100% guarantee the behavior in all settings.
    Anyhow, I've got a fairly good sized project that includes quite a few similar but distinct clusters of booleans.  Each has been turned into a typedef, complete with logical names for each cluster element.  For some of the data processing I do, I need to iterate over each boolean element in a cluster, do some evaluations, and generate an output boolean cluster.  I first structured the code to use the "Cluster to Array" primitive, then auto-index over the resulting array of booleans, perform the evaluations and auto-index an output array-of-booleans, then finally convert back using the "Array to Cluster" primitive.  I, too, was kinda bothered by having to hardcode cluster sizes in there...
    I found I could instead use the "Typecast" primitive to convert the output array back to my cluster.  I simply fed the input cluster into the middle terminal to defin! the datatype.  Then the output cluster is automatically the right size and right datatype.
    This still is NOT an adjustable cluster size, but it had the following benefits:
    1. If the size of my typedef'ed cluster changes during development by adding or removing boolean elements, none of the code breaks!  I don't have to go searching through my code for all the "Array to Cluster" primitives, identifying the ones I need to inspect, and then manually changing the cluster size on them one at a time!
    2. Some of my processing functions were quite similar to one another.  This method allowed me to largely reuse code.  I merely had to replace the input and output clusters with the appropriate new typedef.  Again, no hardcoded cluster sizes hidden in "Array to Cluster" primitives, and no broken code.
    Dunno if your situation is similar, but it gave me something similar to auto-sizing at programming time.  (You should test the behavior when you feed arrays of the wrong size into the "Typecast" primitive.  It worked for my app's needs, but you should make sure it's right for yours.)
    -Kevin P.

  • Disabled color change...

    Hello everybody,
    this is my first comment here because for all other problems I found solution without registration
    Anyway I was looking how to disabled color change (just some part of sentence) which should be highlighted, example is right here (it's part of topics in rpg game):
    Tell me some rumours
    I killed the dragon (quest)
    Goodbye
    In the init. state text "I killed the dragon" is black and text "(quest)" is yellow. Highlight color is red :
    mc_Topics.mc_topic0.tField.textColor = 0xb21d22; // init. state highlight first topic
    Now if I want highlight sentence with "(quest)" it's make this (simple) :
    mc_Topics["mc_topic" + Index].tField.textColor = 0xb21d22;
    but it will highlight of course all sentence by red color even if I want to quest word stay yellow.
    I know I can make it somehow like this for highlight :
    mc_Topics["mc_topic" + index].tField.html = true;
    mc_Topics["mc_topic" + index].tField.htmlText = lowerCase + "<FONT COLOR = '#695f49'><FONT SIZE = '24'>" + quest + "</FONT></FONT>";
    But problem is that in function where I'm setting highlight I dont know variables for text (lowerCase) and quest (there can different text).
    Thanks for any suggestion : )
    Adam

    Yes you right I didn't realize that I can still get them from array. It's little complicated as it is time-input from game anyway it seems that it's solution. Thanks

  • Array to cluster fnc drops one of my array inputs?

    Anyone know what may be going on here? Thanks in advance.
    Attachments:
    Read GPS.vi ‏51 KB

    There's a fundamental difference between clusters and arrays. While clusters can have elements of different types in them, the number of elements must be static. It must be known exactly before you press the run button, and it can't change during run-time.
    The Array to Cluster function must therefore know in advance how many elements the cluster will contain. It can't wait until run-time to decide this when it actually gets the number of elements in the input array. The way you specify this in advance is by right clicking the Array to Cluster function and selecting Cluster Size from the shortcut menu. Here you can specify statically how big your cluster will be. The default is 9 elements large. So if your input array had 10 elements, you would lose one element. If your input array has 4 elements, the last 5 elements of the cluster will have default values.
    Jarrod S.
    National Instruments

  • ICal Calendar Colors Changing On Their Own; iCloud Connection

    AGGRAVATING PROBLEM:
    Many in this forum have written recently about a problem ongoing for people with multiple iCal calendars where iCal calendar colors change "automatically" when you haven't selected those colors, or even "change back" before your eyes to some color your DIDN'T select after you select a new one.  If you log into iCloud on the Web and try to change the color of certain calendars, they refuse to change.  Try as you might, the color you want for your calendar won't "stick" and it is forced to be the wrong color on all your devices.  In some cases, even the names of some of the calendars cannot be changed.  On other calendars in your list, the colors and names will change fine. 
    Related symptoms:  Calendars you have deleted "come back."   Or, calendars you did not create yourself show up in your calendars list, such as "Calendar" or "Home" or even "Untitled."  Note that the problem seems to be most prevalent with calendars with names "Home," "Work," OR either of these words in the NAME of the calendar.  For instance, "Bob's Work" might get snagged (it can't be deleted without coming back or its color is stuck and "comes back"). 
    I spent a long time on the phone with a helpful Apple senior advanced specialist on this problem today.  We conducted a very large number of "experiments". Our family has two iPads, 2 iPhones, and 2 iMacs, so it was easy to rule things in or out.  I will present some information that may help.
    SOME OF WHAT APPEARS TO BE GOING ON:
    First, Apple has not resolved this.  But the problem appears to be related to iCloud, and NOT to individual devices.  After de-linking all of my individual devices from iCloud, I could change any of the colors or names at will on any given device, create new calendars and then change their colors to whatever I wish, delete calendars, change names...no problem.  However, after re-linking calendars to iCloud, all the problems mentioned above returned.  The chances that my iMacs, iPhones, and iPads are all causing the problem independently is very low. They also have slightly different OS versions on them, so it is not likely an a particular device OS, though that could be indirectly related.  Also, the colors "change back" within about the same time (usually a few seconds to up to 30 seconds) that it takes to do a "refresh" (i.e. an update) to the iCloud servers.  This when iCloud is turned on, and the absence of it when iCloud is turned off (for calendars), strongly suggests that it is the iCloud server and its interaction with your devices that the fundamental cause of the problem.
    Apple has said that they are aware of this problem and their engineers are working on a fix.  Historically, this can mean just a few days, or it could be a few months, years, or "whenever."  They don't give estimates of when it will be fixed.  Exactly WHY this is happening is unclear, but my guess is that it is a modification to the iCloud server code that Apple implemented without testing it thoroughly enough to discover this problem.  Apple does not admit to that, of course and I don't know if I am correct.
    A WORKAROUND SOLUTION THAT WORKED FOR ME:
    Please note this is a workaround and not a full fix.  Apple needs to run a patch on their iCloud server code.  Until then, I did the following which seems to have worked for me for now.  Read the whole list before deciding whether to proceed.  I don't guarantee it will work in all situations.
    Note...I found I was stuck for now with the color of ONE of my calendars.  If you are like me, you want to keep that one and work around it....
    Backup first... Make sure that your iCloud copy of your calendar data has the calendar event information you want to save - even if the color is wrong.  Log in at www.icloud.com and do a refresh to sync to the Cloud.  Check over your calendars online to make sure the event data appears to be there for all of your calendars (even if their color or name is not what you want).
    Steps:
    1.     Go to every device that you have linked to iCloud separately. Go into Settings, iCloud, and then uncheck the "Calendars" option.  This delinks your calendars for that device to iCloud.  As you do this on each device, when prompted, select "Keep On My" ..iPAD...iPhone...iMac... etc.  This will preserve the calendar information on the device so it won't be deleted.  I think this is safer, but you can click on "Delete" if you want, too.  Note - if one of your devices is an iMac, with OSX Lion and before, you may be forced (I was) to delete the iCloud calendars from the iMac.  So again, make sure they are backed up to the Cloud first (or somewhere else).
    3.     With the iCloud Calendars Option on all your devices still turned off, go to the WEB and log into iCloud.com.  You need to figure our which calendar iCloud won't let you change the color for.  You probably already know.  On iCloud.com, click on "Calendars," then click open your calendar list and select "EDIT" at the bottom of the dialog box.  One at a time, click on the color dots next to each calendar name and try to change the color (you can put any back after the test if you want). You will probably see a certain one that just goes right back to what you don't want.  This is the one for which the color is stuck, but you may be able to change the name of it now that your devices are unlinked from iCloud.
    4.     Still in iCloud.com, change the names and colors of any of the other calendars you wish to change.  Delete any empty calendars that mysteriously appeared without your wanting them.  Take note of all the calendars, names, and colors that are on the final list of calendars.
    5.     On EVERY device, BEFORE turning iCloud back on on ANY of them: Change the colors and/or names of calendars, delete calendars, etc. so that the calendar names and colors on the device are exactly the same as what you left in iCloud.com in the last step.
    6.   One at a time on each device, go back to Settings and then "iCloud" and check again the box for "Calendars."  You will be asked whether you want to "MERGE" your data with iCloud.  I selected MERGE to ensure I didn't lose anything.  Link each device again into iCloud one at a time.
    7.  When each device is back, go back to iCloud on the Web, or go into iCAL on one of your devices.  Set to view ALL calendars.  Look for duplicates of some of your events.  I found quite several as an artifact of "merging", but in my case it only took me about 5 minutes to go through quickly and delete the duplicates.  It deleted the duplicates on all of the devices at once, so I only needed to delete dups on one device.  I did not find that I lost any events as long as I kept one valid copy.
    Again, no guarantees...hope this works for others.  Good luck.

    I'm getting the same thing and it's really bugging me! Keeps changing colour to one I do not want and I have tried everything to get it to stay the colour I have chosen!!

  • Report row color change based on condition

    I have follow this forum steps Re: Color Row In Report
    Column Template 1
    <td #ALIGNMENT# class="t1data" style="background-color:#ADD8E6;">#COLUMN_VALUE#</td>
    PL/SQL expression condition
    '#2#' = 'BOOKED'
    Column Template 2
    <td #ALIGNMENT# class="t2data" style="background-color:#FFE87C;">#COLUMN_VALUE#</td>
    PL/SQL expression condition
    '#2#' = 'ENTERED'
    http://img29.imageshack.us/img29/2792/apexcolor.png
    This does color change but for some rows the colors are highlighted wrong and when i mouse over the rows , it changes to wrong color.

    Hi,
    t1Data and t2Data sound like standard theme css class names.
    In my example, the colouring is done by the style attribute on the TD tag. For "normal" rows:
    &lt;td #ALIGNMENT# headers="#COLUMN_HEADER#" class="t18data"&gt;#COLUMN_VALUE#&lt;/td&gt;for highlighted rows:
    &lt;td #ALIGNMENT# headers="#COLUMN_HEADER#" class="t18data" style="background-color:red;"&gt;#COLUMN_VALUE#&lt;/td&gt;Have you defined "t1Data" and "t2Data" in STYLE tags on your page?
    Andy

  • Why have colors change in new update?  And won't allow me to permanently change back - as they revert on their own?

    My iCal calendar colors changed by themself.  I have gone to "edit" and "get info" and have changed the colors back.  Within minutes, they change back to the wrong color.  It has now made these same changes on my iPhone 5 and iPad mini.  What's going on?  How do I permanently change these colors?

    Here are two screen shots to show you what I am seeing.  The first screen shot shows it allowing me to select (highlighted in blue) my admin user (which is what I am locced in as).  The second screen shot shows it allowing me to select the "Guest" user (highlighted in blue).  However when I click on the user "Orion" nothing happens.  It will not change to highlight that user.

Maybe you are looking for

  • Error Message: Number is not in external Interval (Testing Schedule)

    Hii , Iam working on Stability study process. I have maintained stabity test with materiial (QS) & performed my test upto Initial test of Inspection lot. But when i click create Testing Scheudle in the Notification (QM02) , system asks for testing sc

  • Questions and Answers Database for HE&R

    Hello Everyone, I'm looking for Questions&Answers Database regarding HE&R. I couldn't find anything about interview questions and answers cookbook, file etc. for Higher education&Research. If anyone has the related documentation, can you please share

  • Safari doens't show background Image when sliding page left

    I display a web page with a large-width photo (say 2000 pixels jpg file) & a repeat small background image in mobile Safari & the right part of photo is beyond the screen. I touch & slide the page left to see right part but found there's no backgroun

  • How to adjust page tiling areas?

    I trying to make a stationary letterhead template. I'd like to make more room at the bottom of the page available for printing. How do I adjust the margins or size of the page tiling areas? Thanks

  • Events in XWindows

    I have an applet which amongst other things contains a JTable and a JButton. The JTable has a write-to-model-on-focus-lost implemented, so that the last change is written to the model if the table loses focus. The problem I have is that under MSWindo