How do I add new data to the same file in a State Machine?

Hello,
I have a State Machine, with a State where 3 samples of data are collected in a For Loop. I would like to save this data in a file and keep adding new data to the same file each time I get to this state. The problem I'm running into is that each time I reach this State, my old data in the Excel file gets replaced with the new data instead of being continuously added in the same file.
Ive tried Shift Registers but I may not be using them correctly since my file keeps displaying only 3 new data points.
Any ideas will be appreciated!
Thank you, so much.
-Peter

Where should I place these shift registers? Where should I place my File I/O VIs? Is it possible to use the Write to Spreadsheet File VI in this situation?
Ive attached a very simple example of the problem. Thank you.
Attachments:
StandardStateMachine 2.vi ‏16 KB

Similar Messages

  • How can i save differnts data in the same file?

        Hi all,
    i need some help.  I'm working  on a project  for students an th university. We have to devellop  a programm for LEDs measurement so that all the measure data must be save in de same file.  We have develloped the programm, but we have  a big problem to save the measure in the same File.
    When we do the first  measure , the file must be created and the fisrt data gonna be save in this file that is correct
    When wie do the second measure, the third  ....  measure, the programm ask us to comfirm the file or where we want save our data
    We need some help, to know how we can change  or devellop this programm so that, for the first measure , the file must be created and the fisrt data gonna be save in this file,  the second measure the same file must be chose and from the third and more the measure data must be automatically save in this file without the programm ask to chose or to confirme a file? 
    I attach a part off this programmm
    Thanks
    Attachments:
    SR830DSP19.vi ‏212 KB

    Move the "File Dialog" where you open your new file out of the while loop. Only pass the refnum inside the loop.

  • How to add new fields to the DME file in F110

    Hi,
    We have a requirement add new fields to the file that is used in  F110.
    .I did go in to DMEE transaction but I hae no idea how to add new fileds to the existing file.
    Can anybody please help me in resolving the issue.
    Thanks
    Venkat
    Edited by: Venkat R on Jun 8, 2009 8:45 AM

    Hi,
    There is no function module for that, We have created our own function module and attached to that field.
    Refer the below code. This will fetch the document number.
    DATA: lwa_item   TYPE dmee_paym_if_type,
            l_fpayp   TYPE fpayp,
            l_fpayhx TYPE fpayhx,
            first_flag TYPE c,
            lv_lifnr   TYPE lifnr,
            voucher_id TYPE string,
            voucher TYPE string,
            invoice_id TYPE belnr_d,
            voucher_len1 TYPE i,
            voucher_len TYPE i.
      TYPES:
      BEGIN OF lt_regup,
            xblnr TYPE xblnr1,
            belnr TYPE belnr_d,
      END OF lt_regup.
      DATA: lt_regup TYPE STANDARD TABLE OF regup,
            lv_regup TYPE regup.
    Hope this helps.
    Raja.A
    Edited by: Raja.A on Feb 16, 2011 7:17 PM

  • How can I add new songs to the top (not the bottom) of my playlist in iTunes?

    How can I add new songs to the top of my playlist in iTunes?
    I thought thats what it did before but now it automatically adds new songs to the bottom of the list.
    Not a huge issue but an annoyance.

    Go to your Music library
    Then, Click Playlist
    Then, Click the sort arrow until it points down.

  • How can I write new objects to the existing file with already written objec

    Hi,
    I've got a problem in my app.
    Namely, my app stores data as objects written to the files. Everything is OK, when I write some data (objects of a class defined by me) to the file (by using writeObject method from ObjectOutputStream) and then I'm reading it sequencially by the corresponding readObject method (from ObjectInputStream).
    Problems start when I add new objects to the already existing file (to the end of this file). Then, when I'm trying to read newly written data, I get an exception:
    java.io.StreamCorruptedException
    at java.io.ObjectInputStream.readObject0(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    Is there any method to avoid corrupting the stream? Maybe it is a silly problem, but I really can't cope with it! How can I write new objects to the existing file with already written objects?
    If anyone of you know something about this issue, please help!
    Jai

    Here is a piece of sample codes. You can save the bytes read from the object by invoking save(byte[] b), and load the last inserted object by invoking load.
    * Created on 2004-12-23
    package com.cpic.msgbus.monitor.util.cachequeue;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.RandomAccessFile;
    * @author elgs This is a very high performance implemention of Cache.
    public class StackCache implements Cache
        protected long             seed    = 0;
        protected RandomAccessFile raf;
        protected int              count;
        protected String           cacheDeviceName;
        protected Adapter          adapter;
        protected long             pointer = 0;
        protected File             f;
        public StackCache(String name) throws IOException
            cacheDeviceName = name;
            f = new File(Const.cacheHome + name);
            raf = new RandomAccessFile(f, "rw");
            if (raf.length() == 0)
                raf.writeLong(0L);
         * Whne the cache file is getting large in size and may there be fragments,
         * we should do a shrink.
        public synchronized void shrink() throws IOException
            int BUF = 8192;
            long pointer = getPointer();
            long size = pointer + 4;
            File temp = new File(Const.cacheHome + getCacheDeviceName() + ".shrink");
            FileInputStream in = new FileInputStream(f);
            FileOutputStream out = new FileOutputStream(temp);
            byte[] buf = new byte[BUF];
            long runs = size / BUF;
            int mode = (int) size % BUF;
            for (long l = 0; l < runs; ++l)
                in.read(buf);
                out.write(buf);
            in.read(buf, 0, mode);
            out.write(buf, 0, mode);
            out.flush();
            out.close();
            in.close();
            raf.close();
            f.delete();
            temp.renameTo(f);
            raf = new RandomAccessFile(f, "rw");
        private synchronized long getPointer() throws IOException
            long l = raf.getFilePointer();
            raf.seek(0);
            long pointer = raf.readLong();
            raf.seek(l);
            return pointer < 8 ? 4 : pointer;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#load()
        public synchronized byte[] load() throws IOException
            pointer = getPointer();
            if (pointer < 8)
                return null;
            raf.seek(pointer);
            int length = raf.readInt();
            pointer = pointer - length - 4;
            raf.seek(0);
            raf.writeLong(pointer);
            byte[] b = new byte[length];
            raf.seek(pointer + 4);
            raf.read(b);
            --count;
            return b;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#save(byte[])
        public synchronized void save(byte[] b) throws IOException
            pointer = getPointer();
            int length = b.length;
            pointer += 4;
            raf.seek(pointer);
            raf.write(b);
            raf.writeInt(length);
            pointer = raf.getFilePointer() - 4;
            raf.seek(0);
            raf.writeLong(pointer);
            ++count;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#getCachedObjectsCount()
        public synchronized int getCachedObjectsCount()
            return count;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#getCacheDeviceName()
        public String getCacheDeviceName()
            return cacheDeviceName;
    }

  • Add new line in the Flat file based on the field value

    Hi,
    Following is my Flat File -
    Customer   X      Y
    1001          1       2
    1002          0       1
    Based on the X and Y value I need to add new lines in the Flat file. If X>0 then add a new line with repeating row and Y>0 add again a new line with repeating row. If X or Y=0 then no need to add any repeating new line. 
    So, here for the above example I need output as-
    Customer    X    Y
    1001          1      2
    1001         1       2
    1001         1       2
    1002          0       1
    1002          0        1
    Suggest how we can achieve this?
    Regards,
    Tridib Konwar 

    Hi Tridib,
        I tried your scenario and You will have to use the custom xslt to get the expected result.
        Please find bellow the xslt code which you can use in your map.
    <?xml version="1.0" encoding="utf-16" ?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var" version="1.0" xmlns:ns0="http://PracticeAtul.XYFlatFileSchema">
    <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
    <xsl:template match="/">
    <xsl:apply-templates select="/ns0:XYComp" />
    </xsl:template>
    <xsl:template match="/ns0:XYComp">
    <ns0:XYComp>
    <XYComp_Child1>
    <XYComp_Child1_Child1>
    <xsl:value-of select="XYComp_Child1/XYComp_Child1_Child1/text()" />
    </XYComp_Child1_Child1>
    <XYComp_Child1_Child2>
    <xsl:value-of select="XYComp_Child1/XYComp_Child1_Child2/text()" />
    </XYComp_Child1_Child2>
    <XYComp_Child1_Child3>
    <xsl:value-of select="XYComp_Child1/XYComp_Child1_Child3/text()" />
    </XYComp_Child1_Child3>
    <xsl:value-of select="XYComp_Child1/text()" />
    </XYComp_Child1>
    <xsl:for-each select="XYComp_Child2">
    <XYComp_Child2>
    <XYComp_Child2_Child1>
    <xsl:value-of select="XYComp_Child2_Child1/text()" />
    </XYComp_Child2_Child1>
    <XYComp_Child2_Child2>
    <xsl:value-of select="XYComp_Child2_Child2/text()" />
    </XYComp_Child2_Child2>
    <XYComp_Child2_Child3>
    <xsl:value-of select="XYComp_Child2_Child3/text()" />
    </XYComp_Child2_Child3>
    </XYComp_Child2>
    <xsl:if test="XYComp_Child2_Child2/text()!=0">
    <XYComp_Child2>
    <XYComp_Child2_Child1>
    <xsl:value-of select="XYComp_Child2_Child1/text()" />
    </XYComp_Child2_Child1>
    <XYComp_Child2_Child2>
    <xsl:value-of select="XYComp_Child2_Child2/text()" />
    </XYComp_Child2_Child2>
    <XYComp_Child2_Child3>
    <xsl:value-of select="XYComp_Child2_Child3/text()" />
    </XYComp_Child2_Child3>
    </XYComp_Child2>
    </xsl:if>
    <xsl:if test="XYComp_Child2_Child3/text()!=0">
    <XYComp_Child2>
    <XYComp_Child2_Child1>
    <xsl:value-of select="XYComp_Child2_Child1/text()" />
    </XYComp_Child2_Child1>
    <XYComp_Child2_Child2>
    <xsl:value-of select="XYComp_Child2_Child2/text()" />
    </XYComp_Child2_Child2>
    <XYComp_Child2_Child3>
    <xsl:value-of select="XYComp_Child2_Child3/text()" />
    </XYComp_Child2_Child3>
    </XYComp_Child2>
    </xsl:if>
    </xsl:for-each>
    </ns0:XYComp>
    </xsl:template>
    </xsl:stylesheet>
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful.
    Atul Toke

  • How do we add trap-recipients to the acl file?

    How do we add trap-recipients to the acl file?
    Any examples.

    Here's some documentation I am working on for my place of work - hope this helps:
    There are two Sun-provided configuration files of note that must be maintained and provided to the SNMP agent program as command line arguments when it runs. They are:
    X.acl (subagent access control file, where X is your agent name)
    X.reg (subagent registration file, where X is your agent name)
    Note: For more information on either of these files, read the Solstice Enterprise Agents User Guide found on the Sun website, but don't expect too much.
    The reg file specifies the subagent name and OID tree it is responsible for, among other things.
    The acl file contains a list of communities that will be sent traps. This file will need to be periodically updated with the IP addresses of any entity that wants to receive traps from the X subagent. The file looks in part like this:
    acl = {
    communities = public, private
    access = read-write
    managers = dv, localhost
    trap = {                                                             
    trap-community = SNMP-trap
    hosts = dv, localhost
    enterprise="Xenterprise"
    trap-num = 1-5
    Where "dv" and "localhost" are configured in the /etc/hosts file as IP addresses to send traps to and "Xenterprise" is an enterprise that must be registered EXACTLY as is shown in the /etc/snmp/conf/enterprises.oid file. (Note: Some of the enterprises in this file have spaces within their name. This WILL NOT WORK. So if for some reason, an enterprise you were going to use is "MY Enterprise" you must changes this file because your MIB will not compile with an enterprise with spaces in the TRAP-TYPE declaration.
    So, to add a new community, add an argument to the "managers" and "hosts" line in the .acl file and ensure that this reference has its IP address listed in the /etc/hosts file.
    Furthermore, in /etc/snmp/conf/snmpdx.acl a comparable entry needs to be added as well. The snmpdx executable is the master agent that the subagent communicates with. It also has an entry in its .acl file as follows:
    trap = {                                                            
    trap-community = SNMP-trap
    hosts = dv, localhost
    enterprise="Xenterprise"
    trap-num = 1-5

  • How do I add a contact from the same company to my address book?

    How do I add a contact from the same company to my address book? I do not want to re-type all of the information. Thanks for your help.

    Any card in your address book can be duplicated. Select the card within the Name column, and use the Edit > Copy menu item followed by the Edit > Paste menu item. Then you can update the card copy and only change the name/email/phone fields as needed.

  • How can i add two values under the same property?

    Hi all,
    How can i add two values under the same property name in a
    prop list? For example:
    [question1: "item1","item2", question2: "item3","item4"]
    To be more precise, i am creating a property list and I want
    whenever a two values have the same property name to be added int
    he list under the same property. For example:
    gMyList.AddProp (#""&question&"" & x,
    member("input").text)
    question is a variable that is updated fromt he user's input.
    Now, whenever somethign like this happens:
    question = "question1"
    member("input").text = "five"
    question = "question1"
    member("input").text = "six"
    I want to output list to be:
    [question1: "five","six"] and so on
    Any ideas?

    Maybe you could make each property a list (so you have a
    property list full
    of lists), and add multiple values to the list held in a
    particular
    property?
    Cheers
    Richard Smith

  • When I try to same an image under the command 'save as' it will only let me save as file types 'firefox document' or 'all files' and when I try to look at them later they dont work. How can I save an image as the same file type it is on the web site?!

    When I try to save an image under the command 'save as' it will only let me save as file types 'firefox document' or 'all files' and when I try to look at them later they dont work. How can I save an image as the same file type it is on the web site?!
    == This happened ==
    Every time Firefox opened
    == I updated to one of the firefox versions (Not sure which one it was)

    Thanks Alex, but sadly I already tried that. Neither .docx or .xlsx files show up in the content list. They both show as a Chrome HTML document so changing how Firefox addresses those doesn't help since it thinks its the same type of file. I don't think I can manually add files into the "Content Type" left side nav.

  • HOW DO I ADD A DATE IN THE FOOTER?

    I can not find the INSERT DATE function to add a DATE to the footer of a NUMBER spreadsheet.  How do I do that? 

    Bob,
    Further to Jerry's pointer, see this thread for a description of how you can set up an 'insert date' pick in your menu.
    If you want (thanks to Badunit for showing that this was possible) instead of going through the steps described there you can just grab a copy of the service via this link (automatic download from Dropbox).  When you doubleclick it, you'll be asked if you want to install it. You may have to go to System Preferences > Security & Privacy to click 'open anyway' if you get a warning message.
    That's it. After it's installed it will be a menu pick similar to the screenshot above.
    If you want to rename it, then in Finder hold down the option key choose Go in the menu, navigate to Library > Services and rename it there as you would any other file.
    If you don't like going to the Services menu then assign a keyboard to it at System Preferences > Keyboard > Shortcuts.
    SG

  • How to update (add new data in different tab) existing table from Excel

    i've an existing table, for instance User Profile table, it consists of few tab in the table which contains different data... recently i've added new tab to the existing table and i would like to upload a particular data for this new tab... is there any way to upload (insert new data for the tab on existing data) this particular data into the existing table from Excel file?
    could it be done by using lsmw?
    Edited by: Yeong Kang Liew on Apr 5, 2010 4:35 AM

    Check HELP on MODIFY & UPDATE statements.

  • Add new row in the same page

    Can anyone give me the code for adding the new row in the same page itself.If we click on add button a new row should come in the table.
    Thanks in advance

    Hi,
    invoke a method in AM on button click
    public void addrows()
    AddressesVOImpl vo1 = getAAddressesVO1();
    AddressesVORowImpl row1 = (AddressesVORowImpl)vo1.createRow();
    vo1.insertRowAtRangeIndex(0,row1);
    vo1.setCurrentRow(row1);
    Thanks,
    Gaurav

  • How do you add multiple effects to the same clip

    How do you had multiple effects to the same clip. I have tried for hours
    I would like to add sepia and aged movie to the same clip. I heard it can be done, but have not figured out how to do it.
    anyone please.

    Normally you can apply only one video effect at a time. But for Sepia, black and white, and others that can be done through the video Adjustments tab, you are in luck.
    Aged Movie should already have a bit of a sepia tone.
    If you want more of a sepia tone or you want to fine tune the sepia effect you can do it with the Clip Inspector/Video Adjustments tab.
    Note: Thanks to Jeff Carlson of MacWorld for this tip.
    If you're looking for a washed-out sepia appearance, first open iMovie's preferences and turn on the Show Advanced Tools option, which adds more controls to the Video Adjustments HUD and other areas of the program. Select the clip you want to alter and press the V key. Set Saturation to 0 percent, and then drag the Red Gain slider to 143 percent, the Green Gain slider to 90 percent, and the Blue Gain slider to 53 percent (feel free to tweak these settings to customize the results). Click on Done when you're finished. Note that the clip thumbnail still appears in color, as the video was shot, but the preview reflects your changes.--JC
    If you need to apply the same settings to all clips, first select the clip you have adjusted. Then Edit/Copy. Then Edit/Select All. Then Edit/Paste Adjustments.

  • How to open a new iView in the same window?

    Hi
      i want to open a new iview in the same window.How can i do that ?
    Thanks

    Hi,
    If u want to code in WDJ  ..
    Use following method
         WDPortalNavigation.navigateAbsolute(
         "ROLES://<PCD location>,
         WDPortalNavigationMode.SHOW_INPLACE,               WDPortalNavigationHistoryMode.ALLOW_DUPLICATIONS,
         (String) null  );
    SHOW_INPLACE is the key
    Cheers!!
    Ashutosh

Maybe you are looking for