Jump to content

Different Read Binary file (LV 7 and 8.5)


GSR

Recommended Posts

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?

Link to comment

QUOTE (Antoine Châlons @ Jan 10 2009, 06:12 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

Link to comment

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 :angry:

Link to comment

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 :angry:

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

Link to comment

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 :unsure: .

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.