Help trying to set a same symbol barcode timeout with continuous scan

J Josh Fischer 3 years 7 months ago
85 2 0

Hello All,
 
I am trying to set the zebra TC70 to start a continuous scan and add a timeout between same barcode values.  I've gotten this to work by hacking up the code and putting my own breaks in, but I would rather use the functionality that Zebra supplies.
 
The flow of the program should execute as so:

User starts the scanner
User scans an item, the enters a quantity
Upon next scan of different barcode data is saved to an sqlite database
And so forth

The problem is after the scanner recognizes the first barcode it collects the data and scanning is stopped.  Code snippet is below for scanner profile set up. I hope this is enough information for anyone to diagnose the problem. .  Any help would be appreciated.
 
Thanks!
 
-Josh
 
@Overridepublic void onOpened( EMDKManager emdkManager ) {
   this.emdkManager = emdkManager;   barcodeManager = (BarcodeManager) this.emdkManager.
  getInstance( EMDKManager.FEATURE_TYPE.BARCODE );   deviceList = barcodeManager.getSupportedDevicesInfo();   deInitScanner();   initializeScanner( );   setProfile( );  try {
   scanner.triggerType = Scanner.TriggerType.SOFT_ALWAYS;  if (scanner.isReadPending()) {
   scanner.cancelRead();   }
   scanner.read();   } catch (ScannerException e ) {
  e.printStackTrace();   }
}
 
private void setProfile() {
 
   try {
 
   if ( scanner.isReadPending() ) {
   scanner.cancelRead();   }
 
  ScannerConfig config = scanner.getConfig();   config.decoderParams.code11.enabled = true;   config.decoderParams.code39.enabled = true;   config.decoderParams.code128.enabled = true;   config.decoderParams.upca.enabled = true;   config.decoderParams.ean8.enabled = true;   config.decoderParams.ean13.enabled = true;   config.readerParams.readerSpecific.imagerSpecific.beamTimer = 0;   config.readerParams.readerSpecific.imagerSpecific.pickList = ScannerConfig.PickList.ENABLED;   config.readerParams.readerSpecific.imagerSpecific.continuousRead.isContinuousScan = true;   config.readerParams.readerSpecific.imagerSpecific.continuousRead.sameSymbolTimeout = 500;   scanner.setConfig( config );   // Starts an asynchronous Scan. The method will not turn  // ON the  // scanner. It will, however, put the scanner in a state  // in which  // the scanner can be turned ON either by pressing a  // hardware  // trigger or can be turned ON automatically.   scanner.read( );   } catch (ScannerException e ) {
  Log.d( TAG, "exception setting profile: " + e.getMessage() );   }
}

Please Register or Login to post a reply

2 Replies

E Efkan YILMAZ

I have not tried this,  but I'm wondering if you noticed this in the docs.  I think you need to do  another scanner.read() after you receive scan data to get the scanner lit back up.  It looks like the sameSymbolTimeout is a max of 5 seconds though,  so not sure it's going to always work the way you want it to.

ScannerConfig.ReaderParams.ReaderSpecific.ContinuousRead

1. After each successful read, the application will have to submit a new read for rapid triggering.

J Josh Fischer

I have tried this, but the problem is that is will scan the barcode multiple times a second.  I've also tried to raise the value in the same barcode timeout and the scanner will still scan the barcode repeatedly.

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