11-09-2005 09:49 AM
Hello again,
The following snippet of code is part of a much larger program that leads the user through a battery of tests meant to check for defects in a truck cab.
In each frame the user is asked to do one of three things:
1) Type some data and press "ENTER" (saves status of "PASS" Boolean in column 1 (c1), "FAIL" Boolean in c2 and the contents of the data string in c3)
2) Press an "ENTER" button to acknowledge reading the information given (saves status of "PASS" Boolean in c1)
3) Press the "YES" or "NO" button in response to the question. (Saves status of "PASS" Boolean in c1 and "FAIL" Boolean in c2)
The program is designed to save the raw data gathered in each frame in a specific row in the spreadsheet for easy recall. You can see that I have noted above the information saved in each type of frame and which column the data is saved in.
Some cab features are optional, in which case the program asks if the option is present (signified by ** in frame 16). If the option is present, the program asks certain questions associated with that option. Otherwise, the program skips those questions and asks about the next option. If you answer "YES" in frame 16 and answer the questions in frames 17, 18, 19, and then 20, the information entered in each frame is saved properly. If you answer "NO" in frame 16, the program skips to frame 20. At that point, the data entered in frame 20 should be saved in row 19, but instead the program quits saving data entirely. I think the program is trying to write after the EOF, and I don't know how to fix it.
Can anyone help me?
Thanks,
Drew
11-10-2005 06:04 PM
You don't ever seem to be appending to the existing file, but rather reading the file, adding data, and then rewriting the file altogether. In that case I don't see how the Write Text to Spreadsheet VI could be trying to write after the EOF marker.
Have you tried any debugging techniques like highlighted execution or conditional probes to verify the data that you are sending to the spreadsheet?