
PT-20 Programming Guide
InitScanner1( );
while(1)
{
if (Decode())
SleepScanner1(TRUE);
while(_getchar()==0);
SleepScanner1(FALSE);
}
Use SleepScanner1 function to set scanner in sleep mode. You have not
to initial scanner again, and it would be scan again.
Stop the scanner port from operating.
Use HaltScanner1 function to stop scanner port from operating. To
restart a halted scanner port, the initialization function, InitScanner1,
must be called. It is recommended that the scanner port should be
stopped if the barcode decoding is not required for a long period of time.
To check the scan key status.
if (TriggerStatus( ))
_printf_color(COLOR_RED, “Scan key pressed!”);
This function can check the scan key status, if pressed scan key, this
function will return 1, else will return 0.
0:Scan key is not pressed.
1:Scan key is pressed.
Set scanner setting to default.
If (Scanner_Reset())
_printf_color(COLOR_RED, “Scan module reset OK!”);
Commentaires sur ces manuels