03-31-2018 05:55 AM
Hello GerdW,
I am attaching the VI, which is not working, as I am not able to receive any string but getting the overrun error.
What changes should I make in this VI.
Thanks
04-01-2018 06:57 AM
How is the data in your barcode formatted? Is it all ASCII data that ends with an Carriage Return or a Linefeed? Is it binary with a set number of bytes? There are many problems with your code, but we need to know exactly what you are trying to read in order to provide any real help.
04-01-2018 11:52 PM
Hi CrossRulz,
ASCII data is being read w/o any linefeed or carriage return, but 12 digit alpha numeric code is to be scanned.
Actually, barcode of a unit is being scanned at initial station(1st station) and oil is to be filled and there are 3 test beds where some tests are to be performed after scanning the barcode of unit at respective stations.
At 1st station, units for testing keep coming so I need to add them in an array as soon as I scan it. And later at Test beds after scanning I search them again from created array of barcodes (at 1st station) and start testing for respective unti.
Thanks.
04-28-2021 01:33 AM
Hello
Decided not to open another thread and rather revive a dead one.
I get the same error, but only on the very first read, as if the buffer was already full.
In the attached VI i started doing reads and buffer flushes in configure and shutdown tab in order to fix this, but on first read i still get an overrun error. All the subsequent reads are fine, i've let it run for 2 days and didn't get another error, i only get an error on the first read.
The sensor outputs data about once a second.
Thanks for your help.
04-28-2021 10:37 AM
1. You should not be using a Timed Loop. Just use a normal While loop. Add the delays only when you need to (the Idle state, when in the Read state and there is no data available).
2. If you are going to flush the buffer, you should do that before your initial read.
3. I wouldn't clear the buffer if there is 1 byte available. You could have checked it right when a message started, so you should attempt to read.
04-29-2021 12:50 AM
2. I did buffer flushes wherever i could (after configuring, if too many bytes in buffer, at the shutdown etc...)
In the end i took your original solution to this post and redid the whole code in it's likeness and... it works. Thanks for helping 🙂
Still don't understand why i got the overrun error in original code tho.
04-29-2021 12:59 AM
Hi Aero,
@AeroSoul wrote:
Still don't understand why i got the overrun error in original code tho.
Because of the delays in your code…