09-27-2012 09:39 AM
Hi All, I have a subvi to implement read data and return it to display on front panel. Right now it is not working well on display. But when I set the breakpoint to debug, I found the step into the sub vi can make everything work, but if step over this block, it will be the same as the normal operation. Could anyone advise why this differences happend? Thank you very much!
09-27-2012 09:48 AM - edited 09-27-2012 09:49 AM
I can't give you an explanation, without seeing the whole picture "in context". try posting your vi and we can have a better look at it as a "whole"...
09-27-2012 09:53 AM
Hi Apok, here is the "whole" one. Thank you!
09-27-2012 10:01 AM
@bhl3302 wrote:
Hi Apok, here is the "whole" one. Thank you!
When run at normal speed the sub-Vi may be returning an error. Since you are not using a SR for the error, subsequent iterations may be stepping on the error code.
If that guess does not exaplin it, show us the sub-VI.
Ben
09-27-2012 10:09 AM
Hi Ben, are you talking about adding a SR like this? It still cannot work if this is what you are saying. If not, could you advise how to do?
09-27-2012 10:11 AM
That is the shift register Ben was referring to. But the question was whether or not an error was being generated. The shift register is needed in order to preserve the error.
If there is no error, post the actual subVI.
09-27-2012 10:23 AM
@crossrulz wrote:
... Ben was referring to....
Kudoes to you cross for doing a great job of reading my mind and filling in the gaps.
You are a good little dinosaur.
Ben
09-27-2012 10:29 AM
Dinosaur? I'm not that old. Oh, you may be referring to my avatar. It is actually The Cheat.
09-27-2012 01:39 PM
Hi All, I run it again and did not find the error. Attached is the sub vi. You guys are correct, it seems like the running of this subvi was not completed sometimes. When it steps out, the runnng has not been completed yet. Please advise what should I revise! Thank you very much!
09-27-2012 02:15 PM
It's hard to tell, but you might have a race condition. Where is the VISA Resouce coming out of inside of the Diagram Disable Structure? If it is connected to the property node, then you have a race condition. Please attach a snippet or the actual VI to make debugging a little easier.