09-10-2010 05:52 PM - edited 09-10-2010 05:53 PM
A few more tips:
09-10-2010 06:05 PM
altenbach wrote:
- The two "delete from array" right after reading the file can be replaced by a "single array subset".
of course I meant: ... single "array subset".
09-11-2010 12:00 PM
@AlexP1 wrote:
oops, forgot to attach the VI
A few more comments to get you going:
09-11-2010 07:24 PM
Ok, I think I'm really close. I've noticed that the event structure keeps my while loop from running, so the system hangs even if I hit the stop button because the boolean value never actually changes.
I looked at these threads and it seems like I have a similar problem:
So I added another event for the while loop cancel button that simply wires a True value to the while loop condition. This works, but I get an error 1045: A Null Refnum is passed to the close reference function. How do I make a refnum constant? Not really sure what that is. Or should I handle this case a different way?
09-11-2010 07:40 PM
@AlexP1 wrote:
Ok, I think I'm really close. I've noticed that the event structure keeps my while loop from running, so the system hangs even if I hit the stop button because the boolean value never actually changes.
I don't understand what you are saying here. What boolean are you talking about?
So I added another event for the while loop cancel button that simply wires a True value to the while loop condition. This works, but I get an error 1045: A Null Refnum is passed to the close reference function. How do I make a refnum constant? Not really sure what that is. Or should I handle this case a different way?
You need to make sure your refnum has the wire running through all events. You should disable the "Use Default if Unwired" option on that tunnel. That way if you had a new case, your code won't break until you go and put your wire through. LIkewise for your orange wires coming out of the loop and going to the spreadsheet file. Since the only way to stop the loop is with the stop button, and that case doesn't have the wires going through, you are going to always have default data of zero coming out of those tunnels going to the Spreadsheet File function.