How to implement barcode rules

// Expert user has replied.
E Erick Rondin 3 years 7 months ago
4 1 0

Hello,
To read an EAN13 with supplemental, in many cases we need to create barcode rules on scanner devices.
I need to get the same behavior on an MK31 running EB but I do not see how to implement a barcode rule in EB.
Is barcode rule supported in EB ?
How can I get examples on how to do it ?
 
Thanks
Regards

Please Register or Login to post a reply

1 Replies

P Pietro Francesco Maggi

Hi Erick,
I don't have an MK31 to test this code, but usually I use EB's Barcode API with the parameter to enable EAN Supplementals:

EB.Barcode.enable({allDecoders:true, upcEanSupplemental5:true, upcEanSupplementalMode:EB.Barcode.UPCEAN_AUTO}, fnScanReceived);Getting the data in the usual way:

function fnScanReceived(params){    if(params['data']== "" || params['time']==""){        $$('#barcode').innerHTML = "Failed!";        return;    }    var displayStr = "Barcode Data: " +params['data']+"Time: "+params['time'];    $$("#barcode").innerHTML = displayStr;}
Let me know if you need a complete sample.

~Pietro

CONTACT
Can’t find what you’re looking for?