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

Similar Messages

  • 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

  • Can I programmatically change the printer paper size from ActionScript?

    Hi,
    I'm a newbie Flash/ActionSript developer and I have been searching for answers for a while with no luck. I wonder if I can get some pointers from this forum.
    I'm trying to programmatically print a movie clip to 8.5" x 11" plain paper regardless of the current paper size setting in the printer. e.g if the user's printer is currently set to use paper size A4, can I change the setting to Letter (8.5" x 11") from ActionScript at runtime? I use PrintJob class for printing the movieclip.
    According to the ActionScript online API spec ( http://www.adobe.com/livedocs/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context =LiveDocs_Parts&file=00002066.html), I can only READ the paper size setting after the call to PrintJob.start. I can't believe that we are not allowed to change the setting. Maybe I missed something here. Can somebody help me out?
    Thanks in advance!

    check your duplicate thread.
    and, please don't cross-post.

  • Programmaticly change cluster size

    I'm i'm facing the following problem, i want to display several plots in a chart, to do this i'm using a build to cluster function, because the source is an array with N items. The sollution i came up to, was not correct because the cluster has a fixed size and the array doesn't. Which results in 9 plots (default cluster size) and only N of them have to be displayed in the chart.
    I included a part of my program. By which i hope it explains my problem a bit more. This subvi is executed X times and saves N value's to an array and after each run the array is converted into a cluster and is displayed in a chart.
    So my question is, is it possible to programmatically change the cluster size, or is it possible to realise a chart which is updated during runtime with new value's.
    Attachments:
    Wavelength AnalyseAndSave.vi ‏208 KB

    I figured it out by myself, havn't slept to mutch last night For those who are interested in my solution, here is what i did after the array is coming out from the forloop i reshaped it so that the dementions are the same as the number of plots i want to have, then i wired the output to a chart and it works

  • 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

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

  • Programmatically Change Page Size

    I have a main crystal report that has two sub reports in it. Which subreport  is displayed is determined by formula logic in the suppress option of the section expert.
    My issue revolves around the page size requirements for the two sub reports. One sub report MUST be printed on letter size paper (8.5 x 11) and the second sub report MUST be printed on legal size paper (8.5x14). Crystal is applying the page size set in the "main" report to both sub reports. Does anyone know of a way to change a reports page size at run time, without manual intervention?
    I'm working with Crystal XI.
    Thanx in advance.

    Hello,
    I moved your post to the BOE forums. In CR 2008 you can set paper orientation for each section but you cannot change paper size. Your options may be setting up a double print job, Print first page and then second page etc. on a separate schedule.
    Unless you use the SDK the BOE forum may be able to help you configure this suggestion. OnDemand report viewing should give you a manual option to print but again but not sure if it's configuable through the viewers themselves.
    You may want to create a support case in Service Market Place and work directly with a support engineer.
    Thank you
    Don

  • How do I change cluster size

    How do I convert 1D array of cluster of 3 elements to 1D array of cluster of 4 elements?

    Its not super-quick with clusters, but here's what I'd do:
    Use a For loop to index out each cluster from the array. Then unbundle the cluster. Then add the 3 unbundled elements and your new 4th element using the bundle function - this will make your new array. See the LV 6 attached.
    Good luck with it, Doug
    Attachments:
    3ElementCluster[]_to_4-ElementCluster[].vi ‏33 KB

  • How to programmatically change the cell color of an ADF table ?

    Hi all,
    I have an ADF table with some fields on it. Depending on the value of a field named, say, "F1", I would like to change its background color.
    So far I can change the field color with this EL expression inside the InlineStyle table column property:
    font-size:medium; background-color:#{viewScope.myBean.setColor};
    where setColor is a bean function, in where I access the field "F1" via binding, parse its value, and return the right value - so far, so good.
    The bad thing is, the InlineStyle affects that field in all the rows of the table, while I would like to change only the field in the rows, which have that specific value in it.
    So for example having the rows:
    F1
    abc#1 ----> currently selected row
    cde#2
    efg#3
    I want to change the background color to all the F1 fields which have a "1" after the '#' and let the other "F1" row cells background color stay unchanged.
    But as you can imagine, the InlineStyle affect the "F1" background color in all the rows (assuming that the first row of the table is selected).
    So the question: how to access a single cell of a row in an ADF table, and programmatically change its background color ?
    So far I can iterate through the ADF table with:
    BindingContext bindingctx = BindingContext.getCurrent();
    BindingContainer bindings = bindingctx.getCurrentBindingsEntry();
    DCBindingContainer bindingsImpl = (DCBindingContainer) bindings;
    DCIteratorBinding dciter = bindingsImpl.findIteratorBinding("aTableIterator");//access the iterator by its ID value in the PageDef file
    RowSetIterator rsi = dciter.getRowSetIterator();
    System.out.println("rsi getrowcount = " rsi.getRowCount());+
    Row row = null;
    +if (rsi.getRowCount() > 0) {+
    row = rsi.getCurrentRow();
    System.out.println("row attr = " Arrays.toString(row.getAttributeNames()));+
    System.out.println("class : " row.getAttribute("F1").getClass().toString());+
    +}+
    +while (rsi.hasNext()) {+
    row = rsi.next();
    System.out.println("row attr = " Arrays.toString(row.getAttributeNames()));+
    +}+
    Regards,
    Sergio.

    Hi,
    I mean a specific cell within a row.
    Here are two pictures that show an ADF table with two rows and some fields on it:
    https://skydrive.live.com/?cid=7D3084D8BF755808&id=7D3084D8BF755808!107&sc=documents#cid=7D3084D8BF755808&id=7D3084D8BF755808!107&sc=documents
    bild_A is what I have, bild_B is what I would like. Note that:
    in bild_A the first row contain a yellow background color for the field F4 and an orange background color for the field F5. This is correct, because F4 has an "1" at the end of its string value, and F5 has a "3" at the end. So far so good.
    But the second row (again, bild_A) has also the fields F4 with yellow background color, and the field F5 with orange background color, even if the value in both fields is 0.
    What is should be, is shown in bild_B.
    The problem is that the solution provided affects all the cells of the column, while I need to change the background color of a single cell, and leave the other unchanged (see bild_B).
    I hope that clarify a bit :)
    Sergio.

  • Maximum cluster size?

    Hi all,
    I'm using LV 7.1 and am trying to access a function in a DLL.  The function takes a pointer to a data structure that is large and complex.  I have calculated that the structure is just under 15kbytes.
    I have built the structure as a cluster and then attempted to pass the cluster into the call library function node with this parameter set as adapt to type.  I get memory error messages and when analysing the size of the cluster I am producing it appears to be much smaller than required.
    I have also tried creating an array and passing that but I think that won't work as it needs to be a fixed size of array which can only be acheived, according to what I've read, by changing it to a cluster and this is limited to a size of 256.
    Does anybody have a suggestion of how to overcome this?
    If any more detail is required then I'm happy to supply. 
    Dave.

    John.P wrote:
    Hi Dave,
    You have already received some good advice from the community but I wanted to offer my opinion.
    I am unsure as to why the cluster size will not exceed 45, my only suggestion is to try using a type cast node as this is the suggested method for converting from array to cluster with greater than 256 elements.
    If this still does not work then in this case I would recommend that you do use a wrapper DLL, it is more work but due to the complexity of the cluster you are currently trying to create I would suggest this is a far better option.
    Have a look at this KB article about wrapper DLL's.
    Hope this helps,
    John P
    John, I am having a hard time converting an array of greater than 256 elements to a cluster.  I attempted to use the type cast node you suggested and didn't have any luck.  Please see the attached files... I’m sure I’m doing something wrong.  The .txt file has a list of 320 elements.  I want to run the VI so that in the end I have a cluster containing equal number of integer indicators/elements inside.  But more importantly, I don't want to have to build a cluster of 320 elements.  I'd like to just change the number of elements in the .txt file and have the cluster automatically be populated with the correct number of elements and their values.  No more, no less.   One of the good things about the convert array to cluster was that you could tell the converter how many elements to expect and it would automatically populate the cluster with that number of elements (up to 256 elements only).  Can the type cast node do the same thing?  Do you have any advice?  I posted this question with more detail to my application at the link below... no luck so far.  
    http://forums.ni.com/ni/board/message?board.id=170​&thread.id=409766&view=by_date_ascending&page=1
    Message Edited by PhilipJoeP on 05-20-2009 06:11 PM
    Attachments:
    cluster_builder.vi ‏9 KB
    config.txt ‏1 KB

  • Raid-0 Stripe & Cluster Size

    I just ordered 2 10k RPM Raptor S-ATA Drives from newegg, they should arrive shortly. I plan to configure my system with them as Raid-0 for increased performance, I just read the "Raid Setup Guide 865/875 LSR/FIS2R Rev 1.01" by Vango and it seems that my Mobo can be configured as Raid-0 with either the Intel ICH5R Controller or the promise controller.
    Will use promise as my raid controller, it seems it's faster , now i got another question.
    What about stripe size/cluster size? my research is giving me too many setting suggestions with all very different settings, can't decide on what to do. Can someone suggest some good setting, Intel raid manual suggest a 128 KB stripe for best performance, and said nothing about cluster size. Vango posted somewhere he used a 64kb for Stripe, but no info on cluster size.
    I will be using 2 36 gb WB Raptors in raid-0 as my main and only windows array (disk) (Will install windows and apps+games to it) then use PATA drive for backups and movie storage. My computer is used mostly for working with office, creation of web pages, playing Everquest (big game), and watching video (divx movies). I use WinXP Pro Sp1.
    Can someone suggest some general setting on stripe/cluster size that give good performance this kind of usage? what is the easiest (best) way to change the 4k default cluster size on the array after i get windows installed to it? do I bother with changing the cluster size? I got partition magic and other softtware available to do this, but dunno what's the best procedure to do this.
    Thanks in Advance

    I've always just used the 4K cluster size that Windows creates if you use NTFS. I honestly don't think this makes a big difference. If you want a different size, use PM to format the drive that way before installing XP. I would recommend against converting from one size to another. Did this once and ended up with all my files labeled in DOS 8.3 format.   (this was NOT good for my 1000+ MP3's)
    I use 64k stripe size as a compromise. My research showed that people were getting the "best scores" using a small stripe size. This seemed to come at the cost of CPU usage going up and I'm unconvinced these scores relate much to how I actually use my HDD's. They say if all your files are 128K and bigger you don't need a smaller stripe size. If you're using the Raid as your XP drive you'll actually have lots of small files so I would recommend something smaller than 128K. Maybe try 32k?
    Let us know how it goes.

  • Best Cluster Size for RAID 0

    Hi all,
    When I get my replacement SATA HDD back I will be creating another RAID 0 array.  My Windows XP cluster size is 4K, but I have a choice when I am creating my RAID array.  All hardware in Sig.
    The system is being used mainly as a gaming machine, but I will be doing other things to with it also.  Looking for the best balance (slightly in favour of the gaming,  ).
    I heard that the cluster size if the drive should match the cluster size of the RAID array.  So if my drive cluster is 4K then i should set my RAID cluster size to 4K or should I set them higher.  
    any information is more than welcome,
    Andrew
    P.S. I did do a search through the forums, but could not find much recent information.

    The "EASIEST" way to change your cluster size is to have a 3rd drive with Win XP on it....here is what you need to do.
    1. Have 3rd drive with Win XP
    2. Go to bios and change boot order to 3rd drive b4 Raid
    3. Once in wondows goto "Disk Management" (as soon as you click on it you will have a window pop up and ask you to select drive and it will also want to know if you want to convert drive to a dynamic disk...I always choose no)
    4. You will see your raid drives as 1 BIG drive..now all you do is right click on the drive and click partion...primary partition...set size...now is where you can choose cluster size...you will have 3 boxes to check off...
    5. NTFS or FAT32...Volume Label....Cluster Size......
    6. After you check all of that off then you click off quick format and Voila...you have done it now do same on rest of drives....
    7. once you have setup all your partitons and selected cluster sizes...shutdown PC unplug 3rd drive...change boot order so CD rom will be a bootable device b4 raid device and you are good to go on a clean install....remember once you get into the window when setting up XP you have choices to format drives again and choose where XP get sinstalled ...choose to leave as is...no need to format again cuz it will default to 4k cluster again.....
    let me know how this goes for ....I have been doing this trick now for a LONG time and I know for a fact that this is a fast and easy way...without using any 3rd party software.....
    my advice to you is try 16/16 then 32/32

  • How can I programmatically change a label?

    Hi everyone,
    I have a 2-D array that I wish to populate with different sorts of data.  Depending upon the data, the names of the rows and columns may change.  Arrays have to have identical labels and I suppose I could simply populate a string indicator, but frankly, that looks like trash.
    How can I programmatically change a label of a column or a row in a 2-D array?  Should I consider using a table?  I want it to look nice.
    Thanks,
    Jason

    Hi
    I do not think you are able to change the label programatically.
    But you might consider to use Captions instead of labels. You can hide labels and make captions visible programatically, and you can change the text of the caption and size (see enclosed vi).
    take care
    Pawel
    Attachments:
    caption.vi ‏20 KB

  • K7n2 delta ilsr - cluster size

    How exactly would I change my cluster size?  Also, if I just wanted to do it for the raid array - not the os volume, could I do that w/o a clean windows install?

    Quote
    Originally posted by loopyloops
    Quote
    Originally posted by Bonz
    Yea I have to agree with Raven on this...don't mess with your cluster sizes because it usually leads to a reload of your system...windows wants that decided early on in the load if you are wanting to change it for real...I have never seen a benefit myself when I experimented with it...if I dropped it lower than the default 4069 then it drags...you can waste a lot of space cranking it up tho, pictures are brutal but your speed does improve...most of these things are trial and error type things tho but do as you see fit for your setup...
    Bonz
    This has to do with my upcoming raid 0 array.
    I think I'll just do it 16stripe/4cluster.

  • 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

Maybe you are looking for

  • Mini DVI to DVI to HDMI Vs Mini DVI to VGA

    When I connect my MacBook to my LG 32" HD Ready LCD TV via Mini DVI to DVI connector and DVI to HDMI cable, image is sharp but color seems very pale and washed out. However, when using Mini DVI to VGA connection, colors are brilliant, though images v

  • How to create/get user & role in Weblogic 9.2 programmatically?

    Hi, I am new to Weblogic 9. I need to create a web service to manage user/role in WebLogic 9. Searching thru the web and found some classes like: AtnSecurityMgmtHelper, AtnProviderDescription etc Are those the correct classes to create/retrieve user

  • 1x1 GIF Image presented instad of requested page

    For the past few months, I'm regularly unable to get to some web pages and instead get a 1x1 GIF image. I'm running Norton Internet Security (21.6.0.32). I regularly apply all the updates for Win 7, Firefox, Java, Flash, etc. Sometimes when launched

  • Floating Fields CSS2 directives not honored

    I have a form whose boilerplate will be dynamically populated based on a XML file. The variable content is bound to a floating field, and there is a draw that references this floating field. The issue is that the orphan and page break control CSS tag

  • ABAP Proxy - BASE64 content

    Hi, We have a requirement to send content in base64 encoded binary form. We have done all the encoding in ABAP and the BASE64 content is available in internal table. We need to use ABAP proxy to send the data to XI and further to target client via ht