Activity Level

The Activity Level regroups the features that are related to the operation of using the scanner.

Enabling or Disabling a Barcode Symbology

In the event where there are several type of barcodes close to each other and to avoid scanning the wrong barcode, it might be useful to enable only the barcode symbology or symbologies the application needs. Enabling or Disabling a Barcode Symbology persists in the Scanner. It is best to first read if the Symbology is already enabled before trying to enable it. Here is a code showing how to enable a specific Barcode Symbology:

int symbologyId = ICaptureSymbology.Id.kCode128;
CaptureHelperDevice.SymbologyResult result = await Device.GetSymbologyAsync(symbologyId);
if (result.IsSuccessful())
{
    if (result.Status == CaptureHelperDevice.SymbologyResult.eStatus.disable)
    {
      CaptureHelper.AsyncResult resultSymbology =
          await Device.SetSymbologyAsync(index, true);
      if (!resultSymbology.IsSuccessful())
      {
          MessageBox.Show(
              "Unable to change the symbology state: " + resultSymbology.Result,
              "Error",
              MessageBoxButtons.OK,
              MessageBoxIcon.Error);
      }
    }
}

In this code Device is a CaptureHelperDevice object instance.

Scanning Through glossy surface such as a windshield

TBD

Scanning a computer screen

TBD

Stand Mode configuration

Some scanners support the Stand Mode; at this time, the S740, S760, D740, D750, D755, D760, D790 do support it. The Stand Mode defines the behavior of the scanner when it’s on or off the Charge Stand. There are 4 modes:

  • Mobile Mode: This is the default mode. In this mode the scanner works like a normal hand held scanner. The reading of a barcode is accomplished by pressing the trigger button. The scanner will try to connect to the host upon startup, until a timeout occurs.

  • Stand Mode: In Stand mode, the scanner is configured into presentation mode. The presentation mode automatically triggers a barcode read when a barcode is detected in front of the scanner without any other user intervention. In this mode the scanner will try indefinitely to connect to the host. It doesn’t have any timeout to shutdown or hibernate as it assumes it is always powered.

  • Detect Mode: The Detect mode requires a stand. When the scanner is in position in the stand it switches in presentation mode. A barcode can be automatically read just by presenting it in front of the scanner. The power off timer is disabled, and the scanner tries to connect to the host indefinitely. It can be removed from the stand and it will stay in presentation mode. Barcodes can be read without the need of pressing on the trigger button. Once off the stand, the power off timers become operational and if the scanner is not connected to a host, it will try to connect a few times before giving up.

  • Auto Mode: This mode is a mix of the Stand mode and the Mobile mode. It behaves as described in the Stand mode when the scanner is in position in the Charge Stand, and it behaves as described in the Mobile mode when the scanner is no longer in position in the stand and the user presses the trigger button. If the trigger button is never pressed while out of the stand, the scanner stays in presentation mode and automatically reads barcodes that are presented in front of it. As soon as the trigger button is pressed while the scanner is not in the stand, it switches to the Mobile mode. It switches back to the presentation mode as soon as it rests on the stand.

Following is a sample code that shows how to read the stand mode of a scanner, the result is displayed in a ComboBox:

CaptureHelperDevice.StandConfigurationResult standConfigResult = await Device.GetStandConfigurationAsync();
if (standConfigResult.IsSuccessful())
{
    comboBoxStandConfig.SelectedIndex = standConfigResult.StandConfiguration;
    OriginalStandConfig = standConfigResult.StandConfiguration;
    comboBoxStandConfig.Enabled = true;
}
else
{
    if (standConfigResult.Result == SktErrors.ESKT_NOTSUPPORTED)
    {
        MessageBox.Show(
            "This scanner does not support Stand Mode",
            "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    }
    else
    {
        MessageBox.Show(string.Format("Error trying to retrieve the Stand Mode: {0:d}", standConfigResult.Result),
            "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    }
}

Device in this code is CaptureHelperDevice object instance.

Add a Prefix or a Suffix

Some deployments require data to be appended to the decoded data either in front (prefix) or at the tail (suffix) of the decoded data.

As with many other scanner settings, the prefix and suffix are persistent in the scanner. It’s best to first read these settings before attempting to change them.

Here is sample code for reading the suffix of a scanner:

// ask for the Suffix
CaptureHelperDevice.StringResult resultSuffix = await Device.GetSuffixAsync();
textBoxSuffix.Text = EscapeCharacter(resultSuffix.Value);
OriginalPostamble = textBoxSuffix.Text;

In this code Device is a CaptureHelperDevice object instance.

Note

Some Prefix or Suffix characters can be not displayable and that is why the EscapeCharacter is a method to translate the various \r \n \t into a string as "\r" "\n" and "\t" respectively.

And here is sample code to set a suffix into a scanner:

string finalSuffix = ConvertEscapeCharacter(textBoxSuffix.Text);
CaptureHelper.AsyncResult result = await Device.SetSuffixAsync(finalSuffix);
if (result.IsSuccessful())
{
    OriginalPostamble = textBoxSuffix.Text;
}
else
{
    MessageBox.Show(string.Format("Error trying to change the suffix: {0:d}", result.Result),
        "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    textBoxSuffix.Text = OriginalPostamble;
}

In this code Device is a CaptureHelperDevice object instance.

Note

Since some characters are not displayable they have been escaped and the ConvertEscapeCharacter is a method to translate the various "\r" "\n" and "\t" into a string as \r \n and \t respectively.

Triggering a Scanner

In some cases it could be convenient to present a Trigger button in the UI (on the screen). Here is a sample of a button handler to trigger a scan:

private async void buttonTrigger_Click(object sender, EventArgs e)
{
    buttonTrigger.Enabled = false;
    await Device.SetTriggerStartAsync();
    buttonTrigger.Enabled = true;
}

Device is a CaptureHelperDevice object instance.

Note

The Scanner Trigger Button can also be disabled or enabled. Please refer to Disable the Trigger Scanner Button.