09-27-2012 02:48 PM
09-27-2012 03:00 PM
It is all about data dependency. If there is no data dependency between the VISA Clear and the VISA Write, then it is very possible that you are clearing the buffer after the data has been recieved, cleared, and then read. The best way to make sure the Clear happens first is to wire the VISA Resource and the Error cluster from the VISA Clear to the VISA Write.
But thinking about this again, I am wrong. The Diagram Disable Structure has to complete first. So that is not a race condition.
09-27-2012 03:05 PM
After letting cross do all of the dirty work...
Could it be a timing issue and the operation is timing out but in lightbulb mode it has more time?
Ben
09-27-2012 03:11 PM
Hi Ben, if there is a timing issue, where do you think can cause it? Because I do not see any time related items there, could you give me more deatil? Thank you!
09-28-2012 07:57 AM
the widget you are talking to may need more time to reply.
Ben
09-28-2012 09:16 AM
Hi Ben, if it needs more time to reply, what should I do? Thank you very much!
09-28-2012 09:16 AM
Hi Ben, if it needs more time to reply, what should I do? Thank you very much!
09-28-2012 09:22 AM
You could use a simple state machine. The other simple way is to insert a delay between your actions. If you are waiting for responses you can also increase your read timeout.
09-28-2012 09:22 AM
@bhl3302 wrote:
Hi Ben, if it needs more time to reply, what should I do? Thank you very much!
THat question is probably best answered by the maker of the widget.
THey may have a "status" flag that can be checked to see if it is done or the widget just needs more time where a small dealy can be introduced (ms wait function) or simply retry the operation until it responds.
But I am speculating.
You should drop probes or indicators on all of the wires of interest to get a clue of the nature of the failure. Quoting myself "The first step in solving a problem is clearly defing what the problem is."
Ben
09-28-2012 11:58 AM
Ben,
Re: your quote. I guess great minds think alike. I've heard a similar saying quoted as though it were a well-known (but unattributed) aphorism, "A problem well-defined is a problem half-solved."
-Kevin P