"open file" vi doesn't work in executable

I have built an executable that reads a com port and displays the readings in a chart.
The vi also has a "start logging" button that uses the "open file", "write to file", and "close file" vi's, and it works on the machine with labview installed on it.
When saving it as an executable and executing it on a clean PC, I can select the com port, I can see the graph working, and when I start logging, I can select a new filename.
However after closing the file, and opening it in a text editor, there is nothing in the file.  So I think there is a problem with the "write to file" vi.
I tried this both in LV 8.5 as well as 7.1 with the same results. Any ideas? I have Visa and Run-time running on the clean PC. Are there any other drivers that I need to run on the host PC?

You have a lot of problems with your VI:
Lousy architecture. You have 4 loops. That's 3 too many. You only need one loop. The code that does the data logging should be in the main (and only) loop.
Do not open and close VISA sessions every time you iterate. Open once. Close once.
Do not open and close files every time you iterate. Open once. Close once.
You do not need to write to an indicator and to a local variable at the same time. A local variable is not a separate entity from a control/indicator - it's the same thing. Thus, the write of the local variable is superfluous. Besides, if you were to correctly code this to use only one loop you wouldn't need the local variable in the first place.
Why are you creating dynamic data from a set of 4 floating point values? Use Build Array to create an array. Charts and graphs do not require you to use dynamic data.
Identical labels. You have four controls called "Current Temp °C". If I mentioned the "Current Temp °C" control, would you know which one I'm talking about? Make your labels distinct. Use captions if you want the text on the front panel to say the same thing. 
I don't know if that serial stuff is a by-product of you opening an old VI in 8.5, so I don't know what that SetSerialTermChar VI is supposed to be. You should look at the serial port examples that ship with LabVIEW for updated VIs.
That's it for now....

Similar Messages

  • "Open File with" doesn't work correctly!

    Hello,
    for some files Bridge chooses the false software to open them.
    There seems to be no way to change the properties for the "open with" function.
    To be more concrete:
    - Bridge tries to open MindManager files ".mmap" using Safari for Windows.
    - Within Windows the ".mmap" files are correctly assigned
    - Bridge doesn't offer this file type in the association preferences.
    Any ideas?
    Thank you,
    Michael

    Thank you for the answer, you are correct, the ".mmap" file isn't listed in Bridge.
    But Bridge should be able to let an other software open it, as it usually does for other not listed exotic files I'm using. For such a common thing Bridge would only need to ask me: "which software do you want to use to open it?" Which is also a very common function in Windows. Or Bridge should simply accept my common Windows preferences where the ".mmap" file is very clearly associated with the correct application. Bridge seems to ignore this, which is very strange!
    I'm not interested in converting the files, but just in managing them in Bridge, and using them within the software they are designed for: MindManager, a Mind Mapping software by Mindjet.

  • I keep getting the message: "what should firefox do with this file" in Windows XP every time I want to download a file, e.g., adobe, excel, etc. How can this annoying message be deleted? The check box to "open file automatically" does not work!

    I keep getting the message: "what should Firefox do with this file" in Windows XP every time I want to download a file, e.g., adobe, excel, etc. How can this annoying message be deleted? The check box to "open file automatically" does not work!

    cor-el,
    Thanks for your prompt reply. However, the sources you gave do not seem to apply exactly to my situation. I have attached some screenshots that show what the dialogue box looks like for a pdf download, and what my settings in the Apps panel of Options are. You will note in the first screenshot that I have checked the box to handle this file type automatically; however, the next time I try to download a file of that type, the same dialogue box appears looking exactly like the one shown, so checking the "automatic" option appears to do nothing. The files to be downloaded from my Gmail messages are not generic or altered file types - they are shown as pdf, doc, docx, etc. So while your intent was good, your post did not help. Thanks anyway.

  • When i convert a word file with a hyperlinks to a PDF file it doesn't work ?? thanks in advance for helping me

    when i convert a word file with a hyperlinks to a PDF file it doesn't work ?? thanks in advance for helping me

    using microsoft word.
    the hyperlink doesn't work in the pdf file (adobe reader).
    adobe reader xi.
    my operating system windows 8.1.
    the attached screen is appeared.

  • File.delete() and File.deleteOnExit() doesn't work consistently..

    I am seeing some odd behavior with trying to delete files that were opened. Usually just doing new File("file.txt").delete() would work. However, in this case, I have created an input stream to the file, read it in, saved it to another location (copied it), and now I am trying to delete it.
    The odd thing is, in my simple application, the user can work with one file at a time, but I move "processed" files to a lower pane in a swing app. When they exit it, it then archives all the files in that lower pane. Usually every file but the last one opened deletes. However, I have seen odd behavior where by some files don't delete, sometimes all of them wont delete. I tried the deleteOnExit() call which to me should be done by the JVM after it has released all objects such that they don't matter and the JVM ignores any object refs and directly makes a call (through JNI perhaps) to the underlying OS to delete the file. This doesn't work either.
    I am at a loss as to why sometimes some files delete, and other times they don't. In my processing code, I always close the input stream and set its variable to null. So I am not sure how it is possible a reference could still be held to the object representing the file on disk.

    and then, in the other class
      public int cdplayerINIToMMCD(File aDatabase, String thePassword) throws IllegalArgumentException {
         /*---------DATA---------*/
         String dbLogin, dbPassword;
         JFileChooser fc;
         INIFileFilter ff;
         int dialogReturnVal;
         String nameChosen;
         File INIFile;
         ProgressMonitor progressMonitor;
         BufferedReader inFileStream;
         String oneLine;
         int totalLines = 0;
         int linesParsed = 0;
         boolean openDBResult;
         int hasPassword;
         if ((aDatabase == null) || (!aDatabase.exists()) ||
            (FileManagement.verifyMMCD(aDatabase) == FileManagement.VERIFY_FAILED)) {
            throw new IllegalArgumentException();       
         else { 
            currentDB = aDatabase;
            if(thePassword == null) {
              dbPassword = "";
            else { dbPassword = thePassword; }
            dbLogin = dbPassword; //For MSAccess dbLogin == dbPassword
         //Ask the user for the cdplayer.ini file.
         //Create a file chooser
         if (System.getProperty("os.name").indexOf("Windows") > -1) {
            fc = new JFileChooser("C:\\Windows");
         else {
            fc = new JFileChooser();     
         fc.setMultiSelectionEnabled(false);
         fc.setDragEnabled(false);
         //Create a new FileFilter
         ff = new INIFileFilter();
         //Add this filter to our File chooser.
         fc.addChoosableFileFilter(ff);
         fc.setFileFilter(ff);
         //Ask the user to locate it.
         do {
            dialogReturnVal = fc.showOpenDialog(mainFrame);
            if (dialogReturnVal == JFileChooser.APPROVE_OPTION) {
               nameChosen = fc.getSelectedFile().getAbsolutePath();
               if(nameChosen.toLowerCase().endsWith(INIFileFilter.FILE_TYPE)) { INIFile=new File(nameChosen); }
               else { INIFile = new File(nameChosen+INIFileFilter.FILE_TYPE); }
               if (!INIFile.exists()) {
                  continue; //If the name specified does not exist, ask again.
               else { break; }
            else { //User clicked cancel in the open dialog.
               //Ignore what we've done so far.
               return(IMPORT_ABORTED);
         } while(true); //Keep asking until cancelled or a valid file is specified.
         //Determine how many lines will be parsed.
         try {
           //Open the INI for counting
           inFileStream = new BufferedReader(new InputStreamReader(new FileInputStream(INIFile)));
           while ((inFileStream.readLine()) != null) {
               totalLines++;
           //Close the INI file.
           inFileStream.close();
         } catch (IOException ex) { return(IMPORT_FAILED); }
         //Make a progress monitor that will show progress while importing.
         progressMonitor = new ProgressMonitor(mainFrame, "Importing file","", 0, totalLines);
         progressMonitor.setProgress(0);
         progressMonitor.setMillisToPopup(100);
         progressMonitor.setMillisToDecideToPopup(1);
         //Make our DatabaseHandler to insert results to the database.
         dbh = new DatabaseHandler();
         //Open the database connection.
         do {
           try {
              openDBResult = dbh.openDBConnection(currentDB, dbLogin, dbPassword);
           } catch(JDBCException ex) { return(IMPORT_JDBC_ERROR); } //OUCH! can't write anything.
             catch(SQLException ex) {
                 openDBResult = DatabaseHandler.OPNCN_FAILED;
                 //Can not open the database. Is it password protected?
                 hasPassword = JOptionPane.showConfirmDialog(mainFrame, "Could not open the database. "+
                                                "The password is wrong or you have not specified it.\n"+
                           "Do you want to enter one now?", "New password?", JOptionPane.YES_NO_OPTION);
                if (hasPassword == MMCDCatalog.DLG_OPTN_YES) {
                   dbPassword = JOptionPane.showInputDialog(mainFrame, "Please enter your "+
                                                              "password for the DataBase:");
                    dbLogin = dbPassword; //For MSAccess, login == password                                                    
                //If the password wasn't the problem, then we can't help it.
                else { return(IMPORT_FAILED); }
         } while(openDBResult != DatabaseHandler.OPNCN_OK); //If it is OK, no exception thrown.
         //Import the ini file
         try {
            //Open the INI file for parsing.
            inFileStream = new BufferedReader(new InputStreamReader(new FileInputStream(INIFile)));
            //Read and parse the INI file. Save entries once parsed.
            while ((oneLine = inFileStream.readLine()) != null) {
               parseLine(oneLine);
               linesParsed++;
               progressMonitor.setNote("Entries imported so far: "+entriesImported);
               progressMonitor.setProgress(linesParsed);
               if ((progressMonitor.isCanceled()) || (linesParsed == progressMonitor.getMaximum())) {
                  progressMonitor.close();
                  break;
            //Close the INI file.
            inFileStream.close();
         } catch (IOException ex) {
              //Make absolutely sure the progressMonitor has disappeared
                progressMonitor.close();
                if (dbh.closeDBConnection() != DatabaseHandler.CLSCN_OK) {
                 JOptionPane.showMessageDialog(mainFrame, "Error while reading the INI file.\n"+
                    "Error while attempting to close the database", "Error", JOptionPane.INFORMATION_MESSAGE);
              else {
                 JOptionPane.showMessageDialog(mainFrame, "Error while reading the INI file.",
                                                    "Error", JOptionPane.INFORMATION_MESSAGE);     
                return(IMPORT_FAILED);
         //Make absolutely sure the progressMonitor has disappeared
         progressMonitor.close();
         //Close the database connection
         if (dbh.closeDBConnection() != DatabaseHandler.CLSCN_OK) {
            JOptionPane.showMessageDialog(mainFrame, "Error while closing the database after import.",
                                          "Error", JOptionPane.INFORMATION_MESSAGE);
         //Did the user cancel?
         if (totalLines != linesParsed) {
            return(IMPORT_ABORTED);     
         //Success!
         //Everything ok. Return the number of entries imported.
         return(entriesImported);
      }

  • Locate file window doesn't work

    Ok, this problem occures only on our Z800 workstations.
    Everything works as expected on my laptop.
    When I try to relink a media file, the relink media window opens, and then I click the Locate button.
    The new window ALWAYS opens in the top most level (basically My Computer in windows) and not in the last used directory.
    I think it has something to do with the second problem - the path text box doesn't work. Whatever I enter there and click Return - nothing happens. It doesn't navigate to the folder specified in the path field. The only way to navigate is to go throught the folder tree on the left.
    For every file I have to do it always from the top most level - that is a lot of clicking.
    Also if I uncheck Use Media Browser to locate files, the default windows dialog properly navigates to the last known location of the file.
    I know it's an error - since on my laptop everything works fine. The window opens in the last know location of the media file and I can easily navigate using the path field.
    Any suggestions what could be the reason for this?

    Jim Simon wrote:
    I'm not sure if this is a bug.  The Locate File dialog seems to be opening where it thinks the file might be, rather than where it was.  For example, I renamed the 0000.mts file for a particular project, and when I opened Premiere Pro, Locate File went to the 0000.mts file from another project/folder, thinking that might be it.
    So...if you have no other files that might be the missing file, the dialog starts at the top.
    Jim,
    I understand what you are saying in regard to where it thinks it might be. However if I manually type a path where a file I want to link to rathter then clicking 20 times in the folder tree, it throws a "File not accessible" error. Yet if I use the folder tree to navigate to the same file it sees it and links to it fine.
    It just seems that whenever I try to manually type a path in the path address field is when the error occurs.
    Are you able to manually type in a path > hit enter/return and have it link to the file?

  • Open new jframe doesn't work when put into jar

    I cant get my program to open up a new frame. When i run my program from netbeans it works fine but when i put it into an executable jar it doesn't work. I have three frames, Main, About and SelectLanguage. From Main i can create a new instance of this from this window but it wont open either of the other two. This is the code i use for all three. Please help.
    new About().show();please help.
    clarkie

    well, if that's the code you use for all three, and
    they are different classes, maybe you should call the
    right class name?
    The code you posted isn't helpful, and I can't begin
    to guess what you're doing wrong.nah, i use
    new Main().show();
    new About().show();
    new SelectLanguage().show();also, i get this error:
    java.lang.NoClassDefFoundError: org/netbeans/lib/awtextra/AbsoluteLayout
    at About.initComponents(About.java:29)
    at About.<init>(About.java:15)
    at Main.aboutMenuItemActionPerformed(Main.java:409)
    at Main.access$2200(Main.java:19)
    at Main$22.actionPerformed(Main.java:344)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknow
    n Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.AbstractButton.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseRelease
    d(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

  • File.deleteOnExit() doesn't work

    My application generates some temporary files (XML files and copied XSL files). The Apache FOP processor then generates other files (PDF) in a different directory. After processing, my application deletes those temporary files. Howevere, some of those files can't be deleted (File.delete() returned false). I guess, FOP still has some access to them ovene though, i clear my FOP ressources. In those cases, I do a myFile.deleteOnExit(). But this doesn't seem to work: those files never get deleted when i exit the application (and therefore the VM). I have to delete them by hand (and this works).

    Well, I close the files, but i don't know if FOP still has open file handles.
    I also tried to add a shutdown hook to delete the remaining files, but this doesn't help.

  • Preference panes - cannot open because it doesn't work on an intel-based mac.

    Just updated to Mavericks and was checking out "System Preferences". Of the 37 items I have here 19 will not open. The error messages I get are alternately:
    "Could not load <....> preference pane"
    "You can’t open <....> preferences because it doesn’t work on an Intel-based Mac."
    (<....> = name of preference pane)
    Clicking on a pane will give one message, then, once "OK" has been clicked, clicking again on the same pane will give the second. There does not seem to be any correlation between when a particular message will occur, but it is always the same panes with the issue.
    Ths was initially a upgrade install over the latest Mtn Lion, but I've just completed a repair and restore on the os with a fresh download, with no change.
    I am running a mid-2009 macbook pro.
    If anyone knows what is going on here and could suggest a solution ...!
    Panes with the issue:
    Security & Privacy; Notifications; Printers & Scanners; iCloud; Internet Accounts; Network; Sharing; Users & Groups; Parental Controls; Date & Time; Dictation & Speech; Time Machine; Accessibility; Startup Disk; an

    I had the same issue after restoring a cloned drive with Mavericks.
    Repairing permissions didn't help.
    Show invisible files and go to /Applications - you will see a bunch of corrupt application starting with .0
    For example i had
    .0Messages
    .0System Preferences
    .0Time machine
    The wrong System Preferences was getting launched when calling it from the menu - the corrupt one.
    I deleted them and all is good.
    Also if this doesn't work, select Applications/System preferences and call Get Info from the File menu and make sure 32 bit mode is not activated.

  • How to open files from old claris works with Appleworks 6 in OS X 10

    Hi,
    I have some claris works files backed up on a zip disk from a G3 with OS 7.X.
    Now I try to open them on another G3 with Appleworks6 in OS X 10.
    In Appleworks, I choose "open file" but those files are grey out so I cannot choose them. Is there anyway I can open those files in OS X 10?

    Kuul, welcome to Apple Discussions.
    MacLinkPlus @ http://www.dataviz.com/products/maclinkplus/ will probably translate the files so you can open them.
     Cheers, Tom

  • When my Imac first boots up, file sharing doesn't work

    27" iMac; about 7 months old
    OS X 10.8.4
    2.7 Ghz Intel Core i5
    When I first boot it up, file sharing with the PCs doesn't work.  I have to turn file sharing off then back on, sometimes I have to do it several times, before the PCs will finally connect using their mapped drives.

    Move the com.apple.systempreferences.plist out of the stupidly hidden /Library/Preferences/ folder onto the Desktop, restart, and see if the problem persists. If not, reset your system preferences and delete the moved file. Then, update to 10.8.5.

  • File sharing doesn't work between two computers

    I have a Macbook Air bought late 2009 (I'll call it MBA 1). OS 10.6.0.
    I have a new Macbook Air bought a few days ago (I'll call it MBA 2). OS 10.6.4.
    I have been attempting to share files from the two computers.
    I was able to move files from MBA 1 to MBA 2 without too much fuss. I could do it both ways: by finding "Shared" in Finder and then accessing the files or I could go to "Go" and "Connect to Server". I was able to add the username of the MBA 2 to the list of users in the Sharing pane of the MBA 1.
    So going from MBA 1 ---> MBA 2 is fine.
    However going from MBA 2 ----> MBA 1 doesn't work.
    1) The finder in the MBA 1 doesn't show "Shared".
    2) I can't add user to the Sharing pane of the MBA 2.
    The problem could be that the two usernames of the MBA 1 and the MBA 2 are very similar.
    Username of MBA 1: jk
    Username of MBA 2: J K
    I tested this theory out by adding a username I just made up called "Jack" and it added the username fine to the list of users.
    But it's too late to change the username of the computers now.
    What can I do?

    I got it to work.
    What I did was on MBA 2, I went to "Go" and "Connect to server". Then I selected the MBA 1 to connect to.
    As soon as I did that, "Shared" appeared in Finder with the MBA 2's name on it.
    After connecting which took a long time, the folders to be shared showed up in the Finder window.
    I don't know why trying to connect to MBA 2's server didn't work in MBA 1. I went to "Go" and "Connect to server" many times on the MBA 1 but it didn't work.

  • V4 download didn't work. Ca't uninstall the file that doesn't work. I get can't proceed because firefox is open when it isn't

    Downloaded v.4. It downloaded but I could not open foxfire. I tried to unistall so I could download again. I couldn't uninstall because I kept getting a message that foxfire had to close, when it wasn't open. I verifies it wasn't open in task manager.
    I downloaded again and propmted "run" but it wouldn't continue set-up because firefox was still open when it wasn't.
    I was happy with 3.6 and now I have nothing except internet explorer.

    1st try the Restart and if need be try the reset
    Restart or reset your iPhone, iPad, or iPod touch
    https://support.apple.com/en-us/HT201559
    Best of Luck

  • Automator service to open file in app only works if app is closed

    For my work I frequently need to edit text files that have non-standard extensions (and many have no extension at all). So for convenience when browsing in Finder, I created a simple Automator service that opens selected files TextMate:
    It works but the problem is that it only works if TM is initially closed before running the service. If it's open when the service runs, the TM menu bar appears but the file doesn't open. If I close TM and re-run the service, the file opens. How should I modify the service so that it will work whether or not TM is initially open or closed? Thanks!

    Thanks! That works, but I had to keep the 'Get Selected Finder Items' as the first action.
    Both of these configurations open an empty TextMate window:

  • The "always open with-"  option doesn't work!

    Is there a way to get the "Always open with" option when doing a (control) (option) click on a file to actually ALWAYS open with the application I choose? Could this feature be broken or perhaps mislabeled?
    Here's what happens; I'll set a file to "always open with" one application. I work on that file and save it. The next time I try to open that file it opens with the snow leopard default application instead of using the application I directed it to "Always open with".
    I don't want to open every file type with this application so I'm not setting "apply to all" in the info window/ inspector, I simply want this one file to always open with the application I've selected.
    I'm hoping some of you super mac users will know a trick to make this work.

    I want to open a few select files with a non-default application (now that the creation code is not used.)...If I work on the file and make/save any changes, it reverts to the default app.
    Aha! Okay, I don't think any of us were getting that in the initial posts. You are correct. Snow Leopard no longer uses Type and Creator codes by default, but they are still there. Various things are keeping you from doing what you want.
    1) Newer programs that do not use Type and Creator codes at all still need a way to tell the OS what files belong to them. Since at least back as far as Leopard (likely earlier), the system now uses Uniform Type Identifiers. As far as keeping track of what files belong to what applications, they serve the same purpose as Type and Creator codes. So when you save changes, it will indeed revert back to the default app since the file once again gets saved with that program's UTI data.
    2) Some programs use both UTI and Type and Creator codes. Usually older apps that have come from PPC code. I would guess that would be either because the developer doesn't want to waste time removing the code that adds the Type and Creator codes to the files, or more likely, to make sure files passed to other users still on older Macs that don't use UTI won't have trouble opening them.
    3) I use some much older apps which have still not been rewritten at all for Intel Macs and are still all PPC code. They still write Type and Creator codes.

Maybe you are looking for

  • Disk utility error message

    My daughter told me her Mac mini isn't booting up past the grey screen. I put in the install disk and started it up pressing "C" and used Disk Utility to attempt to figure out what's up. I got the following error message: Could not repair due to unde

  • APEX Report Formatting in PDF Help

    Hello there, I was asked to create a report in APEX that will generate a report in PDF. The report will have the first column that will print Institution names, the subtotal should print the institution sector (eg: research university or state Univer

  • Acrobat v8 Standard Admin point install patches

    We have an application that will not work with Acrobat 9 so at this point I need to create an Admin point install for version 8 and would like to update the admin point to the most recent update for Acrobat 8.  Is there a chart I can use that list th

  • JDBC  & sql_trace

    Hello, is anyone aware that a "ALTER SESSION SET SQL_TRACE = TRUE" (or dbms_session.set_sql_trace(TRUE)) does not work through JDBC? When I issue the above statement in SQL*Plus the trace files will be generated. When I do the same from a JDBC based

  • Can't send imessages between my phone and daughter's phone

    My daughter and I were using one login for our iphones. I created a new id. We're unable to send each other imessages. We have restored both phones. When I logged in to this forum using MY apple id, the email was addressed to my daughter. I spent an