Hello,
IS the device you are talking to relatively old? One possibility is that the device communicates slowly, where perhaps the time between writes and reads on your computer side is very short, but the timing required by your device may be longer. I would try putting a delay between writes and reads. NI-Spy may be fixing this because it will in general slow down programs which make calls to NI-VISA because the calls and associated data are being recorded.
One solution, noted in the previous stream, may be to run NI-Spy in the background, however programmatcially implementing delays may be a more stable solution, especially if you choose to take your program to other computers.
Give this a try and definitely repost with the results!
Thank you,
Best Regards,
JLS