For loop without N input

Hi Guys,
I have looked at the I/O example and found that the for loop in the example can exist without an input of N. I tried the same thing in the VI created by myself. I think the problem is the type of the tunnel. Can I change the input tunnel into a indexed tunnel? I right-click the tunnel and there is no option to change the tunnel into a auto-indexed one. 
Attachments:
loop_test.vi ‏6 KB

Have you looked at the LabVIEW Help? This is explained in there.
To learn more about LabVIEW it is recommended that you go through the tutorial(s) and look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the _

Similar Messages

  • Making 2 for loops without nested

    How to make two for loops without nested like the follwoing
    for i in 1.10, j in 1..30 loop
    end loop
    Please help me

    Following is the closest I could think of...
    SQL> ed
    Wrote file afiedt.buf
    1 declare
    2 type myrec is record (ctr1 number, ctr2 number);
    3 type tabrec is table of myrec ;
    4 v_tabrec tabrec := new tabrec();
    5 begin
    6 for i in 1..10 loop
    7 v_tabrec.extend;
    8 v_tabrec(i).ctr1 := i;
    9 v_tabrec(i).ctr2 := i;
    10 end loop;
    11 for i in 11..30 loop
    12 v_tabrec.extend;
    13 v_tabrec(i).ctr2 := i;
    14 end loop;
    15 for i in v_tabrec.first..v_tabrec.last loop
    16 dbms_output.put_line(v_tabrec(i).ctr1 || v_tabrec(i).ctr2);
    17 end loop;
    18* end;
    SQL> /
    11
    22
    33
    44
    55
    66
    77
    88
    99
    1010
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30

  • How to use no of iteration of for loop as the input for the for loop

    hi all,
    i wanna need some help here..
    i'm using for loop to iterate to ceratin no of iteration.. then, i would like to use back the no of iteration as the input of 'N' for the next iteration..
    in other word, eg:
    1st run:
    i insert a control to 'N', let say 80
    then the iteration run until 80-1 = 79..
    2nd run:
    i need to insert the no of "N", let say a control of 120.. i want the loop run for "120 - 79", where the 79 is the no of previous run..
     easy to say,
    how can i connect the "i' as a control to ''N''
    n how to make a "run' or ' GO' and ''stop'' button in the front panel and block diagram after the first run without using the stop and run from the labview window
    thanks..

    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
    Attachments:
    Untitled 2.vi ‏9 KB

  • Writing data to spreadsheet in FOR loop without shift register

    My program has a case window within a For loop.  The loop iteration index is wired to the case, so there’s a case for each iteration of the loop (about 30 cases).  In each case, data points are gathered, formatted to a spreadsheet and written to a file, along with some occasional header strings to describe the data.  This works fine, as I can simply write the data to file as soon as I get it. 
    At some point in the loop, I’m gathering from two sources (rpm data for two fans) over several iterations that is to be written to two separate but similar formatted tables in the same output file.  Since I’m writing two tables to one file simultaneously, I can no longer write on-the-fly in a linear fashion; I’d need to store all the information until I complete the iterations, then format the header & raw data to spreadsheet and write to file in two chunks – at least, this is what I believe is the way to go, but I’m all ears if there’s another way.
    In order to buffer the data, I could use a shift register, but this requires me to wire an array across my loop for all loops, whether I’ll be using it or not.  I’ve also considered initializing an array at the case I’ll need to start buffering, then writing to a local variable of that array, but in fiddling with this approach, I don’t see how to specify what index to which I’m storing the data point.
    So I’m looking for advice on whether (1) there’s another way to accomplish my goal and/or (2) how to execute the initialize array and local variable approach. 
    Below is a picture of what I want this portion of the spreadsheet to look like.  Also included is a much abbreviated mock-up of my program for a case where I’m writing on the fly for a single table or column of information and a case where I’m setting up the write to local variable approach.  
    Message Edited by TESTIE on 04-03-2008 12:48 PM
    Attachments:
    illustration22.JPG ‏52 KB
    output_file2.JPG ‏120 KB
    illustration3.JPG ‏50 KB

    An Action Engine can thought of as an encapsulated shift register.
    AE's out-perform locals while alos elliminating possible race conditions. You may want to review the Nugget I wrote on Action Engines.
    Just trying to help,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How to put entries in a for loop without hard coding the values

    I have a below pl/sql block that needs to flag a claim based on claim number values given that I have in an excel sheet. Is there a way to capture those 500 claims efficiently in the select statement in the pl/sql without hardcoding these from value 1 ...to value 500 (as listed below)???
    DECLARE
       ln_ctr   NUMBER := 0;
    BEGIN
       FOR lrecclaimnumber
       IN ( SELECT   entityid claimnumber
             FROM   mpi_fnx.wfTokenEntity wte
            WHERE   wte.entityid IN
                          ('Value1','Value2',....'Value 500')
    LOOP
       mpi_fnx.pkgSaveClaimData.spMarkClaimInvalid (pivClaimNumber          => lrecclaimnumber.claimnumber,
                                                    pininvalidreasonid      => 304,
                                                    pinuserid               => 4999
       ln_ctr := ln_ctr + 1;
       END LOOP;
       DBMS_OUTPUT.put_line ('Total Entries Processed: ' || ln_ctr);
    END;
    /

    DECLARE
       ln_ctr   NUMBER := 0;
    BEGIN
       FOR lrecclaimnumber
       IN ( SELECT   entityid claimnumber
             FROM   mpi_fnx.wfTokenEntity wte
            WHERE   wte.entityid IN
                          (select 'Value '|| level as col_name from dual  connect by level <=500)
    LOOP
       mpi_fnx.pkgSaveClaimData.spMarkClaimInvalid (pivClaimNumber          => lrecclaimnumber.claimnumber,
                                                    pininvalidreasonid      => 304,
                                                    pinuserid               => 4999
       ln_ctr := ln_ctr + 1;
       END LOOP;
       DBMS_OUTPUT.put_line ('Total Entries Processed: ' || ln_ctr);
    END;
    / bye
    TPD

  • REF CURSOR FOR LOOP WITHOUT FETCHING

    I am trying to run the following PL/SQL with REF CURSOR.
    I am using FOR .. IN <REF CURSOR NAME> LOOP construct. The compiler fails at FOR v_Each IN v_Cursor line complaining that the v_Cursor is not delared. You can see the v_cursor is defined in the DECLARE section. If I change the FOR v_Each IN v_Cursor to
    FETCH v_Cursor INTO v_RecordHolder;
    EXIT WHEN v_Cursor%NOTFOUND;
    then the PL/SQL will run. Does anyone know why I can not use my prefer construct?
    If I use FETCH .. INTO, since my select statment returns a result of severla joins, I have to create a Record() structure for all the columns returns, is there a way to create a Record() type that only has one field%ROWTYE.
    /******* my code starts here ********/
    DECLARE
    v_StartDate DATE := TO_DATE('05-01-2003','MM/DD/YYYY');
    TYPE t_CursorRef IS REF CURSOR;
    v_Cursor t_CursorRef;
    BEGIN
    OPEN v_Cursor FOR
    SELECT DISTINCT E.*, P.P_CODE, C.PT_ID
    FROM TABLE1 E, TABLE2 P, TABLE3 I, TABLE4 C
    WHERE E.P_ID = P.P_ID AND E.E_ID = I.E_ID
    AND E.P_ID = C.PT_ID (+)
    AND TRUNC(E.E_DATETIME) >= TO_DATE(v_StartDate)
    AND E.DIS_ID = 1
    AND RTRIM(P.A_CODE) = 'A'
    AND ((MONTHS_BETWEEN(SYSDATE,P.P_BEGIN)/12 > 40) AND (MONTHS_BETWEEN(SYSDATE,P.P_END)/12 < 85))
    AND (RTRIM(I.E_D_CODE) IN ('V81.1','272.2','272.4','401.9','305.1','278.00','272.0') AND RTRIM(I.E_D_CODE) NOT IN ('414.9','414.00','250.00','436','414.01'));
    FOR v_Each IN v_Cursor LOOP
    DBMS_OUTPUT.PUT_LINE('Inside the loop P_ID is ' || TO_CHAR(v_Each.P_ID));
    CLOSE v_Cursor;
    END LOOP; /* FOR v_Each */

    Please post technical questions in the respective forums : PL/SQL
    Is it mandatory for you to use REF CURSOR, else you could use the following code which gives the same result.
    DECLARE
    v_StartDate DATE := TO_DATE('05-01-2003','MM/DD/YYYY');
    CURSOR v_Cursor(inputdate DATE) IS
    SELECT DISTINCT E.*, P.P_CODE, C.PT_ID
    FROM TABLE1 E, TABLE2 P, TABLE3 I, TABLE4 C
    WHERE E.P_ID = P.P_ID AND E.E_ID = I.E_ID
    AND E.P_ID = C.PT_ID (+)
    AND TRUNC(E.E_DATETIME) >= inputdate
    AND E.DIS_ID = 1
    AND RTRIM(P.A_CODE) = 'A'
    AND ((MONTHS_BETWEEN(SYSDATE,P.P_BEGIN)/12 > 40) AND (MONTHS_BETWEEN(SYSDATE,P.P_END)/12 < 85))
    AND (RTRIM(I.E_D_CODE) IN ('V81.1','272.2','272.4','401.9','305.1','278.00','272.0') AND RTRIM(I.E_D_CODE) NOT IN ('414.9','414.00','250.00','436','414.01'));
    BEGIN
    FOR v_Each IN v_Cursor(v_StartDate) LOOP
    DBMS_OUTPUT.PUT_LINE('Inside the loop P_ID is ' || TO_CHAR(v_Each.P_ID));
    END LOOP; /* FOR v_Each */
    END;

  • Stopping a For Loop, part 2

    Hello. Thank you everyone for your help, getting to this point. I asked for help to create a stop condition, while a For Loop is running. I was given many ideas and selected the one that used local variables. It works well however, if I am in the "Test in progress" state, in the first For Loop, and the "Stop" button is selected from the front panel, when it stops the Vi, it sends the value "5" to the second For Loop before going to the "End" state, which puts it to "0", then stops the Vi. What this Vi is doing is feeding 0-200VDC signal to an eddy current sensor, then it feeds 200-0VDC going the other direction. I have tried sequencing, putting in timers and a few other goofy things but I can not get the Vi to stop in the first For Loop, without the Vi performing the initial "5" to the second For Loop. Someone had mentioned using an event handler, in my previous post. I practiced for quite some time, trying to understand how to use an event handler but am not much the wiser. Any and all input would be greatly appreciated.

    altenbach wrote:
    ceilingwalker wrote:
    You are autoindexing way too many thing between the two FOR loops I was doing this to create a data dependency, at least that was my thought process behind it. As far as the physical channels and VISA refnums, I did it this way so I didn't create more controls for the front panel. Being my first project, I am very certain my logic is flawed, this is why I like posting here and getting feedback from
     You have many visa sessions that (hopefully) never change during the execution of the loops, so why woold you turn them into an array of 11 identical elements just to autoidex them out again at the next loop. Change the tunnels to no autoindexing and things would look cleaner. Why are these session controls inside the loop? Are you expect them to be changeable during loop execution or would that screw up the results?
    Wounld't it be easier to simply create an up&down ramp once and use a single FOR loop, autoindexing on the ramp? You have way too much duplicate code!!!
     If you don't want the second loop to run when the first one is ended prematurely with the stop button, put it in a case structure I tried a Case structure for the second For Loop. I couldn't find a way to change conditions that didn't affect the Vi's overall performance.
    Then show us what you tried! That should be trivial to implement. Why would a case structure affect performance? Makes no sense!
    Why would a case structure affect performance? Makes no sense! I used a boolean operator to change the state. When I used a false, it worked for that problem but shut down my Vi before the second For Loop. 
    Wounld't it be easier to simply create an up&down ramp once and use a single FOR loop, autoindexing on the ramp? You have way too much duplicate code!!!  I tried using one For Loop to begin with but because I had to ramp up, then ramp down, I couldn't figure out how to use just one. I needed an Add function for the ramp up and a Subtract function for the ramp down.
    Why are these session controls inside the loop? Are you expect them to be changeable during loop execution or would that screw up the results? No Sir, the values are not changed during operation. I did this because I wanted it to display the data on the front panel, during operation of the Vi. For display only.
     

  • How to ignore error and continue with next value in PL/SQL FOR loop?

    hi,
    When the DROP INDEX statement fails it have to continue with the next value in FOR loop without exiting from the loop. Can anyone tell me how to do this?
    DECLARE
    CURSOR aud_cur IS
    SELECT key_col_idx FROM audience_work where aud_ref_id between 106 and 109;
    BEGIN
    FOR aud_row IN aud_cur LOOP
    EXECUTE IMMEDIATE
    'DROP INDEX ' || aud_row.key_col_idx;
    END LOOP;
    END;
    Thanks,
    Noble

    DECLARE
      CURSOR aud_cur
      IS
      SELECT key_col_idx FROM audience_work where aud_ref_id between 106 and 109;
    BEGIN
      FOR aud_row IN aud_cur LOOP
        begin
          EXECUTE IMMEDIATE 'DROP INDEX ' || aud_row.key_col_idx;
        exception
          when others then
            if sqlcode = -01418 then
              dbms_output.put_line(' index does not exist ');
            else
              dbms_output.put_line(sqlcode);
              raise;
            end if; 
        end;
      END LOOP;
    END;
    /

  • For Loop in Struts ?(without Collections)

    Hi all,
    Pls tell me how can v use FOR LOOP IN JSP STRUTS without using scriplets and collections .
    suppose i want to display 20 times "hello world "in jsp .How can i display it using STRUTS as conventionally scriplets are not allowed in it.
    and Iterator is only for Collections .
    thanx

    TestBean.java
    * $Id: TestBean.java 54929 2004-10-16 16:38:42Z germuska $
    * Copyright 1999-2004 The Apache Software Foundation.
    * Licensed under the Apache License, Version 2.0 (the "License");
    * you may not use this file except in compliance with the License.
    * You may obtain a copy of the License at
    * http://www.apache.org/licenses/LICENSE-2.0
    * Unless required by applicable law or agreed to in writing, software
    * distributed under the License is distributed on an "AS IS" BASIS,
    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    * See the License for the specific language governing permissions and
    * limitations under the License.
    package org.apache.struts.webapp.exercise;
    import java.util.ArrayList;
    import java.util.Collection;
    import java.util.HashMap;
    import java.util.List;
    import java.util.Map;
    import java.util.Vector;
    import javax.servlet.http.HttpServletRequest;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.util.LabelValueBean;
    * General purpose test bean for Struts custom tag tests.
    * @version $Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $
    public class TestBean extends ActionForm {
    // ------------------------------------------------------------- Properties
    * A collection property where the elements of the collection are
    * of type <code>LabelValueBean</code>.
    private Collection beanCollection = null;
    public Collection getBeanCollection() {
    if (beanCollection == null) {
    Vector entries = new Vector(10);
    entries.add(new LabelValueBean("Label 0", "Value 0"));
    entries.add(new LabelValueBean("Label 1", "Value 1"));
    entries.add(new LabelValueBean("Label 2", "Value 2"));
    entries.add(new LabelValueBean("Label 3", "Value 3"));
    entries.add(new LabelValueBean("Label 4", "Value 4"));
    entries.add(new LabelValueBean("Label 5", "Value 5"));
    entries.add(new LabelValueBean("Label 6", "Value 6"));
    entries.add(new LabelValueBean("Label 7", "Value 7"));
    entries.add(new LabelValueBean("Label 8", "Value 8"));
    entries.add(new LabelValueBean("Label 9", "Value 9"));
    beanCollection = entries;
    return (beanCollection);
    public void setBeanCollection(Collection beanCollection) {
    this.beanCollection = beanCollection;
    * A multiple-String SELECT element using a bean collection.
    private String[] beanCollectionSelect = { "Value 1", "Value 3",
    "Value 5" };
    public String[] getBeanCollectionSelect() {
    return (this.beanCollectionSelect);
    public void setBeanCollectionSelect(String beanCollectionSelect[]) {
    this.beanCollectionSelect = beanCollectionSelect;
    * A boolean property whose initial value is true.
    private boolean booleanProperty = true;
    public boolean getBooleanProperty() {
    return (booleanProperty);
    public void setBooleanProperty(boolean booleanProperty) {
    this.booleanProperty = booleanProperty;
    * A multiple-String SELECT element using a collection.
    private String[] collectionSelect = { "Value 2", "Value 4",
    "Value 6" };
    public String[] getCollectionSelect() {
    return (this.collectionSelect);
    public void setCollectionSelect(String collectionSelect[]) {
    this.collectionSelect = collectionSelect;
    * A double property.
    private double doubleProperty = 321.0;
    public double getDoubleProperty() {
    return (this.doubleProperty);
    public void setDoubleProperty(double doubleProperty) {
    this.doubleProperty = doubleProperty;
    * A boolean property whose initial value is false
    private boolean falseProperty = false;
    public boolean getFalseProperty() {
    return (falseProperty);
    public void setFalseProperty(boolean falseProperty) {
    this.falseProperty = falseProperty;
    * A float property.
    private float floatProperty = (float) 123.0;
    public float getFloatProperty() {
    return (this.floatProperty);
    public void setFloatProperty(float floatProperty) {
    this.floatProperty = floatProperty;
    * Integer arrays that are accessed as an array as well as indexed.
    private int intArray[] = { 0, 10, 20, 30, 40 };
    public int[] getIntArray() {
    return (this.intArray);
    public void setIntArray(int intArray[]) {
    this.intArray = intArray;
    private int intIndexed[] = { 0, 10, 20, 30, 40 };
    public int getIntIndexed(int index) {
    return (intIndexed[index]);
    public void setIntIndexed(int index, int value) {
    intIndexed[index] = value;
    private int intMultibox[] = new int[0];
    public int[] getIntMultibox() {
    return (this.intMultibox);
    public void setIntMultibox(int intMultibox[]) {
    this.intMultibox = intMultibox;
    * An integer property.
    private int intProperty = 123;
    public int getIntProperty() {
    return (this.intProperty);
    public void setIntProperty(int intProperty) {
    this.intProperty = intProperty;
    * A long property.
    private long longProperty = 321;
    public long getLongProperty() {
    return (this.longProperty);
    public void setLongProperty(long longProperty) {
    this.longProperty = longProperty;
    * A multiple-String SELECT element.
    private String[] multipleSelect = { "Multiple 3", "Multiple 5",
    "Multiple 7" };
    public String[] getMultipleSelect() {
    return (this.multipleSelect);
    public void setMultipleSelect(String multipleSelect[]) {
    this.multipleSelect = multipleSelect;
    * A nested reference to another test bean (populated as needed).
    private TestBean nested = null;
    public TestBean getNested() {
    if (nested == null)
    nested = new TestBean();
    return (nested);
    * A String property with an initial value of null.
    private String nullProperty = null;
    public String getNullProperty() {
    return (this.nullProperty);
    public void setNullProperty(String nullProperty) {
    this.nullProperty = nullProperty;
    * A short property.
    private short shortProperty = (short) 987;
    public short getShortProperty() {
    return (this.shortProperty);
    public void setShortProperty(short shortProperty) {
    this.shortProperty = shortProperty;
    * A single-String value for a SELECT element.
    private String singleSelect = "Single 5";
    public String getSingleSelect() {
    return (this.singleSelect);
    public void setSingleSelect(String singleSelect) {
    this.singleSelect = singleSelect;
    * String arrays that are accessed as an array as well as indexed.
    private String stringArray[] =
    { "String 0", "String 1", "String 2", "String 3", "String 4" };
    public String[] getStringArray() {
    return (this.stringArray);
    public void setStringArray(String stringArray[]) {
    this.stringArray = stringArray;
    private String stringIndexed[] =
    { "String 0", "String 1", "String 2", "String 3", "String 4" };
    public String getStringIndexed(int index) {
    return (stringIndexed[index]);
    public void setStringIndexed(int index, String value) {
    stringIndexed[index] = value;
    private String stringMultibox[] = new String[0];
    public String[] getStringMultibox() {
    return (this.stringMultibox);
    public void setStringMultibox(String stringMultibox[]) {
    this.stringMultibox = stringMultibox;
    * A String property.
    private String stringProperty = "This is a string";
    public String getStringProperty() {
    return (this.stringProperty);
    public void setStringProperty(String stringProperty) {
    this.stringProperty = stringProperty;
    * An empty String property.
    private String emptyStringProperty = "";
    public String getEmptyStringProperty() {
    return (this.emptyStringProperty);
    public void setEmptyStringProperty(String emptyStringProperty) {
    this.emptyStringProperty = emptyStringProperty;
    * A single-String value for a SELECT element based on resource strings.
    private String resourcesSelect = "Resources 2";
    public String getResourcesSelect() {
    return (this.resourcesSelect);
    public void setResourcesSelect(String resourcesSelect) {
    this.resourcesSelect = resourcesSelect;
    * A property that allows a null value but is still used in a SELECT.
    private String withNulls = null;
    public String getWithNulls() {
    return (this.withNulls);
    public void setWithNulls(String withNulls) {
    this.withNulls = withNulls;
    * A List property.
    private List listProperty = null;
    public List getListProperty() {
    if (listProperty == null) {
    listProperty = new ArrayList();
    listProperty.add("dummy");
    return listProperty;
    public void setListProperty(List listProperty) {
    this.listProperty = listProperty;
    * An empty List property.
    private List emptyListProperty = null;
    public List getEmptyListProperty() {
    if (emptyListProperty == null) {
    emptyListProperty = new ArrayList();
    return emptyListProperty;
    public void setEmptyListProperty(List emptyListProperty) {
    this.emptyListProperty = emptyListProperty;
    * A Map property.
    private Map mapProperty = null;
    public Map getMapProperty() {
    if (mapProperty == null) {
    mapProperty = new HashMap();
    mapProperty.put("dummy", "dummy");
    return mapProperty;
    public void setMapProperty(Map mapProperty) {
    this.mapProperty = mapProperty;
    * An empty Map property.
    private Map emptyMapProperty = null;
    public Map getEmptyMapProperty() {
    if (emptyMapProperty == null) {
    emptyMapProperty = new HashMap();
    return emptyMapProperty;
    public void setEmptyMapProperty(Map emptyMapProperty) {
    this.emptyMapProperty = emptyMapProperty;
    // --------------------------------------------------------- Public Methods
    * Reset the properties that will be received as input.
    public void reset(ActionMapping mapping, HttpServletRequest request) {
    booleanProperty = false;
    collectionSelect = new String[0];
    intMultibox = new int[0];
    multipleSelect = new String[0];
    stringMultibox = new String[0];
    if (nested != null)
    nested.reset(mapping, request);
    }

  • For Loop in Struts ?(without  Container)

    Hi all,
    Pls tell me how can v use for loop in JSP struts without using scriplets and container .
    suppose i want to display 20 times "hello world "in jsp .How can i display it using STRUTS as conventionally scriplets are not allowed in it.
    and Iterator is only for Container .
    thanx

    Hi all,
    Pls tell me how can v use for loop in JSP struts without using scriplets and container .
    suppose i want to display 20 times "hello world "in jsp .How can i display it using STRUTS as conventionally scriplets are not allowed in it.
    and Iterator is only for Container .
    thanx

  • Wait for user input in for loop

    I'm pretty new to labview and I'm having a hard time figuring out how to do this. Basically, I need the user to press a GO button and data aquisition will take place saving it in an array, then the program will wait for the user to press the GO button again and the data aqusition will add more values to the array, and the whole process will repeat 5 times and finally it will average the values.
    To try and figure out how to do this, I tried making a program that loops 5 times and adds a random number to an array with each loop (using shift registers) but I CANNOT figure out how to make each loop iteration wait on the user to press a button. Any advice?

    Hi Roger,
    you can use a dialog in your for loop, or better you use an event structure to react on user inputs. If you use the event structure you can count the button press events and store them in a shift register. With a compare function you can check if your limit is reached and react on it.
    Mike

  • Facing problem in saving data without overlapping in for loop

    Hi,
    I am facing problem in writting data withou overlapping if i run outer loop for 2 or more times and in inner for loop i am getting array in a way I want but when i try to build that array with logging temperature i am not able to do it. Please guide me through ths.
    Thank You
    Hnagpal
    Solved!
    Go to Solution.
    Attachments:
    data storage.vi ‏31 KB
    what i am getting.xlsx ‏10 KB
    what i want.xlsx ‏10 KB

    Thanks odessy27, Matthew Kelton, for replying.
    Matthew Kelton: Thanks for the solution i am adding outer loop so that i can increase the number of row. I am using it for some application which require me to save data several time and i used random number here but originally instead of random number there will be power meter reading and i want to save it every hour and plot it. I am also attaching a file what i made I don't know is this a good way or not. Actually i will also beneeded to plot a graph. But again how to increase a row and without replacing previous data i can write another row.
    Yes i want to make one row for each iteration.
    I attached both files in 2009 version.
    Thank You
    Himanshu Nagpal 
    Attachments:
    desired result.xlsx ‏10 KB
    data storage (1).vi ‏26 KB
    data storage.vi ‏37 KB

  • Can a waveform graph be used without for loop

    i would like to know if a waveform graph can be used without a for loop and if so, how? I tried using a while loop only, but the reading becomes too fast.
    can someone advise

    Dear nebb,
    first of all, graph is usually an offline plot of the acquired data but to use it as an online display u need to use build arrays in for/while loop which keeps on adding new points & plots in waveform graph.
    I am including a vi which incorporates a while loop in which by using build array, points keep on increasing & simultaneously they are plotted in the waveform graph.
    Using for or while loop, it has no concern with speed. it depends on the code inside the loop which makes them faster or slower.
    For making slow readings, you can put some delay inside while looping.
    Hope this works. YOur feedbacks are welcome.
    Best Regards,
    Nirmal Sharma
    India
    Attachments:
    waveform_graph_without_for_loop.vi ‏17 KB

  • Modifying user input in for loop

    Hello,
    I am making a program in order to control two velmex motors. As part of my program, I have two nested for loops. The inner for loop formats a user specified input in ascii commands and the outer loop tells the program how many times to run that specific inner loop pattern. 
    I want to modify the program so that two motors work together in a "snake pattern". In other words, the first outer loop should take the original user input, but then the second time the outer loop runs the direction of one of the motors (all of the associated values with one motor are stored in an individual cluster and these clusters are sorted and placed into an array), should be reveresed by mulltiplying the step size * -1. The third time the outer loop runs, the direction of one the motors (the same motor) should be reveresed again so it is moving in its original direction etc.
    Hope that made sense...
    I have attached my code for clarification - any help would be really appreciated
    Thanks,
    Mridu

    mnanda98 wrote:
    Hi RavensFan,
    Do you mean I need to wire a constant into the VISA read?
    Isn't that exactly what I said?
    Also I am making progess, but now when I run the program I get the error "timeout expired before the operation completed". From what I understand, the timeout would only expire if it is not picking up on the termination character, which I have put in.. Can you look at my code maybe and tell me what may be the problem?
    It looks like you've set the termination character to be a carriage retrrun (decimal 13) just fine.  So if you are getting a timeout error, that means you are either not sending the commands correctly and the device is not responding, or the termination character is not actually a carriage return like you said.
    Do you have any software that the vendor of the device  might have supplied that can prove to you that it is communicating correctly?  Is any data returned in the string indicators when it finally times out?
    Thanks in advance,
    Mridu
     And why do you still have the VISA Close inside the loop closing the port on each iteration?  It belongs after the while loop.

  • How to iterate List in jsp without using for loop

    Hi,
    I am developing a small application is struts. I have one ActionForm file which contain one List like getEmployeeDetailsList(). When I am using this list in jsp page for displaying data. I want to display it as employee name, employee address, employee designation and employee contact no. These all fields are available in the above list. Now what is the problem is that I am using logic:iterate method to iterate data. but this is not sufficient to display all records in order. like employee name should be in one table and they can be vertical not horizontal, employee address is also should be seperate. and same thing with employee designation and contact no. I don't want to use for loop to iterate this list. Please tell me about optionCollection for this list. only employee names should be one drop down and employee designation is also in another drop down.
    Please help. It is really urgent.
    Any help will be appreciated.
    Thanks in advance.
    Manveer

    I'm not sure what you problem is, but one thing you can do is to create a new class and pass the list into its constructor (and store it as a private variable). Then, provide a set of functions in the new class that extracts data from the list and returns it in a form that the various parts of the JSP page wants. For example, one function may return a sorted list of just the employee names. In this way, all the business logic for formatting the data into a form that JSP page likes is hidden inside the new class.

Maybe you are looking for

  • DW CS3 conflict with server & uploading files (please help?!?!)

    I work with one other person and although we work on files locally, when one of us tries to push a file up to the remote server we get an error that reads: "name of person" is currently working on that file (Please enable Check In/Out in the Site Def

  • Different values in GR reversal !

    Hi All, I ahve done a GR receipt with value 1 and then posted an invoice of value 33000. Now when I try to do the reversal of the GR document using MBST I get the reversal document with value -33000 from the invoice. Again I changed the PO value to 3

  • For moderator: where to address a question on music software "finale?"

    i have an older version of finale (2002b) and am having trouble getting the application, which runs in classic mode, recognize the usb ports. i'd like to post the question but there is no forum for this reasonably popular software. where would it be

  • Can't add new bookmarks

    Just recently I am unable to add new bookmarks. All my old ones are there, I just can't add new ones. Usually when I click "bookmark this page" a small black window pops up and allows me to determine which folder i'm going to save the page in, but th

  • Get employee photos with sapnco 3.0

    Hi Experts, I am developing a program with vb .net that show employee photos worked our company. I use sapnco dll. Is there any BAPI to get employee photo with using pernr? Or which table store these photos? And can you give me an example about using