Bug in LV8 : 'Save for previous version' and 'Write to Binary File' VI

Hello
I am using LabVIEW 8's revamped 'Write to Binary File' VI with a 'TRUE' boolean constant wired to the optional 'prepend array or string size?' to write non-trivial structures to a binary file. I then read the file with the 'Read from Binary File' VI and everything is fine. I don't wire anything to the 'file (use dialog)' input (don't know if this can help).
However, after saving my VI for LabVIEW 7.1, I cannot read the binary files created with the LV7 version of the VI anymore. After examining the LV7 converted version of the VI, there is a 'FALSE' boolean constant that is wired to the equivalent of the 'prepend array or string size' input, which breaks the binary format that is expected.
The attached files are LV8 and 'saved for LV7' versions of a dummy VI that writes an array of 5 integers into a binary file. To test the bug, start LV8, open the LV8 version, run it and create a 'test-lv8.bin' file, then open the LV7 version, run it and create a 'test-lv7.bin' file. Check the content of the two files : the size of the array is indeed missing from the 'test-lv7.bin' file, which can be assimilated as a bug in my opinion.
I think I found another one too : if in LV8 I wire the 'cancelled' boolean output of the 'Open/Create/Replace file' to the selector of a case structure, the 'converted to LV7' version VI will have an error, saying the Case Structure selector is not wired.
Could someone please confirm these are indeed bugs ?
Thanks in advance and have a nice day.
Eric Batut
Attachments:
Test Binary File v7-v8 LV7.vi ‏15 KB
Test Binary File v7-v8 LV8.vi ‏7 KB

I'm using LV8.6 and need to read a .bin file created in MATLAB. This file obviously does not contain the 4 byte header that LabVIEW prepends .bin files with. So when I use Read from Binary File, I get no data (I'm trying to read an array of doubles). I've tried making my .bin file both in native and big-endian format and changing the representation (double, int64, float64) but none of this works. I noted that if I create the same array in a .bin file in LabVIEW and wire a FALSE to the "prepend array or string size?", my VI for reading .bin files can't read this file either.
Any work-arounds here?
(I'll try attaching my write & read VI's)
Attachments:
ReadWriteBinFile.zip ‏19 KB

Similar Messages

  • Save for Previous version and post!

    Hi,
     This is a request for all the users posting in the NI Discussion forum. Please save your VI for the previous version (atleast to 8.6) before posting because the people who knows your best solution might not have the latest version that becomes tough for them to solve.
    So make it easier and get the solution faster....
    The best solution is the one you find it by yourself
    Solved!
    Go to Solution.

    smercurio_fc wrote:
    Not sure what you mean by this. Are you saying you can't create snippets in LV2010?
    No. Am asking about the VI's posted not as snippet as attachements (eg: Read from RS232). Is it that much tough to add a feature to make LabVIEW Compatible for the latest version (Atleast from LV2009 compatible for LV2010). Then the need for Upconvert VI Requests ( Its really usefull thread. Kudos to smercurio_fc) will gradually decrease .
    The best solution is the one you find it by yourself

  • How do I continue to save for previous version?

    Hello. I am currently using LabView 9.0 32-bit, Windows 7. Unfortunately, my university uses Labview 8.6.1 32-bit, Windows Vista Business. First, I tried to open my VI's which I started at the University and modified on my machine back on a university machine. I received an error stating that the files were saved with a newer version of LabView and could not be opened. I went home, and opened the VI's again and used File > Save for Previous Version. This is okay, except it forces me to create a new destination folder. When I close LabView and open the VI's from this destination folder, they open up automatically with an asterisk to indicate the files have changed and require saving. Obviously this is automatically converting my 8.6 files to 9.0. This is very frustrating.
    How can I force LabView to stick with the version that the files were created or saved as? If I attempt to save the "asterisked" files for previous version, it refuses to let me. Thank you for your time and consideration.

    You must be doing something wrong, or perhaps Windows 7 is interfering. Here's the step-by-step process:
    Launch LabVIEW 2009.
    Open an 8.6 VI. It should show up with an asterisk in the title bar.
    Make some changes.
    Select File -> Save for Previous Version.
    Verify that "8.6" is selected in the dropdown.
    Click "Save...".
    In the dialog click the "Save" button to accept the default of saving the VI into a new folder called "<VI Name> Folder".
    Close the VI. When asked if you want to save changes click "Don't Save".
    Check the timestamp on the newly created file in that folder.
    Open the same 8.6 VI again.
    Make some changes. 
    Select File -> Save for Previous Version.
    Verify that "8.6" is selected in the dropdown.
    Click "Save...".
    The "File name" textbox should have the same default name as previously. If you click "Save" Windows should move you into that folder, and the save dialog should remain open. The file listing should contain the VI.
    Click on the "Current Folder" button. You should get a dialog warning you that the operation will save over existing files. Click "OK" to continue. The VI will be saved as the previous version over the previous save that was done. To verify this, check the timestamp on the file.
    I just did the above on LV2009 running under XP just so I could get the button names correct.
    You can repeat steps 10-16 as many times as you want without needing to create a new folder.

  • 8.2.1 save for previous version

    I have a few problems with Labview 8.2.1 "Save for Previous Version" for use with a computer with Labview 8.0.
    1-Labview 8.0 does not see the VI (created by 8.2.1 that was saved for previous version 8.0) as an 8.0 VI.
    it complains:
    "The VI, last saved with LabVIEW 8.0, has been converted to version 8.0.  After a VI has been saved with LabVIEW 8.0 it can only be loaded by LabVIEW 8.0 or later.  Use Save for Previous Version... to save VIs for older versions of LabVIEW."
    2-I can't Reset the History to zero.  The history resets only down to 1.
    3-Save for Previous Version will not save only the one VI specified, it saves a bunch of VIs.  I have to pick out only the changed VIs and place them with the unchanged 8.0 VIs.  Is there a way to just save a single changed file as 8.0?
    Are these problems that were fixed in later versions of Labview, such as 8.5.1, 8.6 etc?

    Gaslight wrote:
    So keeping a copy of Labview 8.0 for an unspecified length of time means keeping one or more computers running Windows XP for an unspecified length of time.  Labview 8.0 will NOT run under Vista or Windows 7.  This also means the computers runing Labview 8.0 will no longer remain on out company LAN.  They are eliminating all computers running XP.
    I will be forced to order fewer copies Labview 2010 upgrade.  Less money for National Instruments.
    You could use the included VM version of xp in windows 7 if you needed to, but it runs really horribly.
    You could also keep a VMware image of XP on a computer.

  • Labview 7.1 crashes windows XP when using VI's saved with the 'Save for Previous Version' option available in Labview 8

    I am trying to work with a series of vi's developed in Labview 8 in Labview 7.1.  The code was saved with the 'Save for Previous Version' option available in Labview 8.  When trying to use the code in LV7.1 my entire Windows XP system locks up (cursor freezes).  Are there any ideas what's going on and how to fix this?
    Thanks for your help!
    Mike

    I have seen some problems with the save for previous option in the past. Instead of saving the entire hierarchy, try seperating the code into several different pieces and saving each piece individually. Then, see if you can open the different pieces in 7.1.
    If that doesn't help, you should post some more details, like when exactly does it lock up, does it have things like DLL calls, and maybe attach the code.
    Try to take over the world!

  • Save for previous version (8.6 to 8.5) including dependencies

    Hello everyone,
    Once again please forgive me if I use the wrong terminology as I am very new to Labview.
    Here is what I am trying to do. I have a project written in Labview 8.6. It has a number of files and some dependencies (which include .lvlib's .lvlclass's and some .vi's). I need to save this project as a previous version (8.5) and send it downstairs to the lab. I've tried to save it as a previous version using the the project explorer: file->save for previous version. When I zip up the project folder and send it to the lab and try and run it on 8.5 it says there are missing files. Specifically:
    NI_report.lvclass
    NI_reportGenerationCore.lvlib
    NI_HTML.lvclass
    NI_StandardReport.lvclass
    I am not creating an executable as they need to be able to make some minor changes to the code. Both computers have the full Labview development suite. Also there is no chance that the lab can simply upgrade to 8.6 from 8.5 as these upgrades are scheduled by another department.
    Is there any way to save this project so that it includes the dependencies that are missing in the project folder? I'm sure there must be a simple solution but I can't seem to get it to work.
    As always any suggestions or advice is greatly appreciated. Please let me know if there is any more information I can provide. Also please feel free to tell me what I'm doing wrong as I'm keen to understand why what I'm trying to do isn't working.
    Cheers,
    Alex
    Alexander H. | Software Developer | CLAD

    Yes the toolkit is installed on the computer in the lab. I was able previously able to work on this project on either computer and only had problems once the upstairs computer was upgraded to Labview 8.6.
    Alexander H. | Software Developer | CLAD

  • VBAI2011 Save for Previous Version option

    Hello,
    Since VBAI 2011 is one of NI products, I am curious that it has an option of Save As For Previous version like Labview, or is there any way around it?. 
    I currenlty have running Labview 8.6 in my systems which doesn't work well with VBAI 2011. What I have done is using Labview 2012 evaluation version to re-save my VI 8.6 till to 2010 version. I am thinking an option of down-grade my VBAI if possible.
    Thanks.
    Hoa Huynh
    University of Minnesota

    Not sure if you're aware, but you can use the Vision Builder API in LabVIEW to control an any version of VBAI 2010 or greater with any version of LV 8.5 or higher. There is a shipping example located in your Vision Builder AI\API Examples folder. The API has several advantages over migrating your inspection to LabVIEW, so you might want to check it out. Here is a web video of how to use the API to control VBAI, run inspections, and get the results and images:
    http://zone.ni.com/wv/app/doc/p/id/wv-2424
    Hopefully Vision Builder will eventually support saving for previous, but until then, using the API allows you to use a variety of LabVIEW versions with a variety of VBAI versions.
    Hope this helps,
    Brad

  • Labview 2011 save for previous version crashes

    Hello,
    I am trying to save an existing Labview 2011 project to any previous version. I have tried 2010 all the way down to 8.0. I have a clean project, all files are LV 2011, it builds and runs correctly. I have mass compiled.  It did call 2 dynamic vi's but I have removed those. The project did contain conditional compilation, but that is removed. It did contain disabled diagrams, but they are removed. I did a save hierarchy to a seperate folder, just to make sure the standard save works. It does.  There are 1196 vi's and controls in the project.
    If I save to LV 2010, quite a number of sub vi's are saved (909 including controls), but none of the top level ones. The crash is manifested by Labview leaving memory (task manager doesn't see it any more) and the Labview window dissapearing.
    Attached is the save dialog at the instance before crashing.
    I have not been able to locate a log to let me know the last loaded vi. If you know of such a log, please let me know.
    Has anyone experienced similar problems? If so, any clues on how to fix this?
    Thanks,
    Bart Schroder
    Attachments:
    LV2011 save crash.jpg ‏17 KB

    BartSchroder wrote:
    I have not been able to locate a log to let me know the last loaded vi. If you know of such a log, please let me know.
    In the advanced build configuration, check "generate build log file". See if you get more information. Good luck.
    Quote from the help:
    Generate build log file—Specifies whether to create a log file for the build. The build log file lists all files contained in the build, including subVIs you do not specify as Startup VIs or Always Included. The log file also contains general build information such as build start and end time, the build specification and project name, and any errors that occurred during the build.
    LabVIEW Champion . Do more with less code and in less time .

  • Save for previous version 8.5 to 8.2 generates code that crashes Labview (uses classes)

    Hello,
    I'm working on some java style interfaces for labview for hot swapping of instrumentation for design patterns. When I try to port this code, developed on Labview 8.5 back to labview 8.2, the code it generates crashes labview (both 8.5 and 8.2).
    Included is a small snipet of the work that demonstrates this behavior.
    It includes to classes:
    untitledProject1 - the containing project (version 8.5)
    FunctionGeneratorI - Similar to a Java style interface (A class with all Dynamic VI's with no useful functionality)
    FunctionGenerator33220a - An intended implementation of Function generator (only a few functions implemented)
    and a folder "labview8_2Distribution"
    Which contains the port of the 8.5 code to 8.2.
    To recreate the error:
    A.
    1. Open "labview8_2Distribution\Users\Laptop\Desktop\objec​t\Untitled Project 1" (8.2 save)
    2. Verify it crashes labview 8.5 and labview 8.2.
    3. Watch labview crash?
    B.
    1. Open the "Untitled project 1" in the root directory. (Using labview 8.5)
    2. Save the project as a labview 8.2 type.
    3. Try to open the saved version with 8.5 and 8.2.
    4. Watch labview crash?
    Greg Sonnenfeld
    Attachments:
    error.zip ‏885 KB

    Hello Karunya,
    In regards to your questions:
    >Can you post your code? Have you tested this by creating another project?
    Do you have an xcontrols in your projects? Do you have typedefs? Do you
    have a LVOOP constant on your block diagram? Are you also using Classes?
    I cannot post the cost as it is way too big. Not really my code but a spaghetti code from a previous programmer. I think problems saving it to a previous version have to do with a few things:
    1) Memory - I have 1 GB of RAM and I am running XP. I notice the available RAM dropping quickly as it is saving and then it blow up.
    2) Long Filenames - The directory path of the original file is incorporated into the saved "previous version" of the code. While a good design, it does make the file/path a bit longer when saving
    3) One of teh things it saves is the drivers and their menus. This is due to the drivers being in a subdirectory of the original code and not in the c:\program files\national instruments\labview 8.5\instr.lib directory. I saw this when I tried to save the file as an LLB.
    4) If I work with smaller parts of the code without long paths, it saves fine.
    There probably are xcontrols, definitely typedefs, no LVOOP's or Classes. Hope you can do something with all this. It just seems that converting to a later version of the code should be reversable. Thanks.
    Michael

  • LabVIEW 8.0 project save for previous version

       Hello all,
    I have a LV8 project, and I want to save the VIs for a previous LV version. Do I have to save every VI in my project manually, or is there an "exporting" function for the complete project available?
    If available, where can i find this function?
    Regards
    Heinrich

    Les.embrey wrote:
    I am trying to work from home with anothers code and trying to figure out how to fix what they have done.
    I go to transfer a project to  my home computer (bigger faster better monitors ) and I can not due to the fact that they are using shared vi libraries on other computors with no clean way to collect all sub vi's  Documents notes and rev versions under the project.  So I end  up with the broken arrow and no way to get the shared vi's untill the next day.
    I think I have them and bingo NO WAY
    Worse the Labtop they gave me is on a wireless net work and I have no way of getting the shared files.
    BRING BACK "SAVE PROJECT AS"    That will collect all the information and zip it up for transfer to another system.
    PLEASE
    if you have to put it under password ok  My boss would like that.
    Upgrading to 8.20 should also help a long way. The project shortcomings in LabVIEW 8.0 that are almost inherent to a new feature of that size have been considerably made better there.
    It is very unlikely that NI is going to develop a standalone tool for LabVIEW 8.0 to be distributed as addon, now 8.20 is out and I do not see someone from the outside stepping up to write such a tool as that is a major task to do and quite thankless since it is already more or less unneccessary on LabVIEW 8.20.
    Rolf Kalberamatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Save for previous version doesn't warn about incompatibilities

    I just back-saved some code from LV2012 to LV2009. The code included some conditional indexing. I expected that either:
    The code would be converted to a LV2009 functional equivalent without conditional indexing
    I would get a warning about the incompatibility
    I was disappointed to find that I got neither....
    I thought we previously got warnings about incompatibility... Or is my brain superimposing some wishful thinking onto my memories again?
    Chris Virgona
    Solved!
    Go to Solution.

    Just getting back to this thread after a busy week...
    The project that I backsaved included 2 VIs with conditional indexing. Neither had particularly complicated logic and the data types were a scalar and a small flat cluster of standard types. The one interesting thing about it was that both myself and a colleague both noticed the problematic backsave on different PCs and with different revisions of the code.
    Anyway, I since tried to reproduce the issue but failed... (Doesn't that always happen straight after a forum post?!) Now when I do a backsave (on similar code, lost track of the original code where I noticed this) I get the build array + case structure + shift register...
    BUT there is one problem: The new shift register always seems to be uninitialised. That seems buggy to me... (It definitely produces defective code in my case.) Is it that way by design for some reason??
    Chris Virgona

  • Save for previous versions of GB

    I have recently written a song on GB and sent it to my dad who has Garageband 2.0.2. Of course, he couldn't open it.
    Does anybody know how to save a GB file so it may be opened on older versions?
    Please help
    imac G4   Mac OS X (10.4.4)  

    (And of course, if your Dad only wants to listen to it, you can mix it down to iTunes and send him an MP3. But I guess you knew that ...

  • Error saving for previous version 2009 to 8.5

    I have a project with a VI containing DAQmx Data Acquisition VIs, timed loops and other standard conrols and indicators.  When trying to save for previous version (from LV2009 to LV8.5) an error occurs.  All of the dependencies can be saved to previous versions but the main VI cannot.  Can anyone help with this problem?
    The error message can be seen in the image attached.
    Attachments:
    error.JPG ‏18 KB

    Backsaving creates a folder structure with the backsaved VI and all support files in their relative locations. This might be useful in most cases.
    Very often I just need a single VI (without SubVIs) backsaved. I do this programmatically using VI server (open VI reference, then call the "Save For Previous" method, then close the reference). See image below.
    To do this for a project you could of course use a recursive file list and go through the whole list (programmatically), saving the VIs in a parallel folder structure (create destination folder before saving the VI).

  • How To Build exe for Previous Versions

    I'm new to LabView and still struggilng a little with all the files associated with a project, so I'm sure this is a simple question.
    I'm running LabView v10 for development, but wish to create an exe that can run on a v8.5 runtime version. I've seen the threads that suggest that this is as simple as 'Save For Previous Version'... but for some reason I cannot seem to make this work. I have tried saving the vi for 8.5, then choosing to build the exe, but upon being prompted to create an associated project, I'm told there are unsaved changes - that the subvi's have been converted to version 10. I've tried declining the changes and opting to use those in memory, but this also doesn't work; the built exe then gives me a runtime error, complaining it does not have LV Runtime 10.
    I've tried saving the project with 'Save for Previous Version', then building. Again, this doesn't work - even though when i open, then immediately close either the project or it's contained vi's, I'm told there are unsaved changes where it has been converted to LV10 - implying the saved files were indeed saved in LV8.5 format.
    I seem to be going round in circles here. Would someone mind laying out the necessary steps to build an exe that can run on a previous runtime environment?
    Thanks in advance
    Solved!
    Go to Solution.

    To my knowledge, none of NI's device drivers can have multiple versions co-existing.  Now, that doesn't necessarily mean if you use any hardware that you will run into problems.  If the hardware is NI hardware, then they will also have specific drivers which can be in conflict, but if they are another manufacturer, it'll come down to NI-VISA probably.  If you are using any NI data acquisiton cards, then you have DAQmx installed.
    As long as your program doesn't access these devices, you are OK.  You are not required to update the drivers if you don't use the hardware.  You need to look in the relase notes for each of the drivers you need to update and see if you can find a version that supports both 8.5 and LV2010.
    Even if you do this, it is not a 100% guarantee that you won't have problems.  I had written an application for a customer once that used NI-RFSA.  I had a control on the front panel based on a typedef in the driver.  I updated my laptop for a new project, but later had to come back and make an update for the original project.  The typedef had changed and caused a recompile.  Nothing broke on my end.  When I sent the update, it crashed on the customer PC because of the typedef change.  I ended up getting them to upgrade the driver on their machine.

  • Create snippet for previous version

    Hello!
    Is there a way to create and save a snippet from the block diagram for a previous version? I have realized that even if I save my VI for previous version, and open it, the created png snippet from this eariler version is still LV version 2014.
    Is this possible somehow?
    thanks for info!
    Solved!
    Go to Solution.

    hello,
    Thanks for the info!
    Unfortunately I cannot install it via the VI Package Manager, i get the following error msg: "one or more packages you have selected cannot be installed together. this could be due to a conflict between them, blablabla..."
    I only try to install this package, and the following ones I have already. Maybe one or more of them are incompatible with the Code Capture Tool?
    MGI 1D Array-1.0.0.28
    MGI Application Control-1.0.2.45
    MGI Cluster-1.0.0.16
    MGI Error Handling-1.0.0.23
    MGI File-1.0.0.33
    MGI Graph-1.0.0.15
    MGI Numeric-1.0.0.22
    MGI Picture & Image-1.0.0.16
    MGI Read/Write Anything-2.1.2.37
    MGI String-1.0.2.25
    MGI Timing-1.0.0.13
    NI Icon Library Update Tool-1.0.0.13
    OpenG Application Control Library-4.1.0.7
    OpenG Error Library-4.2.0.23
    OpenG LabVIEW Data Library-4.2.0.21

Maybe you are looking for