This really comes shocking to me, but it takes 110 ms to close the VISA reference, while other open VISA or read/write VISA only used <20 ms. Is it per device? Or it always takes this long to close VISA reference? Any way to reduce this timing?
It's hard to tell from your small picture but it look like you are opening and closing a VISA session everytime you write?
If so, you are doing it wrong.
Open a VISA session at the beginning of your program, use that same session for all of your reads and writes, then close the session at the end of your program.
Hmmmm... that "Watch" glyph on the VISA write makes me think of a quote from Velma Binkley.
Set the synchronous mode to "Synchronous" from the Right Click Menu and the VISA Close won't need to wait for the data transfer to finish before it can act. (Yup, that benchmark isn't as data dependant as it looks)
Thanks for the tip, but I tried it and it does not make any difference on timing.
I also tried flushing the receive buffer after the Write, but it did not help either. I guess in this case, I cannot do the open-close every time.
There is an Automatically Close VISA Sessions option you can set instead of putting a VISA close in your program.