If you are losing your connection to a barcode scanner while connected to an iPad via bluetooth, it is likely due to your iPad going into sleep mode.
This is actually an Apple bug. When the iPad goes into sleep mode, the in-app Bluetooth connection is severed and cannot be repaired unless you disconnect and reconnect the scanner (or simply power off and power back on the scanner).
A way to work around this would be to set the iPad to not got to sleep as quickly or even to never go to sleep if feasible. You can do that in the iPad settings menu by going to Settings > General > Auto Lock.
Be aware that if you set your auto-lock to "never" the battery will drain faster if you are not connected to a power source.