Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Random Overrun errors (-1073807252)

Solved!
Go to solution

I have a simple serial port data capture program that has been running fine for litterally weeks on an old laptop.

 

Now I have installed it on a much faster desktop PC and I get random crashes due to serial data overruns (-1073807252)

 

It's not like this is high speed comunications either. (9600 baud 8n1 no flow control)

 

I can not figure out how to set the serial buffer size. Bare with me here as I jumped from Labview 5.11 to Labview 8.x (now using Labview 8.51).

 

In the old Labview serial port setup vi there was a setting for serial port buffer size. Where is that setting in Labview 8.5.1?

========================
=== Engineer Ambiguously ===
========================
Download All
Message 1 of 7
(5,746 Views)

I have masked this problem by removing the stop on error I added in my last revision. (To hell with good programming)

 

I would rather have a line here and there of bad data then have it abort at 1:00 AM and miss several hours of data.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 7
(5,743 Views)
Solution
Accepted by topic author RTSLVU

Use VISA Set Buffer Size which is on the Instrument I/O>VISA>Advanced>Bus Specific palette.

 

Your text to file could be rewritten so that you do not do a file open and close with each call. It looks like you want a new file each day. With each iteration, you are using the concantanate string and over time, the string is going to get very large and the VI's execution will slow down quite a bit. You might want to add some code to limit the size of the string.

Message 3 of 7
(5,741 Views)

Thanks, I never thought about that string constantly growing and growing, that may have been the root cause.

 

It certainly does explain why it seemed to run slower after several hours running. But I managed to have it run for five days straight without it crashing on an old laptop.

 

Since it is just a there for a quick look at what is happening now I made it so it would clear the string (replace it an empty string) after 20,000 Chr$.

 

I'll have to look into the Text to File vi. That was a quickie drop in replacement I threw together when I was upgrading LV5.11 code to 8.2.1.

 

I have been depending on the old Write String to File vi in LV 5.11for years and it's hard to break bad habits, besides I don't understand how to use a lot of the new "express" vi's.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 7
(5,725 Views)

doubble post Smiley Surprised

Message Edited by RTSLVU on 10-14-2008 05:22 PM
========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 7
(5,725 Views)

sir

if i want to send more then 20,000 Chr$ wat i hav to do for serial comuniation cuz i m getting time out error

maak

0 Kudos
Message 6 of 7
(5,412 Views)

duplicate post

 

Not only a duplicate but you hijacked a completely unrelated thread.

0 Kudos
Message 7 of 7
(5,407 Views)