NI Home > Community > NI Discussion Forums

Instrument Control (GPIB, Serial, VISA, IVI)

Showing results for 
Search instead for 
Do you mean 
Reply
Member
PyroaLAT
Posts: 1
0 Kudos

Timout expired before operation completed VI_ERROR_TMO

Hi everybody,
My code is in Vb .Net and i use VISA COM Lib 3.0 to communicate with GPIB instruments.
But sometimes when i write some string on gpib, i've got the VI_ERROR_TMO error, whereas before the write operation was successfull !

any ideas ?

Thanks for your ask !
Member
Baldy
Posts: 32
0 Kudos

Re: Timout expired before operation completed VI_ERROR_TMO

I am by no means an expert, but since no one else has responded, I'll share my experience with you.

I use VISA to communicate serially in LabView. I've seen lots of VI_ERROR_TMOs that appear to be normal time-out events on the port. When I've seen them, I am reading from the port, and this tells me that there is no data to be read.

When you are writing to the port, Perhaps it means that the port is still busy with a previous command, or busy receiving. Does this port have a write buffer? Try increasing the buffer size.

I hope this is helpful.
-Jim
Active Participant
JoshuaP
Posts: 830
0 Kudos

Re: Timout expired before operation completed VI_ERROR_TMO

Hey PyroaLAT,

I have a few thoughts on why this might be happening. If you changed to a different computer it might take longer to get the information or if there is additional traffic. I would suggest changing the VISA timeout to a larger value to see if that fixes the problem.

As a side note, I would not recommend using VISA COM with .NET. NI has a native .NET class for VISA that doesn't use COM. The .NET assemblies for VISA are much better and faster in .NET then using COM.

The VISA for .NET is included with Measurement Studio 7.0 or on the recent Driver CD.

I hope this helps out.

JoshuaP
National Instruments