07-08-2019 01:49 PM
Hi everyone,
I am trying to make a vi that communicates with the Keithley 2231A-30-3 power supply. The immediate problem I have right now is that I cannot even communicate with it from labview. It works fine with tera term. I am using labview 8.0 and windows 10. I attached screenshots of my code, and code during test. When I use bytes at port property, it always reads 0 and display nothing but at least it works. But if I use the visa read without the bytes at port property, it just fails and gives a time out error.
Thanks for your time and I really appreciate all your help,
Kaawn
07-08-2019 02:11 PM
Suggestions:
1. Check the port selected. The name is not visible in your screenshot
2. Check the baud rate, start at 9600 if possible
3. Check parity and stop bits (N81)
4. Check the termination character setting. Normal is 0xA (\n)
5. Use the VISA Test Panel -> Input/Output in MAX (under Devices and Interfaces) to send *IDN?\r\n
6. Try the Example "Continuous Serial Write and Read.vi"
07-08-2019 02:26 PM
Hi Michael,
I did all those and still got the same result. I tested the instrument by sending the *idn? command in tera term and it works fine. I also attached a second version of the my code.
Thanks,
Kaawn
07-08-2019 02:52 PM
LabVIEW 8 and Windows 10 are not officially supported together. LabVIEW 8 came out in 2005 so you're really pushing your luck, there.
However, on your queries that you're sending, do you have "\ codes display" set? Because the "\n" in your strings is supposed to be a newline character, ASCII 10, but if you're sending a slash followed by an "n" then of course you're not receiving anything, because you never sent the final command character.
Can you try appending a line feed constant (I think it'll be in your String palette, but under LV8, who knows?) to an "*IDN?" string and see if that works?
Also, if you DO use "bytes at port" (which you shouldn't!) it is vital that you add a wait time on the error chain between the "VISA Write" and the "Bytes at port". Otherwise, your destination equipment has had zero time to send back any reply, so of course there's nothing there...
07-15-2019 06:16 PM
Hi everyone,
Sorry for the late reply. I figured out the solution after I talked to someone from Keithley. I attached the picture of my vi. Hopefully that will help people in the future.
**Please note that the disp:text:cle command is to clear the screen in case someone displayed something before and not cleared the display afterwards. The program will run without this command as well. The system:remote command has to be there because that is what puts the unit into remote mode. If your program interacts with the power supply for the first time, take out the clear screen command because that will not work without putting the system into remote mode first. Hopefully that will help.
Thanks everyone for the help,
Kaawn