09-13-2011 04:30 PM
Hi, I try to read data from DMM via RT system. In my vi, if I wire the Read Data line to the "Reference Node" then it gives ERROR 7 otherwise it's OK (Please refer to the attached file). It doesn't show which file it's looking for and I gues it looks for the file to write data to (I just inherited the code)
thank you very much,
09-14-2011 11:52 AM
Hi Triple H, thanks for the detailed problem description
First, as to the KB you found, you don't have an executable in your project. It is a source distribution. I don't think the KB will help us with this problem.
Error 7 is simply "File not found" Have you checked that the file path in "Report Data" exists?
09-14-2011 12:18 PM
Hi Jesse,
yes, this is just a source distribution project. When I unwired the the "Error In" and "Error Out" to the bottom of "VI Reference Node" (Look at the attachment) it runs FINE and it writes to the "results.mdb" but NO DATA has wrote to it (the results.mdb updated with NEW timestamp). Otherwise, it complains for "File not found". I even tried to as NI website advises for "Error 7 When Running an Application Using VIs from Report Generation Toolkit for MS Office" but the error is still.
thanks so much for your help,
09-14-2011 05:22 PM
Hi Triple H,
Did I miss something in your original post? It seems like your subVI might have a default file that it is writing to when you don't have "Report Data" connected and you are suppressing errors when you delete the error wires.
Could you post a screen shot of the VI you are calling?
It seems whoever had the VI before you put in logic for when the VI was aborted (1039 is an abortion code):
I wonder if he had problems with it aborting. Once you have the VI running there is a much better way to do this with the clear specific error community vi.
09-14-2011 05:38 PM
you are right. I don't know why the one who wrote this wants to check if the VI was aborted. Here's another attachment for your reference. some other instrument VIs are defined the same of this.
09-14-2011 08:25 PM
Hi Triple,
Thanks for the additional info.
I noticed that you deleted the file path to the call by reference node. Did you modify the subvi you are calling also?
The error "file not found" is happening inside the VI that is being call by this node. This error appears to happen at the terminal you marked but in reality it is just being detected there. It is actually being thrown in the sub vi you are calling with the call by reference node.
If you probe the wire below during run-time you will see the path to the subvi. You can keep this subVI open during runtime to see where the error is being thrown. I will bet there is a control named "File Path" or similar that has a value like "results.mdb"
09-14-2011 09:49 PM
Hi Jesse,
Here's another screenshot that path for the vi is correct (as probe). Please look at this new attachment. What should I do with this?
I appreciated for your help,
Triple H
09-14-2011 10:06 PM
Great, open up the VI it points to and use "Highlight Execution" to see where the error is occuring
09-15-2011 09:56 AM
Hi Jesse,
The last screenshot of the attachments shows with the Highlight Execution was on.
Thank you,
09-15-2011 12:25 PM
You also should be able to open the subVI in the probe path. The error, which is a file not found error, is happening in this subVI. You can open the subVI along with the main program and use highlight execution on both to see what is happening.