Page 1 of 1

GLK 240128-25 Clear Buffer Command

Posted: Tue Jun 22, 2010 12:26 pm
by Rook
Hi,

I am working with a GLK 240128-25 and was wondering if there was a command to clear the screen buffer without closeing the Com port. I am working in .NET.

the .net commands comport.discardinbuffer and comport.discardoutbuffer have no effect. The only solution currently is to close and reopen the com port. I have searched the manual and have only found a command to clear the keypad buffer.

On a separate note I was reviewing the product page for the aforementioned screen and the buffer size is listed as 120 without any units. Is the buffer 120 bytes or 120 kilobytes.

Thank You,
Rook

Posted: Tue Jun 22, 2010 12:54 pm
by Ray
its 120 bytes, if you have no interest in the keypressed coming in just turn the auto transmit off ( section 9.3 in the manual) not sure there is a way to clear all data from the .net inbuffer except for closing the port and re-opening or just reading all data in it.

Posted: Tue Jun 22, 2010 1:12 pm
by Rook
My primary concern is that if I send several command to the screen such as 6 strings and 6 cursor position commands then I must open and close the port twice or else the data will be scrambled. One particular screen requires several cursor positions, strings, and lines forcing us to open and close buffer roughly 10 times which causes problems with the rs232 server device. Can you recommend any other solution?

Posted: Tue Jun 22, 2010 1:20 pm
by Ray
That sounds *weird* i assumed that you had incoming data you wanted to get rid off, outgoing data should be fine aslong as you use flow control (section 4.2 in the manual) if you want to make sure you are overflowing and should implement flow control put a small delay (System.Threading.Thread.Sleep(50); ) between the strings you send and see if the problem goes away.