This function checks whether the scan engine is off.

Syntax

int IsScannerOff(void);

Parameters

None

Return value

Zero when the scan engine is on, a non-zero positive integer when the scan engine is off.

Remarks

Inspect the operating status of the scanner module

Requirements

Header file:
lib.h
Library 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;
    GotoXY(0,0);
    Cursor(BLINKING);

    for(;;)
    {
        if (!IsScannerOff())
        {
            ResetKey();
            if (ReadBarcode(&code)==OK)
            {
                GoodReadLed(GREEN,TIME_100MS * 2);
                Sound(TSTANDARD,VHIGH,SMEDIUM,SHIGH,0);
                ScannerPower(ON,TIME_100MS * 50);
                GotoXY(0,0);
                printf("%s",code.text);
            }
        }
        else
        {
            ScannerPower(ON, TIME_100MS * 50);
        }
    }
}

Last updated: 2020/10/02