LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems reading a file...

Keep getting this message (when trying to  run the vi's bay1 & bay 2)... is this due to the fact that they are both trying to access the read_write file?

 

I have tried copying the read_write file and re-naming it... but with no luck 😞

 

Message:

Possible reason(s): LabVIEW: An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @. ========================= NI-488: Command requires GPIB Controller to be Controller-In-Charge.

Download All
0 Kudos
Message 1 of 6
(2,403 Views)
Have you used the highlight execution tool to see exactly where the error occurs?  What is the path for the file you are using, including the file name?
0 Kudos
Message 2 of 6
(2,397 Views)

The error occurs on the close file part...

 

c:\documents and Settings\All Users.WINDOWS\Documents\BatchView\Bay_1.vi

c:\documents and Settings\All Users.WINDOWS\Documents\BatchView\Bay_2.vi 

c:\documents and Settings\All Users.WINDOWS\Documents\BatchView\File_Write.vi 

0 Kudos
Message 3 of 6
(2,358 Views)
Im guessing that the error is displayed after the close file function but it may be generated earlier.  If you are trying to write to the same file from two different places at the same time then you would see this error.  One way around it is to open the reference to the file outside the main loop and pass the reference to both subVI's so that they can both have access to the file.  Trying to open the file within each subVI can cause problems.
Message 4 of 6
(2,352 Views)

Ok thanks for advice... will give it a go and let you know how I get on

 

Thanks

0 Kudos
Message 5 of 6
(2,349 Views)
I should add that you still want to be careful about writing to a file at the same time from two different places.  You may need to incorporate some synchronization into your program, perhaps using notifiers to communciate between subVIs.  An action engine would also work here.
Message Edited by jmcbee on 03-17-2009 07:32 AM
0 Kudos
Message 6 of 6
(2,345 Views)