Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to decrease default timeout for VISA Open?

I have a basic vi that just attempts a "Visa Open" for each resource found using the "Visa Find Resource" tool.  If the port is available then .....I do something, if the port is not available, it is supposed to return an error.

 

OK, THAT WORKS but...

 

If there isn't anything available at that port, then it waits 5 seconds before it times out.  HOW on earth do I shorten that timeout?  All the functions that affect the timeout seem to affect the timeout after the resource is open, and the one that is attached to the visa open doesn't seem to have any affect.  This is a big problem, because it will end up waiting a minute if it can't find the resource it's looking for.

 

-Something's missing....what I really need is more cow bell   VISA!

-Regards

eximo
_______________________________________________
UofL Bioengineering M.S.
Neuronetrix

"I had rather be right than be president" -Henry Clay
0 Kudos
Message 1 of 3
(1,688 Views)

 Hi there! So what value are you writing to the VISA Open timeout parameter? Keep in mind it is in milliseconds.

 

In addition, you might try to use a VISA Set Timeout property node. If you need to learn more about property nodes, check out this link.

Ravi A.
National Instruments | Applications Engineer
0 Kudos
Message 2 of 3
(1,676 Views)

A decade later and this problem still persists. So far as I can tell, this occurs with a TCP VISA alias which is mapped in MAX, but the device is offline/disconnected. 

 

So far, I have been unable to find a way to shorten this timeout, or to identify this condition and act accordingly. It can't be avoided by wiring a small value into the VISA Open timeout, and trying to set the timeout via property node to this session also takes several seconds and then throws an error. 

0 Kudos
Message 3 of 3
(54 Views)