How to insert delay in array?

in my program i need to send array for control 5 servo motors , but i need to send them with delay between each number, it  suppose to control pick and place robot, any idea ?
is it possible to apply delay within array? its urgent thanks 

erfan wrote:
I need delay between arrays, for instance if i send 45 56 78 87 54 for my servo motors (there are five servo motor ),  i need delay between this number,.., 
Your statements are confusing and conflicting. You talk about "this number" but show five numbers. Do you need delays between arrays (as you just said and as your code already does) or delays between the elements of the array?
If you need a delay between the elements, you need to add a small inner FOR loop containing the write node and autoindex over the blue 1D array, similar to steve's suggestion..
If this is not the solution, you need to be much clearer in your description, for example describe in detail how the delay should look, e.g.:
 45 56 78 87 54 delay
 or 45 delay 56 delay 78 delay  87 delay  54 delay
or something esle
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • How to insert delay without using loops, and how can I use variable to store data in labview

    Hi all,
    I am new to Labview and I realized that quite often I am in condition to require a delay beween two functions or elements.. how can we insert a delay in such cases?
    I know how to use delays in a loop. but don't know how to inser some time delay between two elements.
    I have one more question, I know its a bad practice to post 2 questions in 1 thread.
    How can I use a temporary variable to store data, So far I am storing it in an indicator by making it invisible in front panel and making local variable of that indicator, is it the right way to do it ?
    Thanks in advance.

    Generally, LV doesn't have variables in the same sense that most languages do. You can use indicators to perform the same function as variables, but as Adnan pointed out, you run the risk of having race condition and it creates data copies, which is a problem if you have a lot of data. In most cases, you should use wires to perform the function of variables, which is to store data and make it available to the different functions in your code. Instead of thinking about variables, you need to think about data (something like "I have the data coming out of this function. Where does it need to go?").
    Try to take over the world!

  • How to insert int type array value to String type value?

    public class wood
         public static void main (String args[])
              int a[]={1};
              String b[]={" "};
              b=a[0];
    }how can I do it??I know it is int type, but how to insert a[0] to b[0]?

    I don't understand this statement.
    What I want to know is
    1) why are you trying to convert an int[] to a String[]
    2) are you trying to convert from a int[] to String[] or from an int[] to a String (i.e. treating the ints as chars or even simply concatenating there String values to a single String) and , once again why
    There is probably a better way to accomplish your goals, but without cleary stating your goals we cannot help you. And as far as there being multiple int values, so what, the code snippet I posted would work for a hundred int values, you would just need to make the String[] long enough and loop through the values, you can't just simply do it all at once (unless of course, they are to be treated as char values, in which case you can probably cast your int[] to a char[] and use new String).

  • How to insert a 1d array line into a 2 d array?

    I have a vi that acquire the signals of several pulse encoder and store it into a 1d array, and I want to move these data to a 2d array and fill it. I mean I want to acquire signal and store at line 1 of the 2d array, then acquire again and store at line 2 of the 2d array and keep going like this successively.
    how can I do that?
    Solved!
    Go to Solution.

    labvlearner wrote:
    I have a vi that acquire the signals of several pulse encoder and store it into a 1d array, and I want to move these data to a 2d array and fill it. I mean I want to acquire signal and store at line 1 of the 2d array, then acquire again and store at line 2 of the 2d array and keep going like this successively.
    You need to be careful with the terminology, because there are two very different scenarios:
    You have an existing 2D array and you want to insert a column(or row), thus growing one of the dimensions by one and moving everything to the right (or bottom) over one slot. (similar to "insert column" in excel)
    You have an existing 2D array (possibly all zeroes at the beginning) and you want to replace an existing column with new data. (many newbies call that "insert" too, even though it is not)
    If you know the final size of the 2D array, option 2 will be orders of magnitude more efficient, because it avoids constant memory allocations. Every time (almost) you grow an array, it needs to be recreated at a new memory location because arrays need to be contiguous in memory.
    LabVIEW Champion . Do more with less code and in less time .

  • How to insert 2-D array of elements in excel sheet

    I have a 2-D array of elements. I want to insert this array into an excel sheet and display the data in a graph. I used the example "excel insert table" but the problem with that VI is, it is inserting the elements cell by cell which is taking long time. I am wondering whether there is way to insert a complete column or row into excel sheet at a time.
    Thank you,
    Mudda.

    Hi,
    Try this vi which inserts the table in one operation. You can modify it to suit your purposes.
    Hope this helps.
    Edit: Should note that it works for both string and numeric array inputs.Message Edited by DavidT on 06-29-2005 10:09 AM
    Attachments:
    Excel Insert Table (LV7.1).vi ‏100 KB

  • How to insert a 2D array into the end of X axis of the initial array?

    Hi, friends, I have a question and look for an advice. I have several input data, each of which has 4 rows and unknow columns. Each time I receive the input, I need to combine it to all of the previous ones by adding it to the end of X axis of the previous combined data. I must do it because, later, I need to run my model and my model read input for each column of 4 rows. How should I do it? Also, should I initiate an array before reading all of the inputs? The inputs are F32 format. Thank you very much for any of your advice.

    Building a 2D array row-by-row is easy. You either use "build array" if you need to update the indicator during the run, or you simply autoindex at the loop  boundary (FOR or WHILE).
    Two possibilities are shown in the attached image. If your arrays are getting large and you use a while loop, there are possibilities that are more memory efficient. You would initialize a 2D array (e.g. filled with NaNs) of an upper boundary of the final expected size, then replace rows as you go.
    (Notice that if you use autoindexing on a FOR loop, the final size is known from the beginning so memory can be allocated efficiently)
    Message Edited by altenbach on 11-01-2006 09:19 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    AppendRows.png ‏5 KB

  • How to insert a new array of elements to a build array function such that the elements will be given one by one

    i 'am attacing one VI. In this VI i had a for loop into it I need to insert a section of commands only when the case loop selection is on state. How can I do it. Please help me to overcoem this problem
    Attachments:
    sequence post-case for selection.vi ‏15 KB

    Can you elobrate please. When boolean is FALSE then what you want to send otherwise when boolean is true then what you want to send ?
    Kudos are always welcome if you got solution to some extent.
    I need my difficulties because they are necessary to enjoy my success.
    --Ranjeet

  • How to insert array of records in Storage table and  Nested table same time??

    Hi,
    I am using ProC++ ( Oracle 8i) . I want to insert a host array
    in a table. That table has a nested table in it. So for every
    record in my host array, there are muliple records to be
    inserted in Nested table. How is this possible using pro*C??
    Pls help.
    Thanks
    Nivedita

    Have a look at the Oracle 9i PL/SQL manual, which has an example.

  • How can I do to insert a 1D array in a line of a table or a 2D array ?

    I have some vectors I concatenate in a 1D array when I pushed a button. Furthermore, when I pushed the same button, I would like to insert this 1D array in a line of a 2D array or in a line of a table. How can I do ?
    Thanks.
    Cyril.

    Hi,
    to insert 1D array into 2D array you must use
    Functions->Array->Insert Into Array.
    Wire your 2D array to array input of this vi, then specify the row index you want your 1D array will be, and then wire your 1D array to element input. The output will be what you want. The length of all 1D arrays must be the same, otherwise you may loose some data.
    If you want to add data to text table then you need first to convert your numeric array to textual form with
    Function->String->String/Number Coversion VIs
    Good luck.
    The example is attached.
    Oleg Chutko.
    Attachments:
    Insert.vi ‏17 KB

  • How to insert elements into an array after each iteration of a for loop

    I am new to labview and working on an application where I am supposed to store an element into an array (without overwriting) after each iteration in a for loop. I have tried using Build Array Function keeping the indicator outside the for loop and played with indexing but didn't work. Please suggest me an idea how to do it.
    Thanks
    Solved!
    Go to Solution.

    Thank you for your suggestion.Here is my actual application attached . In the first image, a difference in time is evaluated and an enum const of insert into array is passed to the shift register where it takes to Insert element into array phase (Second image). I need to enter the time difference into an array after every loop iteration. Please have a look and could you let me know where I am mislead.
    Attachments:
    Image 1.JPG ‏88 KB
    Image 2.JPG ‏71 KB

  • How to auto insert a number array with size of 20 into a named excel file with the positon is from A1 TO A20?i use lv6.1

    can you give me a example vi for it ?thanks a lot!
    how to auto insert a number array with size of 20 into a named excel file  with the positon is from A1 TO A20?i use lv6.1

    You don't need us to give you an example, as the example already comes with LV. Go to Help>>Find Examples and search for "excel". You will find an example called "write table to XL". You should note that the example doesn't do that exactly, because it writes a 2D array from 2 to N.
    You can modify the example by using only one for loop (instead of nested loops) with a 1D array or by going into the Set Cell Value and modifying it to accept a second cell value for the Cell2 terminal and wiring in a 1D array instead of the single string. If you do modify it, be sure to save it under a different name, so you don't overwrite the original.
    To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
    In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).
    Try to take over the world!

  • How to insert Integer array in a MySql DataBase

    Now i am doing one swing application,in that i have List box,My doubt is ,How to insert the mutiple seleted value into database.

    http://java.sun.com/docs/books/tutorial/jdbc/

  • How to insert a word document or an RTF document into RichTextEditor?

    How to insert a word document or an RTF document into af:richTextEditor. I am using Apache POI for reading the Word document and getting its contents. I am able to display the whole content of the document except the table and image within the document. The data in the table is getting displayed as a string and not as a table inside the editor.
    Can we insert a word/RTF document into a rich text editor?
    Can we insert images into the rich text editor?
    The following is the code that I used. On clicking a button the word document has to be inserted into the <af:richTextEditor>.
    <af:richTextEditor id="rte1" autoSubmit="true"
    immediate="true"
    columns="110" rows="20">
    <af:dropTarget dropListener="#{SendEmail.richTextEditorDrop}">
    <af:dataFlavor flavorClass="java.lang.String"/>
    </af:dropTarget>
    </af:richTextEditor>
    <af:commandButton text="Insert at position" id="cb2">
    <af:richTextEditorInsertBehavior for="rte1" value="#{RichTextEditorUtil.docFile}"/>
    </af:commandButton>
    Java Code: I am using Apache POI for reading the word document.
    import org.apache.poi.hwpf.HWPFDocument;
    import org.apache.poi.hwpf.extractor.WordExtractor;
    public String getDocFile() {
    File docFile = null;
    WordExtractor docExtractor = null ;
    WordExtractor exprExtractor = null ;
    try {
    docFile = new File("C:/temp/test.doc");
    //A FileInputStream obtains input bytes from a file.
    FileInputStream fis=new FileInputStream(docFile.getAbsolutePath());
    //A HWPFDocument used to read document file from FileInputStream
    HWPFDocument doc=new HWPFDocument(fis);
    docExtractor = new WordExtractor(doc);
    catch(Exception exep)
    System.out.println(exep.getMessage());
    //This Array stores each line from the document file.
    String [] docArray = docExtractor.getParagraphText();
    String fileContent = "";
    for(int i=0;i<docArray.length;i++)
    if(docArray[i] != null)
    System.out.println("Line "+ i +" : " + docArray);
    fileContent += docArray[i] + "\n";
    System.out.println(fileContent);
    return fileContent;

    Hi,
    images are not yet supported. Its an open enhancement request for the rich text editor.
    For tables, it seems they are supported but in a basic way (just HTML 4 style) if I interpret the tag documentation correct
    http://download.oracle.com/docs/cd/E15523_01/apirefs.1111/e12419/tagdoc/af_richTextEditor.html
    Frank

  • How to declare a dynamic array in java

    I have to use a dynmic array of boolean and the size of this array will defiend throuh the run of the program to explian
    boolean[][] a;
    a=new boolean[number_of_ raw][number_of_ culm];
    after the program run the number_of_ raw and number_of_ culm will defind..so if any body know how to declare this kind of arraies in java please help me.

    My previous post gives me an idea on how to use ArrayList of ArrayList as dynamic 2 dimensional array.
    More info bellow
    ArrayList rows = new ArrayList()
    ArrayList columns_of_row0 = new ArrayList()
    rows.insertAt(0) = columns_of_row0;
    ArrayList columns_of_row1 = new ArrayList()
    rows.insertAt(1) = columns_of_row1;and so on..
    You can't use the code exactly or similar way, it would depend on how this array grows in your application.
    But this and my previous post should give an idea on how to insert and retrieve elements from ArrayList when
    treated as 2 dimensional array.
    Hope this helps.

  • Insert element into array problem

    Hi,
    I have problem about how to insert value into an array. here is one section, could anyone help me to insert input value into array and delete the first value in the array. Gap means to fill in code
    void Ins(String name)
    // Insert name or increment its multiplicity.
    // If the bag is full remove the oldest entry.
    int i; // Running index on BagName
    int target; // if target < n then name.equals(BagName[target]);
    // else target == n
    Date EntryDate; // Current date and time
    // Get current date and time
    EntryDate = new Date();
    BagDate[n] = EntryDate.toString();
    Mult[n] = n+1;
    BagName[n] = name;
    n++;
    // Search bag for name
    // Gap 2
    // Assertion: target < n => name.equals(BagName[target])
    // else target == n
    // Update Mult if target < n
    // Gap 3
    // Make room for and insert name if target not found
    } // Ins(String name)
    Message was edited by:
    sibojava
    Message was edited by:
    sibojava

    Do you have several accounts?
    See this thread, it's the same question:
    http://forum.java.sun.com/thread.jspa?threadID=5143232
    Kaj

Maybe you are looking for

  • Running iTunes as another user - iTunes window keeps popping up

    My missus and I have one iPod and want to just use one library on iTunes (hers). Therefore when I want to use iTunes, I run it under her user credentials ("Run as" option in Windows XP). This loads her library & settings no problem, but the iTunes wi

  • Period and Fiscal Year in a report selction screen (3.1 I version of SAP.)

    Hi Team, I have a requirement on a Zreport. Suppose if we are executing a report in the month of March (3)-fiscal year 2011 and if I select a variant and the varinat should populate period as Feb (2 period) and fiscal year as last year (2010). In Nut

  • Firmware Update 1.2.2

    Will apple be re releasing the firmware for xp and vista computers or are they going to make adjustments to it so that it can work on 2000 as well as xp and vista?

  • Additional selections for F-32

    Hi Gurus, SAP has given reference under additional selections for F-32. Is it possible to have one more reference under this this screen as reference2. Pl let me know. Thanks in advance

  • BIG full inventory cycle count

    Hi Experts, We have a BIG inventory coming up in a month and it seems that no one knows how to create a CC for all the parts in our inventory... we need to count everything in stock and record it in SAP. as of now MI31 will not work... because the AB