2 Replies Latest reply on Mar 15, 2016 2:05 AM by Erick Rondin

    How to implement barcode rules

    Erick Rondin


      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 ?




        • Re: How to implement barcode rules
          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!";
              var displayStr = "Barcode Data: " +params['data']+"<br>Time: "+params['time'];
              $$("#barcode").innerHTML = displayStr;


          Let me know if you need a complete sample.



            • Re: How to implement barcode rules
              Erick Rondin

              Hi Pietro,

              Thanks for your info but I am not sure how to use it. If you have a complete sample I would appreciate.

              Just a detail to point that enabling barcode supplemental does not match with the expectations, same as using a barcode device. For that reason the only way to make it works is to use a rule that manage correctly the read informations from the scanner and I am looking for how to do the same in EB.