09-28-2009 10:41 AM
09-28-2009 10:43 AM
Cory,
See the earlier posts - I want to be able to abort the VI using the abort VI node.
I can't do this if it is a subVI, it has to be called as a VI in its own right.
09-28-2009 10:44 AM
The VI might be running already when you try to call it.
By the way, usually you should set the control values BEFORE running the VI.
Daniel
09-28-2009 10:47 AM
Daniel,
That makes sense, about the VI already running when I try to call it.
How can I prevent this from happening? How can I call it once, and make the top level VI wait until it has finished executing (i.e. as though it were a subVI)?
09-28-2009 10:50 AM - edited 09-28-2009 10:50 AM
Just set the "Wait until done" flag to True.
But don't forget, set the control values before running the VI.
Daniel
09-28-2009 11:18 AM
Hi,
Surely it would be better to make all_tests.vi detect when a test has taken too long, or retured an incorrect value? This could be used to set a failed boolean and skip the remaining tests. Then you can do away with all this surrounding timing stuff with all its race conditions, vi server complexity, or closing an IO channel whilst it's being used
Rod.
09-28-2009 11:24 AM
Rod,
Yes, given the increasing complexity and susceptibility to race conditions etc., I am inclined to agree.
The trouble is that if the programme does "hang", it will be inside a while loop waiting for a response from some DUT (albeit several layers down the hierachy). Hence, I have the same issue - just at a lower level within the hierachy.
Dan
09-28-2009 11:27 AM
09-29-2009 03:11 AM
Yes,
On reflection, I think timeouts on my comms VIs are the way forward. It's a bit tricky though, as I am currently using the timeout on the "TCP read" VI to add a delay to the while loop that I sit in waiting for my end-of-transmission character (">" in this case). See attached code.
I think I will just OR the stop condition with "if number of iterations is greater than 100", or something similar.
Cheers,
Dan