Hi,
That is because you perform a VISA Read right after VISA Write; the expected (full) set of data may not be already available for reading back.
I assume that you already know how many bytes of data are expected (to be read back), you may at a sub-loop with timeout after VISA Write to check if Bytes at Port is equal or greater than the expected byte count. Perform a VISA Read only when Bytes at Port is equal or greater than the set byte count, else wait till timeout.
You may also perform a VISA Read of Bytes at Port right before the VISA Write to clear whatever data in the buffer.
I hope that you can re-construct the exact code by yourself... this way, you might be able to really understand 😉
You may omit the hidden Case(s). It will still works!
握已经尝试重建了你的例子,错误的地方请您指正,谢谢!
第一个case,没想明白它的条件,还有左上角的局部变量。
All you need is the code inside the Fixed Bytes Case. Please remove the Byte Count control and the first Case.
As for the local variable (top-left corner), it is merely to reset the Timeout error at entry of this VI.