11-06-2019 10:07 AM
Hello Everyone,
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?
11-06-2019 12:03 PM
What is the error number? The picture you gave us has it cut off!
11-06-2019 01:08 PM
So sorry,
11-06-2019 01:21 PM
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.
11-06-2019 01:25 PM - edited 11-06-2019 01:26 PM
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.
11-06-2019 01:39 PM
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.
11-06-2019 02:47 PM
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.