10-14-2008 10:40 AM
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?
Solved! Go to Solution.
10-14-2008 10:56 AM
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.
10-14-2008 11:45 AM
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.
10-14-2008 05:21 PM
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.
10-14-2008 05:21 PM - edited 10-14-2008 05:22 PM
doubble post
03-04-2009 08:16 AM
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
03-04-2009 08:39 AM