Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Occasional VI_ERROR_TMO error

Hi,

I am getting the VI_ERROR_TMO error occasionally when trying to program an E4440A PSA. I'm doing a viWrite with "INIT:IMM; *WAI\n".

Which is performing a single sweep.

This command is part of a loop which has successfully run X times before I get the error. It seems to be totally random when I get the error and doesn't occur in the same instance of the loop every time.

Anyone got any ideas? This is really bugging me.

Thanks in advance.

JC.

0 Kudos
Message 1 of 9
(11,684 Views)
Sorry. I should have mentioned that I'm using a GPIB interface to communicate with the analyser.
0 Kudos
Message 2 of 9
(11,682 Views)

Hi JC,

 

Good Morning and I hope your well today.

 

Thanks for your post. 

 

Firstly, does the command work in HyperTerminal? 

 

What is your timeout set to, have you tried varrying this? 

 

Are you using the LV Driver supplied by Agilent ESA PSA Series from the NI Instrument Driver Network. These VIs seem likely to work. If not, have you considered using these? If you study this driver you maybe able to notice where the issue is. You may need to setup the instrument with other cmmands first. 


If your not, can you post your code and LabVIEW version to see your application?

 

Do other GPIB commands work? If not, can you perform a loop back test fine?

 

Hope this helps,

 

 

 

 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 3 of 9
(11,674 Views)

Hi. Thanks for your comments.

 

The command works most of the time, just goes wrong at random. I've written a CPP program to talk to the VNA and not sure I'm using LabView at all.

Sorry, this is not really my area of expertise and I've just taken this code on from someone who has left the company.

Interestingly, with a E4445 PSA the code works fine, no problems at all.

I can't really post the code I'm afraid as it's on an offline computer. 

Thanks.

0 Kudos
Message 4 of 9
(11,672 Views)

J_C wrote:

 

The command works most of the time, just goes wrong at random.


Thanks.


JC,  Its a shame you got stuck with someone else's code.  OK Agilent VISA drivers assume several things any of them could be your new headache.

 

1) The instruments on the bus are all compliant to the same standard (HPIB, IEE 488 or IEEE 488.2 [there is no 488.1 whatever Keithley instruments likes to say] or HS-488) are there other instruments on the bus?

 

2) ALL instruments are assigned an address corresponding to their importance.  The service requests of lower addressed instruments mask the service requests above them.  This means that latency in GBIP is dependant on service request polling and address.

 

3) Are you using VISA? if you use IVI or VISA you use VISA.  If you are are you using synchronous or asynchronus calls to ibread and ibwrt?  Remember the timing changes dependant on system overhead and the size of the GPIB buffer.  For example- you have two functions that write a value VIA GBIP using the synchronus call and read responses from those instruments. Write (L) is a multiline message that takes about 1 second to pass through the bus ending in a query, Write (S) is a query for a measurement and passes through the bus in 1mS.  TMO for Instr(L) is 30000mS and 1000mS for Instr(S).  synchronous writes return when the data is delivered to the GBIP buffer so it takes almost no time for either of the write functions to do their job and return.  Yet, when will the Write(S) data make it to Inst(S)?  in 1mS if the buffer is empty but, in about 1001mS if the Write(L) data just beat it to the buffer! Assume the Instuments process commands instantly.  When will you TMO on the read from Inst(s)?  never if the buffer latency is zero. 1 time in 1001 if a random 1second buffer load is possible and 28999 times out of 30000 if there is a problem with instr(L) failing to respond to an ibread that occured with random time relation.

 

Number three sounds like your issue doesn't it.  Agilent drivers like to use synchronous reads and writes.  The best work-around is to revise the drivers to use asynchronous calls to ibwrt functions.  Asyncronous calls do not return untill the buffer is clear so you can assume the data is at the instrument not hanging around idleing in a buffer.  

 

So you've hit a basic program language model issue - Data-flow / Event / Data flow from what perspective? /  which event?

 

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 9
(11,663 Views)

Hi, Number 3 definately sounds like my problem. I am using VISA yes.

I will re-read your suggestions and give it a go. Thanks!

0 Kudos
Message 6 of 9
(11,640 Views)

Hi, can you solve your problem?; I have a similar problem getting the trace of an spectrum analyzer with GPIB-USB interface.

 

When the sweep time are less than +/-1500mS  my software work fine, but when the instrument is taking slow traces, i get  VI_ERROR_TMO error; i try change the openTimeout for the same time of the sweep, but I don't get better results, I try write the command for recovery the trace, put a delay and read, but I get the same result; I'mvery lost in this case, thanks in advance for any help.

 

Freddy Coal

0 Kudos
Message 7 of 9
(11,106 Views)
尊敬的各位NI工程师您们好:
      最近我在用NI公司的MEASUREMENT STUDIO做实验,这两天遇到一个非常头疼的问题,我在VC6.0的环境下用VISA对仪器进行控制,已经正确的添加了头文件和lib,开始时是能够实 现对仪器的控制的,但我不知最近我对电脑进行的什么操作改变了什么,突然间不能控制仪器了,而用Agilent IO control中的VISA Assitant仍能够实现对仪器的控制。(我用的是GPIB仪器,仪器与计算机之间应用网关E5810来连接的)
      望您们能够解答我的困惑,现在实验停滞不前,所以很着急,万分感谢您们的关注!
0 Kudos
Message 8 of 9
(11,083 Views)
To Yong_Z: Please stop hijacking other people's threads! Create a new thread in which to post your question. You've done this several times now.
0 Kudos
Message 9 of 9
(11,070 Views)