GSR Posted January 11, 2009 Report Share Posted January 11, 2009 Dear all, I am reading a LV book using LV7. I see the read binary file VI, which has a pos offset input. However, I don't see the input in LV 8.5. If I only want to read from the 7th element in the binary file, should I read the whole file using the read binary file VI and then use array subset to take out the useful part? Quote Link to comment
Antoine Chalons Posted January 11, 2009 Report Share Posted January 11, 2009 QUOTE (zmarcoz @ Jan 10 2009, 07:37 AM) If I only want to read from the 7th element in the binary file, should I read the whole file using the read binary file VI and then use array subset to take out the useful part? Hello, You can do that but this is not the only way. Between LabVIEW 7.1 and 8.5 the File functions have changed a bit - and in my opinion its easier to use now but there is a lack of documentation. See below. http://lavag.org/old_files/monthly_01_2009/post-7452-1231582348.png' target="_blank"> Hope this helps Quote Link to comment
Rolf Kalbermatter Posted January 15, 2009 Report Share Posted January 15, 2009 QUOTE (Antoine Châlons @ Jan 10 2009, 06:12 AM) Hello,You can do that but this is not the only way. Between LabVIEW 7.1 and 8.5 the File functions have changed a bit - and in my opinion its easier to use now but there is a lack of documentation. See below. http://lavag.org/old_files/monthly_01_2009/post-7452-1231582348.png' target="_blank"> Hope this helps Option 3 was somewhere documented in old LabVIEW days (LabVIEW 4 or 5) but it seems it got somehow lost since, although it still works. Rolf Kalbermatter Quote Link to comment
Antoine Chalons Posted January 15, 2009 Report Share Posted January 15, 2009 QUOTE (rolfk @ Jan 14 2009, 09:19 AM) Option 3 was somewhere documented in old LabVIEW days (LabVIEW 4 or 5) but it seems it got somehow lost since, although it still works.Rolf Kalbermatter INDEED !! I didn't know it was documented, I just know it's not now and I think this is a shame :thumbdown: Another thing is driving me mad... on the "binary Write" primitive, before LV8 the input "header" had its default value to False and now in LV8 and above this input - renamed "prepend array or string size" - has its defauft to True. So if you're not careful when upgrading code from LV 7.1 to 8.X, the code is not broken but you get weird results when reading your binary file because some bytes to each chunk of data you write. That happened to me recently Quote Link to comment
Rolf Kalbermatter Posted January 15, 2009 Report Share Posted January 15, 2009 QUOTE (Antoine Châlons @ Jan 14 2009, 03:31 AM) Another thing is driving me mad... on the "binary Write" primitive, before LV8 the input "header" had its default value to False and now in LV8 and above this input - renamed "prepend array or string size" - has its defauft to True. So if you're not careful when upgrading code from LV 7.1 to 8.X, the code is not broken but you get weird results when reading your binary file because some bytes to each chunk of data you write. That happened to me recently Hmm didn't encounter that so far. I would expect the upgrade process to take care of that. It does with just about anything else with the immensely reworked File IO functions. Writing new code is of course another beast if you are used to the old default value Rolf Kalbermatter Quote Link to comment
Antoine Chalons Posted January 15, 2009 Report Share Posted January 15, 2009 QUOTE (rolfk @ Jan 14 2009, 10:26 AM) Writing new code is of course another beast if you are used to the old default value Damn true ! Quote Link to comment
LAVA 1.0 Content Posted January 15, 2009 Report Share Posted January 15, 2009 QUOTE (Antoine Châlons @ Jan 14 2009, 09:31 AM) ... on the "binary Write" primitive, before LV8 the input "header" had its default value to False and now in LV8 and above this input - renamed "prepend array or string size" - has its defauft to True. So if you're not careful when upgrading code from LV 7.1 to 8.X, the code is not broken but you get weird results when reading your binary file because some bytes to each chunk of data you write. That happened to me recently QUOTE (rolfk @ Jan 14 2009, 10:26 AM) Hmm didn't encounter that so far. I would expect the upgrade process to take care of that. As far as I have seen this happens in the right way. If you encounter somewhere where this doesn't happen it is a bug and you should report it to NI. Ton Quote Link to comment
Antoine Chalons Posted January 15, 2009 Report Share Posted January 15, 2009 QUOTE (Ton @ Jan 14 2009, 10:58 AM) As far as I have seen this happens in the right way.If you encounter somewhere where this doesn't happen it is a bug and you should report it to NI. Ton This is true. A VI saved in LV 7.1 using file IO functions and opened in LV 8 will be fine (appropriate constants will be added to guarantee the same functionality) ; in my case it was coding in LV 8 and assuming that default values would be the same as in LV 7.1 . Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.