LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP/IP lost connection?

Solved!
Go to solution

I am talking with a California Instruments MX15 power supply using TCP/IP. I downloaded their GUI to control the power supply remotely so I could familiarize myself with how it works. The GUI works fine without any connection issues. I am now trying to make my own driver (the driver download they provide on their website does not work) to control the power supply remotely. I have attached the VI that I am trying to simply send the *IDN? command and query back a response. If I can get this to work I will have no problem figuring out the rest. However I have been trying to figure this out for the past day or so and to no avail. I am new to TCP/IP but I now understand the basics because of all my google work the past many hours :/.

 

I attached my VI to look at. As you can see I tried using the VISA function as well as the TCP function. The TCP function works fine without any errors returned, but does not return anything in the buffer and times out. The VISA function on the other hand opens communications to the power supply but when I try to send a command to the power supply it gives me this error:

 

Error -1073807194 occurred at an unidentified location

Possible reason(s):

VISA: (Hex 0xBFFF00A6) The connection for the given session has been lost.

 

Any help is appreciated, thanks in advance.

 

0 Kudos
Message 1 of 10
(6,414 Views)

Have you installed VISA server?  Sounds like this is what you need to do.

 

http://digital.ni.com/public.nsf/allkb/F3AB0B5D7DBA367C86257982005BBF2C

aputman
0 Kudos
Message 2 of 10
(6,393 Views)

Well I did have VISA installed but I didn't have the "Run the VISA server on startup" box checked. I checked it( as you can see in the picture) but I still am not getting an *IDN? response back. The VI runs without any errors but doesn't return the IDN? string. Any other thoughts?

0 Kudos
Message 3 of 10
(6,358 Views)

Whenever I have a new device that I need to "play with" to see how connections work, I usually start with MAX.  If you open MAX, can it "see" your Power Supply?  Can you configure your VISA to that port?  If so, try doing a VISA Write (open Test Panels) and see what VISA Read returns.  

 

BS

0 Kudos
Message 4 of 10
(6,351 Views)

I went ahead and started a new connection in MAX and, as you can see in the pictures, I can sent the *IDN? command and receive a response! However, when I try to do the same thing with my VI I dont get anything in return, frustrating. Any other thoughts? I also attached a screenshot of my VI. 

Download All
0 Kudos
Message 5 of 10
(6,343 Views)

Are you sure that there's a response to the IDN? query immediately? How long does your VI take from start to finish now? 



Remember Cunningham's Law
0 Kudos
Message 6 of 10
(6,330 Views)

It's at least as fast as I can click the execute button 2x for the read and write. I see what you are saying, I put a 5000ms delay in between my write and read in my VI, still no reply. 

0 Kudos
Message 7 of 10
(6,319 Views)

It now takes like 5010ms maybe?

0 Kudos
Message 8 of 10
(6,316 Views)
Solution
Accepted by topic author reesethelabviewguy
You are sending a termination character with MAX but not in your VI. Be sure to right click on the constant and enable '\' Code Display.

VISA Server is not at all required.
Message 9 of 10
(6,301 Views)

You are a lifesaver!!! Thanks so much!

0 Kudos
Message 10 of 10
(6,292 Views)