I know VISA read errors occur a lot on these forums, but I am really struggling understanding what's going on with our system. The problem seems to be very intermittent.
I am using a Keithley 2260B-800-1 360 W instrument, and I am connecting to it by TCP/IP. In NI MAX, when I open the test panel, I have enabled the termination character, and I get a response with an *IDN? query. I do this with either the Query or with the Write and then Read. I've updated the Bytes in the test panel to 256 like driver does, and it still works just fine.
I've used drivers from https://www.tek.com/dc-power-supply/2260b-30-36-software-1, and I have used them successfully. Suddenly though, there is a VISA Read Error. I am using the Initalize VI. I've not changed anything with this code.
Why is it that it is running fine with the NI MAX Open VISA Test panel, but the visa read is giving me a problem in the driver?
Something must have changed, even if you don't know what. It's odd that it is in the Initialize VI. I'm not going to go and download that driver. Look into that subVI and see if it is trying to to any VISA Reads.
If nothing obviously changed in your code, perhaps it is something mechanical like a cable coming loose or getting damaged.
Yes, it is. Since you don't have the driver downloaded, here are two snippets. Inside the Initialize VI there is a Read VI, and inside the Read VI there is a VISA read.
What is happening in the Keithley Write?
It is hard to tell in the Initialize VI, but the string constant for IDN? doesn't appear to have a termination character at the end of the command. If that was set for \code display mode, it would be easier to tell. Perhaps they are explicitly adding a linefeed or carriage return to the end of it within the Keithley Write.
Indeed it does...
If I turn off the power supply, disconnect and reconnect the ethernet cable, turn it back on again, run it in NI Open Test Panel, and then run the initialize vi, it works. I don't really trust that I will be able to maintain communication, though.