Barcode Scanner Event not working

We are scanning a barcode by scanner and model no of the barcode scanner is ‘BS-C101 Star’ TVS make. Currently its interface selection is ‘PC/AT’ and connected to the USB port of the PC. Further we have developed the screen with Text_Field component in the ignition.
With the selection of the ‘Text_Field’ component in the runtime/preview mode, observed that scanner is able to scan the barcode and get the barcode info in ‘Text_Field’ component without placing ‘barcode scanner’ component in the ignition screen.
After that we took a ‘barcode scanner’ component on the screen and wrote a simple script for making boolean tag True on ‘onBarcodeReceived’ event. But we observed that the script written by us not working on the event. please refer the script here.

value = 1
system.tag.writeToTag(‘Z_China/Stamping_Line_Stamp/PrintBIt’, value)

We are doing the task to write a barcode value in the Memory tag on the ‘onBarCodeReceived’ event of the ‘barcode scanner’ component. But we observed that no scripts works on this event.

so kindly suggest us the code for the above mentiond task.

we are using ignition 7.7.2(b2014121709) | 64-bit and module for barcode scanner is 1.7.2 (b4402)