11-03-2010 07:32 PM
The basic issue is, I have two excel files being created per While Loop iteration. One (excel 1) is correctly appending hundreds of data points into the file. The other (excel 2) Runs the first While loop iteration fine, then skips appending 2nd iteration of data and then remains 1 iteration behind until program exits, never writing the last iteration to file.
Please help.
11-05-2010 06:10 AM
Hi KMerrill,
I don't see a specific reason why that would be happening. Have you tried using Highlight Execution or breakpoints to see what happens when you get to that VI the second time.
11-05-2010 06:36 AM
it doesn't look like there is anything to enforce which excel write comes first. Are you sure it's missing a loop and not just executing second in some cases?
11-08-2010 07:10 PM
When I set a break point just after getting the data from the hardware and walk through the rest of the icons, it properly writes the data to the excel file. When I take the break point away, Excel 2 get 1 loop behind Excel 1.
Could there be an issue with a buffer somewhere?
When I'm back on site, I'll try putting a wait around one of the Excel writes to control execution and to separate the use of that function.
Thanks for taking a look, let me know if you think of anything else.
11-08-2010 07:57 PM
It looks to me like Excel 2 actually executes before Excel 1. It is tough to tell because you have some backwards running wires. But I see a path wire coming out of Excel 2 and into some path and string functions then into Excel 1. But I can't tell how the path is getting determined for the Excel 2 Write to Spreadsheet File vi.
Wait a minute, I do see something. It looks like you have a path shooting in Excel 2 from the bottom which explains why I can't see it. (Please clean up wiring!) And that path looks like it comes from before the Write to Spreadsheet file in the small case structure beforehand. But what happens in the false case?
Why do you have a 1 iteration For Loop around your code?
It is impossible for us to debug a shrunken screenshot of your code particularly when some of the wires overlap and run backwards. Clean up the code and post the VI. Cleaning up the code might be enough to show you something isn't executing the way you think it should.