How to wait until the 1st part of the processing is done

Hi,
I had a hard time to combine two parts of processing in one .vi file, and thus would like to get some advice/help through the forum.
Attached is the partial finished vi file I made. You can see that it is composed of two parts. The upper part is to run a bat file (check_result.bat), which generates a result.txt file. The lower part is to use the result.txt file as an input file, and check if the key word called "test case passed" is included in the result.txt file or not. So I want to run the upper part firstly, and then run the lower part after the upper part is finished.
However, I don't know how to connect the two parts in a right way that the lower part only starts running after the upper part is finished. Any comments/help is highly appreciated.
Thank you in advance.
Xuedong 
Attachments:
question.vi ‏49 KB

The magic of dataflow!
All you need is a data dependency between the two parts. Often critical parts of each section contain error terminals, so you can just string em along in the proper order and each part must wait until the previous node has finished.
In your particular case, the read operation has no error input, so you can recruit any other input. Create a fake data dependency by strategically placing a small sequence frame containing common code. The sequence cannot start until all code that provides imputs has finished, serving your purpose.
Of course it seems silly to even try to read the file if the previous node failed. Right? So simply place the second part inside a case and hook it up to the error output. Now the second part (1) waits until the first part has finished AND (2) execute only of the first part succeeded. No sequence needed.
All clear?  
Message Edited by altenbach on 02-07-2007 02:34 PM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
dataflow.gif ‏4 KB
dataflow2.gif ‏4 KB

Similar Messages

  • How to wait until setPage(number) is finished

    SR 3-8311228061
    When calling getStrings, found I need to iterate the pages of the doc/xls/etc
    However Autovue Support tells me that setPage() is asynchronous
    I asked how to wait until setPage() is complete, they suggested I post the question here
    Note, at the time its called the viewer (desktop version 20.2.2) is on the task tray, but not rendering the document
    Its only loaded to extract the text
    here is the blip of code
    for( curPage = 1; curPage <= pages; curPage++)
    vueBean.setPage( curPage ); //its necessary to call setPage even for page 1
    //If setpage fails stop (per Daniel/Oracle)
    int thisPage = vueBean.getPage();
    if( curPage != thisPage )
    //This message never shows up
    String msg = String.format("Pages[%d] thisPage[%d] curPage[%d] ", pages, thisPage, curPage);
    AdeptApplication.INSTANCE.publishEvent("file-event", msg,
    new SystemEvent(this.fileName, "GETTEXT_PAGEFAILED"));
    break;

    The code you have is to know whether changing pages succeeded or not, and unless you are trying to set a page number that is out of the page count it will always succeed
    So, yes, your test is the same as if (false)
    Now, page loading is done in an asynchronous manner
    1. you ensure that the page (the container for all the page artifacts) is created, synchronously
    2. the page content are streamed on another thread
    3. once the page is loaded, an event is sent VueEvent(VueEvent.FILEEVENT, VueEvent.ONPAGELOADED)
    So you should be able to query for info after you received the page loaded event
    Now, word documents are an special kind of documents, so you need to be aware of some specific issues.
    The same way ms-word does not know the total number of pages until the ENTIRE document is loaded, AutoVue will not be able to notify you either.
    And as Word, AutoVue allows you to display the pages that are already loaded, and you may query for some of its contents too.  BUT you can not query for page info when the page is been loaded (or obviously not yet loaded)
    The loading is a 2 phase one, part is done on the server (native code) and part is on the java side (display)
    So you will not be able to iterate
    for( curPage = 1; curPage <= pages; curPage++)
    simply because page count is not known.  You need to query doc info more than once.
    If page count = -1, you need to iterate for each page and then, test whether setPage() != getPage() and/or page count has been updated.

  • The new itunes overfills my window. When I try to move it to the left so that I can use the slide bar on the right, part  of the left side of screen is not visible. How can I fix this, please.

    The new itunes overfills the window on my desktop ( windows 7). When I move it to the left so that I can access the slidebar on the right, part of the left side of the screen then disappears. How do I correct this?

    The problem of tracks becoming de-linked between iTunes and the music files in your iTunes music folder happens for different reasons - this seems to come up fairly commonly in this forum.
    The solution can be to locate each song in the iTunes library, as you mentioned - or, but wait, before I get to that...
    trouble finding the original track in your iTunes music folder? maybe look for it under compilations, or if not using the 'group compilations preference' then look in the folder under the songs artist name, but what song artist name iTunes uses depends on what you have in the metedata tag spot for album artist or song artist. Any varyation in artist name spelling, in the menu item 'get info' metadata for any selected individual track will cause iTunes to create that as a separate artist folder in the library, even names like 'various' or any difference at all (even the word 'the' can change where in your iTunes music folder a track gets placed by iTunes). You can try to use the finder function of find file (finder munu item outside of iTunes) to locate hard to find items.
    Back to how to re-link any de-linked tracks .
    There may be scripts that can help re-link de-linked music files - or, at least provide you a list of such files, Scripts are easy to install and use...
    at Dougs Scripts, there is one called iTunes Track CPR that might work
    http://dougscripts.com/itunes/scripts/ss.php?sp=itunestrackcpr
    or, if you just want a list of de-linked tracks, go to
    http://dougscripts.com/itunes/
    and find the script called List MIA's, this will create a text file listing all de-linked tracks
    if you review the thread at
    https://discussions.apple.com/thread/3633708
    also the thread at
    https://discussions.apple.com/message/17513078#17513078
    you may find more insight into dealing with this kind of issue there, although some of that thread may not apply to your case, aspects of it might help.
    Good luck.

  • In our program, we are concerned about reducing CPU work; how to wait until a boolean condition changes in a "while loop"?

    Is there a way to wait until a boolean condition changes (instruction is sent) in a "while loop" (because I want the program run until I press exit button)? Now it is consuming a lot of CPU because it is running the loop very fast waiting for instructions unless I stop the program.
    Thank you.

    Use /functions/time and dialog/wait until next millisecond multiple in the
    loop. Input 100ms.
    "mcdesm" wrote in message
    news:[email protected]..
    > In our program, we are concerned about reducing CPU work; how to wait
    > until a boolean condition changes in a "while loop"?
    >
    > Is there a way to wait until a boolean condition changes (instruction
    > is sent) in a "while loop" (because I want the program run until I
    > press exit button)? Now it is consuming a lot of CPU because it is
    > running the loop very fast waiting for instructions unless I stop the
    > program.
    >
    > Thank you.

  • How can I print just a part of the page and not the full page with Adobe Reader v 10.1.2?

    how can I print just a part of the page and not the full page with Adobe Reader v 10.1.2? I need to print a engineering print with lot of information but information is too small in letter size and I don't have a plotter.

    Two ways to print a portion of a page: zooming or using the Snapshot Tool.
    ZOOMING:
    Zoom into the area you want to print.
    Click the Print icon.
    Under "Pages to Print", make sure "Current view" is selected under "More options" (you may need to click "More options" to open it).
    If you aren't satisfied with the preview, try clicking "Fit" under the Size button.
    SNAPSHOT
    Choose Edit > Take A Snapshot.
    Drag a rectangle around the area you want to print. 
    Click the Print icon.
    Under "Pages to Print", make sure that "Selected Graphic" is selected under "More options".
    To enlarge the snapshot to fit the sheet of paper, choose "Fit" under the Size button.
    Hope this helps!

  • I would like to know it it's possible to change the scroll bar from the right part of the firefox browser, to the left part and, if it's possible, how can it be done. Thank you!

    The scroll bar (the one used to scroll up and down any kind of website), that is normally in the right part of the firefox browser, would be of much help to me if it could sometimes be moved to the left part of the browser. Is this possible? How can it be done? Can anybody tell me the exact steps to take in order to do this (if it is possible of course)? This would be helpfull to me, since I think that the firefox scroll bar is overlaping the scroll part of the facebook chat sidebar, since I just can see a few people on this facebook chat sidebar and I can´t scroll along it, as I could a while ago. So my guess is that the firefox scroll bar is covering the other. In order to solve it in a simpler way, I guessed that if the firefox scroll bar could be moved to the left side of the browser, this problem could be solved. So, can anybody help me?

    http://kb.mozillazine.org/layout.scrollbar.side
    Type '''about:config''' in Location (address) bar
    filter for '''layout.scrollbar.side'''
    Right-click the Preference and Modify it to '''3'''
    You may need to reload any pages open to have scrollbar move to left after Preference change.

  • I have a problem with Safari in IOS 8 on my iPad 3. The bookmarks take up a third of the screen and I can't seem to make the bookmarks disappear until I need them. The useful part of the screen is therefore very small. Any suggestions gratefully appr

    I have a problem with Safari in IOS 8 on my iPad 3. The bookmarks take up a third of the screen and I can't seem to make the bookmarks disappear until I need them. The useful part of the screen is therefore very small. Any suggestions gratefully appreciated.

    OK, it now sort of works. A couple of problems here:
    After updating IOS, Safari iCloud was "automatically" switched off
    Switching it on had no effect
    resetting my iPad automatically switched off safari iCloud again
    after switching it back on, it said "turning off safari data"
    switched it off and on again, now it said : "turning on safari data" and the sync worked
    On IOS 7 no problems
    The bookmarks not being displayed was because after pressing the book icon, it defaulted to showing the history and I had to press "Back" to get to the other options

  • My ant video player after i updated to firefox four is now in the upper part of the screen where it opens up and i cant find out how to fix it

    my ant video player after i updated to firefox four is now in the upper part of the screen where it opens up and i cant find out how to fix it

    Create a new profile as a test to check if your current profile is causing the problems.
    See "Basic Troubleshooting: Make a new profile":
    *https://support.mozilla.com/kb/Basic+Troubleshooting#w_8-make-a-new-profile
    There may be extensions and plugins installed by default in a new profile, so check that in "Tools > Add-ons > Extensions & Plugins" in case there are still problems.
    If that new profile works then you can transfer some files from the old profile to that new profile, but be careful not to copy corrupted files.
    See:
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • How can I delete the 1st city in the weather app

    Hi, would any one know how can I delete the 1st city in the weather app. I can delete all other cities but not the 1st one. Any suggestions? Thanks!

    Not sure why you can't delete it. I was able to delete all of them including the first one in the same way -- sliding to the left in the list and then tapping Delete. I didn't encounter any difference on the first one.

  • HT201272 I have part of a song on my iphone, and the other part of the same song in my itunes purchased history, how can I fix this?

    I have the first part of a song on my iphone, the second part of the same song shows up in my "purchased" list in itunes store. It used to play the whole song on my phone, what happened and how can I fix this? thanks.

    Not if you sync your contact to itunes using the program provide i.e outlook..etc

  • When I click the launchpad, (I have icons on 2 pages) how do I return to the 1st set when the system seems to automatically shift to 2nd page?

    When I click the launchpad, (I have icons on 2 pages) how do I return to the 1st set after the system seems to automatically shift to 2nd page?.
    I'm not aware of anything I might have done, but it's annoying to want to use an icon on the 1st page, only to see all the icons on page 1 shift rapidly to the left
    and I can't find a way to shift back to page 1.
    Is there a way of getting all my Launchpad icons onto 1 page by adjusting their size?

    Thanks for that. I think the 2 little white dots were hidden by the white frame round the desktop picture on my screen
    As you can see from the pic, there is a broad white frame around the image.

  • How can I get my IMac to recognise the scanner part of the HP printer/scanner?  It prints!

    How can I get my iMac to recognise the scanner part of the HP printer/scanner?  It prints!@

    I had a similar problem right after the first update to 10.6.7, which happened to quite a few people.  It took a couple of software updates and then an HP printer update to fix it.  So make sure that all your software updates are up to date.   Mine is an older printer: C6280 All-in-one but scans fine now that my mac recoginises it.  You might want to check on the HP site also.
    It was really frustrating because it had worked fine before.
    laverne's mom
    Message was edited by: laverne's mom

  • How do I click the '1st' button in the character panel for texts?

    I'm having trouble figuring  out how to click the '1st' button in the character panel because i need to write 25th anniversary and needs the 'th' to be lowercase on the side. I'm new so please help! thanks.

    I think the availability of Oridinals depends on the font.
    Quote from the Reference:
    Typefaces include many characters in addition to the ones you see on your keyboard. Depending on the font, these characters can include ligatures, fractions, swashes, ornaments, ordinals, titling and stylistic alternates, superior and inferior characters, old-style figures, and lining figures. A glyph is a specific form of a character. For example, in certain fonts, the capital letter A is available in several forms, such as swash and small cap.
    But one can achieve something similar by changing the font size and baseline shift for the affected characters.

  • I bought a Elements 12 Software bundle 3 weeks ago.  How do I redeem the other part of the product I paid for?

    I bought a Elements 12 Software bundle 3 weeks ago.  How do I redeem the other part of the product I paid for?
    I bought a Elements 12 Software bundle 3 weeks ago.But I only redeemed,'Premier Elements' with the code it gave and had a separate code for Elements 12 , wich I wrote down but did not use at that time. Now I have made space on the PC, I want to download the Elements 12 part of my bundle but its proving impossible. How do I redeem the other part of the product I paid for? The serial number retrieval code, from the card I bought comes up as Invalid now.

    Serial number and activation chat support (non-CC) may help
    http://helpx.adobe.com/x-productkb/global/service1.html

  • How to get only the last part of the URL in the doGet() method?

    In the doGet() method is there a way to check what URL it was called from ? For example the URL was: http://localhost:8080/myproject/jsp/randomPhrase.php (the php here is purely for misleading purposes - it's all Java really). in the doGet() method I would like to get the "randomPhrase" part of the URL only - to determine where to redirect the user. How can I do that?
    Thanks.

    Hello there,
    As it seems to me the part of the URL you're looking fo,r corresponds actually to the name of the servlet, so why don't you just call the getServletName method?

Maybe you are looking for