User Select File Path Before Running Rest of VI?

I am designing a system where data is being acquired and written to 12 data files, and I would like to have the operator have the option of selecting the data path while keeping the filenames of the individual files constant. It is necessary for the data not to be acquired until the operator completes the prompt so the data acquisition and writing are synchronized.  How can design my VI to not start the data acquisition and writing the data until the operator has selected the file path?
I've attached my program below. It has a producer/consumer design with two consumer loops. One consumer loop will process and write the data and the other controls a water bath based on the data that is acquired.
Attachments:
Composting System Program.vi ‏123 KB

NT_Engineer,
Hello! If I understand what you are asking correctly, you just want to have the user select a file path before you start your data acquisition, control, and file writing. Is this correct?
There are multiple ways in which you could do this.
As mentioned previously you could design your VI to operate like a State Machine.
A flat sequence structure could be used to first execute a dialog portion of your code, and then the data acquisition portion.
You could use an event structure to not start your program until a user clicked  "Done" button.
Let me know if this is what you were asking.
Ben Sisney
FlexRIO V&V Engineer
National Instruments

Similar Messages

  • How to set the File Path to run a javascript using Plugin Code?

    Hi All,
    Im new to Indesign Plugin Development.Can any one help me out with my problem.
    What i want to do is to run a javascript using Plugin Code.When i went through this forum i was able to find out that i should use the IscriptRunner Class to automate this.I could also figure out that the Member Function to use is "CanHandleFile" &"RunFile".
    The first parameter in CanHandleFile & RunFile Member Function is to specify the path of the JavaScript File i suppose!I could also find out that IDFile has to used to set the file path Information.
    But im clueless how to set the Javascript FilePath using IDFile.Can any one help me how to do this?Any Code Snippets Please?
    Waiting for reply.
    Thanks
    myRiaz

    Hi,  Andreas<br /><br />  Can you explain this in detail? I found it in your post before.<br /><br />  The content of elements are returned through the Characters callback function:<br /><br />From ISaxContentHandler.h:<br /><br />/**<br />        Receives character data<br /><br />The parser will call this method to report each chunk of<br />        character data. SAX parsers may return all contiguous<br />        character data in a single chunk, or they may split it into<br />        several chunks. But all characters in any single<br />        event must come from the same external entity so the<br />        Locator provides useful information.<br /><br />Note some parsers will report whitespace using the<br />        IgnorableWhitespace() method rather than this one (validating<br />        parsers must do so).<br /><br />@param Chars The characters from the XML document.<br />        */<br />virtual void Characters(const PMString& chars) = 0; <br /><br />  What i have done is implement my own SAXContentHandlerServiceBoss, and in my file XXXSAXContentHandler.cpp, I override the fonctions StartElement, EndElement, and Characters() like below: I add the PMString xmlData to collect the file content:<br /><br />class XXXSAXContentHandler : public CSAXContentHandler<br />{<br />void XXXSAXContentHandler::Characters(const WideString& chars)<br />{<br />xmlData.Append(chars);<br />}<br /><br />void XXXSAXContentHandler::StartElement(const WideString& uri, const WideString& localname, const WideString& qname, ISAXAttributes* attrs)<br />{<br />xmlData.Append("<"); xmlData.Append(localname); xmlData.Append(">");<br />}<br />void XXXSAXContentHandler::EndElement(const WideString& uri, const WideString& localname, const WideString& qname)<br />{<br />xmlData.Append("</"); xmlData.Append(localname); xmlData.Append(">");<br />}<br /><br />}<br /><br />and in my program, I use the code below to call the fonction I overrided, but I dont know how I can get the String xmlData I defined in the XXXSAXContentHandler.cpp<br /><br />InterfacePtr<IK2ServiceRegistry> serviceRegistry(gSession, UseDefaultIID());<br /><br />InterfacePtr<IK2ServiceProvider> xmlProvider(serviceRegistry->QueryServiceProviderByClassID(kXMLParserService, kXMLParserServiceBoss));<br /><br />InterfacePtr<ISAXServices> saxServices(xmlProvider, UseDefaultIID());<br />InterfacePtr<ISAXContentHandler> saxHandler(::CreateObject2<ISAXContentHandler>(kXXXSAXContentHandlerServiceBoss));<br />saxHandler->Register(saxServices);<br />bool16 parseFailed = saxServices->ParseStream(readStream, saxHandler);<br /><br />Can you give me any help?<br /><br />Thanks and regards!

  • Reading from a file. How to ask the user for file name at run time????

    I have the code to read from a file but my problem is how to prompt the user for the file name at run time.
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.util.InputMismatchException;
    import java.util.Scanner;
    public class FileRead {
        public static void main(String args[]) {
            Scanner scan = null;
            File file = new File("Results.txt");
            String number;
            try {
                scan = new Scanner(file);
                while (scan.hasNext()){
                number = scan.next();
                System.out.println(number);}
            catch (FileNotFoundException ex1){
                System.out.println("No such file");
            catch (IllegalStateException ex2){
                System.out.println("Did you close the read by mistake");
            catch (InputMismatchException ex){
                System.out.println("File structure incorrect");
            finally{
                scan.close();}
    }Any hints would be greatly appreciated. Thank you in advance

    I have read through some of the tutorials that you have directed me too and they are very useful, thank you. however there are still a few things that i am not clear about. I am using net beans 5.0 I have placed a text file named Results.txt into the project at the root so the program can view it.
    When I use the code that you provided me with, does it matter where the file is, or will it look through everywhere on the hard drive to find a match?
    This code compiles but at run time it comes up with this error
    run-single:
    java.lang.NoClassDefFoundError: NamedFile
    Exception in thread "main"
    Java Result: 1
    BUILD SUCCESSFUL (total time: 3 seconds)
    import java.util.Scanner;
    import java.io.*;
    class NamedFileInput
      public static void main (String[] args) throws IOException
        int num, square;   
        // this Scanner is used to read what the user enters
        Scanner user = new Scanner( System.in );
        String  fileName;
        System.out.print("File Name: ");
        fileName = user.nextLine().trim();
        File file = new File( fileName );     // create a File object
        // this Scanner is used to read from the file
        Scanner scan = new Scanner( file );     
        while( scan.hasNextInt() )   // is there more data to process?
          num = scan.nextInt();
          square = num * num ;     
          System.out.println("The square of " + num + " is " + square);
    }his is the code that i used. It is the same as the code you posted for me (on chapter 23 I/O using Scanner and PrintStream) Sorry im just really stuck on this!!

  • File open dialog to just get the user selected file name

    Hi,
    I am working on asynchronous file storage to KPRO through my ABAP WD application. For this asynchronous upload
    operation, I just need the file name and file path(not the content). The KPRO servers could be made to use SAPFTP, SAPHTTP in the background to upload documents (triggered via tRFC's).
    Is it possible to have a file open dialog (similar to java file open) which just returns the file path and file name instead of the
    content? Current fileUpload UI element also loads the content which is not desired behaviour for me (because could be a performance problem with large documents uploading).
    Is it possible to select multiple filenames? Thomas Jung's Flash island multiple upload works, but not in my
    asynchronous scenario. Because flex fileReferenceList + upload operation works synchronously.

    You must remember the START-OF-SELECTION event here,  after you select the file name and click F8, the START-OF-SELECTION event is triggered, but if it is not there, nothing will happen.
      if sy-subrc <> 0 or l_rc < 0.
        message id sy-msgid type sy-msgty number sy-msgno       "mo271101
        with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      else.                                                     "mo271101
        read table l_files index 1 into h_files.
        auszfile = h_files-filename.
      endif.
    start-of-selection.            "<--  Add this
      write:/ auszfile.
    Regards,
    RIch Heilman

  • JAR file decompressed before run?

    hi,
    does anyone know if a JAR file is decompressed totally to some temporary location before it is run? So if you had a 1Gb Jar file that was mostly odd files, and a few java classes to do some optional processing which never occured, would the remainder of the jar be decompressed?
    thanks,
    asjf

    Oops, wrong answer to wrong thread.
    Jars a decrompressed on demand but the JRE might cache the whole Jar file.
    But anyways: Who uses such big Jar files?

  • How to Insert user selected files as list attachment using JavaScript?

    I could able to Inset list items using ECMA Script, But for the user added attachment how to save it to list item.
    Please help

    check the similar post
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/3d92510f-f966-45b2-989d-734ba21c5ce5/how-to-attach-file-to-list-item-using-javascript-in-sharepoint-2010?forum=sharepointcustomizationprevious
    More links
    http://sharepoint.stackexchange.com/questions/88487/using-sharepoint-client-api-to-upload-file-as-attachment-in-javascript
    http://sharepoint-community.net/forum/topics/copy-attachments-of-sharepoint-list-item-to-a-document-library

  • Delete User selected file

    I have a form that allows a user to upload a file to the server. What I need to do next is delete the file from the users computer after upload. I have been looking online and only found mention of file deletion from the server. Any help would be appreciative.

    For blindingly obvious security reasons, HTML forms will not allow you to arbitrarily delete files from the user's own computer.
    Dave Watts, CTO, Fig Leaf Software

  • 'F4_FILENAME'. USER FILE PATH

    when I used the following function module  for user defined file path selection
    parameters: p_file like rlgrap-filename.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    PROGRAM_NAME = SYST-CPROG
    DYNPRO_NUMBER = SYST-DYNNR
    FIELD_NAME = ' '
    IMPORTING
    FILE_NAME = P_FILE.
    I am getting the follwing Dump error.
    Exception condition "NO_FIELDCATALOG_AVAILABLE" raised.
    Could any one help me correcting problem ?

    Try  this.
    report zrich_0001.
    data: ifiletable type filetable.
    data: xfiletable like line of ifiletable.
    data: rc type i.
    parameters: p_file1 type localfile default'C:test.txt'.
    at selection-screen on value-request for p_file1.
    call method cl_gui_frontend_services=>file_open_dialog
       EXPORTING
    *    WINDOW_TITLE            =
    *    DEFAULT_EXTENSION       =
    *    DEFAULT_FILENAME        =
    *    FILE_FILTER             =
         INITIAL_DIRECTORY       = 'C:'
    *    MULTISELECTION          =
      changing
        file_table              = ifiletable
        rc                      = rc
    *    USER_ACTION             =
      EXCEPTIONS
        FILE_OPEN_DIALOG_FAILED = 1
        CNTL_ERROR              = 2
        ERROR_NO_GUI            = 3
        others                  = 4.
    read table ifiletable into xfiletable index 1.
    if sy-subrc = 0.
      p_file1 = xfiletable-FILENAME.
    endif.
    Regards,
    RIch Heilman

  • Full Path of selected File

    Hi together,
    in our programming project we are facing a problem with
    handling of files.
    Due to the security it is not possible to handle local files
    via flash.
    This is what I figured out by searching via google.
    But is it possible to get just the full path of a user
    selected file?
    Scenario
    The flash file we are using is embedded in a local stand
    alone application,
    i.e. it is not on the server and also not embedded in html,
    php, jsp, ...
    User clicks on a button. A pop-up window displays the
    directory structure.
    User can navigate to a directory within local drive and
    select a file.
    Currently we only get the file name like process.pdf
    But we also want to have the full path like
    C:\Documents\Project1\process.pdf
    So we only need this full-path string. We don't want to do
    anything with the selected file with flash
    How is this possible, to get full file path with flash by
    using flex 3?
    Thanks a lot
    K.K.

    "KalemKutu" <[email protected]> wrote in
    message
    news:gig89e$f1v$[email protected]..
    > Hi together,
    >
    > in our programming project we are facing a problem with
    handling of files.
    > Due to the security it is not possible to handle local
    files via flash.
    > This is what I figured out by searching via google.
    >
    > But is it possible to get just the full path of a user
    selected file?
    >
    >
    Scenario
    > The flash file we are using is embedded in a local stand
    alone
    > application,
    > i.e. it is not on the server and also not embedded in
    html, php, jsp, ...
    >
    > User clicks on a button. A pop-up window displays the
    directory structure.
    > User can navigate to a directory within local drive and
    select a file.
    >
    > Currently we only get the file name like process.pdf
    > But we also want to have the full path like
    > C:\Documents\Project1\process.pdf
    >
    > So we only need this full-path string. We don't want to
    do anything with
    > the
    > selected file with flash
    >
    > How is this possible, to get full file path with flash
    by using flex 3?
    Sounds like you need to be using AIR

  • Backing up selected files onto an external hard drive

    Hi,
    I have partitioned an external hard drive in order to use it for both Time Machine as well as selected files.  Is there a way to move over all data/documents/libraries as a whole rather than document by document?  I thought that if you clicked on the user in the side bar, and dragged it onto the hard drive that would back up everything, but I can't seem to do that.  I am beginning to use a new MBP and I want to only bring over select files and leave the rest on the external hard drive.
    Thanks for any help!

    Time Machine is a pretty sophisticated backup system - it will start by backing up your whole computer, and then it will do what is called an "incremental" backup every hour or so.  That incremental backup will take a copy of every file that has changed since it previously backed up.  So it will be fairly efficient with space usage, and it will allow you to recover files at many different points if you have a problem - for instance, you will be able to restore a document from earlier that day, from the day before, or even further back if it existed then.
    Apart from an offsite backup, I rely on TimeMachine for all my backups, because the big advantage is that it works in the background and backs up often.  The approach you seem to be considering is entirely manual, and therefore likely to be much less often.
    You can definitely restore individual files with Time Machine.  It has the benefit that you can also restore an entire computer if you need to, but that is not the only thing it does.  You may wish to browse Pondini's excellent Time Machine website to acquaint yourself more with its features.
    http://pondini.org/OSX/Home.html
    In answer to your question, yes, your important files are generally in your home folder.  However, if you only back up the home folder, and your MBP has a disk failure, you will have to reinstall it from scratch, add all your applications, download all the updates again, and then copy in files from your backup.  There may be issues associated with preference files and application versions, because you will be copying back preference files from your home folder but possibly installing later versions of applications.  If you already have the disk available, I don't recommend this approach.  I don't understand why the Genius Bar has put you off but then I am not privy to the whole conversation.
    Hope that helps.
    Ivan

  • "File Path Control" default Value

    Hi - How do we set or change the default value for "File Path Control" (Control --> String & Path ---> File Path Control)?
    I typed the default path into the control field on the front pannel and save the VI file.  The value gone when I reopen the file.

    jimmy.chretien wrote:
    [...] difference between Not a path and Empty path... Why?
    Not a Path is a specific value for the path (<Not a Path>).
    Developers should use this to prevent situations in applications, where a user has to select a path before performing an action (e.g. saving a file). If the user skips the path selection, the application still has "Not a Path" and can prevent errors and tell the user to select the path (error handling!).
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Schedule a ABAP query from SQ01 to transfer the output to a file path

    I am trying to schedule an ABAP query to run every night and transmit the output as a .TXT file to a particular file path on a server. In the "output format" of the selection screen I selected the second last radio button "File store" and entered the full path and file name.
    When I run this in foreground I get a pop up window confirming the file path before it is downloaded. I have to just hit enter. But when I run in background the file gets transmitted to the spool and not to the file path entered in "File Store".
    Is there any way I can make the file go to the specified path instead of the spool?
    Any help will be appreciated

    See documentation for enhancement SQUE0001. Go to SMOD, enter SQUE0001, and choose documentation.
    I had the same requirement, and I used enhancement SQUE0001 to create a screen exit that adds the selection, "private file". I then created a variant for my query with the private file button selected and the path included, and set up a batch job to run my query with my variant every night.
    Hope that helps.

  • Full file Path when using FormFile in struts

    hi,
    i am uploading an excel file. All is doing fine but whatever file is selected by user by clicking the browse button, its does not retreive full path it retreives only the file name selected......
    JSP page
    <html:form action="uploadFile.do" method="POST" enctype="multipart/form-data">
         <html:file property="fileName" title="Browse" />
         <html:hidden property="methodtoinvoke" value="uploadFile" />
         <html:submit value="submit" />
    </html:form>when i retrieve this filename and convert it to String its only shows file name and not the full path, as a result it always pick this file name from the current working directory.
    how can i get the selected file path ????
    Pls help
    thanx

    What would do a server side program that processes the file upload do with the client side path of the file?
    The server side process (your Action class) would receive a stream of bytes (multipart data) that contains the file's contents as well as other info like size, content type etc.
    ram.

  • GPIB/SCPI Browse File Path

    Is there a way to browse the file path of an instrument connected via GPIB?  From my experience, only the file system on the local controlling machine is accessible in this manner.  I will have files saved within a folder on a PNA but the file name will have a variable characters in the name based upon the date and saved version -- so from an automated testing standpoint, I won't necessarily know the entire file name during execution.  If I could using a browse file command to locate and store the file name before running the code, the script would be more streamlined. 
    An alternative method would be to search the known folder for the beginning of the file name string.  I know the List Folder function could do this for files stored locally, but again, this does not access the file system of the PNA controlled via GPIB.
    Any suggestions would be helpful.  Thank you.

    The information I was looking for there was how to save certain file information over GPIB (once I found the PNA help site it became trivial as they have that general information on their site).  In this instance I am trying to find ways to manipulate files and file structures over GPIB similar to the methods available in the File I/O functions list on LabVIEW.  Specifically, I want to search a folder for a file on the PNA and open it without knowing the complete file name (I will know the beginning string but the last couple digits will vary based on a variety of information).  If this was on the local machine, I could use List Folder and string Match Pattern functions to find the exact file name, however, I have not seen a way to do this or something comparable with the SCPI commands.  I understand this can be quite instrument specific but thought there may be a more general way to do this.  I may have to rethink how I'm structuring this portion of my code somehow to avoid this.

  • Image/File Path

    hi there,
    have a slight poblem regarding a file path, when running it (preview) in netbeans the following is fine
    String path = "src\\Game\\images\\character\\man.gif";However the distributed version no longer looks from src\\ its already in Game\\
    So the dist version (jar file) can no longer display
    man.gifAny ideas?
    Thanks
    Edited by: stevanicus on May 27, 2010 12:11 AM

    stevanicus wrote:
    ..This is what i've got,
    URL path = Game.class.getResource("images/character/");
    getImg(path + "man.gif");
    getImg(path + "man1.gif");
    Code snippets are next to useless. For example, this snippet fails to explain what getImg(String) does or how it does it(1). But please don't go on to post a bunch of other snippets you feel explains the problem. For better help sooner, post an SSCCE.
    1) My answers to your latest question would be different if the getImg(String) method was treating that String as a string representation of a File or URL, for instance. But either way I would advise you limit the getImg() method to accept either a File or URL as appropriate, rather than a String representing the same.
    The URL path, is correct thoHow do you know that?(2) Where/how was it checked?
    2)
    - Do a..
    prompt> jar -tf the.jar.. & copy/paste the output here.
    - Check the URL returned from getResource(String) via System.out or System.err.

Maybe you are looking for

  • Reading TIFF, Writing JPEG with Advanced Imaging

    I am working on a servlet that will read a TIFF image file from a SOCKET connection, and write it to a JPEG file for viewing by the user. I've been able to read the TIFF file into a byte array, but I'm not sure how to write it back out as a JPEG. The

  • Showing bangla character in all types of java mobile using bitmap fonts

    i am a new user of j2me.but i cannot find any helps. i want to do english to bangla dictionary for all types of java mobile using bitmap fonts. initially how can i display bangla character using bitmap font in non unicode supported java mobile??? but

  • We need JDK in zip Format

    We are developing Java application in restricted env where in we will not be able to install any software. We require the last JDK for windows in zip format for our testing purpose. I would be gr8 if sun continues supporting zip format too along with

  • Minimum on rows  and sums/ Summation on overral result required

    Dear All, If I have three shipments with three line items then I want to see the minimum for each key figure (in this case distance). This is becasue each shipment will not have an overall sum, but a number of shipments will have an overall total I a

  • BDC  for AB08

    Dear Experts, I am making a program which involves making a reversal of asset document using the T-CODE AB08. I am trying to make a recording to build a BDC table for transaction AB08 to use in the program. In the transaction I am using the dynamic s