Loop structures

Hi
I was wondering, if there exists a while-loop in LV. Now don't think "what kind of problem has this guy - there is a while-loop" - I know there is, but compared to a textual language it's a do-while-loop (footer controled).
I want to know if a header-controled loop exists or if it may come with a future release of LV.
Thomas
Using LV8.0
Don't be afraid to rate a good answer...

If you just want a while loop where the termination condition is checked before each code iteration, use something like in the attached image. I don't think we need an entirely new loop species.
Message Edited by altenbach on 05-19-2005 07:54 AM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
WhileLoopCheckFirst.gif ‏5 KB

Similar Messages

  • Is it possible to use a "for loop" structure to represent DAQ of 16 channels?

    Hi,
    I tried to search but I failed to find a similar problem so I am posting this problem here.
    I have a temperature DAQ board which has 16 channels, and I am using all 16 channels to record and monitor temperature data.
    When I writed blocks for all 16 channels, a mess was created (as you can see in my attached program). I have noticed that all the VIs for the 16 channels have similar structure, so I was thinking whether we can represent all 16 channels with a "for loop" strucutre with a pointer i scanning from i=1 to 16 as we usually do in Matlab or Fortran.
    For instance, we may try to simplify the code like:
    for i=1:1:16
         acquire data from channel i
         show data from channel i in X-Y graph
         write data from channel i to excel in every 10 seconds
    end  
    I could not do it myself because I cannot find a "pointer" to represent each channel.
    Does anyone know how to do this in LabVIEW? Thank you.
    It is said that it is best if we can put all of our code within the screen of a monitor we use by using subVIs to divide the code into many subroutines. But I found it quite difficult to do so as I have too many controls as inputs and indicators as outputs. Also, I use property node to read and write frequently, which make things harder....
    Attached code does not work as it requires the 9213 hardware, and for simplicity I deleted irrelavent modules. But if you need I can upload one that may work by modifying the read VI.
    Thank you.
    Attachments:
    ask for help.vi ‏132 KB

    Yup, instead of all these 1D arrays, use a single 2D array. Your code could be reduce to <10% of the current size. I am sure it would fit easily on a single screen.
    Also try to do some tutorial or take some courses. I realy don't think you are ready to tackle a system of this magnitude at this time.
    Your code is just peppered with very poor choices. Some things you apparently haven't figured out:
    index array is resizable. There is no need to create dozens of parallel instances, all wired to the same array and all with a unique index diagram constant. If you want all elements in order, the indices don't need to be wired at all.
    Replace all your value property nodes with local variables. Much more efficient. Then redesign the code so you don't even need most of the local variables.
    You can use built array to append elements to an existing array. Using "insert into array" is much more complicated an error prone.
    It is not a good idea to have deeply stacked while loops with the innermost loop having long delays and indeterminate stop conditions. That just gums up the gears.
    Learn about proper code architectures, state machines, etc.
    Get rid of that gigantic, all encompassing stacked sequence. I am sure you can find a better way to reset three booleans when the code is about to stop. In fact it is typically more reasonable to set things to a defined state when the program starts to avoid problems due to accidental value changes at edit time.
    Don't use hidden control/indicators as data storage and interloop communication via local variables. There are better ways.
    You can wire the reminder or Q&R directly to a case structure. No need for e.g. "=0".
    Don't use ambiguous labels, e.g.a boolean labeled "Dampers on or off". Nobody will be able to later figure out if TRUE corresponds to ON or OFF. Could it be that TRUE mean it is either ON or OFF and FALSE that it is in some imternediate position?
    LabVIEW Champion . Do more with less code and in less time .

  • Who know the difference between the two Timed Loop structures in NI's examples named PAC Simulation.vi?

    My LabVIEW version is LabVIEW 8.0.
    When I look up the help document about Timed Loop, I find two examples about Timed Loop with the same file name and different file path.
    One is "labview\examples\general\plat-timedloopframes.llb\PAC Simulation.vi",
    and the other is "labview\examples\general\timedloop.llb\PAC Simulation.vi".
    The function of these two examples is almost the same. But they display different results when running. I debug them and find that the value of Actual Start [f] of these two timed loop is different. Its value is constand in one vi and increasing in another vi. But the configuration of these two timed loops is the same.
    Can anyone tell me the diffrence between these two timed loops?
    Thanks!

    After I posted this, I realized there was one more "Time" clock, namely the Time node on the Event structure.  How is this clock (which I will call ET, for Event Time) related to the Global Start Time (or GST) and the TimeStamp (TS)?
    ET represents time in milliseconds, using a U32.  The largest value that can be represented is roughly 4 billion, but there are more than 30 billion milliseconds per year.  Hence this "clock" cannot directly keep the same time as the GST or TS.
    However, on the PC, if you multiply the ET value by a million (thereby converting the time to nanoseconds) and compare this value to GST, you'll see they are basically the same.  Thus, on the PC, ET and GST are "in sync", but not in sync with TS.
    On a real-time PXI system, we already established that TS and GST are "in sync" -- what about ET?  Curiously, this does not seem to be synchronized with anything.
    A Word to the Wise -- when I originally added the Event structure, I synchronized it with the Timed Loop using a Value(Signalling) property node, which worked fine on the PC, but failed to fire on the PXI.  I'd forgotten that you can't use this trick on real-time systems, as they have no Front Panel objects, hence the implementation using Dynamic Events. 
    Attachments:
    TS GST ET VI.png ‏16 KB

  • For Loop Structure

    Hi... are multiple initializations inside the firt part of a for loop allowed in Java?
    for (int i = 0, int j = 0; i < someArray.length; ++i, j = j + 2) {
        //doin' somethin'
    }

    If you find yourself asking a question along the lines of is this possible in java, then why don't you just write some code, compile it and run it.
    If you did that you would find that indeed it is legal.
    If on the other hand you are asking for our opinion on this type of code, then you should phrase the question differently.
    This is probably a sign of bad design... you could probably come up with a better way to do what you require...

  • Is there any way to read the data from an excel file w/o using a loop structure?

    I am retrieving a large amount of data (multiple sheets) from an excel file and would like to extract the entire range without retrieving individual cell values(too slow). I can write an range all at once but cannot read it.

    If you are able to write a block of data, then you should be able to read a block. The four requirements that you want to verify are:
    1. The Range specified must match the exact size and location of the data block you want to read
    2. The returned data is in a 2D array of Variants (either strings or numbers)
    3. Use Variant to Data to convert to 2D DBL or 2D Strings
    4. Check for the correct orientation for your application (use transpose if it is not)
    Michael Munroe
    Certified LabVIEW Developer
    www.abcdef.biz
    Michael Munroe, ABCDEF
    Certified LabVIEW Developer, MCP
    Find and fix bad VI Properties with Property Inspector

  • XML Publisher Looping

    Hello everyone,
    I have an Invoice XML source which has the following grouping structure:
    - <TMP002>
    - <LIST_G_ORDER_BY>
    - <G_ORDER_BY>
    <ORDER_BY>111</ORDER_BY>
    - <LIST_G_INVOICE>
    - <G_INVOICE>
    <BILL_CUST_NAME>Name 1</BILL_CUST_NAME>
    <BILL_ADDRESS1>Addr 1</BILL_ADDRESS1>
    <BILL_ADDRESS2>Addr 11</BILL_ADDRESS2>
    - <LIST_G_INV_TERM>
    - <G_INV_TERM>
    - <LIST_G_LINE_TOTAL>
    - <G_LINE_TOTAL>
    - <LIST_G_LINES>
    - <G_LINES>
    <LINE_NUMBER>1</LINE_NUMBER>
    <LINE_TYPE>LINE</LINE_TYPE>
    <ITEM_DESCRIPTION>ITEM_1</ITEM_DESCRIPTION>
    <TRX_NUMBER>11</TRX_NUMBER>
    </G_LINES>
    </LIST_G_LINES>
    </G_LINE_TOTAL>
    </LIST_G_LINE_TOTAL>
    </G_INV_TERM>
    </LIST_G_INV_TERM>
    </G_INVOICE>
    </LIST_G_INVOICE>
    </ORDER_BY>
    - <G_ORDER_BY>
    <ORDER_BY>222</ORDER_BY>
    - <LIST_G_INVOICE>
    - <G_INVOICE>
    <BILL_CUST_NAME>Name 2</BILL_CUST_NAME>
    <BILL_ADDRESS1>Addr 2</BILL_ADDRESS1>
    <BILL_ADDRESS2>Addr 22</BILL_ADDRESS2>
    - <LIST_G_INV_TERM>
    - <G_INV_TERM>
    - <LIST_G_LINE_TOTAL>
    - <G_LINE_TOTAL>
    - <LIST_G_LINES>
    - <G_LINES>
    <LINE_NUMBER>1</LINE_NUMBER>
    <LINE_TYPE>LINE</LINE_TYPE>
    <ITEM_DESCRIPTION>ITEM_2</ITEM_DESCRIPTION>
    <TRX_NUMBER>22</TRX_NUMBER>
    </G_LINES>
    </LIST_G_LINES>
    </G_LINE_TOTAL>
    </LIST_G_LINE_TOTAL>
    </G_INV_TERM>
    </LIST_G_INV_TERM>
    </G_INVOICE>
    </LIST_G_INVOICE>
    </ORDER_BY>
    </G_ORDER_BY>
    </LIST_G_ORDER_BY>
    </TMP002>
    I am using the following looping structure within my template:
    Following code has been used behind the form feilds.
    Company Logo INVOICE
    Header Section:
    (Starting for loop for each transaction number)
    <?for-each@SECTION:G_INVOICE?><?sort:TRX_NUMBER;'ascending';data-type='text'?>
    (Starting for loop for each invoice term (this is used if an invoice is being paid in multiple installments. That way, each installment will be printed as saperate invoice stub))
    <?for-each@SECTION:G_INV_TERM?><?sort:TERM_SEQUENCE_NUMBER;'ascending';data-type='number'?>
    Customer Name: <?/TMP002/LIST_G_ORDER_BY/G_ORDER_BY/LIST_G_INVOICE/G_INVOICE/BILL_CUST_NAME?>
    Address Line 1: <?/TMP002/LIST_G_ORDER_BY/G_ORDER_BY/LIST_G_INVOICE/G_INVOICE/BILL_ADDRESS1?>
    Address Line 2: <?/TMP002/LIST_G_ORDER_BY/G_ORDER_BY/LIST_G_INVOICE/G_INVOICE/BILL_ADDRESS2?>
    (Starting for loop for each invoice line)
    <?for-each:G_LINES?>
    Line Number: <?LINE_NUMBER?>
    Line Type: <?LINE_TYPE?>
    Trx Number: <?TRX_NUMBER?>
    Item Desc: <?ITEM_DESCRIPTION?>
    (Ending loop 1)
    <?end for-each-group?>
    (Ending loop 2)
    <?end for-each-group?>
    (Ending loop 3)
    <?end for-each-group?>
    Now, here starts the problem:
    Previewing the report gives me an output like this.
    Invoice 1:
    Company Name Logo
    Customer Name: Name 1
    Address Line 1: Addr 1
    Address Line 2: Addr 11
    Line Number: 1
    Line Type: LINE
    Trx Number: 11
    Item: Item_1
    Invoice 2:
    Company Name Logo
    Customer Name: Name 1
    Address Line 1: Addr 1
    Address Line 2: Addr 11
    Line Number: 1
    Line Type: LINE
    Trx Number: 22
    Item: Item_2
    Invoice 2 should be printing the "Customer Name", "Address Line 1" and "Address Line 2" as "Name 2", "Addr 2" and "Addr 22"respectively, where as it still prints those credentials belonging to Invoice 1.
    Any suggestions would be of a great help.
    Thanks.

    Hello,
    Try this:
    <?for-each@SECTION:G_INVOICE?><?sort:TRX_NUMBER;'ascending';data-type='text'?>
    <?for-each@SECTION:G_INV_TERM?><?sort:TERM_SEQUENCE_NUMBER;'ascending';data-type='number'?>
    Customer Name: <?../../BILL_CUST_NAME?>
    Address Line 1: <?../../ BILL_ADDRESS1?>
    Address Line 2: <?../../ BILL_ADDRESS2?>
    <?for-each:G_LINES?>
    Line Number: <?LINE_NUMBER?>
    Line Type: <?LINE_TYPE?>
    Trx Number: <?TRX_NUMBER?>
    Item Desc: <?ITEM_DESCRIPTION?>
    <?end for-each-group?>
    <?end for-each-group?>
    <?end for-each-group?>
    Hope that helps!

  • How to use while loops to implement a simple climate control.

    Hi,
    I am currently a 4’th year computer systems engineering student in South Africa doing a primitive climate control project in LabVIEW 8.0. Although my knowledge and skill level of LabVIEW is far from that of an expert, I really enjoy working with it. The project consists of a motor driving some fan blades, a resistor heater and an analog temperature sensor. The basic functionality entails that a user specifies a desired temperature and then the program will heat if the current temperature is lower than desired or cool if the current temperature is above the desired temperature.
    What I want to add is an acceptable temperature difference so that the fan and heater do not switch constantly as the threshold temperature is reached. Rather leave the current temperature to linger between the maximum (current + acceptable difference) or minimum (current – acceptable difference) allowed temperature before heating or cooling it to the desired temperature once again.
    I have attached 2 VI’s:
    Final Assignment: I tried to achieve the sensible climate control by making use of a formula node. As soon as I substituted the if statements in the formula node with while statements, the VI did not respond. It did not give any errors, it just didn’t respond.
    Final Assignment2: I tried the same but by making use of while loop structures. The while where my Input DAQ is works fine, but none of the other while loops work.
    Please advise me on possible solutions for my problem/project.
    Thank you in advance.
    D. Weppenaar
    Attachments:
    Final Assignment1.vi ‏254 KB
    Final Assignment21.vi ‏256 KB

    1. Your VI does not respond because your formula node is trapped in an infinite loop and cannot exit if you're out of the deadband. Replace the words "while" with "if" (or similar) and you might be getting somewhere. Sorry, I don't have DAQ installed, but what determines the loop rate?
    2. You have a dataflow issue. Only the inner loop on the left will run. All other loops must wait because they depend on data from the first loop. data is only available at an output tunnel of a loop once the loop finishes and a loop cannot start until all input tunnels contain data. Also the first loop can never stop, because the stop button is outside the loop and will never get read once the inner loop starts. The stop button needs to be in the innermost loop.
    Most likely, all code segments should run synchronized, so delete all the inner loops. They serve no purpose. All yon need is the big outer loop as in the first code.
    There are many ways to directly observe what is going on. For example you could run the VI in execution highlighting mode while watching the diagram.
    Clearly, you need to become more familiar with LabVIEW basics. Maybe do a tutorial? Right now you might think that dataflow is a hindrance while in fact it is one of the most powerful advantages of dataflow programming. You simply need to be familiar with its logic.
    LabVIEW Champion . Do more with less code and in less time .

  • Is there and alternativ​e to shift registers for saving data across iterations in a subVI operating inside a loop?

    I am creating a subVI state machine (case structure) which will run inside a while loop which will be executing every 250ms. The reason I wanted to make the state machine case structure into a subVI is because I want to execute 64 of the machines within the same loop. The goal is to monitor certain types of voltage changes on 64 I/O channels on a FP2200 RT module and report periodic details about state changes to a database. My thinking was that by executing each independent machine in the same loop structure, I will only worry about one thread. It seems that the alternative of having one state machine thread per I/O channel is probably more than the RT module can handle. Please correct me if I am wrong on that.
    The issue I'm now having is as I'm creating the state machine, I am finding that I need to keep track of some pieces of data from one loop iteration to the next. This is easy enough to do with shift registers but in order to use them, I have to create additional input nodes to my SubVI as well as output nodes. For example, I want to use a queue to buffer some I/O data but as of now, I have to create this queue outside the loop, pull it into the loop across a shift register, feed it to the subVI, and output it to the out Shift register. It would be better if I didn't have to output this queue because there's no reason for anything to have access to it outside the subVI. It just creates an extra set of wires to look at and makes me worry a bit about maintainability. 
    Is there a better way to approach this problem? 

    You could place a while loop inside your sub vi that has a true constant wired to the stop condition. Then add unitialized shift registers to that while loop to keep data between iterations.
    or you could use a feedback node inside the sub vi

  • Nested loops and if statements

    I have four schemas with a problem category table "gppcat" that
    has problem categories and problem descriptions. I need to
    output these categories and descriptions to a csv file. while
    doing this I need to make sure I don't include duplicate
    records. I use schema 1 as a system of record. I want to select
    pcode "category" from schema 1 and loop through to compare each
    record in the other schemas and write each unique record once to
    the file. I have included the code I am writing. I son't have
    much experience in PL/SQL, I usually write in ABAP or Java so
    the looping and if logic may seem incongruent as I have never
    implemented this in PL/SQL before. Thanks in advance, all the
    answers I have gotten fomr this forum have been great.
    CURSOR C1
    IS
    SELECT PCODE, PDESC FROM gpcomp1.gppcat;
    CURSOR C2
    IS
    SELECT PCODE, PDESC FROM gpcomp2.gppcat;
    CURSOR C3
    IS
    SELECT PCODE, PDESC FROM gpcomp3.gppcat;
    CURSOR C4
    IS
    SELECT PCODE, PDESC FROM gpcomp4.gppcat;
    -- error handling routine. we will handle all file access errors
    -- and data access errors in this procedure err_processing
    PROCEDURE err_processing (p_errFileHandle UTL_FILE.FILE_TYPE,
    p_lineNum PLS_INTEGER,
    p_errText VARCHAR2)
    IS
    BEGIN
    lv_errorFile := UTL_FILE.FOPEN(p_errDir,p_errFile,'W');
    UTL_FILE.PUT_LINE( lv_errorFile, lv_initErrorLog );
    UTL_FILE.FFLUSH(lv_errorFile);
    UTL_FILE.FCLOSE(lv_errorFile);
    UTL_FILE.FCLOSE_ALL;
    END err_processing;
    -- Retreive data into cursors
    BEGIN
    catFileHandle := UTL_FILE.FOPEN(p_dirName,p_fileName,'W');
    Here we need to loop through 4 companies and write all Problem
    Codes (pcode) and
    Problem Descriptions (pdesc) without writing duplicates. In this
    case we are using
    the same logic in the old extract by using the US company as the
    driving table.
    We compare the pcode, record by record in eanch 4 companies.
    When we find a unique
    record we write it to the file.
    FOR catLine1 IN C1
    LOOP
         FOR catLine2 IN C2
         LOOP
         IF catLine2.pcode = catLine1.pcode THEN
         writeLine:= (catLine1.pcode) || ',' ||
    (catLine1.pdesc);
              UTL_FILE.PUT_LINE( catFileHandle, writeLine );
         ELSE
         writeLine:= (catLine2.pcode) || ',' ||
    (catLine2.pdesc);
              UTL_FILE.PUT_LINE( catFileHandle, writeLine );
         END IF;
         END LOOP;
         FOR catLine3 IN C3
         LOOP
         IF catline3.pcode = catLine1.pcode THEN
         writeLine:= (catLine1.pcode) || ',' ||
    (catLine1.pdesc);
              UTL_FILE.PUT_LINE( catFileHandle, writeLine );
         ELSE
         writeLine:= (catLine3.pcode) || ',' ||
    (catLine3.pdesc);
              UTL_FILE.PUT_LINE( catFileHandle, writeLine );
         END IF;
         END LOOP;
         FOR catLine4 IN C4
         LOOP
         IF catline4.pcode = catLine1.pcode THEN
         writeLine:= (catLine1.pcode) || ',' ||
    (catLine1.pdesc);
              UTL_FILE.PUT_LINE( catFileHandle, writeLine );
         ELSE
         writeLine:= (catLine4.pcode) || ',' ||
    (catLine4.pdesc);
              UTL_FILE.PUT_LINE( catFileHandle, writeLine );
         END IF;
         END LOOP;
         EXIT WHEN C1%NOTFOUND;
         UTL_FILE.PUT_LINE( catFileHandle, writeLine );
    END LOOP;
    UTL_FILE.FFLUSH(catFileHandle);
    UTL_FILE.FCLOSE(catFileHandle);
    Thanks again.
    -Pat

    The easiest way of doing this is to use the UNION operator.
    You just have one cursor, viz:
    CURSOR C1
    IS
    SELECT PCODE, PDESC FROM gpcomp1.gppcat
    UNION
    SELECT PCODE, PDESC FROM gpcomp2.gppcat
    UNION
    SELECT PCODE, PDESC FROM gpcomp3.gppcat
    UNION
    SELECT PCODE, PDESC FROM gpcomp4.gppcat;
    This will return only unique rows (to get duplicates you use
    UNION ALL). Then you can use a single CURSOR LOOP structure to
    write out the result set:
    FOR lrec IN C! loop
    utl_file.put_line(C1.pcode);
    END LOOP;
    HTH, APC

  • How can I include loops in positional flat files?

    Hi,
    I got a simple record structure flat file working in B2B, but my data file is more complex and I want to know how I can define the ecs file for the same.
    My data has orders, lines underneath and finally a trailer with the total number of lines in the file. So when this goes to my target system, I would like to create order and lines underneath so I am expecting my schema as a result of the ecs to represent that loop structure.
    In the document editor, when I right click on the message I see Insert Child Node --> Record, but under the record I see both Insert Node and Insert Child Node again, and I am lost as I don't find any document on what these options mean.
    Can someone please throw some light on this?
    Thanks
    Venkat

    Hi Venkat,
    You may find Min Use and Max Use record properties at right side when you click on a record. Set min use as 0 (or 1 if it is not optional) and max use to 999999 or any other high value and you are good to go.
    Inside record, you can insert Fields which will eventually hold the line data.
    Regards,
    Anuj

  • How can I append some data to an array via a case structure?

    Basically i want to do the following thing:
    do
    if control=0
    else
    Data=Data append data1
    end if
    }while(run=1)
    We try to avoid local variable since the size of Data is pretty big. I am pretty sure i can add a shift register in a loop structure.But is it possible to add a shift register in a case structure?
    Thank you!

    The best you will be able to do is going to be a variation on what CC suggested regarding replacing array sub-sets.
    If you do not know how big it will end up then over-allocate but still use the replace array subset.
    The delays you are seeing are due to the memory buffers groing and additional memory need allocated as the array grows. The Replace array subset function operates inplace and re-uses the buffer it is passed. There is no clear KB regarding which array operations operate inplace and which do not.
    http://forums.ni.com/ni/board/message?board.id=170&message.id=74847&requireLogin=False
    Under Tools >>> Advanced >>> Show buffer allocations will show you where buffers are being allocated (LV 7.1).
    If you post a zip or llb of you code I am sure someone will have more to add.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • For loop in new format

    Hi
    I am working on some project and am encountring for loop in some strange format. Can anyway help me with understanding this format of for loop.
    this is something like:
    for(Case q: cases)
    can you simplify of map this to simple format of loop.
    Thanks

    This was introduced in JDK 1.5. Read the release notes for that to find out about this loop structure.
    Basically it's a way to quickly loop, using iterators implicitly if the thing to the right of the colon is a Collection.

  • While loop in a for loop,Is it possible?

    Is It possible to call a while loop a particular number of time's using a for loop.
    for example :
    for(.....){
    while(true)
    Is this technically possible?
    Thanks,

    Hans9777 wrote:
    Based on the code you wrote , the program will enter the for loop and then the while loop . It will never exit the while loop as while(true) means loop infinite times. normally while do-while and for loop can be immplemted for the same function therefore they are rarely used together.Obviously his code only showed the loop structures themselves with no loop bodies. Supposedly there may be a 'break' in the while loop somewhere, so it is not necessarily an infinite loop.
    And your remark about them rarely being used together is nonsense. Loops within loops are written for legitimate logic purposes all the time, regardless of what kind of loops they are.

  • Best practices for logging results from Looped steps

    Hi all
    I would like to start a discussion  to document best practices for logging results (to reports and databases) from Looped Steps 
    As an application example - let's say you are developing a test for one of NI's analog input or output cards and need to measure a voltage across multiple inputs or outputs.
    One way to do that would be to create a sequence that switches the appropriate signals and performs a "Voltage Measurement" test in a loop.    
    What are your techniques for keeping track of the individual measurements so that they can be traced to the individual signal paths that are being measured?
    I have used a variety of techniques such as
    i )creating a custom step type that generates unique identifiers for each iteration of the loop.    This required some customization to the results processing . Also the sequence developer had to include code to ensure that a unique identifier was generated for each iteration
    ii) Adding an input parameter to the test function/vi, passing loop iteration to it and adding this to Additional results parameters to log.   

    I have attached a simple example (LV 2012 and TS 2012) that includes steps inside a loop structure as well as a looped test.
    If you enable both database and report generation, you will see the following:
    1)  The numeric limit test in the for loop always generates the same name in the report and database which makes it difficult to determine the result of a particular iteration
    2) The Max voltage test report includes the paramater as an additional result but the database does not include any differentiating information
    3) The Looped Limit test generates both uniques reports and database entries - you can easily see what the result for each iteration is.   
    As mentioned, I am seeking to start a discussion for how others handle results for steps inside loops.    The only way I have been able to accomplish a result similar to that of the Looped step (unique results and database entry for each iteration of the loop) is to modify the process model results processing.  
    Attachments:
    test.vi ‏27 KB
    Sequence File 2.seq ‏9 KB

  • Nested Loop Help

    Hello,
    I have generated a simple VI, to make multiplication and division operations. I have the following operation performed with the following inputs.
    A1 has a value range from 1 -10 fixed
    A2 has an input range of 1 - 5
    A3,A4 are constants.
    so Result  = (A1*A3 ) / (A4*A2)*100 ,
    I want to  plot "Result Vs. A1" with a current value of A2, increment A2 and repeat the procedure. So I generate 5 graphs and display it in only one. I need to write a nested loop to perform this operation.however I am able to do it only once.
    I am trying to use for loop structure in one another but havent gone ahead in this.Any help will be appreciable..Thanks in advance.

    altenbach wrote:
    Dravi99 wrote:
    The Problem is that I want to plot the division result vs. the # of array out elements and i am unsuccessful at it. May be i am missing on the waveform graph properties.
    You should make the current values default before saving so we have some typical data to play with.
    Currently, your code makes very little sense, because the inner loop has no purpose.
    If you plot the division result versus array index (I assume that's what you want, I don't understand what you mean by "the # of array out elements "), you only have one plot. What should be on the other plots???
    Please explain or even attach an image of the desired output. Thanks!
    Thanks Altenbach for the inputs.
    I have made the values default. Srry for the previous one.
    Now the inner loop was placed so that i can create a 2D array.
    I need to plot the division result vs. the value of the element in the arry out. i.e. currently my array out has 0.0...,0.3 I want that to be the X axis.
     The graph plotted   is for 1st value of "in", this value will change like from 4.5 to 4.7 to 4.9, not necesarily in steps.
    Thus my one graph should have multiple plots of "in" which has the above mentioned axis.
    Hope this time i was clear in my msg. I have attached the modified VI.
    Attachments:
    For_loop_prob.vi ‏17 KB

Maybe you are looking for