Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to ensure received serial buffer completely read before stop

Hi,

     I have difficulties to ensure that all data in serial buffer are read before the program stop(after I push stop button). Help needed and appreciated. Thank you.

 

rgds,

Zahari

0 Kudos
Message 1 of 6
(4,617 Views)

It is kind of hard to tell you what is wrong without some code to look at.  I don't even have a frame of reference to help you.  What are you communicating with?  What is the communication protocol?  SHARE SOME CODE.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 6
(4,606 Views)

crossrulz,

       Thanks for your reply. The attached subvi is used in while loop to read data from a INS system via USB serial comm. I have continous data read from the bufffer but when I stop the program, meaning stop the while loop and later start again, the program gives the error of overrun.  I hoope this decribes...Thanks

Download All
0 Kudos
Message 3 of 6
(4,595 Views)

crossrulz,

       Thanks for your reply. The attached subvi is used in while loop to read data from a INS system via USB serial comm. I have continous data read from the bufffer but when I stop the program, meaning stop the while loop and later start again, the program gives the error of overrun.  I hoope this decribes...Thanks

Download All
0 Kudos
Message 4 of 6
(4,595 Views)

@ninermikezaa wrote:

crossrulz,

       Thanks for your reply. The attached subvi is used in while loop to read data from a INS system via USB serial comm. I have continous data read from the bufffer but when I stop the program, meaning stop the while loop and later start again, the program gives the error of overrun.  I hoope this decribes...Thanks


If the instrument is constantly sending data, there is nothing your can do.  You have to tell the instrument to stop sending the data.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 6
(4,587 Views)

So, I have to send stop command to the instrument soon as I stop my program right? Ok Thanks I will do that.

Message 6 of 6
(4,577 Views)