Data entries to array

Hello,
'Looping Table.vi" This VI generates random numbers and gets the real time to plot them into a table. After a certain amount of entries, say 10, the first entry gets deleted and so on...(like First in First out (FIFO)).
I would like the same concept but instead of a random number generator, i would like to control the input with a numeric slider and have the entries shown in an array, with after 10 entries the 1 first gets delted and the 11th entry gets inserted, liek a queue.
Any help would be appreciated! 
Attachments:
Looping Table .vi ‏19 KB
modified looping table1.vi ‏13 KB

duplicate post
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • Data entry in array of clusters

    Hi guys. I have 2 array of clusters in tab. My cluster have different types elements. I need  get referance data entry. 
    I can do it for one array of cluster with dynamic event structure but cant do it for other. 
    My vi in attachment.
    Can anyone help me for solution?
    Thanks.
    Kerem
    Solved!
    Go to Solution.
    Attachments:
    x1.vi ‏21 KB

    Why can't you just duplicate the same for the Array 2? I am not sure what is the actual problem you are facing but duplication did work.
    The best solution is the one you find it by yourself
    Attachments:
    x1_Anand.vi ‏29 KB

  • Data entry type in array of clusters

    Hi i have 4 column array of cluster
    X Y Z & Data entry Type 
    X+Y=Z simply
    I wanna do this 
    when i entry x; data type cell will auto X (not numerical value just "X")
    when i entry z; data type cell will auto Z 
    Then i can build my algorithm.
    How can i do this.
    Thanks.
    Solved!
    Go to Solution.

    As i said, you image displays a STRING table.
    If you want something like Excel with predefined datatypes for columns, an array of cluster can work out.
    But building an algorithm which checks for specific dependencies within a single record/row
    a) is very specific
    b) can get quite complex.
    That being said, you have to start by looking at these dependencies and evaluate if rows can swap/be in arbitrary order.
    Simply stating:
    row 0 => column 0 is of interest
    row 1 => column 1 is of interest
    row 2 => column 2 is of interest
    will most likely not work.
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • How do you store parsed XML data in an array

    Hi, i am trying to complete a small program which implements the SAX parser to parse an XML file. My problem is that i am writing a custom class to store the parsed data into an array, and then make the array available to the main program via a simple method which returns the array. I know this must be very simple to do, but i seem to have developed a mental block with this part of the program. I can parse the data and print all the elements to the screen, but i just cant figure out how to store all the data elements into the array. I will post the class which is supposed to do this, and ask anyone out there if they know what i'm doing wrong, and also, if there is a more effeicient way of achieving this ( i expect there definitely is!! but i have never used the SAX parser before and am getting confused by the API docs on it!!) Any help very much appreciated.
    Here is my attempt at coding the class to handle the parsed XML data
    class Sink extends org.xml.sax.helpers.DefaultHandler
         implements org.xml.sax.ContentHandler{
    Customer[] customers = new Customer[20];
         int count = 1;
         int x = 0;
         int tagCount = 0;
         String name;
    String custID;
         String username;
         String address;
         String phoneNum;
    public void startElement(String uri, String localName, String rawName, final org.xml.sax.Attributes attributes)throws org.xml.sax.SAXException{
    //count the number of <name> tags in the XML file
         if(rawName.equals("name")){
              tagCount++;
    public void characters(char[] ch, int start, int len){
    //get the current string
         String text = new String(ch, start, len);
         String text1 = text.trim();
    //there are 5 elements for each customer found in the XML file so when the count reaches 6
    // i reset this to 1
         if(count == 6){
         count = count - 5;
         if(text1.length()>0 && count == 1){
              name = text1;
              System.out.println(name);
              }else{
         if(text1.length()>0 && count == 2){
              custID = text1;
              System.out.println(custID);
                   }else{
                   if(text1.length()>0 && count == 3){
                   username = text1;
                   System.out.println(username);
                   }else{
                        if(text1.length()>0 && count == 4){
                        address = text1;
                        System.out.println(address);
                        }else{
                        if(text1.length()>0 && count == 5){
                             phoneNum = text1;
                             System.out.println(phoneNum);
                             //add data to the customer array
                             customers[x] = new Customer(name, custID, username, address, phoneNum);
    // increment the array index counter
                        x = x+1;
                        }//end of if
                        }//end else
                        }//end else
                   }//end else
              }//end else
    }//end of characters method
    public void endDocument(){
         System.out.println("There are " + tagCount +
         " <name> elements.");
    }//end of class Sink
    Before the end of this class i also need to make the array available to the calling program!!
    Any help would be much appreciated
    Thanks
    Iain

    Ok, yer going about this all the wrong way. You shouldn't have to maintain a count of all the elements. Basically you are locking yourself into the XML tags not only all being there but are assuming they are all in the same order. What you should do is in your characters() method, put all of the characters into a string buffer. Then, in endElement() (which you dont use btw, you should) you grab the information that is in the string buffer and store it into your Customer object depending on what the tagName is.
    Also, you should probably use a List to store all the Customer objects and not an single array, it's more dynamic and you arent locked into a set number of Customers.
    I wont do it all for you, but I'll give you a good outline to use.
    public class CustomerHandler extends DefaultHandler {
        private java.util.List customerList;  // List of Customer objects
        private java.util.StringBuffer buf;   // StringBuffer to store the string of characters between the start and end tags
        private Customer customer;  // Customer object that is initialized with each entry.
        public CustomerHandler() {
            customerList = new java.util.ArrayList();   // Initialize the List
            buf = new java.util.StringBuffer();   // Initialize the string buffer
        //  Make your customer list available to other classes
        public java.util.List getCustomerList() {
            return customerList;
        public void startElement(String nsURI, String sName, String tagName, Attributes attributes) throws SAXException {
            // Clear the String Buffer
            //  If the tagName is "Customer" then create a new Customer object
        public void characters(char[] ch, int start, int length) {
            //  append the characters into the string buffer
        public void endElement(String nsURI, String sName, String tagName) throws SAXException {
            // If the tagName is "Customer" add your customer object to the List
            // Place the data from the String Buffer into a String
            //  Depending on the tagName, call the appropriate set method on your customer object
    }

  • Is there a date entry widget for XMP custom file info panels?

    Looking through the Custom File Info Panels documentation, the samples, and the default info panels presented in Photoshop, I can't find any reference to a date entry widget - the closest I've seen is the date_static_text widget.
    Is there any way to present an editable, validating date entry field to our end-users through the File Info panel?
    (the info we're wanting to store is a release date so it's user-specified, and not derivable from the file in any way)

    Mark,
    The PDF/A extension schema provides a big step to the self-sufficient functionality that you are asking about. It permits the XMP schema description information of custom XMP schemas to be embedded into the XMP as payload so that the file can be opened in years to come and the target metadata acurately interperted. Currently, PDF tools are active candidate to make use of this facility. However, there is nothing preventing future use with other file formats, and other tools (via plug-ins?).
    It does not include vocabulary, static text, and panel presentation layout information.
    http://www.pdfa.org/doku.php
    It defines a "known" subset of standard XMP properties from the 2001 XMP Spec. Everything else is "custom".
    You could craft a custom File Info "template" with the PDF/A extension for your custom XMP fields. Then import the template into each file.
    The PDF/A extension schema itself is implemented with multi-dimensional XMP arrays. MetaGrove Plug-in dialog screen shots can be viewed on http://www.poundhillsoftware.net/Acrobat.htm
    Regards,
    Carl Rambert

  • Mixed Data Type Table Control for Data Entry

    Hi Guys --
    I'm attempting to do error-checked data entry,
    My data is mixed: path, boolean, and numeric.  The natural organization is an array of clusters.  For instance, the cluster element would look like "path, boolean, numeric, numeric"  and I would have many rows of this data cluster.  To further complicate things I have to dynamically define the number of numeric elements in the cluster (tricky already) and also dynamically define the length of the array.
    I find the table control to be ideal to handle the dynamic nature of the data for editing.  I can easily use scroll bars to navigate to the appropriate part of the data.  I can delete rows and columns etc.
    On the other hand, the table can only handle string data.  I find that doing data checking and type conversion on the table elements to be extremely cumbersome. 
    I think what I'm looking for is a Table Control with ability to handle controls as elements.  From what I've read in this list and personally experienced, that functionality doesn't exist.
    Does LV have in-built functionality that I'm overlooking to resolve this problem?  Is there a third-party library that would do the job?
    Thanks,
    John

    Hi Ben --
    I think perhaps that I wasn't clear in my description. 
    As I pointed out, my data is organized naturally as an Array of Clusters.  More descriptively, my data looks like spreadsheet data; some text, some numbers.  I need to add rows and columns dynamically.  I need to be able to resize column widths dynamically... and while the program is executing.
    The Table Control does all of this.  The intuitive way that the Table Control permits a user to enter data is also good for my user.  The Array of Cluster data looks like spreadsheet data and a Table looks close enough to a spreadsheet.  A Table permits one to insert and delete rows, resize columns widths, and scroll around.
    I don't see that I get these features with an Array of Clusters Control.
    The issue with the Table Control is the lack of in-built data types, so I spend an inordinate amount of time doing type-conversion and range-checking. 
    At this point I'm pretty much convinced that LV doesn't have the in-built capability that I'm looking for. 
    I am curious if there are any LV libraries or Active-X controls somewhere that would implement the functionality that I require?

  • Upload data from excel file to "Fast Data Entry" in FB60

    Hi,
    I have a requirement from users, they want to load data of G/L accounts items in FB60 using "Fast Data Entry" from an excel file.
    I did some research and found out that the framework to transfer clipboard data into an SAP table(http://www.synactive.com/examples/example0016.html) seems to be the suitable solution.
    However, I still cannot make it work.
    Do you have any suggestion for my case ? How can I load data from an excel file to the transaction FB60?
    Thanks in advance,
    Hung

    Dear Hung,
    You can upload data through LSMW (Batch Input).
    But you need to convert your excel sheet into CSV format or txt format.
    Please take help of your ABAP team if required.
    This will accommodate your requirement.
    Regards
    Saurabh

  • Adding data to an array

    hi need help.. i need to add missing data for the array
    YY-Year
    MM-Month
    DD-Date
    mm-minutes
    ss-seconds
    Data  1YYMMDD mmss0 
    20.8 1090828 05050
    1.2   1090829 10150
    7.2   1090901 08400
    the above array is the data where i need to insert data for data til 090831
    as below
    Data  1YYMMDD mmss0 
    20.8 1090828 05050
    1.2   1090829 10150
    0      1090830 0
    0      1090831 0
    7.2   1090901 08400
    how to do this? and i need to check for every month is there data missing inbetween? Plz help
    Solved!
    Go to Solution.

    Yes.  You will need to iterate through your array.  Index out the current index and the index +1.  Translate the text into dates and use the date functions to determine if a date is missing.  If not, increase the index by 1 and repeat.  If a date is missing, insert a row and set the date to be the last date +1.  Repeat increasing your index which should make it the row you just added.

  • Without loops how can i read data from associative Array??

    Hi all,
    I am facing scenario like...
    i need to read data from associative array  without using loops is it possible,
    CREATE OR REPLACE PACKAGE BODY test_pkg IS
        TYPE t1 IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
       -- in array we can expect more than one row or sometimes no data also.
      FUNCTION test1(vt1 T1 DEFAULT CAST(NULL AS t1)) RETURN NUMBER IS
      BEGIN
        -- basically in array we'll get data of column2
        -- this loop should satisfies table1.colum2 = nvl(NULL, table2.colum2 )if array is null.
        -- if array is not null then only compare with array values
        FOR i IN (SELECT t1.colum1,t1.column2
                         FROM table1 t1, table1 t2
                              WHERE t1.colum1 = t2.column1
                                AND t1.colum2 = nvl(vt1, t2.colum2)
          LOOP
            generateTEXT(i.colum1, i.colum2);
         END LOOP;
      END test1;
    END test_pkg;
    in table1 we have date like...
    colum1          column2
    Jan                  1
    Feb                  2
    Mar                  3
    if i call select test_pkg.test1(1) from dual then output should
    be Jan..
    and
    select test_pkg.test1(null) from dual then it should display all elements from table1.
    Jan                  1
    Feb                  2
    Mar                  3,
    Thanks for your quick replay..

    i need to read data from associative array  without using loops is it possible,
    No - you would need to create a SQL type and then use the TABLE operator to unnest the collection.
    create or replace TYPE my_nums IS TABLE OF INTEGER;
    DECLARE
    --  TYPE my_nums IS TABLE OF PLS_INTEGER INDEX BY PLS_INTEGER;
      v_nums my_nums := my_nums(1, 2, 3);
      v_total number;
    BEGIN
      select sum(column_value) into v_total from table(v_nums);
      DBMS_OUTPUT.PUT_LINE
        ('Sum of the numbers is ' || TO_CHAR(v_total));
    END;
    Sum of the numbers is 6

  • How to select a single row in a report for data entry?

    Hello All, and Greetings.
    I am a newcomer, with no experience in Apex, and in need of help.
    I have to generate a report with some read-only columns and two write columns. These will be the result of a SQL query.
    For the sake of robustness in data entry, a row has to be selected prior to data update. The document specifies that a radiobutton for each row be present, and the corresponding row selected accordingly by clicking its radiobutton. There could be any number of rows returned in the report, which means that the number of radiobuttons will vary dynamically according to the number of returned rows.
    1. So my question is, how do I construct the page to do this? Please remember I am a newbie, so detail will be appreciated.
    2. Another question is, how do I change the fonts and colours of the names displayed along with the listboxes?
    Thank you very much for your attention. Any help will be warmly received.
    With regards,
    Arindam.

    You may find this article useful: http://balusc.blogspot.com/2006/06/using-datatables.html
    P.S: please don't reply with "but I cannot read and write code, I can only drag'n'drop!".

  • Open data slice for data entry and close afterwards

    Dear all,
    I have created one data slice for a characteristic combination country xy in order to prevent the data entry within the data entry query for the user. But for some reason I have to run a planning function in order to summarize some values and write a total value in the characteristic e.g. country xy.
    The planning function brings out an error message because this can not be executed due to the fact that this combination is protected.
    Is there a way to open the data slice before the planning function is writing the data in the cube? I have tried to to this in the Data slice exit, but I do not have an idea how to open the DS, save the data and close the DS again.
    We are running NW BI 7.0. Any ideas would be great.
    Best regards,
    Stefan from Munich/Germany

    I did something like this by creating an FM and calling that FM from a FOX function. I think you will have to use three commands to execute three functions one after the other (and not combine them in one planning sequence) - first one will switch off the data slice, next will be your planning function containing the logic, and the last will switch it back on.
    The FM would be something like below:
    FUNCTION Z_SWITCH_DSLICE.
    *"*"Local Interface:
    *"  IMPORTING
    *"     REFERENCE(I_INFOPROV) TYPE  RSINFOPROV
    *"     REFERENCE(I_DSNR) TYPE  RSPLS_DSNR
    *"     REFERENCE(I_STATUS) TYPE  I
    *** This function imports the name of a real-time Infoprovider and a Data Slice number
    ***        and a parameter I_STATUS. If I_STATUS is 1, data slice is activated
    ***        If I_STATUS is -1, data slice is de-activated
    data wa_ds type rspls_ds.
    select single * from rspls_ds
            into wa_ds
            where infoprov = I_INFOPROV
              AND objvers = 'A'
              AND dsnr = I_DSNR.
    if I_status = 1.
       wa_ds-used = 'X'.
    elseif I_status = -1.
       wa_ds-used = ''.
    endif.
    update rspls_ds from wa_ds.
    ENDFUNCTION.
    The Fox code will be like below -
    CALL FUNCTION Z_SWITCH_DSLICE
        EXPORTING
           I_INFOPROV = <infoprov name>
           I_DSNR = <Data Slice Number>
           I_STATUS = <0 or 1>.

  • How can I put data in an array which will be used in SPC plotting

    In my program, it will generate data continuously and I would like to store these data time to time in an array. Could you suggest me a method?
    For example, 1.77,1.67,1.56,1.89,1.99... (these data generated continuously)
    1st second: 1.77 1.67,1.56,1.89,1.99( store in array)
    After 1 second: 1.67,1.56,1.89,1.99,1.33 (remove the first one data in the array and replace it with the following generated data)
    How can I remove the data in the array and replace it with the other data?
    Could you give me some examples?
    Thanks

    Check the attached VI. It includes two methods. You can choose the one you like. I prefer the bottom one because only one extra memory for the subarray is created. The top one makes two copies because of the resize.
    Joe
    Attachments:
    Simple_Numerical_Que.vi ‏26 KB

  • How to use the same variable value for data entry and the planning sequence

    Hi,
    the scenario is the following:
    Using the WAD template a user enters cost center plan data. The cost center is selected by the chosen value for the variable "V1".
    Afterwards he shall push a button which starts a planning sequence (including saving the data and further functions). This planning sequence uses a filter that also contains the variable "V1".
    What or where has it to be defined that the planning sequence uses automatically the same value for the variable "V1" as selected for the data entry?

    You have to define in the planning function. The planning sequence is only a sequence and it read the planning functions underneath it.
    Ravi Thothadri

  • First Day of Week in Data Entry Profile

    Does anyone know if there is a standard SAP RFC i can use in my Web Dynpro application to get the First Day of Week entry in a user's Data Entry Profile?
    Thanks,
    -Kevin

    Hello Kevin,
    Function Module returns the System Date from that SAP System(R/3). I have checked this BAPI with '200743 - current week' GET_WEEK_INFO_BASED_ON_DATE, it returns proper data like Start Date and End Date.
    I Assume, you are using this in your Java WD. You can write your own function for this. This will return the day of the week.
    Calendar xmas = new GregorianCalendar(2007, Calendar.SEPTEMBER, 23);
    int dayOfWeek = xmas.get(Calendar.DAY_OF_WEEK);
    wdComponentAPI.getMessageManager().reportSuccess("Day : "+dayOfWeek);
    Note : - week starts with 0 . 0 - Monday 6 -Saturday.
    Regards,
    Sridhar

  • Data entry form problem - form in query-only mode

    Hi there,
    I am trying to create an data entry form to insert recordacross 2 out of 3 tables. The last of the four tables already have details and does not need to have record inserted into.
    This is the scenario, my four tables are Factory, Employee, Works_in. Works_in resolves a many to many relationship between Factory and Employee
    Now for a person to be employed in a factory, he must be assigned to a factory.
    I have a list of factories already in the database. After choosing a factory from the database, I want to insert records to do with his Fname, Lname, Hiredate bla, bla, bla to the Employee table.
    I have a single form with Factory as the master, and 2 tabs each for Employee and Works_in.
    After linking all my tables with the ability to choose a factory first on the master form from a combo box and after inserting records into the other forms, it says form running in query-only mode.
    What do you think?
    Many thanks in advance.
    Cube60

    I think that's too much of the wrong information.
    It sounds like you have multiple forms. Are they Modal or Non-Modal?
    What code do you use to call the form that's not working?
    Does it work initially and then stop working?
    James.

Maybe you are looking for

  • Regarding performance tuning for BSEG & BKPF table data fetch

    Hi Friends:    Plz see the below select queries. This is really impacting the performance of my report. Plz suggest the steps to increase the performance of the report.Points will be rewarded. Thanks: FORM GET_DATA . Selecting the Document number fro

  • No sound g60-235DX Windows XP only after standby

    Thanks to CherylG and Provost, I was able to convert the above said computer from Vista to XP.  The thing runs great, except for one small annoyance... When I bring the computer back from standby, there is no sound. The Conexant 221 driver is there,

  • System Preferences - Web Sharing...

    I've enabled Web Sharing and have been using it without issues, but recently (within the last week) I noticed that in the Web Sharing properties, where is usually displayed the "computer's website" and "personal website" url's as being "http://ip add

  • How to change Background colors in photos

    Hi all, I could use some help with changing background color of attached example.  I want to be able to change background of this photo and have a few examples of it with blue, red and green background color. any help is appreciated. Thanks, Den

  • How to merge partitions in Windows Server 2008 quickly and effectively?

    How to merge partitions in Windows Server 2008 quickly and effectively?