LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 5 occurred at Write To Measurement File

I'm trying to read voltages and thermocouples from an SCXI 1000 chassis using a SCXI 1300 and 1303, respectively.  When trying to write to a measurement file (.lvm) i receive the following error message:

 

Error 5 occurred at Write To Measurement File

 

Possible reason(s):

LabVIEW:  File already open.
=========================
NI-488:  Command requires GPIB Controller to be System Controller.

 

I've tried renaming the file and reconfiguring the write to measurement file settings, but the error message returns after the second try after renaming.  It happens at different intervals.  I'm using LabView 8.6 and that I have the reset input set to false to prevent it from writing to multiple files.  I have the write to measurement sub-VI set to write to the next available file name.

 

Also, I'm not using a GPIB controller.  I followed several other forum threads on this subject and none of them seemed to help.

 

Any ideas on how to fix this problem?

0 Kudos
Message 1 of 8
(7,395 Views)

Any change another program might have the file open such as Excel?

 

Or you don't have permissions to write to whatever directory you want to save the file?

Message Edited by Ravens Fan on 10-30-2009 04:49 PM
0 Kudos
Message 2 of 8
(7,393 Views)

I don't think either of those are the issue.  I've tried different settings in the Write to Measurement File such as using append to file and ask user to choose file name.  Different combinations of these work, while others don't.  For instance right now I have the append to file and ask user to choose buttons selected, and that seems to be working, however, if I use overwrite existing file with the ask user to choose buttons, it doesn't work and I get the same error message.  I unistalled 488.2 since I'm not using nor will I ever need to use a GPIB controller.  This did not resolve my issue.  Now I just get the same error message with out the NI-488 reason. 

 

Any more ideas?

 

Thanks

0 Kudos
Message 3 of 8
(7,383 Views)
Are you closing the file in LabVIEW at the end of your program.  Do you get this issue if you change to a new filename?
Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 4 of 8
(7,381 Views)

I get the same error if I try using a different file name.  I'm not sure what you mean by closing the file in LabView at the end of my program.  Can you explain further to me?

 

Thanks

0 Kudos
Message 5 of 8
(7,378 Views)

Assume you are using the Express VI, Write to Measurement File.  Correct?

 

Sound like it is preventing you from overwriting the file and throwing the error.  Have you tried all the If File Already Exist options? What happens if you select overwrite?  I know you don't want to do this but want to know if this will clear the error.  Also, check the obvious that there is no error when the subVI is being called (No Error).

 

Don't worry about closing the file if you are using the Express VIs.

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 6 of 8
(7,375 Views)

Am I using all express VIs and I have tried all the if file already exists options.  The append file option seems to work, while the overwrite does not, unless I do not use the ask user to choose option.

 

Example: Ask user to choose + Overwrite if file already exists = error; however save to one file + overwrite = no error

 

or

 

Ask user to choose + Append to file = no error; but save to one file + append = error

 

Other combinations do not work as well, including the use next file name which is what i had started out using when i first encountered the error...

 

0 Kudos
Message 7 of 8
(7,372 Views)

Don't worry about the GPIB part of the message.  GPIB errors share some of the same error code numbers as other LabVIEW errors.  If you get an error 5, LabVIEW really doesn't know if it is LabVIEW error 5, or GPIB error 5 being passed along.  So it shows the messages for both and you need to decide which is appropriate for your case.  The vast majority of LabVIEW users aren't using GPIB, so the first error is usually the correct one for them.

 

It would be best if you posted your VI.  Perhaps there is some setting in the express VI or something else that explains the issue you are getting.  With the actual VI, we can poke around at it and see if we can duplicate your problem so we can best determine how to solve it.

0 Kudos
Message 8 of 8
(7,361 Views)