Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Overrun error (-1073807252) occurs after several minutes

Hello folks,

I have a LV 7.0 program that terminates after several minutes of running with some VISA serial port communication with an error -1073807252, overrun error. I only get this error on Win98 and the latest version of LV (7.0) and VISA (3.01). Does anyone know what exactly causes this error? The help on the error is not very detailed. I tried the same program on a Win2000 PC and it works without any problems. I also tried another VISA communication program on the Win98 PC and the same error occurs.

Thanks in advance,
Michael
0 Kudos
Message 1 of 23
(18,113 Views)
This is a buffer overflow error. You are probabaly not reading from the serial port fast enough. Increasing the buffer size will only delay the problem because a bigger buffer will still eventually overflow (the buffer might overflow after 6 min and not 3 min). The difference between the computers may be that the Win 2000 computer is faster, or that you may have accidentally turned on highlight execution on in the Win 98 program. Solutions to this would be to

a) Do reads more often.
b) Read more bytes at a time.

Depending on your application one or both of these modfications may be appropriate, this depends on a number of factors:
ie
- Are you receiving binary or ASCII?
- Do messages end with a termination character?
- Are there time intensive opera
tions that prevent you from looping faster to read at a higher frequency?
0 Kudos
Message 2 of 23
(18,106 Views)
Hello,
I have a similar problem after using LV7.0 with Visa 3.0. I'm sure that it is not a overun problem because within my application I send a 8-byte binary command to a device and wait for a 8-byte response. After "Visa Write" I receive sometimes the errorcode -1073807252.
With the Application Builder I've build an exe-file wich is runnung on several machines. On some machines the problem appears (XP or NT), in some not.
0 Kudos
Message 3 of 23
(18,106 Views)
I have the same issue - I read and write larger messages, but I know they aren't too large in general because it works most of the time. I communicate with a command/response handshaking system, so I don't understand how my buffer could be being overrun. It happens at random intervals, it seems.

I'm using the "Bytes at Serial Port" and "Serial Port Read" built-in VIs. I know they say to change them out and not use them anymore, but I'm in a time crunch, and they seem to most of the time be working fine. In fact, looking inside them looks just like what I would code with the base VISA VIs anyway, but I thought I would mention it in case it might have something to do with the error. I'm using LabVIEW 7.1, on Windows XP. I would be grateful
for a quick answer if possible! 🙂 Thanks.
0 Kudos
Message 4 of 23
(18,106 Views)
I found this thread when searching for error -1073807252.  A client of mine is having the same problem.  A LV 7.1 program that works fine on numerous computers gives an occasional -1073807252 buffer overrun error on a new Dell Lattitude D510 laptop.  This isn't the fastest computer the program has ever run on, nor by far the slowest, but it is the only one we've seen this error on.  We've tried upgrading VISA.  I'm wondering if it could be a buggy chipset.  Did anyone get any resolution on this issue before?

Thanks,
    Dave
-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
0 Kudos
Message 5 of 23
(17,846 Views)
Dave,

not really a solution, but a suggestion.
Windows is by far not a real-time OS. And there are several buffers involved when doing serial communication.. The first one when watching from the serial cable side is the UART. This one is the one that is affected by serial handshake. A system driver acts as the interrupt service routine ISR whenever this buffer is nearly filled or emtied and performs some coying to or from a system buffer. LabVIEW as user mode program uses this buffer for ist serial reading and writing. This system buffer is often not taken into account. Its default size is often not as much as one would expect and some few kB of data may easily overrun it. I have learned this when performing serial highspeed transfer with up to 13 ports simultanously.
You can use 'VISA Set I/O Buffer Size' to set this buffer after you have configured a serial port. AFAIK one can set the buffer size of both directions to a value of up to 32765 bytes. Yes, not 2^15, but 2^15 - 3. But do not rely on the exact number, please.  Test it on your system.

How can this buffer overrun?
Well, WinDoze can (occasionally) take some time where nothing happens with end user code. This may happen when awakening the hd from power save mode or when doing some network actions. And there are a lot of other possibel reasons. This does not affect the system driver, which fills up the system buffer when serial transfer is in progress.
Your code may as well operate in 'bubbles' that do not allow to empty the buffer in-time. Think of DLL code or subroutine prioritized one. All this may be eased if not solved by setting the system buffer size to the limit, as it increases the delay your whole system can ignore.

Just my  Euro 0.02
Greetings from Germany!<br>-- <br>Uwe
Message 6 of 23
(17,842 Views)
Give this a try and let me know if you still have any problems.

http://digital.ni.com/public.nsf/websearch/D776A9D834B132AB86256ED2004E18EF?OpenDocument

-Josh
0 Kudos
Message 7 of 23
(17,820 Views)
Uwe, Josh,
   Thanks for the ideas.  I'll give them a try and post the results when I get a chance.

Regards,
   Dave
-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
0 Kudos
Message 8 of 23
(17,817 Views)

I have had this problem as well with a Dell Latitude laptop running XP. An external application dumps data at 38400 baud out the serial port - typically about 100 Kbyte records.  About 60% of the time the transfer would fail with the Overrun error.   I tried all the suggestions in this thread (increasing the system buffer size, lowering the bytes for flow control etc.,  decreasing the amount of time between serial port reads and nothing seemed to help).  

Since the applicaiton worked flawlessly on my development system I suspected the laptop.  I found another laptop ( a more recent Dell),  loaded the VISA run-time and the Labview Run Time Engine and that solved the problem.  The takeaway that I took from this frustrating episode is that some PCs will have unreliable behavior.  I was unable to determine if it was related to how the laptop was configured (hardware or software) or related to a weak serial port hardware on the PC.

The way it looked to me was that the system had ample time to service the serial port until the overrun occurred.  So my gut reaction is that some unkown Windows action (hard drive, network, other driver etc.)  is doing something that is blocking me for  a couple hundred milliseconds - and I'm dead.

 

0 Kudos
Message 9 of 23
(17,571 Views)
I have seen a very similar problem on some dell laptops. I switched to a NI USB-232 and the problem went away. I suspect it has something to do with the serial chipset or the Windows driver used for the chipset on some computers.

-Josh
Message 10 of 23
(17,552 Views)