06-16-2009 10:26 AM
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.
06-16-2009 10:31 AM
06-17-2009 04:41 AM
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,
06-17-2009 07:23 AM
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.
06-18-2009 12:35 AM
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?
06-19-2009 05:19 AM
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!
04-13-2010 09:49 AM
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
04-14-2010 04:19 AM
04-14-2010 09:09 AM