Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-VISA Interactive Control can't seem to recognize RS232 port

Hello all,

 

I have been trying for some time to troubleshoot an issue where VISA just cannot see my Lakeshore 218 Temperature Controller.  This instrument is connected via RS232 directly into the back of the PC.  Windows Device Manager sees that port fine.  I can successfully communicate with the it through RealTerm and also through pyserial.  Lakeshore makes a proprietary Communication Utility and Chart Reader and both of those can communicate with the instrument fine.  Neither NI-VISA Interactive Control nor pyvisa can see this device, but they are able to see other devices that I have connected.  It may also be relevant that NIMAX cannot see any of the devices, but if I manually add the RS232 device it can see it and communicate with it until I restart the software.  Then, it cannot communicate again.

 

Right now I am just using pyserial, but that is not an ideal situation.  I would really like to be able to use VISA.

 

Here are the things I have tried:

-reinstalling NI-VISA

-using different VISA instances (from Agilent for example)

-using a RS232 to USB converter and a USB port

 

Thanks in advance for any help

0 Kudos
Message 1 of 6
(4,337 Views)

Have you tried manually typing in COM port number in a VISA control (for example COM5) and doing a VISA Open and Close on it?

Certified LabVIEW Architect (CLA)
0 Kudos
Message 2 of 6
(4,277 Views)

Thanks for your reply.  I think I have tried what you are suggesting, but I may be doing something wrong.  Here are the steps I've taken and the result.

 

1. In VISA Interactive Control under "Resource to Open", I have typed "COM10" or "ASLR10::INSTR" and hit enter.

2. I get this error: VISA:  (Hex 0xBFFF0012) Invalid resource reference specified. Parsing error.visaintcont.PNG

 

I have also tried doing something similar in NI MAX:

1. "Create new" device - follow prompts for serial device, set alias to "COM10"

2. It appears to add the device just fine.

nimaxworks.PNG

3. If I click "Open VISA Test Panel" and then I/O, I can ask the device for it's IDN and get the correct response:

nimaxstillworks.PNG

4. If I refresh the devices by clicking "Devices and Interfaces" and hitting F5, I lose the connection.  I also lose the connection and can't re-establish (without deleting the resource and repeating steps 1-3) it if I close and reopen NI MAX.nimaxdoesntwork.PNG

0 Kudos
Message 3 of 6
(4,260 Views)

I haven't seen an issue like this before, were you can see the port for a while and then you lose connection. I have seen conflits between Agilent VISA and NI VISA when installed on the same machine, but I don't think if those conflicts would let you see a resource, but then lose it later on. Another pitfall to watch for is that once you open the port in an application like Putty, it gets locked and becomes inaccessible to other applications such as MAX or LabVIEW. But that doesn't seem to be the issue here either.

Certified LabVIEW Architect (CLA), LabVIEW 2015.
0 Kudos
Message 4 of 6
(4,245 Views)

Thanks for your reply.  You've summarized my thoughts nicely - it's a really weird problem.

 

All of my other devices work fine, although they are all USB.  For the time being, I will keep plugging along with pyserial, but if anyone has any ideas - I'd love to hear them!

0 Kudos
Message 5 of 6
(4,241 Views)

Sorry, I wasn't really able to help! 😞

Certified LabVIEW Architect (CLA), LabVIEW 2015.
0 Kudos
Message 6 of 6
(4,233 Views)