View Single Post
  #13   Spotlight this post!  
Unread 27-01-2006, 16:13
Joe Hershberger Joe Hershberger is offline
National Instruments
AKA: jhersh
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 1997
Location: Austin, TX
Posts: 148
Joe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to all
Re: Labview keeps freezing

Quote:
Originally Posted by Peter H
My laptop uses an Intel Premium M730, at 1.6 GHz, and 512 MB memory. I don't find any option in WinXP2 to increase the buffer size. The RS-232 serial port is built in to the mother board. No other app is running while LabView is running.

If this is a buffer size problem, why does it work more often than not? When I get a partial frame, it is anywhere from 10% to 90% of the full frame.
Your setup seems reasonable. I have a serial port that plugs into the PCMCIA port that looks just like a standard ISA UART. In the properties of the port in Device manager is has the option to turn on buffering (it allows 14 bytes for transmit and 15 bytes for receive)... I would expect that to be available to you as well, but it depends on which UART chip they used on your motherboard. The older models of UARTS have no buffering at all... the driver must read every byte that comes in before the next one comes. This can be difficult to achieve and very inefficient, which is why newer UARTs have buffering. or operating systems like Windows that are not real-time, it is difficult to service every byte with low latency (before the next byte). It is much easier for something like the PIC in the RC.

If it works more often than not, then VISA is barely not able to keep up with the serial stream. This should only be an issue for receiving, so you shouldn't have problems with things like programming your RC. You may have problems if you try reading the memory at full speed. I will add an option in the code to allow you to make it work for your serial port and computer. It will slow down the rate at which the camera sends bytes to you and will eliminate the buffer overflows (as long as you set it high enough). You will want to start with 1 bit delay (the default is 0 which is causing your problems) and increase it until your problem goes away. Since it almost works now, I would expect that a value of 1 or 2 should be sufficient to make it work very well.

At least I'm confident that this should solve the problems you and others have been having. Thanks for helping to diagnose the problem so that everyone can enjoy the benefits of a working system! I'll post it when I finish the addition.

Cheers!
-Joe
Reply With Quote