09-14-2012 07:42 AM - edited 09-14-2012 07:47 AM
Hello all,
I'm getting a very inconsistent error with one of my SubVI's. If I'm trying to debug and I turn execution highlighting on in my main VI, I get an error (see picture attached below). If I don't have execution highlighting on, it works most of the time. However, when I run the SubVI by itself with execution on or off, it works fine. In the Main VI I'm using the "Fract/Exp String to Number" function. It errors out at the "WorksheetFunction" Variant to Data functions. Any ideas?
Thanks all!
Solved! Go to Solution.
09-14-2012 08:11 AM - edited 09-14-2012 08:12 AM
I finally got it to error out consistently, and I just don't get it. If you run the attached VI with the two SubVI's, enter into the string input "0407.05007.020179" and run it with execution highlighting on. It will error out at the Variant to Data functions. As you can see, I tried using two different data types and it errors out regardless.
.
09-14-2012 10:55 AM
09-14-2012 11:18 AM
Have you tried putting probes on the variants that are causing problems?
Also, I can't get this to run - I get an error with the VLookup function. Might be a difference in versions of Excel. Are you sure your range should end at fu300? There's no need to do the explicit conversions TO variants, LabVIEW will handle that automatically.
09-17-2012 07:04 AM
Thanks for the responses, I fixed the "Excel get data specified field" VI that I believe was causing it to not run for you guys. I attached the main VI and two sub VIs along with the spreadsheets for you to test out. As for the "To Variant" functions, I put those in there just to see if it would make a difference. Before that I had them wired directly into the VLookup function arguments with the same issue. Test.VI is the main program.
I've put probes in the wires that send arguments to the VLookup function and they all have the correct information, but for the wire that comes out of the VLookup function, it is empty. This is with execution highlighting on.
09-17-2012 07:16 AM
Hello PiDi,
I tried putting as high as a 3 second delay between Worksheet Activate and the Worksheet Range function with no success. Same issue. Thanks though
09-17-2012 07:22 AM
Update:
I decided to probe the wire coming out of the Range function, and the value is "0". This must be the issue. Any ideas on how to fix that?
09-17-2012 10:07 AM
It appears the Error.zip file is corrupt, when I try to unzip the file I get an error saying its an invalid zip file.
09-17-2012 10:24 AM
Strange... I zipped it again, try it now.
09-17-2012 10:38 AM
Can you unzip it on your machine? I still cannot open it with the windows zip extractor. The error says "The Compressed (zipped) Folder '...Error.zip' is invalid."
It may be easier to attach just the files.