Cycle through an array

LabVIEW 2013
Attached is the browser program I am working on. I am trying to cycle through the database elements that are displayed in the cluster by means of a boolean button. Any help would be hugely appreciated
Paul Power
I have not lost my mind, it's backed up on a disk somewhere
Solved!
Go to Solution.
Attachments:
Browser.vi ‏156 KB

This is technically a duplicate thread:http://forums.ni.com/t5/LabVIEW/Sequence-through-a-cluster/m-p/2837814#M829070
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines

Similar Messages

  • Programmat​ically Cycle through Boolean Array

    I'm using an Agilent 34970 with a 34901A switch module. It has 16 switches going to two commons. The end function is to switch through all the sources to read resistance and voltage.
    The driver and sample vi from the NI idnet were used as a base for my vi.
    The sample vi uses a user-controlled 2-d boolean array (false = open). I want to be able to programmatically cycle through all the switches, but I don't know how to tell the dimensions of array I have.
    I would like to go through every element of the 2nd raw for each element in the 1st row. If I could programmatically ignore elements #9, 10, 19, and 20, that would be helpful too.
    Thanks for any help!
    Attachments:
    Agilent 34970 Advanced Scan-2U test-1.vi ‏31 KB
    Agilent 34970 Switch-2U test.vi ‏23 KB

    CelerityEDS wrote:
    Is there a way to determine what's in the vi front panel right now? I cannot determine if it's 2x10 or 10x2... There are no properties of the 2-d array that plainly tell me.
    There is "array size" which tells you the actual size of the 2D array.
    There are properties that tell you how many rows and columns are visible in the front panel array container.
    There are also properties that tell which element is currently scrolled to the top left corner.
    The size and index position of the front panel array control or indicator is not related to the actual array size. You can show only 2x2 elements of a 1000x1000 array or vice versa. if the container is too big, the extra elements are greyed. 
    LabVIEW Champion . Do more with less code and in less time .

  • Cycle through list and build compound array...

    I have a database that I'm pulling data from that is already existing. There is a designs table and a details table. The designs table stores the id's of the details items that are associated with the design. Since I'm using Flash remoting I would like to just get all the designs and their details back in one compound array instead of making a bunch of calls. I'm stuck on how to make the string "5,8,12,19" into an array, cycle through the array and then get the details info for each id. Then return the compound array when finished.
    I would prefer the array be like this:
    [design item 1 and it's data][details array of the design 1 items], [design item 2 and it's data][details array of the design 2 items]....
    Here is what I have so far
    <cffunction name="getDesignsByAct" access="remote" returntype="query" hint="gets activities by id">
    <cfargument name="send_id" type="numeric" required="yes" />
        <cfquery name="getDesignsByActQuery" datasource="#dsn#">
        SELECT design_id, design_items
        FROM designs_table
        WHERE design_activity = #send_id#
        </cfquery>
        <cfquery name="getDetailsQuery" datasource="#dsn#">
    SELECT
        FROM
         details_table
        WHERE <!-- cycle through the list of "design_items" in the above query -->
    </cfquery>
        <cfset this_return[1] = getDesignsByActQuery>
    <cfset this_return[2] = getDetailsQuery>
       <cfreturn this_return >
    </cffunction>
    Thanks in advance.

    Is your end goal to get a multi-dimensional array?  a query recordset object?  or an array of structs?  Based on your description, it looks like you want something like this:
    arrMultiDimArray = NewArray(2)
    arrMultiDimArray[1][1] = Query Data from Design Record 1
    ArrMultiDimArray[1][2] = Array of Detail records data structures (or query recordset object?) associated with design record 1
    If that is the case, then you should be able to put something together like this:
    1) Query your design & details data from the database as a joined recordset
    2) Initialize your multi dimensional array
    3) You can use the <cfoutput group=""> attribute to create an outer loop that only changes once for each new design ID
    4) Increment your first dimension array and add your design data to position one of your 2nd dimension
    5) Create a new array to store your Detail record items
    6) Use a nested <cfoutput> loop to loop over your detail item records and populate your new array
    7) Store your new array in position two of your 2nd dimension
    8) Return your 2D array to your flash remoting app

  • Walking Through an Array

    Hi, I need some help with dynamic content.
    The end product I need is a series of pictures loaded and
    diplayed in sequence ( one fades in, then out, then another fades
    in & out etc. ) I have an XML connector set up which provides
    the filename to a loader which pulls up the first picture, no
    problem. But I can't work out how to get the following rows from
    the array & cycle through them each time the timeline returns
    to the start.
    any help would be great,
    best wishes
    Robert.

    I setup the demo app on apex.oracle.com:
    http://apex.oracle.com/pls/apex/f?p=26255:3
    Login as demo / demo
    Go to the "products" tab. There is a Test region with a multiselect list. It shows product names (with product id's) from the demo_product_info table.
    When you select multiple things from the list and click apply, it uses the following procedure to simply insert a new record for each into the product table. It increments the product_id by 1000 and prepends "DUPLICATE " to the product_name:
    declare
    cursor c_products is
    select product_name, product_id
    from demo_product_info
    where instr(':' || :P3_X || ':', ':' || product_id || ':') >= 1
    order by 1
    begin
    for r_product in c_products loop
    insert into demo_product_info (product_id, product_name)
    values (r_product.product_id + 1000, 'DUPLICATE ' || r_product.product_name);
    end loop;
    end;
    You can see that is working by using it on the duplicate entries themselves.
    -Richard

  • Cycle through XML on click/swipe

    I'm (still) working on my xml phone book. I need to cycle through the data in the array on mouse click. (The mouse click will be a swipe on a mobile device.)
    stop();
    var nameArray:Array = new Array();
    var countryArray:Array = new Array();
    var portraitArray:Array = new Array();
    var flagArray:Array = new Array();
    var jobtitleArray:Array = new Array();
    var imageNum:Number=0;
    var totalImages:Number;
    //Load XML
    var XMLURLLoader:URLLoader = new URLLoader();
    XMLURLLoader.load(new URLRequest("recbook.xml"));
    XMLURLLoader.addEventListener(Event.COMPLETE, processXML);
    function processXML(event:Event):void {
          var theXMLData:XML = new XML(XMLURLLoader.data);
          totalImages=theXMLData.name.length();
          for (var i:Number =0; i < totalImages; i++){
                //push xml data into the arrays
                nameArray.push(theXMLData.name[i]);
                countryArray.push(theXMLData.country[i]);
                portraitArray.push(theXMLData.portrait[i]);
                flagArray.push(theXMLData.flag[i]);
                jobtitleArray.push(theXMLData.jobtitle[i]);
          //data is processed
          loadData();
    function loadData():void {
          var thisPortrait:String = portraitArray[imageNum];
          var thisCountry:String = countryArray[imageNum];
          var thisName:String = nameArray[imageNum];
          var thisJobtitle:String = jobtitleArray[imageNum];
          var thisFlag:String = flagArray[imageNum];
          var dataLoader:Loader = new Loader();
          dataLoader.load(new URLRequest(portraitArray[imageNum]));
          dataLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, dataLoaded);
          function dataLoaded(event:Event):void {
                stage.addEventListener(MouseEvent.CLICK, loadMainImage1);
                function loadMainImage1(event:MouseEvent):void {
                      portraitUILoader.source=thisPortrait;
                      flagUILoader.source=thisFlag;
                      selectedName.text=thisName;
                      selectedCountry.text=thisCountry;
                      selectedJobtitle.text=thisJobtitle;
    //add 1 to imageNum
    if (imageNum < totalImages) {
         trace("imageNum " + imageNum);
         trace("image name (thisPortrait) " + thisPortrait);
         imageNum++;
         if (imageNum!=totalImages) {
              loadData();

    solution :
    import flash.events.MouseEvent;
    stop();
    var nameArray:Array = new Array();
    var countryArray:Array = new Array();
    var portraitArray:Array = new Array();
    var flagArray:Array = new Array();
    var jobtitleArray:Array = new Array();
    var contactArray:Array = new Array();
    var imageNum:Number = 0;
    var totalImages:Number;
    //Load XML
    var XMLURLLoader:URLLoader = new URLLoader();
    XMLURLLoader.load(new URLRequest("recbook.xml"));
    XMLURLLoader.addEventListener(Event.COMPLETE, processXML);
    function processXML(event:Event):void
        var theXMLData:XML = new XML(XMLURLLoader.data);
        totalImages = theXMLData.name.length();
        for (var i:Number =0; i < totalImages; i++)
            //push xml data into the arrays
            nameArray.push(theXMLData.name[i]);
            countryArray.push(theXMLData.country[i]);
            portraitArray.push(theXMLData.portrait[i]);
            flagArray.push(theXMLData.flag[i]);
            jobtitleArray.push(theXMLData.jobtitle[i]);
            contactArray.push(theXMLData.contactInfo[i]);
        //data is processed;
        loadData();
    homeScreen_btn.visible=false;
    var thisPortrait:String;
    var thisCountry:String;
    var thisName:String;
    var thisJobtitle:String;
    var thisFlag:String;
    var thisContact:String;
    function loadData():void
         thisPortrait= portraitArray[imageNum];
        thisCountry= countryArray[imageNum];
        thisName = nameArray[imageNum];
        thisJobtitle = jobtitleArray[imageNum];
        thisFlag = flagArray[imageNum];
        thisContact = contactArray[imageNum];
        var dataLoader:Loader = new Loader();
        dataLoader.load(new URLRequest(portraitArray[imageNum]));
        dataLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, dataLoaded);
        function dataLoaded(event:Event):void
                portraitUILoader.source = thisPortrait;
                flagUILoader.source = thisFlag;
                selectedName.text = thisName;
                selectedCountry.text = thisCountry;
                selectedJobtitle.text = thisJobtitle;
                selectedContact.text = thisContact;
                //add 1 to imageNum and cycle through the data
                if (imageNum < totalImages)
                    imageNum++;
                    trace(totalImages);
                    if (imageNum!=totalImages)
                        goNext_btn.addEventListener(MouseEvent.CLICK,nextfn);
                    }else goNext_btn.removeEventListener(MouseEvent.CLICK,nextfn);
                }//closes incrementation loop
            }//close loadMainImage
    }//close loadData
            function nextfn(e:MouseEvent):void{
                loadData();

  • Issues with AUTO cycling through ....

    I'm trying to do this:
    Any help with one or the other is very much appriciated !!!
    1) When the Timer is finish auto cycling through the tabs (1 to 16) of the ViewStack, and switching over to tab (1) to STOP, I would like to address a function to do something ???
    The question is now how to write the code to ID that the Timer has come to a STOP on tab (1), and how can I incoperate this into the existing (onTimerOne) function.
    2) The second item I'm after is that if I'm amnualy select any tab (1 to 16) to address also a function to do something ???
    3) The third item I'm after is to automaticly zero (0) the ViewStack to tab number (1) if I click a Btn.
    <mx:Script>
    <![CDATA[
        import flash.events.TimerEvent;
        import flash.utils.Timer;
        private var timerOne:Timer;
        private function initOne():void {
            timerOne = new Timer(5000, myViewStack.numChildren);
            timerOne.addEventListener(TimerEvent.TIMER, onTimerOne);
        private function onTimerOne(evt:TimerEvent):void {
            if(myViewStack.selectedIndex == myViewStack.numChildren-1) {
            myViewStack.selectedIndex = 0;
            return;
            myViewStack.selectedIndex++;
        private function autoOne():void {
            if (!timerOne.running) {
            timerOne.start();
        private function manualOne():void {
            if (timerOne.running) {
            timerOne.stop();
    ]]>
    </mx:Script>
    4) Well, the fourth item I'm trying to work out is as I'm reading my data from an Xml file to have a TextArea which shows the different countries from the Xml file for each ViewStack tab while auto cycling through these tabs (1 to 16).
    The diffuculty here is that I use this Xml with a specific urlID="1" to urlId="16" as part shown below.
    <urlsOceania>
        <urlOceania urlID="1"/>
        <searchCountry>American Samoa</searchCountry>
        <etc></etc>
    </urlsOceania>
    I'm reading all the other items this way:
    source="{urlsOceania.urlOceania.(@urID==1).etc}"
    Thanks in advance aktell2007

    Thanks for the confirmation.  7 miles away is most likely using the same VZW tower but it does confirm the problem is not in your current location for us.
    You can look up local tower locations from many public websites such as the following:
    www.antennasearch.com
    www.cellreception.com
    http://www.evdoinfo.com/content/view/2990/63/
    The signal of -65 shows you have strong reception but it doesnt show the entire picture.  Your tower could be overloaded or unauthenticating you.  There are lots of little issues that exist outside of the raw signal strength between the towers and the connecting devices that we users have no control over.  As you may guess only a tower tech has access to identify and correct these things.
    Based on the picture of the back of the MBR1515/Netgear N300 router from Netgear I would assume that only a normal sized SIM card will fit.  I would not assume a micro SIM card will fit.  Since I do not have access to either of the VZW or non-VZW 4G LTE router I cannot confirm if it will work or not.  You might have to give Netgear a call and ask.  Based on what I can see from the User Guides of both devices the SIMs used for each should be compatible with eachother.
    If you decide to purchase the non vzw version please post back your findings for us.

  • How to change keyboard shortcut for cycle through open tabs in PS and AI CC 2014

    I would love to set my own keyboard shortcuts for cycling through open tabs in PS and AI 2014 on OS X. I found out that this can be achieved with ctrl+tab in PS, but I couldn't manage to make any of the suggestions in the forum work for AI. As said, I would like to set a more "standard" shortcut like alt+cmd+arrow-keys for both of the apps. If that shouldn't be possible, does anyone know a shortcut in AI CC 2014?
    Many thanks!
    Amadeus

    Thanks! The shortcut can be set like this in AI, although all key combinations I would want to use are not allowed. Too bad. But anyways, thank you very much for the tip!
    cmd+~ is not an option for me, I guess, since the swiss/german keyboard layout has no dedicated tilde key.
    So, I have a working shortcut in PS (ctrl+tab / of which I still don't know how to change, if possible at all) and thanks to you, I can now set one in AI as well. Unfortunately, I can not set it to be identical as in PS, since the "cmd" key needs to be included in AI's shortcut assignment dialogue, but I guess, this is as good as it gets.

  • When I press play on my iPod the only the thing that happens the songs cycle through the current playlist instead of playing the audio. How do I fix this?

    Ever since this morning I synced my ipod to my computer all that happens is the ipod cycles through the songs in the current selected playlist. No audio or anything. All the songs that are in my song libraries and are synced to my ipod properly. I did not disconnect the cable whiile it was syncing. It has been a long time since I synced it. Why is my ipod doing this? This ipod is the current ipod classic with 160 GB. Please help

    Thank you, when I meant by I haven't synced with my library in a long time. I meant the day before this morning. So I already synced it and I am not hearing any audio when I press play. Right now I am in front of a mac at my job and I have synced and ejected it from a different computer and it still isn't working. Does this have anything to do with the fact that it might have something to do with my music library at my home computer?

  • How do I change the keyboard shortcut for Cycle through open documents in PS CC for Mac?

    Sorry to bug the community with such a seemingly inconsequential task, but I am seriously tired of using the awkward default keyboard shortcut for cycling through open docs in PS.  I'd like to change it to what I am used in in Chrome, which is Cmd+Option+[left] or {right} arrow keys.  I noticed this is not a command listed in the in keyboard shortcuts, for whatever reason.  Where on Earth can I change this? 
    If it is not possible to do it by default, is there a plug-in or a change to the code that will allow this basic functionality? 
    Thanks again guys and gals!

    As far as I know, you can't. It's "hard wired" in.  Not even Edit > Keyboard Shortcuts is allowed  to change it.
    However I did find this tip:
    Anyway i never found tabs in Adobe application useful, instead i prefer the old school method: simply switch off tabs feature via illustrator/ preferences/ user interface/ open documents as tabs. Then in Mac preferences panel, under keyboard, just search for the “focus on next application window” field (under menu, keyboard and text) and assign a shortcut if the default option doesn't fit you. And there is now you can easily switch between open documents!.
    The best part of this is that it can be used in all mac applications, not only Adobe ones. And remember, if you want this working on Indesign, Photoshop, etc be aware of first switch off the tab features so that the system could “see” multiple documents opened not only one single tabbed document.
    Gene

  • Cycle Through Applications

    Is it possible to cycle through the remote computers applications> (some special key command perhaps) as whenever I do CMD TAB at my end it cycles through my computers applications, not the remote computers applications.

    Click the "Full Screen" button when controllling the remote computer.

  • Cycle Through Windows broken

    The Cycle Through Windows (CMD + ~) is broken in the Leopard Finder. It works until you cycle to the Desktop, and then it stops working. You need to click on another Finder window to get it going again. Not a show-stopper but it's definitely a very annoying bug.
    OAW

    *Cycle Through Windows* in the Finder works again if you +disable Spaces+ (...) I hope it's just a silly bug, cause it is really annoying (and I want to use Spaces).
    10.5.1 didn't fix it - let's wait and see what 10.5.2 will bring us.
    To disable Spaces: System Preferences > Exposé & Spaces > Spaces > uncheck 'Enable Spaces'

  • Im running a web-based CMS, that cycles through a number of pages, and wanted to know if there is an auto reload code option ( not plug-in ) that can restart previous page when connection failed.

    I am running a web-based CMS that cycles through a number of pages, each for different times ( ranging from 40 seconds to 2 minutes )and is displayed in a number of shops. Every now and then our internet drops, and the page errors with connection failed. I’m wondering if there is anyway to auto reload the page as soon as the error connection failed is showing. auto-reload addon is not an option as this will interrupt the sequence.
    The following error was encountered:<br />
    <br />
    <ul><li><b>Connection Failed</b></li></ul><br />
    <br />
    This means:<br />
    <br />
    <pre>

    I am running a web-based CMS that cycles through a number of pages, each for different times ( ranging from 40 seconds to 2 minutes )and is displayed in a number of shops. Every now and then our internet drops, and the page errors with connection failed. I’m wondering if there is anyway to auto reload the page as soon as the error connection failed is showing. auto-reload addon is not an option as this will interrupt the sequence.
    The following error was encountered:<br />
    <br />
    <ul><li><b>Connection Failed</b></li></ul><br />
    <br />
    This means:<br />
    <br />
    <pre>

  • Windows 7 cycles through updates on shut down (all the time)

    i have been having a devil of a time with my mac pro and am hoping this forum might have some leads on a problem.
    i have a first generation mac pro and an installation of windows 7 using parallels and every time i use windows 7 it cycles through a windows update procedure. this is a minor pain now which takes about five minutes but in the past it was a very long procedure.
    i recently had to re-install this setup due to a WD HD with "bad sectors" and i would like to solve this problem.
    can anyone advise?
    TIA
    P.S. I had to use "Jowie's" method to install windows 7 on this computer. i am running Lion 10.7.5.
    P.P.S. apologies for the apparently off-topic post but i have not gotten any leads on this on the windows forums or from the boot camp forums and i am almost at a total loss at this point in terms of getting this OS on this computer to work.

    you like me face the problems post Vista SP1 with 64-bit versions.
    Modifying and using Imgburn via Jowie is best I know of to get it to boot and install.
    There are always issues with native Boot Camp Windows updates and a VM like Parallels as to whether you can or should apply any update whatsoever in a VM or stick to doing so natively.
    Always have a backup image to restore from for ANY OS.
    Paragon Software Camp Tune and the great Hard Disk Mgr 12 Suite which will perform an "Clone OS" migration to another disk drive.
    For convenience never share a hard drive with Mac and Windows. Esp. for you and I. Dedicated drive only.
    WD Lifeguard in Windows is great at mapping out bad sectors.
    Use Carbon Copy Cloner to image your Mac and the Recovery partition to another drive also.
    You would then never ever have to reinstall any or either.
    There are people on the Boot Camp forum where I burned out that you and I well... we've been over this before to the point I stopped and left.
    Apple's BootCamp 4.0 64-bit from my attepms (I run Windows 8) will not install and I guess needs CMD.exe and direct it at Apple installer MSI program or Setup. I would not normally and not needed except for data and time and the Boot Camp Startup  Manager in Windows.

  • Photoshop unexpectedly cycling through newly-opened files

    This is a weird one, and I can't get a foothold on what's causing it. I routinely have to open a batch of five graphics (it's not the same five graphics each time, but each project starts from the same five templates). Lately, when I open them all at the same time, a few seconds after I open them, Photoshop suddenly cycles through them in what seems to be a random order (though it never ends on the file I was looking at when it starts cycling). This is playing havoc with my workflow, as I have actions that rely on the files being opened in a particular order. Not to mention the fact that it often happens just as I'm starting to edit the files. All of a sudden, I'm looking at a different image in the set.
    It doesn't seem to be making any changes when it cycles, as there aren't any files that need saving after it's done. I just can't figure out what it's doing, or why.
    I'm using Photoshop CC 2014.2.1, on a Macbook Pro, running OS X Yosemite (10.10.1). Happy to provide any additional details!

    Have you tried a Preference reset? It has been known to clear up a lot of things in Photoshop when they go haywire. Press Cmd+Opt+Shift immediately after initiating Photoshop startup. Select "yes" when prompted.

  • How to create a small field that cycles through a series of images. (using Acrobat Pro)

    Using Acrobat Pro, we need to use a small field to track student progress.  With successive mouse clicks, the field would cycle through: 
    -- a number (that identifies an element of study),
    -- same number surrounded by a circle (indicates element is assigned to the student),
    -- same number with a check mark (indicates element was completed by the student),
    -- back to the original number.
    This could probably be handled by cycling through a series of small images when the user clicks on the field.   
    The "Check Box" field allows only a check to be added to the field.  It does not allow the circle and does not cycle through multiple states. 
    The "Text Box" field might allow this capability, but if so we are not able to configure it properly.  
    Any solutions?   Thanks!

    Thanks Michael,
    The information at the link you provided enabled us to create a button that cycles through a series of ASCII characters. 
    This us useful, but we need to cycle through a series of images.  A more difficult problem. 
    FYI, an example of the javascript that cycles through a series of ASCII characters is shown below.  (The "else" statement pertaining to a null "" buttonGetCaption state is used to initiate an initial state of "1" for the button when the form is first opened.). 
    if
    (event.target.buttonGetCaption()=="1"+"\u2714") {
        event.target.buttonSetCaption("1");
        event.target.textColor = color.black; }
    else if (event.target.buttonGetCaption()=="") {
        event.target.buttonSetCaption("1");
        event.target.textColor = color.black; }
    else if (event.target.buttonGetCaption()=="1P") {
        event.target.buttonSetCaption("1"+"\u2714");
        event.target.textColor = color.green; }
    else if (event.target.buttonGetCaption()=="1") {
        event.target.buttonSetCaption("1P");
        event.target.textColor = color.red; }
    loop
    Again, we are still looking for a way to cycle through a series of images so any help with that problem would be appreciated. 

Maybe you are looking for

  • Still can't receive messages from Iphone Users

    Greetings, I know there are many topics asking similar questions if it's googled, and I think I have read through almost all of them to no prevail. I know veterans of these boards probably get tired of seeing the same topics, but im desperate and wil

  • HELP! I cant flash my bios, :censored:....

    When I got to flash my bios I enter the correct file names in the command prompt, then when i get the message if i want to save my current bios i say no, and then it says "Source File Not Found!" what does this mean and what am i doing wrong? thanks.

  • Just a scenario

    Hi All, This is just a scenario.. I have 3 redo groups which are not multiplexed (I know its a bad idea), and suddenly due to some OS issues one of my redo gets corrupted, my backups policy involves hot backup for datafiles and also backups of my arc

  • Selected pictogram for workset not shown in portal

    Hi Gurus, i have created a workset in portal and there is a setting that i can select a pictogram for this workset. If i select a pictogramm and save the workset the selected pictogram is not used in portal. I still see the old pictogram. I have uplo

  • I met ORA-00935 group function is nested too deeply Message.

    Hi all, I made a table like below, ============================== CREATE TABLE ser_1m_det (      time                    TIMESTAMP,      proto                    NUMBER(3,0),      port                    NUMBER(5,0),      pkts                    NUMB