Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple serial read overrun error.

Hello All,

I am scanning two serial ports (barcode scanners on usb ports with usb to serial converter) simultaneously and creating an array for the different entries as shown in VI

 

Apart from it I am also scanning Digital inputs (not shown in attached VI, in a while loop).

 

Sometimes, I get an overrun error, how can I overcome it or what changes should I made in my VI.

I am using LV 2013

Thanks & Regards

JP

0 Kudos
Message 1 of 6
(2,619 Views)

What is the data being scanned?  I am more concerned with the format.  Typically, bar codes will used ASCII representations for the letters and numbers and then end the data with a Line Feed character.  If this is the case, then you need to enable the termination character.  Regardless, you really should not be using the Bytes At Port to tell the VISA Read how many characters to read.  There are much better ways, but they depend on the data format.


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
(2,605 Views)

Hello,

Barcodes in ASCII will be scanned, around 12 characters.

 

Thanks

0 Kudos
Message 3 of 6
(2,602 Views)

@james_p_martin wrote:

Barcodes in ASCII will be scanned, around 12 characters.


And they end with a Carriage Return and/or Line Feed?


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 4 of 6
(2,593 Views)

Hi Cross

 

No they dont end with line feed, or carriage return

0 Kudos
Message 5 of 6
(2,574 Views)

james_p_martin wrote:

No they dont end with line feed, or carriage return


Well, regardless, with a barcode, they should always be the same length.  So just tell VISA Read to read the 12 bytes.


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 6 of 6
(2,568 Views)