04-12-2011 05:06 PM
Hi everybody,
I was wondering why the error no. 7 is coming as attached, when I run the program.
My intention is to write the data (from the FIFO) to the spreadsheet using Write to measurement function. I have connected the 1-D array to the 1-D array input of this function. I have connecetd the add file port of this sub VI to the add file controller. I could not connect it withe add file indicator. Wire shows broken when doing that.
Can you give me necessary suggestion to overcome this error and accomplish my recording of data using that sub VI (Write to spreadsheet.vi)?
Necessary attachments are given for your convenience.
Thank You.
Solved! Go to Solution.
04-12-2011 10:22 PM
You forgot the attachments.
04-13-2011 09:43 AM
Attachments are here. Sorry for the mistake.
04-13-2011 10:07 AM - edited 04-13-2011 10:10 AM
Based on the pictures you attached, it seems like when you run your VI, you have a file dialog box popping up to ask you where to save the file. And when you do that, you are selecting a file location that happens to be on UTA's desktop.
Is it possible you don't have the security rights to create this file on UTA's desktop? Do any other programs (such as Excel) have this file open?
Create a file path control on your front panel so that you can preselect the file name.
What operating system and version of LabVIEW do you have?
04-13-2011 10:39 AM
I have Windows 7 as OS and version 2010 for LV
Yeah, that excel is not a read-only file, meaning I should have been able to write on this file, am I right?
04-13-2011 11:00 AM
Windows 7 has tighter security restrictions than previous versions of Windows, so that doesn't rule out the possibility of trying to create a file that you aren't permitted to do so.
@auree123 wrote:
Yeah, that excel is not a read-only file, meaning I should have been able to write on this file, am I right?
???
I don't know what you are asking and how that relates to the question I am asking you.
Have you created a file by that name that Excel currently has open? Then when you try to run your VI, you are getting the error?
If Excel has a file open, then it puts a lock on the file that no other program will be allowed to open the file. You would get an error in LabVIEW. I don't know whether it would be the same error 7 that you are getting or another code. But I am asking questions to try to rule out some of the things that I know would cause you problems.
By the way, you do know that what you are creating is a text file and not an Excel file? Just giving it an .xls extension does not automatically make it an Excel file. Although if you open it in Excel, Excel is generally smart enough to recognize text files and know how to import them. You really should use an extension like .txt or .csv and not .xls so that you don't confuse your file with real Excel files.
04-13-2011 02:42 PM
Hi,
Now I am getting only error no. 43 after adding the file path to the new path output of the write to spreadsheet.vi.
Can you suggest to recover this error please.
Note. My intention is to write the data to a text/xl file after I hit the run button.
Anyone's feedback would be appreciated.
04-13-2011 03:31 PM
Did you read the error message?
Error 43 (which really shouldn't be an error, more of a warning) says the user cancelled the dialog box. When you do that, there is no valid path and thus the file saving functions can't work.
04-13-2011 11:39 PM
Yeah, I understand that message.
But don't know why that msg comes?
I just hit the run and no dialog comes, just that msg comes.
Anyway< I think any silly thing goes on which I have to find out.
Thank You.
04-14-2011 03:03 PM
Do you have your file selected in the file path before running the VI, not have a file selected first would throw that error.