Filling N-dimensional table without loop for

Hello

I would like to create a table to N dimensions without the use of loops, one in other than n times because I would like to have the number of variable dimensions, so I don't want to change the code by adding or removing loops whenever I change the number of dimensions. I would like to start Let's say with 7 dimensions 10x10x10x10x10x15x20.

Thank you

Zied


Tags: NI Software

Similar Questions

  • clear the table of loop for

    Hello world

    I have a question about the erasure of history to the table. It sounds simple, but I'm really confused...

    As the example attached below, I've built a table within a while loop and a loop. After totally run the program once, when I run it a second time, it seems that the table has a memory of the last time, that is the size of table does not start from 0, and appears the old number from last time, even through its initialization of the for loop.

    How can I make it go empty each time when I restart the table?

    Need your help. Thank you very much. : )

    You must also have a shift in the loop FOR. This will keep the data for the duration of the program, but it clear at the beginning of the next run.

  • a table are in the other table without duplicate

    How to check the records in a table are in the other table without duplicate.

    for example, in the tables below, the records from the Table A are in Table B1. But the B2 table has duplicate and one record is missing.
    I want to know which records are not in table B, records that have two copies.
    as A and B2, 1 2 is not in B2, 1 1 a 2 folders in B2

    A and B1, nothing should be returned.

    Table A
    -----------
    A1 A2
    -----------
    1 1
    1 2
    1 3
    -----------

    Table B1
    -----------
    A1 A2
    -----------
    1 1
    1 4
    1 2
    1 3
    2 2
    -----------


    Table B2
    -----------
    A1 A2
    -----------
    1 1
    1 4
    1 3
    2 3
    1 1
    -----------

    version is the database of Oracle 11 g Enterprise Edition Release 11.1.0.7.0 - 64 bit Production

    Thank you!!

    Two standard methods to compare the tables are either to use DEFINED such as UNION, UNION operations or LESS.
    Or use a FULL OUTER JOIN.

    If the structure of the table is the same and that you want to compare all the columns, then set them operators are the best way.

    If you want to compare only on one or more columns and want to see the other columns, then a FULL OUTER JOIN is the best way.

    Here is an example

    select A1, A2,
          count(distinct sourcetable) cnt_tables,
          count(sourcetable) cnt_records,
          count(case when sourcetable = 'A'  then 1 end) record_is_in_A,
          count(case when sourcetable = 'B1'  then 1 end) record_is_in_B1,
          count(case when sourcetable = 'B2'  then 1 end) record_is_in_B2
       (select 'A' sourceTable, a.* from tableA a
        union all
        select 'B1' sourceTable, b1.* from tableB1 b1
        union all
        select 'B2' sourceTable, b2.* from tableB2 b2
       )
    group by A1, A2
    having  count(distinct sourcetable) < count(sourcetable) ;
    

    It is an example. It will show you the records that have duplicate data in the following tables.
    If you want to display all records that are in A but not in B1, you can add a few other checks.

    Published by: Sven w. on August 13, 2010 17:23

  • Create a table in a loop 'for' (reset the number of loops)

    Hello

    I try to incorporate a signal of acceleration from an analog input CRIO to get speed and then further integrate to get the moving of a vibration system.

    I understand that to achieve integration, a table must be fed in. My problem is that I could not buffer the signal in a buffer block, as I couldn't find buffer blocks. so I decided to create my data table by using a loop "for". The nests of the loop 'for' inside a timed loop. The problem that I'm stuck on is how to reset the loop 'for' in order to fill the buffer with each iteration of the outer loop timed.

    I enclose the code if that helps. Note that I use labview in 2013.

    If anyone who has encountered a similar problem before can help me, I would be gratefull.

    Concerning

    Ali

    You can use a shift register initialized as inputs to your curls, to build your table of one. However, you realize, don't you, that the execution of your program as written loops as soon as the computer can spit out responses, then the output array may contain several points that took place before the entry has updated? Assuming that your thing cRIO (I've not worked with these) has integrated into its routine acquisition of calendar data, I suggest you put that inside the loop to get a data point by reading.

    And do you really want your graph to distance for update only every thousand points (points of acceleration million) speed?

    Cameron

  • Add values for them to table without accidental

    Hi I am writing a program for research at penn state behrend. It is designed to take a pressure transducer values and calculate pressure losses. My teacher wants to gather incriments of 10, their average values and then store all means when the user chooses you to start saving. I use a loop for to bring values and the average of the 10 output collected values in a table. After 10 averages are collected the program to output these values in a table. I can't understand how to continue to add to this table without overwriting the previous values. Any help would be appreciated. I'm uploading what I have so far. Thank you

    PS I use a generator of random numbers for testing only

    ajh305

    Keywords:

    Build the Array function

    shift registers

  • Creating a table of automatic indexing of loop for

    Hello and greetings from a newbie to LabView,

    In my program, I want to write several orders via VISA and read them in order. I created a table of command and auto-indexé to a loop for.

    I want to receive a table of responses, in the order they were read of course. However, I'm not sure what is the best way to do it.

    I'm sure that the solution is simple but have been unable to find one. I have attached the vi for reference. (VISA vi reading is part of the LabView unit driver), which works, but looks like a unmodular approach and inelegant.

    Thank you!

    Simple, you can auto-index the output!

  • stop a loop without waiting for its next iteration

    I wonder if there is a good way, or still anyway to stop a while loop without waiting for its next iteration. Lets say you have a timer in the loop so he iterates once evey 10 seconds, and then you have to wait 10 seconds for him to stop after you press a stop button that could be a problem.

    Thank you!


  • Operation on line on table with a For loop

    Hello

    I work with a wide range of dimensions column one. I'm doing the following

    for i = 1:size (A) / 2

    B (i, :) = A (1 + (i-1) * 2:i * 2))

    So, for example if

    A =.

    0

    1

    2
    3
    4
    5
    6
    7

    then

    B =

    0 1

    2 3
    4 5
    6 7

    My approach was to use a subset of the table inside the loop for to select several items, but I don't know how to transpose the selected items in a new line to create the table (B) is there a simpler approach?

    Thank you

    Mike

    try experimenting with the table to reshape feeding your table entry and re-sizing for a 2d aray of output. It is much faster to use a loop For, because the data is never moved and LV just changes the dimensions of the matrix and updates the stride.

    Ben

  • Facing problem in the recording of data without overlapping in loop for

    Hello

    I am facing problem in writing data withou overlap if I run the outer loop for the 2 times or more, and inside the loop, I make table in a way that I want to, but when I try to compile this table with record temperature I am not able to do. Please guide me through ths.

    Thank you

    Hnagpal

    Himanshu salvation,

    To start reading your matrix of the second line, you can use a table of Index function once you have loaded the table of your spreadsheet file. The function Array Index lie in the range of functions under functions > programming > Board Index. The help of LabView is very useful to explain how to use this function.

    With regard to the accuracy of the numbers when read you the spreadsheet file that you read is formatted in fractional chain, since form you it converted into a mixed string before saving. In order to recover all the precision, read the worksheet as a string and then convert it to a string using a string Fract/Exp to fractional numbers conversion function. This feature is on the range of functions for String > String/Number Conversion > Fract/Exp string in number. The help of LabView is also very useful for explaining the operation of this function.

    Best,

    Dan Nelson

    Technical sales engineer

  • Table of path error 1430 in the loop for

    Hello!

    I have a problem with the 1430 error: path is empty or relative, which seems impossible. The thing is that I have a battery of indicators of path connected to the loop for (check the .jpg and there is no problem with writing to a file by using the paths of an array with the first and last index.) Others are not saved because of the error... to be honest, that all data paths are absolute. Record in the file of the idicator path is the work of a Subvi (merge data vi) but it is in a for loop because I need to make it available to multiple files. There is no error that occur with the work of Subvi to a path. The question is: what labview makes with the paths saved in a table between the loops? I have just run out of ideas so if someone had some time, I would really appreciate for all the tips and ideas.

    K.

    Hello again,

    If someone was interested in the happy ending: the solution is: 2 loops for. I think there must be something with the way that labview sends data between iterations. In any case - don't know how much exactly but works

    the floor is .jpg.

  • loop for and while loop with empty table entry

    Hello

    I have a question with loop and loop.

    When a constant empty array (zero element) is connected to the loop For with "allowing the index", there are no interactions performed in loop For. But, if the loop is replaced by any loop, no problem.

    LabVIEW 2010

    Hello

    It is ok. I have no problem at all.

    For the 'loop' For when you connect the table thanks to indexing, the number of iterations is set to the size of the array. The iteration number assigned to N (in your case 10) is ignored.

    For the 'While' loop the number of iteration is defined by the Boolean Condition and the size of the array is ignored.

    Paul

  • loop for doesn't loop in table built from worksheet

    I'm probably doing sonthing but really stupid...

    first I build and table of data in a worksheet (RefLookup)

    the spreadsheet contains 3 rows above the row is my label (getting by)

    the second row it my face value

    the third row is my minimum value.

    REF is my live stream of data to be searched.

    then, I put this in a loop for loop through the table until she finds that go the Ref data in the lie...

    Then I just stop the loop and the index of output value.

    This index value is the opportunity to review worksheet data and return the label for this index.

    from what I can understand the code should... work. but it does not go past the first itteration of the loop for

    any ideas?

    Please and thank you

    John

    You must set the comma separator, otherwise you get all the data. (read spreadsheet)

    You do this too complicated. Here is the equivalent code. I don't know that it can be much more simplified!

    You don't need the outside while loop. find once is enough.

    You probably want to add a "select" after the loop that selects NaN instead of the last value if nothing is found, based on the Boolean value.

  • Potential problems for tables without primary keys and unique keys

    GoldenGate 11.2.1.0.3/Solaris 10
    DB: Oracle for Oracle (Source and target is 11.2.0.3)
    Topology: unidirectional


    In our one-way configuration GG, little of the tables being replicated is not a primary key or a Unique key.

    Last week when we have implemented GG for the test, we received warnings for these table below.
    GGSCI > add trandata WMHS_UD.crtn_dtl
    
    2013-01-12 11:34:33  WARNING OGG-00869  No unique key is defined for table 'CRTN_DTL'. All viable columns will be used to represent the key, but may not guarantee uniqueness.  KEYCOLS may be used to define the key.
    
    Logging of supplemental redo data enabled for table WMHS_UD.crtn_dtl.
    Replication seems to work very well for these tables.

    Googling, I think that there may be performance degradation when you replicate tables without PK or the United Kingdom.

    But are there other potential problems such as data of a certain kind not replicated to the lack of PK/UK?

    It really depends on the data.

    By default, GG is combining all columns as a virtual primary key but don't no conflict control by default. So when you can be sure that the record you insert into the table is unique, then it will work.
    BUT as soon as you insert the same record, which is already inserted, then you will encounter problems.

    Let me show what happens when you use an initial charge because it makes it easier to describe:
    We start at 10:00 the capture for a table. Now, you insert a record at 10:00 in the tables. When you now start an initial charge to 10.02, then check you have inserted in the database to 10.01 will be repeated two times. During the IPL as the initial charge is made to 10.02 and it includes data of 10.01 AND it will be replicated again through the process of capture/replicate.

  • Delete the text of the table via loop field for

    Hello

    I have a problem to delete text added via loop fields for.

    What im do is, via loop GI dynamically create menu with 10 buttons.

    Each button contain, created dynamically, background (shape) and the text field.

    And all is well.

    But when im trying to delete text fields, then I got this error:

    -I'm using the button to remove text fields - lang_btn.addEventListener (MouseEvent.CLICK, clickHandler);

    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
              at flash.display::DisplayObjectContainer/removeChild()
              at Loading_Img_fla::MainTimeline/xmlLoaded()
              at flash.events::EventDispatcher/dispatchEventFunction()
              at flash.events::EventDispatcher/dispatchEvent()
              at flash.net::URLLoader/onComplete()
    
    

    In the script below marked in red is what should remove the fields of text in a table, instead me gives error.

    Here's my script

    // Create for loop
    for (var i:int = 0; i < 10; i++)
    {
              for each (xml in listItems)
              {
                        if (i == xml.attribute("Id"))
                        {
                                  // Add MovieClip to stage to hold the data
                                  addChild(lmHolder);
                                  lmHolder.x = 0;
                                  lmHolder.y = 0;
      
                                  // Create new MovieClip to hold buttons
                                  lmButtonsMCArray[i] = new MovieClip();
                                  lmButtonsMCArray[i].buttonMode = true;
                                  lmButtonsMCArray[i].mouseChildren = false;
                                  lmButtonsMCArray[i].x = 20;
                                  lmButtonsMCArray[i].y = 20 + btCount * buttonSpace;
    
    
                                  // Add each button MovieClip to lmHolder MovieClip
                                  lmHolder.addChild(lmButtonsMCArray[i]);
    
    
                                  // Create Background to buttons
                                  lmButtonsArray[i] = new Shape();
                                  lmButtonsArray[i].graphics.beginFill(lmBgColor0, 1);
                                  lmButtonsArray[i].graphics.drawRect(0, 0, 230, 85);
                                  lmButtonsArray[i].x = 0;
                                  lmButtonsArray[i].y = 0;
    
    
                                  // <<-- Add Background shape to the buttons MovieClips 
                                  lmButtonsMCArray[i].addChild(lmButtonsArray[i]);
    
    
                                  // Create a new array to preserve data from XML List
                                  lmNameArrayEG = new Array();
                                  lmNameArrayUS = new Array();
    
    
                                  // Create local variable to hold
                                  var lmTxtFieldContentUS:String;
                                  var lmTxtFieldContentEG:String;
                                  var lmTxtContent:String;
      
                                  // If clicked button is EG then make array with Arabic text
                                  // If clicked button is US then make array with English text
                                  if (footer.lang_btn.langState == "EG")
                                  {
                                            for each (var leftMenuName:XML in egLanguageList)
                                            {
                                                      lmNameArrayEG.push(leftMenuName);
                                            }
                                            lmTxtFieldContentEG = lmNameArrayEG[i];
                                            lmTxtContent = lmTxtFieldContentEG;
                                  }
                                  else
                                  {
                                            for each (var leftMenuNameUS:XML in usLanguageList)
                                            {
                                                      lmNameArrayUS.push(leftMenuNameUS);
                                            }
                                            lmTxtFieldContentUS = lmNameArrayUS[i];
                                            lmTxtContent = lmTxtFieldContentUS;
                                  }
                                  // Setup new text field each time script is executed
                                  lmTxtFieldsArray[i] = new TextField();
                                  lmTxtFieldsArray[i].width = 110;
                                  lmTxtFieldsArray[i].border = false;
                                  lmTxtFieldsArray[i].wordWrap = true;
                                  lmTxtFieldsArray[i].multiline = true;
                                  lmTxtFieldsArray[i].selectable = false;
                                  lmTxtFieldsArray[i].embedFonts = true;
                                  lmTxtFieldsArray[i].antiAliasType = AntiAliasType.ADVANCED;
                                  lmTxtFieldsArray[i].autoSize = TextFieldAutoSize.CENTER;
                                  lmTxtFieldsArray[i].text = lmTxtContent.toUpperCase();
                                  lmTxtFieldsArray[i].x = 10;
                                  lmTxtFieldsArray[i].name = "lmTxtFieldName" + i;
    
    
                                  // <<-- Add Text fields to the Movie Clip
                                  lmButtonsMCArray[i].addChild(lmTxtFieldsArray[i]);
    
    
                                  // If clicked button is EG then set Arabic text format, and make array with Arabic text fields
                                  // If clicked button is US then set English text format, and make array with Egnlish text fields
                                  if (footer.lang_btn.langState == "EG")
                                  {
                                            lmTxtFieldsArray[i].setTextFormat(txtFormat_lm_eg);
                                            // Make array from text fields;
                                            pushEgTFintoArray.push(lmTxtFieldsArray[i]);
                                  }
                                  else
                                  {
                                            lmTxtFieldsArray[i].setTextFormat(txtFormat_lm_us);
                                            // Make array from text fields;
                                            pushUsTFintoArray.push(lmTxtFieldsArray[i]);
                                  }
      
                                  // If clicked button is EG then loop thrue the for loop and remove English text fields from array
                                  // If clicked button is EG then loop thrue the for loop and remove Arabic text fields from array
                                  if (footer.lang_btn.langState == "EG")
                                  {
                                            for (var rNr_us:Number = 0; rNr_us < pushUsTFintoArray.length; rNr_us++)
                                            {
                                                      //remove the text field array from the display
                                       removeChild(pushUsTFintoArray[rNr_us]);
                                            }
                                            //clear the array
                                            pushUsTFintoArray = [];
                                  }
                                  else
                                  {
                                            for (var rNr_eg:Number = 0; rNr_eg < pushEgTFintoArray.length; rNr_eg++)
                                            {
                                                      //remove the text field array from the display
                                       removeChild(pushEgTFintoArray[rNr_eg]);
                                            }
                                            //clear the array
                                            pushEgTFintoArray = [];
                                  }
                        }
              }
    
    
              btCount++;
    }
    
    

    If you don't know what you're doing, you can always use:

    {If (pushUsTFintoArray [rNr_us] & {pushUsTFintoArray [rNr_us] .stage)}

    pushUsTFintoArray [rNr_us].parent.removeChild (pushUsTFintoArray [rNr_us]);

    }

  • You can trigger through communication Modbus TCP/IP PLC data acquisition without using a loop for?

    Hello

    I am trying to contact a facility through a Modbus TCP/IP communication PLC. I'm new to this method, but the idea is that the installation will send the logical (Boolean) values 1 bit by ethernet to my workstation which read and then will begin data acquisition. Basically, I need a triger to come to my pc. I placed my vi inside a structure case T/F which will run according to the signal, it receives data acquisition. However, for it constantly waiting, I put this in a loop for. The works of vi, but playback signals sometimes lagging behind due to the loop for. If I take the loop out and just run labview permanently, it works perfectly, but I know that the option is only for debugging and should not be used. So my question is, is there a better way to wait for an incoming signal?

    Hello!

    Please note that the order of execution of the write operations on the shared variable 000002 is not determined.

    For example, nothing prevents this order of execution:

    (1) value false 000002

    (2) set to true 000002

    (3) execution of the loop

    In what concerns the delay, you might consider placing a waiting vi in the case of 'false', or the loop uses 100% of CPU if I'm not mistaken...

    Kind regards

    Marco

Maybe you are looking for

  • Facebook displays only a list with no graphics.

    For about 2 weeks now, Facebook has come in the form of list only in Firefox. In Safari, it's normal. I can click on a link and get there, but nothing is displayed on the homepage except text. I am on a Mac with the latest update of Firefox installed

  • Receive click my hotmail in box nothing happens

    caught a virus-35 of them and a program called xp 2012 poped stateing place I had to download and buy software to solve the problem, the only thing that I could go to work existed at my set of recovery disks provided with the problem solved after a c

  • LifeCam Studio on Windows XP SP3 problem

    LifeCam Studio on Windows XP SP3. Connection camera after installation of the software (driver). Not dedect camera. Error code 28. Massage: "the installation of the driver for this device is missing a necessary entry.» Maybe it's because the file INF

  • My computer is very slow and takes a long time to connect and disconnect

    Original title: sign out of questions My computer is very slow and takes a long time to connect and disconnect. Sometimes I hit Logoff button and do not forget I have more work to do... is it possible to cancel the newspaper once it starts, or should

  • C: transfer disc 500 GB external drive and re - install XP for best performance...

    Can I safely move my C: drive to my external 500 GB drive and re-install XP for best performance, and then replace the files & C: files transferred by car to ' puter?