System settings are used to change the reading behavior of the handheld terminal.
Syntax
int SystemSetting(
const char *option_string
);
Parameters
- option_string
-
[in] Specifies a pointer to a system setting string.
For 2 characters, set as it is.
For 3 characters, add "[" to the beginning of the command.
For 4 characters, add "]" at the beginning of the command.
For 5 characters, add "{" at the beginning of the command.
For 6 characters, add "}" at the beginning of the command.
Return value
Returns OK if the function succeeds, ERROR otherwise.
Value | Description |
---|---|
OK | Option code is supported and set. |
ERROR | Option code is not supported. |
Remarks
Please refer to Barcode length settings and Barcode reader settings for available settings.
This function can support multiple commands specified in option_string at once.
For example, SystemSetting ("B0B2R4") allows you to read Code 39 and JAN.
The settings made by this API are not saved. Make the necessary settings each time you start up.
In addition, this setting reflects the setting changed by our menu bar code.
We recommend that you initialize it with U2 for the first time.
This function can support multiple commands specified in option_string at once.
For example, SystemSetting ("B0B2R4") allows you to read Code 39 and JAN.
The settings made by this API are not saved. Make the necessary settings each time you start up.
In addition, this setting reflects the setting changed by our menu bar code.
We recommend that you initialize it with U2 for the first time.
Requirements
Header file:
lib.hLibrary file:
libSTARTUPOPH5000.a
Sample
#include <stdio.h>
#include "lib.h"
void main( void )
{
char bcr_buf[42];
struct barcode code;
code.min = 1;
code.max = 41;
code.text = bcr_buf;
SystemSetting("U2"); // set barcode default setting.
for(;;)
{
if( !IsScannerOff())
{
if( ReadBarcode( &code ) == OK)
{
if (((code.id == CODABAR) ||
(code.id == I2OF5) ||
(code.id == D2OF5)) &&
(code.length > 5))
{
GoodReadLed( RED, 10);
Sound( TSTANDARD, VHIGH, SMEDIUM, SHIGH, 0);
Vibrate( TSTANDARD, VIB_POWER_MID );
ScannerPower( OFF, 0);
printf("%s\n",code.text);
}
}
}
else
{
Delay( 50 );
ScannerPower( ON, 250);
}
Idle();
}
}
Last updated: 2020/10/02