Since your bar-code reader is on the client computer, when you call __dopostback
the browser loads the same page again, and during this time, all the keyboard events simulated by the bar-code reader aren't transmitted to the textbox.
So you need to do the postback only when you have 13 characters in your textbox.
You can modify your javascript to do something like this: (not actual javascript)
if (this.value.length == 13) __dopostback(this);