How can I create a 5 minute window?

What I am trying to do is make a 5 minute window of events that happened last in my application. For some reason, I cannot get the "5 minutes"  to be just that. Here is what I want to do:
I want to have events from the event structure written to a file (easy - done). After a specified amount of time ( 5 minutes ), the writing that was happening into this file "fileA.txt" ends. After this ends, a new file is created and the process of writing data to that file continues into this file "fileB.txt". Here's the tricky part: Again now, after 5 minutes, I want to replace the entire contents of "fileA.txt" with new data in this new 5 minute window. This process continues until the VI stops arbitrarily.
The goal with this is after a certain base amount of time that the VI has run, I always have AT LEAST the last 5 minutes of data that occured in the application. Worst case scenario I have only "fileA.txt" in its entirity, best case scenario being I have "fileA.txt" and for example 3 minutes and 30 seconds of "fileB.txt".
I would greatly appreciate any insite into how to finish this. The reoccuring problem for me is that I am constantly getting the Error 1, GPI ....... when the VI tries to write to text file.
I need to do this so I can troubleshoot another VI that keeps shutting down for some reason. 
Here are my 2 tries at doing this:
Solved!
Go to Solution.
Attachments:
1st Attempt.vi ‏22 KB
2nd Attempt.vi ‏20 KB

The common way of disabling controls is to ... disable them.
You're mixing different attempts at solutions and throws code, use 1 event-structure.
I've attached a skeleton, there's no real error handling, but it should get you started.
You can easily add a Disable-event if time is more than 5 seconds.
/Y
LabVIEW 8.2 - 2014
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
G# - Free award winning reference based OOP for LV
Attachments:
5minwindow.vi ‏22 KB

Similar Messages

  • How can i create a new shell window using some functions?

    1.In a shell window, how can i use a command to create another new shell window?
    2.In C code, which function will be called to create a new shell window?
    (not excute shell command -- being implemented by using system() )
    Thanks!

    #1 I don't know what a "shell window" is. There are shells (programs that accept terminal input and run scripts), and there are windows (usually drawn by an Xclient (like xterm), or a toolkit client (dtterm, gnome-terminal).
    The two are very different. You may just want to run xterm or something and assume that it will also launch a shell.
    #2 You'll need to explain that one better. system() is the normal way to launch external commands. If you don't want to use it, you'll need to explain why it's not useful here.
    Darren

  • How can I create a pop up window for a Windows Media video file in Dreamweaver CS6?

    I have a Windows Media video file on my homepage that plays automatically when you go to the website. I'd like to change my homepage. I now would like to place text that says "click here to play the video" and I'd like a pop up window to open and play the video. I'm using Dreamweaver CS6. Your help will be appreciated. Thanks.

    BlueSapphire777 wrote:
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    Is the code you told me about (above), is it necessary for older browsers such as ie8? I thought you were saying it was for the HTML5 tags and I wasn't sure I'd bother with it. If it helps people with ie8, I probably should add it.
    I include it (or a link to a localized copy of the file) by default now.
    To truly support the ancient browsers out there, you'd likely need something like...
    <video width="500" height="500">
        <source src="video.mp4" type="video/mp4" />
        <source src="video.ogv" type="video/ogg" />
        <source src="video.webm" type="video/webm" />
        <object width="500" height="500">
        <param name="movie" value="video.swf" />
        <embed src="video.swf" width="500" height="500"></embed>
        </object>
    </video>
    I don't bother with a Flash fall back for old browsers though. I just put in text letting the viewer know they're behind the times pretty severely, like...
    <video width="500" height="500">
        <source src="video.mp4" type="video/mp4" />
        <source src="video.ogv" type="video/ogg" />
        <source src="video.webm" type="video/webm" />
        <p>Your browser is horribly, helplessly and hilariously outdated. Visit <a href="firefox.com" target="_blank">www.firefox.com</a> to download something better, more secure, modern, worthwhile, etc, etc...</p>
    </video>
    For junky old browsers that can't see any HTML5 (which the <video> and <audio> tags are), they get a text message to get something better and a link to go there.

  • How can I create tree menu (like windows explorer) in Portlet

    On my page I need a portlet which will be a tree menu (expandable and collapsable).Items in the menu are just URLs.
    EG: Main menu
    SubMenu1
    -Item11
    -Item12
    -Item13
    Submenu2
    -Item21
    -Item22
    -Item23
    I crated a menu portlet in 9iAS portal R2, But it is not able to expand or collaps inside the same region.
    When I clik on Submenu1 it open a new window and Items are dispayed on window. I do not want that, I need to see all items in a submenu at the portal region itself, then when I clik on that Item(URL) I wiil get that new page/file as per the URL.
    On the menu portel design/layout screen of Oracle9iAS portal, it looks good (with exand/collaps), I want the exact same functionality for the menu on my page region.
    Please give me a quick answer

    Hi,
    This is not possible with Portal right now. You can run the menu as a tree by clicking on the frame view icon at runtime of the menu in the full page mode. This is not possible on the page.
    Thanks,
    Sharmila

  • How can I create the recovery discs for my AIO computer? (For Windows 7 systems)

    Q.: How can I create the recovery discs for my MSI laptop/AIO computer? (For Windows 7 systems)
    A.:
    1. Locate the "MSI BurnRecovery" shortcut on your desktop or start menu. Run this program. (Note: If UAC is enabled, press "Yes" to allow the program to run.
    2. MSI BurnRecovery will prepare the files. This process may take a few minutes.
    3. Click on "Next" to continue.
    4. Click on "Advanced".
    5. Click on "Create an ISO file for the recovery disc".
    6. Select the destination where you want to create the ISO files. (Default is the D: drive)
    7. The program will now create the ISO files. This process may take up to 20 minutes.
    8. Click on "Finish". Make sure the box is unchecked.
    9. Browse to the location of the ISO files. Double-click the recovery_dvd file. (Note: Depending on your system, you will have 1-3 recovery_dvd files)
    10. Insert a blank DVD (If the AutoPlay window pops-up, close it). Click on "Burn". It is also recommended to check the box to verify disc after burning.
    11. After burn is complete, click on "Close".
    12. Double-click the recovery_dvd2 file.
    13. Insert a blank DVD (If the AutoPlay window pops-up, close it). Click on "Burn". It is also recommended to check the box to verify disc after burning.
    14. After burn is complete, click on "Close". Recovery disc creation is now complete. (You can also delete the ISO files, but it is recommended to keep them)

    Hi,
    You can order a replacement set of Recovery Discs using the link below.
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c00810334&cc=us&lc=en&dlc=en
    If you have any problem with this link, order them directly from HP.
    If you live in the US, contact HP Here.
    If you are in another part of the world, start Here.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • How can I create a text pop up window in my Pages document? I want text to pop up when the reader hovers his/her cursor over a certain word.

    How can I create a text pop up window in my Pages document? I want text to pop up when the reader hovers his/her cursor over a certain word in the document. I am teacher. So for example when a student came to word he/she did not know, if he/she hovered the cursor over the word, a defintion or other information would appear.  You can do this in Word using bookmarks/hyperlinks but I can't figure this out in Pages. I can link it to another point in my Pages document but I just need the text to pop up - not take the reader to another location.  THANK YOU!!!!!!

    Have you tried Word for Mac?
    You will need to test if links survive export or printing to .pdf
    Peter

  • How can I create more than one main window in a page of SAP SCRIPT?

    How can I create more than one main window in a page of SAP SCRIPT? If anybody helps me I will be obliged.
    Regards,
    Subhasish

    Hi Ganguly,
    It is possible to have more than one main window in a same page.
    You create a main window and simply you copy and past it in the same page.. it will create first main window name as MAIN and other main windows as MAIN01,MAIN02.... up to MAIN99.
    Contets flow from MAIN , MAIN01, MAIN02.......................MAIN99. contents after filling the current window it flows to next window(by default, you skip as well with some keyword not sure could be NEW-WINDOW)
    you want print the main window data twice? or you want to create two main window in the same page ?
    1. give two copies in the no of copies in the output type screen ( Which pop up is coming after excute the program ).
    2. create two page with the same script form.
    3. you can write the coding inside the program to print twice the same page.
    Hope this information use full to you..

  • I have a windows computer. How can I create apps and put them on itunes?

    I have a windows computer. How can I create apps and put them on itunes?

    You can't. The iOS SDK requires Mac OS X and an Intel Mac; Windows applications can't be put on either the iOS or Mac OS X App Stores.
    (82889)

  • How can I create a new partition to install Windows 7 by not using Bootcamp

    How can I create a new partition to install Windows 7 by not using Bootcamp?

    If you want to dualboot you have to use boot camp i think. I think you have already a full disc and cannot make another partition I'm I right?
    Your question seems a bit blurry so I'm giving you a general tip here.
    If you want to just try the beta you can always use Sun's "Virtualbox".

  • Upon launch of Lightroom after initial instalation a warning came up that said lightroom needs to create temporary files and cant open.  The it opened and the catalog i imported will not show the images.  How can I give permission? Running windows 8.1 64

    Upon launch of Lightroom after initial installation a warning came up that said lightroom needs to create temporary files and cant open.  Then it opened and the catalog i imported will not show the images.  How can I give permission? Running windows 8.1 64 bit.  I have avast virus software.

    Upon launch of Lightroom after initial installation a warning came up that said lightroom needs to create temporary files and cant open.  Then it opened and the catalog i imported will not show the images.  How can I give permission? Running windows 8.1 64 bit.  I have avast virus software.

  • How can I create Windows Explorer (as a Tree strucuture) in Java

    Hi All,
    How can I create a Windows explorer (as a tree structure) in a Frame window?
    Thanks
    Sumode

    File[] roots = File.listRoots();
         for (File root : roots) {
         System.out.println(root.toString());
         File[] directoryContent = root.listFiles();
         if (directoryContent != null) {
              for (File directoryFile : directoryContent) {
              System.out.println("File: " + directoryFile.toString());
         }

  • How can I create mailing labels? I'm used to windows' label process

    How can I create mailing labels using pages?  I'm very familiar with window's way of doing this and can't find a tool for labels.  please help!

    Post in the Pages froumwhere those experts are:
    https://discussions.apple.com/community/iwork/pages

  • I have Adobe X how can I create a windows 8 install using Custom Wizard install X?

    I have used Adobe Customization Wizard X to create a custom install on our Windows XP machines. I tried to install it on a Win8 machine and it failed. How can a create an install that will run on a windows 8 machine?

    Win 8 is not supported until 10.1.5 as described here: Overview — Acrobat and Adobe Reader Release Notes
    Get the update here: ftp://ftp.adobe.com/pub/adobe/acrobat/win/10.x/10.1.5/misc/
    However, it's a better idea to update to the latest which is currently 10.1.13.
    If you need more help, see Introduction — Enterprise Administration Guide
    hth,
    Ben

  • How can I create a toolbar

    How can I create a tool bar with a functions defined by the user .? For example on the case of explorer on windows there exists a tool bar which can capable to opt tools which been pre determined .How can this be make possible in my application using Labview ?

    Well, a pop up menu is not like a tool bar, but you can find one example here.
    In general, if you want the menu to open more screens, you will need to create and call those as subVIs.
    If this still doesn't help you, I suggest you explain your problem in more detail, and maybe post a screenshot of the what you want to get (no BMPs, please).
    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 can I create multiple versions of a video within the same project?

    OK...this is a probably a very basic question but I'm not sure how to word it clearly.
    How can I create multiple versions of a video within the same project? What I mean is that I have a bout 50 minutes of video and I want to make two DVDs using different clips from this original 50 minutes of footage. It would be a real pain to have to re-import the video AGAIN for the second DVD. I suppose I could drop anything I don't want to burn to DVD back into the clips pane but that would wipe out all my transitions wouldn't it? I want to save each project in their “raw” form so I can burn additional DVDs later otherwise I would just do them one at a time and not care about one of them being destroyed.
    Wow...that was a mess. Does anyone understand what the heck I’m asking? I hope so.

    How can I create multiple versions of a video within the same project?
    You can't. You make separate projects using the same or different clips, segments, transitions, titles, etc. You can even duplicate the first project and then modify/make the desired changes in the duplicated project. Each project can then be burned as a different DVD or as different titles on the same DVD if there is enough room.

Maybe you are looking for