LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA: (Hex 0xBFFF006C) An overrun error occurred during transfer. A character was not read from the hardware before the next character arrived.

Solved!
Go to solution

i am getting this overrun error with my serial communication with VISA .. my device is sending me a frame of 1640 bytes /sec , i  perform operation on 82 bytes that gives me  20 packets .. but some how after receiving 1500 packets ,nearly (1500*82=123000 bytes) this error pop up..

 i increase the buffer but the problem still exist but it occurs later depending upon the buffer size ..

 

how can i solve this issue ?

 

0 Kudos
Message 1 of 27
(8,847 Views)

Enlarging the buffer only delays how long it takes until the buffer fills up.  You need to read the bytes faster.  What are you doing with the data you read?  Anything else going on in the same loop that slows down the serial read?

 

I could offer more help, but since you didn't post your VI, I can only speculate what is going on in your code.

0 Kudos
Message 2 of 27
(8,844 Views)

i have made a state machine which receives  2 bytes to check the starting of a packet and then on the next stage it receive other 80 bytes and perform some operations on it and then  display these bytes after parsing on a table ..

i works fine until table shows that i have received somehow 3000 packets (3000*82=246000 bytes) .

i think filling up of table somehow slowing the reading process .

   

0 Kudos
Message 3 of 27
(8,823 Views)

here is the attached VI ..

 

i just a little messy but just attached so you might understand what going on .

0 Kudos
Message 4 of 27
(8,820 Views)

Hi shaun,

 

- what's the point of all those local variables? Use shift registers to store data for next iteration!

- what's the point of all those VISAOpen function? Why do you need to open a COM port again and again?

- what's all this stuff in the "append to table" state? When you would supply a typical "received string" you surely would get an example of doing this much simpler…

- why is there a case structure around your VI with a "Play Button"?

- why depends part of that string conversion on that "error in 3"?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 27
(8,812 Views)
  • some of these variables are used for next state.
  • yup i have corrected it and open the visa only at start.
  • append to table state parse the receiving  82 bytes and append it to table.
  •  start button is just to start receiving of data.
0 Kudos
Message 6 of 27
(8,806 Views)

@shaunmarsh123 wrote:
  • some of these variables are used for next state.

Then store that data in shift registers.  They are a lot more efficient (memory and CPU).


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 7 of 27
(8,794 Views)

ok  but  this overrun error still exist .. 

 

0 Kudos
Message 8 of 27
(8,790 Views)

Hi shaun,

 

general hint for such problems: decouple DAQ loop (serial communication) from data analysis (string parsing) by using a producer-consumer-scheme.

 

That being said: I still don't think the string parsing is to slow to keep up with your serial communication…

 

Can you supply an example for this string conversion (input data, format description, expected output data)?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 27
(8,783 Views)

i never use a producer consumer loop ,so can u give me an example ?

 

yup  i am receiving data than convert it to hexadecimal string than parse it accordingly   . from that hexadecimal string i subset fewer bytes than convert it to decimal so my output is a mix of binary and hexadecimal ..

 

i  observe that this error happens when data on my table gets to bigger .

 

please provide some solution as this is giving me a headache know..

 

as you said to use a producer consumer loop so , i have to change my code right ?

😞 

0 Kudos
Message 10 of 27
(8,773 Views)