LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timeout-VISA Open Connection TCP

I cant seem to get the VISA open timeout parameter working right with TCP/IP connections. I made a quick VI to roughly measure the time it takes to either establish a connection or timeout. Though I had the parameter set to 100 ms, it took nearly 7 seconds to timeout an invalid TCP/IP resource. I have attached the VI I used to measure it, it iterates through each VISA resource listed on the system and attempts to open a connection to it. Is there some other timeout I need to configure? 

Download All
0 Kudos
Message 1 of 4
(2,771 Views)

Try using a VISA Set Timeout property node after your VISA Open, as shown in the below image circled in red:

Capture.PNG

 

 

 

Good luck!

0 Kudos
Message 2 of 4
(2,708 Views)

Hi!

 

Sorry for digging out this thread, but I'm observing the same behavior with LV2017.

 

The posting above is not  an answer to the question, since it shows how to set communication timeout once the connection is established.

 

The question is about the very left "VISA Open VI". This VI takes an input "VISA Open timeout", which is set to 50 in the shown block diagram.

In my case, I try to connect to a device via "TCPIP0::192.168.0.1::INSTR". If the device is not reachable, I observe:

 

 

timeout   duration [s]

    0           8

   50           6.05

  100           6.1

  200           6.2

 1000           7

 2000           8

 3000           9

...

 

So, it seems the real timeout is 6 seconds plus the wired value (in ms), and the default  timeout is 8s.

Any idea how to fix that?

 

 

0 Kudos
Message 3 of 4
(1,829 Views)

I confirm this is still the case in LV 2021 SP1. I'll file a bug report, but I'm really surprised this has not been addressed yet.

 

Non-existent instruments react very differently for Serial vs TCPIP.

fnormandinrivian_0-1726015800054.png

 

Bug report (request number 03206179)

 

 

0 Kudos
Message 4 of 4
(191 Views)