Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set viOpen timeout in NI-MAX

Hi,

I am trying to add a new TCPIP instrument in NI-MAX. This works fine for instruments that respond quickly over the network.

However for remote instruments that take longer to respond, I get the 0xBFFF0011 error (resource not present) .

 

Is there a way to change the viOpen timeout value that is being used by NI-MAX?

 

Thanks in advance,

Johannes

0 Kudos
Message 1 of 8
(5,929 Views)

Hello Johannes

 

In order to workout a Solution a few things should be clarified:

 

What device do you mean by TCP/IP instrument?

What do you mean with remote Instrument? Is this Instrument in a different Network?

 

Regards

 

Moritz  M.

0 Kudos
Message 2 of 8
(5,896 Views)

Hello Moritz,

 

I'm trying to add a new TCPIP device in NI-MAX using the "Create New..." context menu. The device supports the VXI-11 protocol. I want to add the instrument manually by providing the instrument's IP address.

Yes, the instrument is in a different subnet and located at a remote location (Corporate network - different site).

When I use NI-Spy to log the VISA activity, I see the

VI_ERROR_RSRC_NFOUNDBFFF0011h
error.

 

My guess was that this may be due to a timeout value which is too short.

 

Regards,

Johannes

0 Kudos
Message 3 of 8
(5,891 Views)

If I understand your correctly you are trying to set up your instrument using the Measurement & Automation Explorer. And after entering Hostname or IP Address and LAN Device Name and clicking on the Validate button you get this error.

Are you able to ping this instrument?

 

Stefan

0 Kudos
Message 4 of 8
(5,876 Views)

Yes, I can ping the instrument.

However, this thread deviates from my original question. 

I'd like to know if there's a way to configure the timeout value for the viOpen() call, when NI-MAX attempts to open a session.

 

Johannes

0 Kudos
Message 5 of 8
(5,869 Views)

Hey Johannes,

 

sorry but I wasn't sure what you were meaning exactly. I thougth you're talking about the settings in MAX.

I found some Information in the NI-VISA Help about the viOpe. You can see that you can set the timeout.

 

NI-VISA Help

https://www.ni.com/docs/en-US/bundle/ni-visa/page/user-manual-welcome.html

 

C Syntax

ViStatus viOpen(ViSession sesn, ViRsrc rsrcName, ViAccessMode accessMode, ViUInt32 openTimeout, ViPSession vi)

 

Visual Basic Syntax

viOpen&(ByVal sesn&, ByVal rsrcName$, ByVal accessMode&, ByVal openTimeout&, vi&)

 

 

Best regards,

 

Stefan

0 Kudos
Message 6 of 8
(5,861 Views)

Stefan,

 

Thanks for the reply. I am familiar with the parameters of viOpen(). However, I wanted to know if there are configuration parameters in MAX for the timeout of viOpen().

My experience so far is that MAX always calls viOpen() with a timeout value of 0. My understanding of 0 is that the default values is being used, correct? For TCPIP devices this means 2 s. Is there any way to change the VISA defaults in a configuration file?

 

I'll try a different wording: Can I set a timeout value in MAX such that this value is passed on to the viOpen() call, when I add a new VISA TCPIP device in MAX?

 

I hope this clarifies my question.

 

Johannes

0 Kudos
Message 7 of 8
(5,846 Views)

Johannes,

 

I'm sorry but the only options to change for NI-VISA using MAX are stored in Tools -> NI-VISA -> VISA Options and the timeout isn't one of them. So it's not possible to change that.

 

Stefan

0 Kudos
Message 8 of 8
(5,832 Views)