If I understand correctly, You've got a driver to Your scanner, and You're able to input a scanned digits to You're Delphi application. And You just need to split this code to two values: product code and weight?
I propose to send You a sample with TEdit were You can input a scanned code, and two TEdit with product code and weigth set up automatically after code change.
I can olso verify a barcode if You need it.