Jump to content

Appending to a Binary File


Recommended Posts

Hopefully a simple problem:

I need to append data acquired to a binary file. Every time I try it overwrites.

I have spent the last few hours trying to get this to work using LabView help and browsing these forums but I just cannot figure it out. Any help is greatly appreciated.

Additional Information:

LabView 8.0

I am acquring data every second in clumps of 2000 and would like to write this data to a binary file. I will be writing data for several hours thus the reason I need to use binary.

Junior in college- physics major.

I apologize if this has been discussed previously; I was not able to find a previous post that helped me.

Link to comment
Hopefully a simple problem:

I need to append data acquired to a binary file. Every time I try it overwrites.

I have spent the last few hours trying to get this to work using LabView help and browsing these forums but I just cannot figure it out. Any help is greatly appreciated.

Additional Information:

LabView 8.0

I am acquring data every second in clumps of 2000 and would like to write this data to a binary file. I will be writing data for several hours thus the reason I need to use binary.

Junior in college- physics major.

I apologize if this has been discussed previously; I was not able to find a previous post that helped me.

The standard file writing VIs open, write, and close the file all at once if you give it a path. If you open the file first and pass the reference to the Write to Binary File, then it can append the data. Look at the help for the Write to Binary File VI.

David

Link to comment

Download File:post-5311-1150390835.vi

Try something like this one attached below.

It could be a way to append data:

at first it checks for an existing file, if nothing is found a new file is created; if a file is alredy present then it "appends" data.

Let me know what do you think about that ;)

Fabio

This program worked very well for awhile. It solved a few problems I was having.

The only problem I am having now is that when the programs reads the file and inserts new data into the array, the array eventually becomes too large for the computer to handle. I tried modifying your program slightly so that new data would simply be appended to the end of the binary file but have still had no luck. I've looked through the writings Vis and the helps several times.

Is there a way to do this?

Mayday's slightly modified Vi:

Download File:post-5311-1150390835.vi

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.