ni.com is currently experiencing unexpected issues.

Some services may be unavailable at this time.

Instrument Control (GPIB, Serial, VISA, IVI)

取消
顯示結果 
搜尋替代 
您的意思是: 

Recover from VISA error 1073807194 after instrument power cycle

已解決!
前往解決方案

Hello, and thanks in advance,

 

I connect to an instrument via VISA with the instrument's IP address and port. This normally works well, but if the instrument losses (and regains) power while the VI is running, LabView must be restarted for the VI to work again. (That is the whole labview, not just my VI). Error code: 1073807194 | VI_ERROR_CONN_LOST | The connection for the given session has been lost. No such instabilities occur when the connection alone is disrupted and restored. It is still a valid resource in VISA. Can I solve this by clearing the port or socket, and if so, how? I hope to insert some code to check whether the connection is obstructed, and if so, clearing it.

 

I am running LV 8.6 on Windows XP using Measurement and Automation to assign the the VISA resource by manual selection of socket. The VI is attached.

 

This thread looks useful, but the links are dead: http://forums.ni.com/t5/LabVIEW/visa-write-connection-has-been-lost/m-p/342028.

 

Thanks very much!

1 條訊息(共 5 條)
18,497 檢視

A little bit of an update. I find that I still have access to the instrumetns if I connect directly via internet, indcluding using LabView as the means.

 

I have also tried using keep- alive packets, and it seems the result is that my errors are now of the timeout variety. I can send commands, but the response is delayed by several minutes regardless of the timeout window.

 

Anyone have any ideas how to reestablish and repair the connection in VISA???

 

Thanks!

0 積分
2 條訊息(共 5 條)
18,449 檢視
解決方案
由主題作者所接受 Warren Harding

When you exit LabVIEW and restart, LabVIEW automatically closes all the VISA Sessions.  Try using the VISA Close function to close the existing session and then open a new one.

3 條訊息(共 5 條)
18,434 檢視

Wow, I do have N opens and N-1 closes i nthe main code. Thanks for catching that! Looks like it is working now.

4 條訊息(共 5 條)
18,430 檢視

I am seeing the same problem. Is there a way to see how many VISA sessions I have open? I believe there is only one as the "duplicate session" input is set to false.

 

As soon as I get this error, I can't recover from it without restarting LabVIEW. All the time I can communicate to the instrument using MAX while my LabVIEW code continues giving me this error.

5 條訊息(共 5 條)
18,349 檢視