Jump to content

Error 5 occurred at write to binary file


Recommended Posts

Hi,

I encounter problem when writing an image file to binary.

***Error 5 occurred at Write to Binary File***

Possible Reason:

LabVIEW:File already open.

=====================================

NI-488: Command requires GPIB Controller to be System Controller.

Anyone know what issue will cause this problem?

Link to comment

According to the error message the file you are writing to is already Open.

So I would check to see if some other application is currently using the file. Maybe you have already opened the file in LabVIEW and are trying to open it again.

Upload a copy of your VI so we can see it, would help you get a better answer

Danny

Link to comment
  • 2 years later...

Well, I wouldn't have approached it this way but if you really need to, then just use this error message code as an indicator if the file is already open or not. i.e. check if you are receiving this error 5, and if so then you know the file is already open. 

 

Are you trying to write to this file or deleting it, or trying to open it again?

 

Kas

Link to comment

I've seen something similar with TDMS and Copy.  I have a test running where we log to TDMS.  Then we close the file at the end, then copy it and the index file to a duplicate location.  Many times I would get an error 10 "Duplicate Path" "Asynchronous I/O Operation In Progress".  So I would put the copy function in a for to retry a couple times and we no longer have this problem.  I never determined the cause, and didn't have time to debug it because a solution was found.

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.