LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

creating VI to control Keithley 2231A-30-3 triple channel Power supply

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

Download All
0 Kudos
Message 1 of 5
(2,166 Views)

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"

Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.0, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
0 Kudos
Message 2 of 5
(2,159 Views)

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

0 Kudos
Message 3 of 5
(2,153 Views)

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...

0 Kudos
Message 4 of 5
(2,140 Views)

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

0 Kudos
Message 5 of 5
(2,103 Views)